Class CompilerScope
java.lang.Object
com.strobel.expressions.CompilerScope
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final classprivate final classprivate final classprivate final classprivate static class///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate HoistedLocalsprivate HoistedLocalsprivate final Map<ParameterExpression, CompilerScope.Storage> private CompilerScopeprivate static final FieldInfo(package private) final Map<ParameterExpression, VariableStorageKind> (package private) final boolean(package private) boolean(package private) final Object(package private) Map<ParameterExpression, MutableInteger> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidaddLocal(LambdaCompiler lc, ParameterExpression variable) private voidprivate voidprivate voidprivate voidemitClosureAccess(LambdaCompiler lc, HoistedLocals locals) private voidemitClosureToVariable(LambdaCompiler lc, HoistedLocals locals) (package private) voidemitGet(ParameterExpression variable) private void(package private) voidemitSet(ParameterExpression variable) (package private) void(package private) CompilerScopeenter(LambdaCompiler lc, CompilerScope parent) (package private) CompilerScopeexit()private static Type<? extends IStrongBox> getBoxType(Type<?> type) private String(package private) LocalBuildergetLocalForVariable(ParameterExpression variable) (package private) HoistedLocalsprivate ParameterExpressionListprivate static ParameterExpressionListgetVariables(Object scope) private CompilerScope.StorageresolveVariable(ParameterExpression variable) private CompilerScope.StorageresolveVariable(ParameterExpression variable, HoistedLocals hoistedLocals) private voidsetParent(LambdaCompiler lc, CompilerScope parent) private booleanprivate booleanshouldCache(ParameterExpression v, int refCount)
-
Field Details
-
ClosureLocalsField
-
_locals
-
_hoistedLocals
-
_closureHoistedLocals
-
_parent
-
node
-
isMethod
final boolean isMethod -
needsClosure
boolean needsClosure -
definitions
-
referenceCount
Map<ParameterExpression, MutableInteger> referenceCount -
mergedScopes
-
-
Constructor Details
-
CompilerScope
CompilerScope(Object node, boolean isMethod)
-
-
Method Details
-
enter
-
exit
CompilerScope exit() -
getNearestHoistedLocals
HoistedLocals getNearestHoistedLocals() -
getCurrentLambdaName
-
emitNewHoistedLocals
-
getBoxType
-
emitCachedVariables
private void emitCachedVariables() -
shouldCache
-
shouldCache
-
cacheBoxToLocal
-
emitClosureAccess
-
emitClosureToVariable
-
resolveVariable
-
resolveVariable
private CompilerScope.Storage resolveVariable(ParameterExpression variable, HoistedLocals hoistedLocals) -
getLocalForVariable
-
emitGet
-
emitSet
-
setParent
-
addLocal
-
allocateLocals
-
getVariables
-
getVariables
-
emitVariableAccess
-