LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
|
Fragment for some code `data'. More...
#include <fragment.hh>
Public Member Functions | |
virtual std::ostream & | dump (std::ostream &o) const override |
Display this fragment. | |
Constructor and Destructor. | |
ProcFrag (const temp::Label &label, const misc::symbol &name, const rStm &body, const frame::Frame *frame) | |
~ProcFrag () | |
Accessors. | |
temp::Label | label_get () const |
Code label. | |
const misc::symbol & | name_get () const |
Procedure name. | |
rStm | body_get () const |
Body. | |
void | body_set (const rStm &body) |
const frame::Frame & | frame_get () const |
Procedure frame. | |
Visitors entry point. | |
virtual void | accept (Visitor &v) override |
Accept a Visitor v. | |
virtual void | accept (ConstVisitor &v) const override |
Private Attributes | |
temp::Label | label_ |
This function's label. | |
const misc::symbol | name_ |
The function's original (possibly ambiguous) name. | |
rStm | body_ |
The function's body. | |
const frame::Frame * | frame_ |
The frame, including accesses to locals and formals. | |
temp::Temp | save_fp_ |
To save/restore the frame pointer. |
Fragment for some code `data'.
Procedures need a LABEL, so that we can jump to them, a BODY to execute, but also details in the prologue and the epilogue which depend upon the content of the frame of the function. So we also need to store its FRAME.
|
inline |
|
inline |
References frame_.
|
overridevirtual |
Accept a Visitor v.
Implements tree::Fragment.
|
overridevirtual |
Implements tree::Fragment.
|
inline |
|
inline |
References body_.
Referenced by canon::canonicalize().
|
overridevirtual |
Display this fragment.
Implements tree::Fragment.
|
inline |
Procedure frame.
References frame_.
|
inline |
Code label.
References label_.
|
inline |
Procedure name.
References name_.
|
private |
The function's body.
Referenced by body_get(), and body_set().
|
private |
The frame, including accesses to locals and formals.
Referenced by frame_get(), and ~ProcFrag().
|
private |
This function's label.
Referenced by label_get().
|
private |
The function's original (possibly ambiguous) name.
Referenced by name_get().
|
private |
To save/restore the frame pointer.