comp
Class ArrayRefNode

java.lang.Object
  |
  +--comp.Node
        |
        +--comp.ExprNode
              |
              +--comp.ArrayRefNode

class ArrayRefNode
extends ExprNode

An array reference expression.


Field Summary
(package private)  ExprNode index
           
(package private)  ExprNode left
           
 
Fields inherited from class comp.Node
asm, globalScope, labelCount, strings
 
Constructor Summary
ArrayRefNode(ExprNode left, ExprNode index)
           
 
Method Summary
 void asHTML(java.io.PrintStream out)
          Process this node.
 java.lang.String codeGen(Scope scope, RegBank bank)
          Read the array reference.
 Type getType(Scope s)
           
 java.lang.String lvalue(Scope scope, RegBank bank)
          Returns the address of this array reference.
 java.lang.String toString()
           
 
Methods inherited from class comp.Node
addDefs, addString, getLabel, reset, rvalue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

left

ExprNode left

index

ExprNode index
Constructor Detail

ArrayRefNode

public ArrayRefNode(ExprNode left,
                    ExprNode index)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getType

public Type getType(Scope s)
Overrides:
getType in class ExprNode

codeGen

public java.lang.String codeGen(Scope scope,
                                RegBank bank)
Read the array reference.

Specified by:
codeGen in class Node

lvalue

public java.lang.String lvalue(Scope scope,
                               RegBank bank)
Returns the address of this array reference.

Overrides:
lvalue in class Node

asHTML

public void asHTML(java.io.PrintStream out)
Process this node.

Specified by:
asHTML in class Node