jellyj.syntaxtree
Class AllocationExpNode

jellyj.syntaxtree.SyntaxTreeNode
  |
  +--jellyj.syntaxtree.ExpressionNode
        |
        +--jellyj.syntaxtree.AllocationExpNode

public class AllocationExpNode
extends ExpressionNode


Field Summary
 Vectorargs_d
          An ExpressionNode vector for each dimension or for each actual parameter of the class constructor.
 booleanarray_d
          This flag determines if the parameters in the args_d vector correspond to an array allocation or a constructor call.
 SymbolclassName_d
          Here we keep the type name to which the invoked constructor belongs.
 intdims_d
          The number of non-empty dimensions being specified.
 Typeetype_d
          Type of elements allocated.
 MethodDeclarationNodemnode_d
          A pointer to the constructor's declaration node.

Fields inherited from class jellyj.syntaxtree.ExpressionNode
falseList_d, leftValue_d, statementExp_d, trueList_d, type_d

Fields inherited from class jellyj.syntaxtree.SyntaxTreeNode
column_d, line_d

Constructor Summary
AllocationExpNode(Type type, Vector args, boolean array)
           

Method Summary
 voidtranslate(ClassGen classGen, MethodGen methodGen)
           
 TypetypeCheck(SymbolTable stable)
           

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

Field Detail

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.
Constructor Detail

AllocationExpNode

public AllocationExpNode(Type type, Vector args, boolean array)
Method Detail

translate

public void translate(ClassGen classGen, MethodGen methodGen)

typeCheck

public Type typeCheck(SymbolTable stable)
throws jellyj.util.TypeCheckError

Association Links

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.