frame
Class Frame

java.lang.Object
  extended by frame.Frame
All Implemented Interfaces:
temp.TempMap
Direct Known Subclasses:
Frame

public abstract class Frame
extends java.lang.Object
implements temp.TempMap


Field Summary
 List<frame.Access> formals
           
 temp.Label name
           
 
Constructor Summary
Frame()
           
 
Method Summary
abstract  frame.Access allocLocal(boolean escapes)
           
abstract  List<temp.Temp> calleeDefs()
           
abstract  List<Instr> codegen(List<Stm> body)
           
abstract  Exp externalCall(java.lang.String s, List<Exp> args)
           
abstract  temp.Temp FP()
           
abstract  Frame newFrame(temp.Label name, List<java.lang.Boolean> formals)
           
abstract  Stm procEntryExit1(Exp body)
           
abstract  List<Instr> procEntryExit2(List<Instr> body)
           
abstract  frame.Proc procEntryExit3(List<Instr> body)
           
abstract  List<temp.Temp> registers()
           
abstract  temp.Temp RV()
           
abstract  temp.Temp SP()
           
abstract  int wordsize()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface temp.TempMap
tempMap
 

Field Detail

name

public temp.Label name

formals

public List<frame.Access> formals
Constructor Detail

Frame

public Frame()
Method Detail

newFrame

public abstract Frame newFrame(temp.Label name,
                               List<java.lang.Boolean> formals)

allocLocal

public abstract frame.Access allocLocal(boolean escapes)

wordsize

public abstract int wordsize()

SP

public abstract temp.Temp SP()
Returns:
Registrador que guarda o stack pointer

FP

public abstract temp.Temp FP()
Returns:
Registrador que guarda o frame pointer

externalCall

public abstract Exp externalCall(java.lang.String s,
                                 List<Exp> args)

RV

public abstract temp.Temp RV()
Returns:
Registrador que guarda o valor de retorno de uma função

procEntryExit1

public abstract Stm procEntryExit1(Exp body)

procEntryExit2

public abstract List<Instr> procEntryExit2(List<Instr> body)

procEntryExit3

public abstract frame.Proc procEntryExit3(List<Instr> body)

codegen

public abstract List<Instr> codegen(List<Stm> body)

registers

public abstract List<temp.Temp> registers()

calleeDefs

public abstract List<temp.Temp> calleeDefs()
Returns:
Lista de registradores "callee def".