|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--at.dms.util.Utils | +--at.dms.compiler.Phylum | +--at.dms.kjc.JPhylum | +--at.dms.kjc.JLocalVariable
This class represents a local variable.
Field Summary | |
static int |
DES_CATCH_PARAMETER
Description: catch parameter. |
static int |
DES_GENERATED
Description: synthetic/generated local variable. |
static int |
DES_LOCAL_VAR
Description: local variable. |
static int |
DES_PARAMETER
Description: method parameter. |
protected JExpression |
initializer
Initializer of local var. |
protected int |
modifiers
Modifiers for local var (final) |
protected java.lang.String |
name
Name of local var. |
protected CType |
type
Type of local var. |
Fields inherited from class at.dms.util.Utils |
DBG_LEVEL_HIGH, DBG_LEVEL_LOW, DBG_LEVEL_NO |
Fields inherited from interface at.dms.kjc.Constants |
CMP_VERSION, JAV_CLASS, JAV_CLONE, JAV_CLONEABLE, JAV_CONSTRUCTOR, JAV_ERROR, JAV_EXCEPTION, JAV_INIT, JAV_LENGTH, JAV_NAME_SEPARATOR, JAV_OBJECT, JAV_OUTER_THIS, JAV_RUNTIME, JAV_RUNTIME_EXCEPTION, JAV_STATIC_INIT, JAV_STRING, JAV_STRINGBUFFER, JAV_THIS, JAV_THROWABLE, OPE_BAND, OPE_BNOT, OPE_BOR, OPE_BSR, OPE_BXOR, OPE_EQ, OPE_GE, OPE_GT, OPE_LE, OPE_LNOT, OPE_LT, OPE_MINUS, OPE_NE, OPE_PERCENT, OPE_PLUS, OPE_POSTDEC, OPE_POSTINC, OPE_PREDEC, OPE_PREINC, OPE_SIMPLE, OPE_SL, OPE_SLASH, OPE_SR, OPE_STAR, TID_ARRAY, TID_BOOLEAN, TID_BYTE, TID_CHAR, TID_CLASS, TID_DOUBLE, TID_FLOAT, TID_INT, TID_LONG, TID_SHORT, TID_VOID |
Constructor Summary | |
JLocalVariable(TokenReference where,
int modifiers,
int desc,
CType type,
java.lang.String name,
JExpression initializer)
Constructs a local variable reference. |
Method Summary | |
boolean |
equals(java.lang.Object o)
|
void |
genLoad(CodeSequence code)
Generates a sequence of bytecode to load the value of the variable on the stack |
void |
genStore(CodeSequence code)
Generates a sequence of bytecodes |
int |
getDescription()
|
java.lang.String |
getIdent()
|
int |
getIndex()
|
int |
getModifiers()
|
int |
getPosition()
|
CType |
getType()
|
JExpression |
getValue()
|
boolean |
isAssigned()
|
boolean |
isConstant()
|
boolean |
isFinal()
Returns if this variable is final |
boolean |
isGenerated()
Returns the variable definied by this formal parameter |
boolean |
isLoopVariable()
|
boolean |
isStatic()
Returns if this variable is static |
boolean |
isUsed()
|
void |
setAssigned(TokenReference ref,
CBodyContext context)
|
void |
setConstructorClass(CClass clazz)
... |
void |
setIndex(int index)
|
void |
setIsLoopVariable()
|
void |
setPosition(int position)
|
void |
setUsed()
|
void |
unsetIsLoopVariable()
|
Methods inherited from class at.dms.kjc.JPhylum |
accept, check, check, check, check, fail |
Methods inherited from class at.dms.compiler.Phylum |
getTokenReference, setTokenReference |
Methods inherited from class at.dms.util.Utils |
assert, assert, fail, fail, hasFlag, hasMoreThanOneFlag, hasOtherFlags, splitQualifiedName, splitQualifiedName, vectorToArray, vectorToIntArray |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final int DES_LOCAL_VAR
public static final int DES_PARAMETER
public static final int DES_CATCH_PARAMETER
public static final int DES_GENERATED
protected int modifiers
protected java.lang.String name
protected CType type
protected JExpression initializer
Constructor Detail |
public JLocalVariable(TokenReference where, int modifiers, int desc, CType type, java.lang.String name, JExpression initializer)
modifiers
- the modifiers on this variablename
- the name of this variabletype
- the type of this variablevalue
- the initial valuewhere
- the location of the declaration of this variableMethod Detail |
public void setConstructorClass(CClass clazz)
public boolean isFinal()
public boolean isStatic()
public boolean isGenerated()
public int getModifiers()
public java.lang.String getIdent()
public CType getType()
public JExpression getValue()
public boolean isConstant()
public int getIndex()
public void setIndex(int index)
public int getDescription()
public int getPosition()
public void setPosition(int position)
public void setUsed()
public boolean isUsed()
public void setAssigned(TokenReference ref, CBodyContext context)
public boolean isAssigned()
public void setIsLoopVariable()
public void unsetIsLoopVariable()
public boolean isLoopVariable()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public void genLoad(CodeSequence code)
code
- the code sequencepublic void genStore(CodeSequence code)
code
- the code sequence
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |