|
||||||||||
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.JStatement
The root class for all statements. (JLS 14.4)
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 | |
JStatement(TokenReference where,
JavaStyleComment[] comments)
Construct a node in the parsing tree |
Method Summary | |
void |
accept(KjcVisitor p)
Accepts the specified visitor. |
boolean |
acceptsBreak()
Returns true iff this statement is a possible target for a break statement. |
boolean |
acceptsContinue()
Returns true iff this statement is a possible target for a continue statement. |
void |
addBreak(CBodyContext context)
Informs statement that there is at least one break to it. |
void |
addContinue(CBodyContext context)
Informs statement that there is at least one continue to it. |
void |
checkBody(CBodyContext context)
Check statement. |
abstract void |
checkStatement(CBodyContext context)
Check statement. |
protected void |
fail(CContext context,
MessageDescription key,
java.lang.Object[] params)
Adds a compiler error. |
abstract void |
genCode(CodeSequence code)
Generates a sequence of bytecodes. |
CodeLabel |
getBreakLabel()
Returns a label at end of this statement (for break statement) |
JavaStyleComment[] |
getComments()
Returns the comments. |
CodeLabel |
getContinueLabel()
Returns the beginning of this block (for continue statement) |
Methods inherited from class at.dms.kjc.JPhylum |
check, check, check, check |
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 |
|
Constructor Detail |
public JStatement(TokenReference where, JavaStyleComment[] comments)
where
- the line of this node in the source codeMethod Detail |
public void checkBody(CBodyContext context) throws PositionedError
context
- the actual context of analysePositionedError
- if the check failspublic abstract void checkStatement(CBodyContext context) throws PositionedError
context
- the actual context of analysePositionedError
- if the check failsUnpositionedError
- this error will be positioned soonprotected void fail(CContext context, MessageDescription key, java.lang.Object[] params) throws PositionedError
fail
in class JPhylum
context
- the context in which the error occurredkey
- the message ident to be displayedparams
- the array of parameterspublic boolean acceptsBreak()
public boolean acceptsContinue()
public CodeLabel getBreakLabel()
public CodeLabel getContinueLabel()
public void addBreak(CBodyContext context)
public void addContinue(CBodyContext context)
public abstract void genCode(CodeSequence code)
code
- The code list.public void accept(KjcVisitor p)
accept
in class JPhylum
p
- The visitor.public JavaStyleComment[] getComments()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |