jellyj.syntaxtree
Class AllocationExpNode
jellyj.syntaxtree.SyntaxTreeNode
|
+--jellyj.syntaxtree.ExpressionNode
|
+--jellyj.syntaxtree.AllocationExpNode
- public class AllocationExpNode
- extends ExpressionNode
Field Summary |
Vector | args_d An ExpressionNode vector for each dimension or for each
actual parameter of the class constructor. |
boolean | array_d This flag determines if the parameters in the args_d vector
correspond to an array allocation or a constructor call. |
Symbol | className_d Here we keep the type name to which the invoked constructor belongs. |
int | dims_d The number of non-empty dimensions being specified. |
Type | etype_d Type of elements allocated. |
MethodDeclarationNode | mnode_d A pointer to the constructor's declaration node. |
Methods inherited from class jellyj.syntaxtree.ExpressionNode |
addFalseList, addTrueList, appendToFalseList, appendToTrueList, backPatch, desynthesize, evaluate, evaluateExp, leftValue, lookupPrimop, superExp, synthesize, thisExp, thisOrSuperExp, translateSynthesized, type, typeExp, variableExp |
args_d
public Vector args_d
- An ExpressionNode vector for each dimension or for each
actual parameter of the class constructor. Empty expressions
in array allocations like a[4][][] are filled with refs to
the NullLiteral.
array_d
public boolean array_d
- This flag determines if the parameters in the args_d vector
correspond to an array allocation or a constructor call.
className_d
public Symbol className_d
- Here we keep the type name to which the invoked constructor belongs.
dims_d
public int dims_d
- The number of non-empty dimensions being specified. This is
calculated by the typeCheck() method.
etype_d
public Type etype_d
- Type of elements allocated. The final type is determined by
typeCheck() and set in the corresponding base class field.
mnode_d
public MethodDeclarationNode mnode_d
- A pointer to the constructor's declaration node.
AllocationExpNode
public AllocationExpNode(Type type, Vector args, boolean array)
translate
public void translate(ClassGen classGen, MethodGen methodGen)
typeCheck
public Type typeCheck(SymbolTable stable)
throws jellyj.util.TypeCheckError
to Class jellyj.util.Type- Type of elements allocated. The final type is determined by
typeCheck() and set in the corresponding base class field.
to Class java.util.Vector
- An ExpressionNode vector for each dimension or for each
actual parameter of the class constructor. Empty expressions
in array allocations like a[4][][] are filled with refs to
the NullLiteral.
to Class jellyj.syntaxtree.MethodDeclarationNode
- A pointer to the constructor's declaration node.
to Class jellyj.util.Symbol
- Here we keep the type name to which the invoked constructor belongs.