|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--comp.Node
The superclass of all AST Nodes.
Field Summary | |
(package private) static Assembler |
asm
|
(package private) static Scope |
globalScope
There is one global scope. |
(package private) static int |
labelCount
|
(package private) static java.util.Map |
strings
A table of static strings. |
Constructor Summary | |
Node()
|
Method Summary | |
void |
addDefs(Scope s)
Add any variable definitions made by this node to the given scope. |
(package private) static void |
addString(java.lang.String label,
java.lang.String s)
|
abstract void |
asHTML(java.io.PrintStream out)
For printing the AST to HTML. |
(package private) abstract java.lang.String |
codeGen(Scope scope,
RegBank bank)
Generate code for this node. |
(package private) static java.lang.String |
getLabel()
|
java.lang.String |
lvalue(Scope scope,
RegBank bank)
Answer a register that holds a pointer to this node's value. |
static void |
reset()
Clears global counters and string table. |
java.lang.String |
rvalue(Scope scope,
RegBank bank)
Answer a register that holds this node's value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static Assembler asm
static int labelCount
static Scope globalScope
static java.util.Map strings
Constructor Detail |
public Node()
Method Detail |
static java.lang.String getLabel()
static void addString(java.lang.String label, java.lang.String s)
public static void reset()
abstract java.lang.String codeGen(Scope scope, RegBank bank)
public void addDefs(Scope s)
public abstract void asHTML(java.io.PrintStream out)
public java.lang.String lvalue(Scope scope, RegBank bank)
public java.lang.String rvalue(Scope scope, RegBank bank)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |