All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class espresso.syntaxtree.AllocationExpNode

java.lang.Object
   |
   +----espresso.syntaxtree.SyntaxTreeNode
           |
           +----espresso.syntaxtree.ExpressionNode
                   |
                   +----espresso.syntaxtree.AllocationExpNode

public class AllocationExpNode
extends ExpressionNode

Variable Index

 o args_d
An ExpressionNode vector for each dimension or for each actual parameter of the class constructor.
 o array_d
This flag determines if the parameters in the args_d vector correspond to an array allocation or a constructor call.
 o className_d
Here we keep the type name to which the invoked constructor belongs.
 o dims_d
The number of non-empty dimensions being specified.
 o etype_d
Type of elements allocated.
 o mnode_d
A pointer to the constructor's declaration node.

Constructor Index

 o AllocationExpNode(Type, Vector, boolean)

Method Index

 o castArguments(Vector)
 o translate(ClassGen, MethodGen)
 o typeCheck(SymbolTable)
 o typeCheckArgs(SymbolTable)

Variables

 o 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.

 o 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.

 o dims_d
 public int dims_d
The number of non-empty dimensions being specified. This is calculated by the typeCheck() method.

 o 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.

 o mnode_d
 public MethodDeclarationNode mnode_d
A pointer to the constructor's declaration node.

 o className_d
 public Symbol className_d
Here we keep the type name to which the invoked constructor belongs.

Constructors

 o AllocationExpNode
 public AllocationExpNode(Type type,
                          Vector args,
                          boolean array)

Methods

 o castArguments
 private void castArguments(Vector argsType)
 o typeCheckArgs
 private Vector typeCheckArgs(SymbolTable stable) throws TypeCheckError
 o typeCheck
 public Type typeCheck(SymbolTable stable) throws TypeCheckError
Overrides:
typeCheck in class ExpressionNode
 o translate
 public void translate(ClassGen classGen,
                       MethodGen methodGen)
Overrides:
translate in class ExpressionNode

All Packages  Class Hierarchy  This Package  Previous  Next  Index