gnu.expr
Class ReferenceExp
- org.xml.sax.Locator, Named, Printable, SourceLocator
public class ReferenceExp
This class represents a variable reference (an identifier).
apply , apply0 , compile , compile , compile , compileButFirst , compileNotePosition , compileWithPosition , compileWithPosition , eval , eval , getColumnNumber , getFileName , getFlag , getFlags , getLineNumber , getPublicId , getSystemId , getType , inline , isStableSourceLocation , makeWhile , match0 , mustCompile , print , print , printLineColumn , setFile , setFlag , setFlag , setLine , setLine , setLine , setLine , setLocation , side_effects , toString , valueIfConstant , walk , walkChildren |
apply , apply , apply0 , apply1 , apply2 , apply3 , apply4 , applyN , check0 , check1 , check2 , check3 , check4 , checkArgCount , checkN , getSetter , getSourceLocation , match0 , match1 , match2 , match3 , match4 , matchN , maxArgs , minArgs , numArgs , set0 , set1 , setN , setSetter , setSourceLocation , toString |
CREATE_FIELD_REFERENCE
public static final int CREATE_FIELD_REFERENCE
Create a FieldLocation referencing the binding.
DONT_DEREFERENCE
public static final int DONT_DEREFERENCE
PREFER_BINDING2
public static final int PREFER_BINDING2
PROCEDURE_NAME
public static final int PROCEDURE_NAME
ReferenceExp
public ReferenceExp(Object symbol)
ReferenceExp
public ReferenceExp(Object symbol,
Declaration binding)
apply
public void apply(CallContext ctx)
throws Throwable
Evaluate the expression.
This is named apply rather than eval so it is compatible with the
full-tail-call calling convention, and we can stash an Expression in
CallContext's proc field. FIXME - are we making use of this?
- apply in interface Expression
getDontDereference
public final boolean getDontDereference()
getType
public Type getType()
Return the Type used to represent the values of this Expression.
- getType in interface Expression
inline
public Expression inline(ApplyExp exp,
InlineCalls walker,
Declaration decl)
Apply inlining transformations on a given ApplyExp.
Assumes the ApplyExp's function is the this expression,
or can be optimized to this expression.
- inline in interface Expression
exp
- an application whose function expression can be simplified
to this expression.walker
- the context for the current inlining passdecl
- if non-null, a Declaration bound to this expression
- an Expression equivalent to te passed-in exp.
isProcedureName
public final boolean isProcedureName()
True if this identifier appears in "function call position".
If so, it should be interpreted as a function name, which makes a
difference for languages (like Common Lisp) that have two name spaces.
isUnknown
public final boolean isUnknown()
setDontDereference
public final void setDontDereference(boolean setting)
setProcedureName
public final void setProcedureName(boolean setting)
Note if this identifier appears in "function call position".
side_effects
public boolean side_effects()
True if evaluating may have side-effects.
- side_effects in interface Expression