|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cs132.vapor.ast.Node cs132.vapor.ast.VTarget cs132.vapor.ast.VFunction
public class VFunction
A function definition.
Nested Class Summary | |
---|---|
static class |
VFunction.Stack
The details of a function's stack space declaration. |
Field Summary | |
---|---|
VInstr[] |
body
The function body is just a list of instructions. |
int |
index
All functions in a single program are assigned an index contiguously, starting from zero. |
VCodeLabel[] |
labels
The function's list of code labels. |
VVarRef.Local[] |
params
The function's parameter list. |
VFunction.Stack |
stack
The function's stack declaration. |
String[] |
vars
The full list of local variables used in this function. |
Fields inherited from class cs132.vapor.ast.VTarget |
---|
ident |
Fields inherited from class cs132.vapor.ast.Node |
---|
sourcePos |
Constructor Summary | |
---|---|
VFunction(SourcePos sourcePos,
String ident,
int index,
VVarRef.Local[] params,
VFunction.Stack stack)
|
Method Summary |
---|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final int index
public final VVarRef.Local[] params
public VCodeLabel[] labels
public final VFunction.Stack stack
[in 1, out 2, local 0]
.
public VInstr[] body
labels
array.
public String[] vars
VVarRef.Local
nodes
have an index that point into this array.
Constructor Detail |
---|
public VFunction(SourcePos sourcePos, String ident, int index, VVarRef.Local[] params, VFunction.Stack stack)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |