public class QuoteExp extends Expression
SourceLocator.Simple
Modifier and Type | Field and Description |
---|---|
static QuoteExp |
abstractExp |
static QuoteExp |
classObjectExp |
static QuoteExp |
emptyExp |
static int |
EXPLICITLY_TYPED |
static QuoteExp |
falseExp |
static QuoteExp |
falseObjExp |
static int |
IS_KEYWORD |
static QuoteExp |
isTrueTypeExp |
static QuoteExp |
nativeExp |
static QuoteExp |
nullExp |
static int |
SHARED_CONSTANT |
static QuoteExp |
trueExp |
static QuoteExp |
trueObjExp |
static QuoteExp |
undefined_exp |
static QuoteExp |
voidExp |
static QuoteExp |
voidObjectExp
Same value as voidExp, but different type, to suppress diagnostics.
|
applyMethodExpression, flags, NEXT_AVAIL_FLAG, noExpressions, type, VALIDATED
applyMethodType, applyToConsumerDefault, applyToConsumerMethod, applyToObjectDefault, applyToObjectMethod, compilerKey, compilerXKey, inlineIfConstantSymbol, validateApplyKey, validateXApplyKey
nameKey
Constructor and Description |
---|
QuoteExp(java.lang.Object val) |
QuoteExp(java.lang.Object val,
Type type) |
Modifier and Type | Method and Description |
---|---|
void |
apply(CallContext ctx)
Evaluate the expression.
|
protected Type |
calculateType() |
void |
compile(Compilation comp,
Target target) |
Expression |
deepCopy(IdentityHashTable mapper) |
static QuoteExp |
getInstance(java.lang.Object value) |
static QuoteExp |
getInstance(java.lang.Object value,
SourceLocator position) |
Type |
getRawType() |
java.lang.Object |
getValue() |
boolean |
isExplicitlyTyped() |
boolean |
isSharedConstant() |
static QuoteExp |
makeShared(java.lang.Object value,
Type type) |
protected boolean |
mustCompile() |
void |
print(gnu.kawa.io.OutPort out) |
void |
setType(Type type) |
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 <R,D> R |
visit(ExpVisitor<R,D> visitor,
D d) |
applyMethodExpression, checkLiteralKeyword, compile, compile, compileWithPosition, compileWithPosition, deepCopy, deepCopy, deepCopy, eval, eval, getColumnNumber, getEndColumn, getEndLine, getFileName, getFlag, getFlags, getLineNumber, getPublicId, getStartColumn, getStartLine, getSystemId, getType, getTypeRaw, isSingleValue, isStableSourceLocation, makeWhile, maybeSetLine, neverReturns, numArgs, print, printLineColumn, setFile, setFlag, setFlag, setLine, setLine, setLine, setLine, setLine, setLocation, visitChildren
apply0, apply1, apply2, apply3, apply4, applyL, applyN, applyToConsumerDefault, applyToObjectDefault, checkArgCount, checkBadCode, getApplyMethod, getApplyToConsumerMethod, getApplyToObjectMethod, getReturnType, getSetter, getSourceLocation, isSideEffectFree, lookupApplyHandle, maxArgs, maxArgs, minArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
public static final int EXPLICITLY_TYPED
public static final int SHARED_CONSTANT
public static final int IS_KEYWORD
public static QuoteExp undefined_exp
public static QuoteExp abstractExp
public static QuoteExp nativeExp
public static QuoteExp voidExp
public static QuoteExp voidObjectExp
public static QuoteExp trueExp
public static QuoteExp falseExp
public static QuoteExp trueObjExp
public static QuoteExp falseObjExp
public static QuoteExp emptyExp
public static QuoteExp isTrueTypeExp
public static QuoteExp nullExp
public static final QuoteExp classObjectExp
public QuoteExp(java.lang.Object val)
public QuoteExp(java.lang.Object val, Type type)
public final java.lang.Object getValue()
public final java.lang.Object valueIfConstant()
Expression
valueIfConstant
in class Expression
public final Type getRawType()
protected final Type calculateType()
calculateType
in class Expression
public void setType(Type type)
setType
in class Expression
public boolean isExplicitlyTyped()
public boolean isSharedConstant()
public static QuoteExp getInstance(java.lang.Object value)
public static QuoteExp getInstance(java.lang.Object value, SourceLocator position)
protected boolean mustCompile()
mustCompile
in class Expression
public void apply(CallContext ctx)
Expression
apply
in class Expression
public void compile(Compilation comp, Target target)
compile
in class Expression
public 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 boolean side_effects()
Expression
side_effects
in class Expression
public java.lang.String toString()
toString
in class Expression
public void print(gnu.kawa.io.OutPort out)
print
in class Expression