comp
Class Type
java.lang.Object
|
+--comp.Type
- Direct Known Subclasses:
- CharType, IntType, PointerType
- public abstract class Type
- extends java.lang.Object
Represents a type in our language. Currently we support only
the following types: int, char, int*, char*, int[], and char[].
- Version:
- $Id: Type.java,v 1.5 2002/05/10 22:49:25 dugan Exp $
Field Summary |
protected java.lang.String |
name
|
protected int |
size
|
Constructor Summary |
Type()
|
Method Summary |
java.lang.String |
emitArrayOffset(Assembler asm,
java.lang.String indexReg)
|
int |
getLayoutSize()
|
java.lang.String |
lValue(Assembler asm,
java.lang.String dest,
int off)
|
java.lang.String |
lValueGlobal(Assembler asm,
java.lang.String dest,
java.lang.String label)
|
java.lang.String |
rValue(Assembler asm,
java.lang.String dest,
int offset,
java.lang.String baseReg)
|
java.lang.String |
rValueGlobal(Assembler asm,
java.lang.String dest,
java.lang.String label)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
size
protected int size
name
protected java.lang.String name
Type
public Type()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
emitArrayOffset
public java.lang.String emitArrayOffset(Assembler asm,
java.lang.String indexReg)
rValue
public java.lang.String rValue(Assembler asm,
java.lang.String dest,
int offset,
java.lang.String baseReg)
lValue
public java.lang.String lValue(Assembler asm,
java.lang.String dest,
int off)
rValueGlobal
public java.lang.String rValueGlobal(Assembler asm,
java.lang.String dest,
java.lang.String label)
lValueGlobal
public java.lang.String lValueGlobal(Assembler asm,
java.lang.String dest,
java.lang.String label)
getLayoutSize
public int getLayoutSize()