|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.Utils
org.multijava.util.compiler.Phylum
org.multijava.mjc.JPhylum
org.multijava.mjc.JExpression
org.multijava.mjc.MJWarnExpression
This AST node is used to enable or disable the compile-time and run-time checking of integral arithmetic overflow.
| Field Summary | |
private boolean |
enable_safe_math
|
private JExpression |
operand
|
private String |
operatorName
|
private boolean |
scope_is_one_op
|
| Fields inherited from class org.multijava.mjc.JExpression |
EMPTY |
| Fields inherited from class org.multijava.util.compiler.Phylum |
|
| Fields inherited from class org.multijava.util.Utils |
DBG_LEVEL_HIGH, DBG_LEVEL_LOW, DBG_LEVEL_NO |
| Constructor Summary | |
MJWarnExpression(TokenReference where,
String operatorName,
JExpression operand,
boolean enable_safe_math)
Construct a node in the parsing tree. |
|
MJWarnExpression(TokenReference where,
String operatorName,
JExpression operand,
boolean enable_safe_math,
boolean scope_is_one_op)
Construct a node in the parsing tree. |
|
| Method Summary | |
void |
accept(MjcVisitor p)
Accepts the specified visitor |
JExpression |
expr()
|
void |
genCode(CodeSequence code)
Generates a sequence of bytecodes |
CType |
getType()
Compute the type of this expression (called after parsing) |
boolean |
isNonNull(CExpressionContextType context)
Returns true iff the value represented by this expression is non-null |
String |
operatorName()
|
private void |
partly_desugar(CExpressionContextType context)
Requires this.scope_is_one_op. |
String |
toString()
|
JExpression |
typecheck(CExpressionContextType context)
Typechecks the expression and mutates the context to record information gathered during typechecking. |
private JExpression |
wrap(JExpression e)
|
| Methods inherited from class org.multijava.mjc.JExpression |
buildUniverseDynChecks, clone, convertType, dumpArray, fail, genBranch, genUniverseDynCheckCode, getApparentType, getBooleanLiteral, getFANonNulls, getFANulls, getLiteral, getNumberLiteral, getOrdinalLiteral, getRealLiteral, getStringLiteral, isAssignableTo, isBooleanLiteral, isConstant, isDeclaredNonNull, isLiteral, isMaybeInitializable, isNonNull, isOrdinalLiteral, isRealLiteral, isStatementExpression, isStringLiteral, typecheck, unParenthesize |
| Methods inherited from class org.multijava.mjc.JPhylum |
check, check, check, check, fail, fail, warn, warn, warn, warn |
| Methods inherited from class org.multijava.util.compiler.Phylum |
getTokenReference, setTokenReference |
| Methods inherited from class org.multijava.util.Utils |
assertTrue, assertTrue, combineArrays, escapeString, escapeString, fail, fail, getFilePath, hasFlag, hasOtherFlags, parsePathParts, relativePathTo, splitQualifiedName, splitQualifiedName, stripJavaModifiers, stripNonJavaModifiers, stripPrivateModifier, unescapeString, vectorToArray, vectorToIntArray |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private String operatorName
private JExpression operand
private boolean scope_is_one_op
private boolean enable_safe_math
| Constructor Detail |
public MJWarnExpression(TokenReference where,
String operatorName,
JExpression operand,
boolean enable_safe_math)
where - the line of this node in the source code
public MJWarnExpression(TokenReference where,
String operatorName,
JExpression operand,
boolean enable_safe_math,
boolean scope_is_one_op)
where - the line of this node in the source code| Method Detail |
public JExpression expr()
public String operatorName()
public String toString()
toString in class Objectpublic CType getType()
public boolean isNonNull(CExpressionContextType context)
public JExpression typecheck(CExpressionContextType context)
throws PositionedError
context - the context in which this expression appears
JExpression.typecheck())
PositionedError
private void partly_desugar(CExpressionContextType context)
throws PositionedError
PositionedErrorprivate JExpression wrap(JExpression e)
public void accept(MjcVisitor p)
p - the visitorpublic void genCode(CodeSequence code)
code - the code list
|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||