Package gnu.expr
Class ThisExp
- All Implemented Interfaces:
gnu.kawa.format.Printable,Named,SourceLocator,SourceLocator,Locator
Evaluates to the "this" implicit variable.
This is currently neither robust nor general. FIXME!
-
Nested Class Summary
Nested classes/interfaces inherited from interface gnu.text.SourceLocator
SourceLocator.Simple -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringNon-interned name for implicit 'this' variable.Fields inherited from class gnu.expr.ReferenceExp
ALLOCATE_ON_STACK_LAST, DONT_DEREFERENCE, PROCEDURE_NAME, TYPE_NAMEFields inherited from class gnu.expr.AccessExp
NEXT_AVAIL_FLAG, PREFER_BINDING2Fields inherited from class gnu.expr.Expression
applyMethodExpression, flags, noExpressions, type, VALIDATEDFields inherited from class gnu.mapping.Procedure
applyMethodType, applyToConsumerDefault, applyToConsumerMethod, applyToObjectDefault, applyToObjectMethod, compilerKey, compilerXKey, inlineIfConstantSymbol, validateApplyKey, validateXApplyKeyFields inherited from class gnu.mapping.PropertySet
nameKey -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(CallContext ctx) Evaluate the expression.protected final Typevoidcompile(Compilation comp, Target target) final booleanIf this is being used to pass the context instance to a Macro.static ThisExpmakeGivingContext(ScopeExp context) protected <R,D> R visit(ExpVisitor<R, D> visitor, D d) Methods inherited from class gnu.expr.ReferenceExp
deepCopy, getDontDereference, isProcedureName, isSingleValue, isUnknown, mustCompile, print, setDontDereference, setProcedureName, side_effects, toString, validateApply, valueIfConstantMethods inherited from class gnu.expr.AccessExp
contextDecl, getBinding, getName, getSimpleName, getSymbol, setBinding, setContextDecl, string_nameMethods inherited from class gnu.expr.Expression
applyMethodExpression, checkLiteralKeyword, compile, compile, compileWithPosition, compileWithPosition, deepCopy, deepCopy, deepCopy, eval, eval, getColumnNumber, getEndColumn, getEndLine, getFileName, getFlag, getFlags, getLineNumber, getPublicId, getStartColumn, getStartLine, getSystemId, getType, getTypeRaw, isStableSourceLocation, makeWhile, maybeSetLine, neverReturns, numArgs, print, printLineColumn, setFile, setFlag, setFlag, setLine, setLine, setLine, setLine, setLine, setLocation, setType, visitChildrenMethods inherited from class gnu.mapping.Procedure
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, setSourceLocationMethods inherited from class gnu.mapping.PropertySet
getProperty, removeProperty, setName, setProperty, setProperty, setSymbol
-
Field Details
-
THIS_NAME
Non-interned name for implicit 'this' variable.
-
-
Constructor Details
-
ThisExp
public ThisExp() -
ThisExp
-
ThisExp
-
ThisExp
-
-
Method Details
-
isForContext
public final boolean isForContext()If this is being used to pass the context instance to a Macro. -
apply
Description copied from class:ExpressionEvaluate 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?- Overrides:
applyin classReferenceExp- Throws:
Throwable
-
getContextScope
-
makeGivingContext
-
compile
- Overrides:
compilein classReferenceExp
-
visit
- Overrides:
visitin classReferenceExp
-
calculateType
- Overrides:
calculateTypein classReferenceExp
-