Package com.strobel.expressions
Class CompilerScope
java.lang.Object
com.strobel.expressions.CompilerScope
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final class
private final class
private final class
private final class
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate HoistedLocals
private HoistedLocals
private final Map
<ParameterExpression, CompilerScope.Storage> private CompilerScope
private 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) void
addLocal
(LambdaCompiler lc, ParameterExpression variable) private void
private void
private void
private void
emitClosureAccess
(LambdaCompiler lc, HoistedLocals locals) private void
emitClosureToVariable
(LambdaCompiler lc, HoistedLocals locals) (package private) void
emitGet
(ParameterExpression variable) private void
(package private) void
emitSet
(ParameterExpression variable) (package private) void
(package private) CompilerScope
enter
(LambdaCompiler lc, CompilerScope parent) (package private) CompilerScope
exit()
private static Type
<? extends IStrongBox> getBoxType
(Type<?> type) private String
(package private) LocalBuilder
getLocalForVariable
(ParameterExpression variable) (package private) HoistedLocals
private ParameterExpressionList
private static ParameterExpressionList
getVariables
(Object scope) private CompilerScope.Storage
resolveVariable
(ParameterExpression variable) private CompilerScope.Storage
resolveVariable
(ParameterExpression variable, HoistedLocals hoistedLocals) private void
setParent
(LambdaCompiler lc, CompilerScope parent) private boolean
private boolean
shouldCache
(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
-