comp
Class ArrayType

java.lang.Object
  |
  +--comp.Type
        |
        +--comp.PointerType
              |
              +--comp.ArrayType

class ArrayType
extends PointerType


Field Summary
(package private)  Type base
           
(package private)  int length
           
 
Fields inherited from class comp.Type
name, size
 
Constructor Summary
ArrayType(Type base, int length)
           
 
Method Summary
 java.lang.String emitArrayOffset(Assembler asm, java.lang.String indexReg)
           
 int getLayoutSize()
           
 java.lang.String rValue(Assembler asm, java.lang.String dest, int off, java.lang.String base)
           
 java.lang.String rValueGlobal(Assembler asm, java.lang.String dest, java.lang.String label)
           
 
Methods inherited from class comp.Type
lValue, lValueGlobal, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

length

int length

base

Type base
Constructor Detail

ArrayType

public ArrayType(Type base,
                 int length)
Method Detail

getLayoutSize

public int getLayoutSize()
Overrides:
getLayoutSize in class Type

rValue

public java.lang.String rValue(Assembler asm,
                               java.lang.String dest,
                               int off,
                               java.lang.String base)
Overrides:
rValue in class PointerType

rValueGlobal

public java.lang.String rValueGlobal(Assembler asm,
                                     java.lang.String dest,
                                     java.lang.String label)
Overrides:
rValueGlobal in class PointerType

emitArrayOffset

public java.lang.String emitArrayOffset(Assembler asm,
                                        java.lang.String indexReg)
Overrides:
emitArrayOffset in class Type