|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectTranslate.Frame
Mips.Frame
public class Frame
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class Translate.Frame |
|---|
Frame.Access |
| Field Summary | |
|---|---|
Temp |
RV
|
| Fields inherited from class Translate.Frame |
|---|
formals, maxArgsOut, name |
| Constructor Summary | |
|---|---|
Frame()
|
|
| Method Summary | |
|---|---|
Frame.Access |
allocFormal(Temp t)
Allocate a formal parameter represented by temporary t. |
Frame.Access |
allocLocal(Temp t)
Allocate a local variable represented by temporary t. |
Temp.Label |
badPtr()
Get the label to branch to for null pointers |
Temp.Label |
badSub()
Get the label to branch to for bad subscripts |
Tree.Visitor<java.util.LinkedList<Instr>,Temp> |
codegen()
Obtain a code generator visitor for the target, producing a list of assembler instructions. |
Tree.Exp |
external(java.lang.String s)
Get a reference to an external procedure. |
Frame |
mainFrame()
The frame of the C main procedure. |
Frame |
newFrame(java.lang.String name)
Factory for obtaining concrete instances of the target frame. |
void |
procEntryExit1(java.util.LinkedList<Tree.Stm> body)
Wrap the statement tree body of a procedure with entry/exit after translation. |
void |
procEntryExit2(java.util.LinkedList<Instr> insns)
Wrap the assembly body of a procedure with entry/exit after code generation. |
void |
procEntryExit3(java.util.LinkedList<Instr> insns,
Temp.Map map)
Wrap the assembly body of a procedure with entry/exit after register allocation. |
java.lang.String |
record(Temp.Label lab,
int words)
Allocate a zeroed static record |
Temp[] |
registers()
The registers supported by this target. |
Tree.Exp |
RV()
An expression for the return value of this frame. |
java.lang.String |
string(Temp.Label lab,
java.lang.String string)
Allocate an initialized static string literal. |
java.lang.String |
vtable(Temp.Label lab,
java.util.Collection<Temp.Label> values)
Allocate and initialize a static virtual dispatch table |
int |
wordSize()
The word size (in bytes) of this target. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public Temp RV
| Constructor Detail |
|---|
public Frame()
| Method Detail |
|---|
public Frame newFrame(java.lang.String name)
Frame
newFrame in class Framename - the name of the method
public Frame mainFrame()
Frame
mainFrame in class Framepublic int wordSize()
Frame
wordSize in class Framepublic Frame.Access allocFormal(Temp t)
Frame
allocFormal in class Framepublic Frame.Access allocLocal(Temp t)
Frame
allocLocal in class Framepublic Temp[] registers()
Frame
registers in class Framepublic Tree.Exp RV()
Frame
RV in class Framepublic Tree.Exp external(java.lang.String s)
Frame
external in class Frame
public java.lang.String string(Temp.Label lab,
java.lang.String string)
Frame
string in class Framelab - the label to use for the stringstring - the value of the literal
public java.lang.String record(Temp.Label lab,
int words)
Frame
record in class Framelab - the label to use for the recordwords - the size of the record in words
public java.lang.String vtable(Temp.Label lab,
java.util.Collection<Temp.Label> values)
Frame
vtable in class Framelab - the label to use for the recordvalues - the labels of the methods in the table
public Temp.Label badPtr()
Frame
badPtr in class Framepublic Temp.Label badSub()
Frame
badSub in class Framepublic void procEntryExit1(java.util.LinkedList<Tree.Stm> body)
Frame
procEntryExit1 in class Framebody - the procedure bodypublic Tree.Visitor<java.util.LinkedList<Instr>,Temp> codegen()
Frame
codegen in class Framepublic void procEntryExit2(java.util.LinkedList<Instr> insns)
Frame
procEntryExit2 in class Frameinsns - the procedure body
public void procEntryExit3(java.util.LinkedList<Instr> insns,
Temp.Map map)
Frame
procEntryExit3 in class Frameinsns - the procedure bodymap - the register allocation mapping temporaries to hard
registers
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||