|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgnu.mapping.PropertySet
gnu.mapping.Procedure
gnu.mapping.Procedure0
gnu.expr.Expression
gnu.expr.AccessExp
gnu.expr.ReferenceExp
public class ReferenceExp
This class represents a variable reference (an identifier).
Field Summary | |
---|---|
static int |
DONT_DEREFERENCE
|
static int |
PREFER_BINDING2
|
static int |
PROCEDURE_NAME
|
static int |
TYPE_NAME
Flag indicates a reference to a type name. |
Fields inherited from class gnu.expr.Expression |
---|
flags, NEXT_AVAIL_FLAG, noExpressions, VALIDATED |
Fields inherited from class gnu.mapping.Procedure |
---|
compilerKey, validateApplyKey |
Fields inherited from class gnu.mapping.PropertySet |
---|
nameKey |
Constructor Summary | |
---|---|
ReferenceExp(Declaration binding)
|
|
ReferenceExp(java.lang.Object symbol)
|
|
ReferenceExp(java.lang.Object symbol,
Declaration binding)
|
Method Summary | ||
---|---|---|
void |
apply(CallContext ctx)
Evaluate the expression. |
|
void |
compile(Compilation comp,
Target target)
|
|
protected Expression |
deepCopy(IdentityHashTable mapper)
|
|
boolean |
getDontDereference()
|
|
Type |
getType()
Return the Type used to represent the values of this Expression. |
|
boolean |
isProcedureName()
True if this identifier appears in "function call position". |
|
boolean |
isSingleValue()
|
|
boolean |
isUnknown()
|
|
protected boolean |
mustCompile()
|
|
void |
print(OutPort ps)
|
|
void |
setDontDereference(boolean setting)
|
|
void |
setProcedureName(boolean setting)
Note if this identifier appears in "function call position". |
|
boolean |
side_effects()
True if evaluating may have side-effects. |
|
java.lang.String |
toString()
|
|
Expression |
validateApply(ApplyExp exp,
InlineCalls visitor,
Type required,
Declaration decl)
Apply inlining transformations on a given ApplyExp. |
|
java.lang.Object |
valueIfConstant()
Return value if it is constant, or null if non-constant or unknown. |
|
protected
|
visit(ExpVisitor<R,D> visitor,
D d)
|
Methods inherited from class gnu.expr.AccessExp |
---|
contextDecl, getBinding, getName, getSimpleName, getSymbol, setBinding, setContextDecl, string_name |
Methods inherited from class gnu.expr.Expression |
---|
apply0, compile, compile, compileButFirst, compileNotePosition, compileWithPosition, compileWithPosition, deepCopy, deepCopy, deepCopy, eval, eval, getColumnNumber, getFileName, getFlag, getFlags, getLineNumber, getPublicId, getSystemId, isStableSourceLocation, makeWhile, match0, print, printLineColumn, setFile, setFlag, setFlag, setLine, setLine, setLine, setLine, setLocation, visitChildren |
Methods inherited from class gnu.mapping.Procedure0 |
---|
apply1, apply2, apply3, apply4, applyN, numArgs |
Methods inherited from class gnu.mapping.Procedure |
---|
apply, check0, check1, check2, check3, check4, checkArgCount, checkN, getReturnType, getSetter, getSourceLocation, isSideEffectFree, match1, match2, match3, match4, matchN, maxArgs, maxArgs, minArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation |
Methods inherited from class gnu.mapping.PropertySet |
---|
getProperty, removeProperty, setName, setProperty, setProperty, setSymbol |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DONT_DEREFERENCE
public static final int PROCEDURE_NAME
public static final int PREFER_BINDING2
public static final int TYPE_NAME
Constructor Detail |
---|
public ReferenceExp(java.lang.Object symbol)
public ReferenceExp(java.lang.Object symbol, Declaration binding)
public ReferenceExp(Declaration binding)
Method Detail |
---|
public final boolean getDontDereference()
public final void setDontDereference(boolean setting)
public final boolean isUnknown()
public final boolean isProcedureName()
public final void setProcedureName(boolean setting)
protected boolean mustCompile()
mustCompile
in class Expression
public final java.lang.Object valueIfConstant()
Expression
valueIfConstant
in class Expression
public void apply(CallContext ctx) throws java.lang.Throwable
Expression
apply
in class Expression
java.lang.Throwable
public void compile(Compilation comp, Target target)
compile
in class Expression
protected Expression deepCopy(IdentityHashTable mapper)
deepCopy
in class Expression
protected <R,D> R visit(ExpVisitor<R,D> visitor, D d)
visit
in class Expression
public Expression validateApply(ApplyExp exp, InlineCalls visitor, Type required, Declaration decl)
Expression
validateApply
in class Expression
exp
- an application whose function expression can be simplified
to this expression.visitor
- the context for the current inlining passdecl
- if non-null, a Declaration bound to this expression.
public void print(OutPort ps)
print
in class Expression
public Type getType()
Expression
getType
in class Expression
public boolean isSingleValue()
isSingleValue
in class Expression
public boolean side_effects()
Expression
side_effects
in class Expression
public java.lang.String toString()
toString
in class Expression
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |