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 String
Non-interned name for implicit 'this' variable.Fields inherited from class gnu.expr.ReferenceExp
ALLOCATE_ON_STACK_LAST, DONT_DEREFERENCE, PROCEDURE_NAME, TYPE_NAME
Fields inherited from class gnu.expr.AccessExp
NEXT_AVAIL_FLAG, PREFER_BINDING2
Fields inherited from class gnu.expr.Expression
applyMethodExpression, flags, noExpressions, type, VALIDATED
Fields inherited from class gnu.mapping.Procedure
applyMethodType, applyToConsumerDefault, applyToConsumerMethod, applyToObjectDefault, applyToObjectMethod, compilerKey, compilerXKey, inlineIfConstantSymbol, validateApplyKey, validateXApplyKey
Fields inherited from class gnu.mapping.PropertySet
nameKey
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(CallContext ctx) Evaluate the expression.protected final Type
void
compile
(Compilation comp, Target target) final boolean
If this is being used to pass the context instance to a Macro.static ThisExp
makeGivingContext
(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, valueIfConstant
Methods inherited from class gnu.expr.AccessExp
contextDecl, getBinding, getName, getSimpleName, getSymbol, setBinding, setContextDecl, string_name
Methods 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, visitChildren
Methods 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, setSourceLocation
Methods 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:Expression
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?- Overrides:
apply
in classReferenceExp
- Throws:
Throwable
-
getContextScope
-
makeGivingContext
-
compile
- Overrides:
compile
in classReferenceExp
-
visit
- Overrides:
visit
in classReferenceExp
-
calculateType
- Overrides:
calculateType
in classReferenceExp
-