Package gw.internal.gosu.ir.transform
Class TransformationContextBase
java.lang.Object
gw.internal.gosu.ir.transform.TransformationContextBase
- All Implemented Interfaces:
TopLevelTransformationContext
- Direct Known Subclasses:
GosuClassTransformationContext
,GosuFragmentTransformationContext
public abstract class TransformationContextBase
extends Object
implements TopLevelTransformationContext
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
TransformationContextBase
(ICompilableTypeInternal compilingType) -
Method Summary
Modifier and TypeMethodDescriptioncompile
(IStatement stmt) boolean
boolean
boolean
boolean
createSymbol
(String name, IRType type) boolean
boolean
boolean
int
void
initBodyContext
(boolean isStatic) void
initBodyContext
(boolean isStatic, DynamicFunctionSymbol dfs) boolean
boolean
boolean
boolean
isStatic()
makeAndIndexTempSymbol
(IRType type) makeAndIndexTempSymbol
(String strNameSuffix, IRType type) void
void
void
popScope()
void
pushScope
(boolean bInitialInstanceMethodScope) void
void
putSymbols
(List<IRSymbol> symbols) void
setIrClass
(IRClass irClass) void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface gw.internal.gosu.ir.transform.TopLevelTransformationContext
addAssertionsStaticField, getIRTypeForCurrentClass, getOuterThisFieldName, getOuterThisParamName, getSourceFileRef, getSourceLine, initCapturedSymbolFields, initializeInstanceFields, initTypeVarFields, isExternalSymbol, isFragmentEvaluation, isIllegalProtectedCall, maybeAssignOuterRef, maybePushSupersEnclosingThisRef, pushEnumNameAndOrdinal, shouldUseReflection
-
Field Details
-
_bodyContext
-
_compilingType
-
_irClass
-
_iLazyMethodCount
private int _iLazyMethodCount
-
-
Constructor Details
-
TransformationContextBase
-
-
Method Details
-
initBodyContext
public void initBodyContext(boolean isStatic) -
initBodyContext
-
getIrClass
- Specified by:
getIrClass
in interfaceTopLevelTransformationContext
-
setIrClass
- Specified by:
setIrClass
in interfaceTopLevelTransformationContext
-
compile
- Specified by:
compile
in interfaceTopLevelTransformationContext
-
compileInitializerAssignment
- Specified by:
compileInitializerAssignment
in interfaceTopLevelTransformationContext
-
currentlyCompilingBlock
public boolean currentlyCompilingBlock()- Specified by:
currentlyCompilingBlock
in interfaceTopLevelTransformationContext
-
getGosuClass
- Specified by:
getGosuClass
in interfaceTopLevelTransformationContext
-
getSuperType
- Specified by:
getSuperType
in interfaceTopLevelTransformationContext
-
getEnclosingType
- Specified by:
getEnclosingType
in interfaceTopLevelTransformationContext
-
isNonStaticInnerClass
public boolean isNonStaticInnerClass()- Specified by:
isNonStaticInnerClass
in interfaceTopLevelTransformationContext
-
compilingEnhancement
public boolean compilingEnhancement()- Specified by:
compilingEnhancement
in interfaceTopLevelTransformationContext
-
compilingEnum
public boolean compilingEnum()- Specified by:
compilingEnum
in interfaceTopLevelTransformationContext
-
compilingBlock
public boolean compilingBlock()- Specified by:
compilingBlock
in interfaceTopLevelTransformationContext
-
compilingProgram
public boolean compilingProgram()- Specified by:
compilingProgram
in interfaceTopLevelTransformationContext
-
makeAndIndexTempSymbol
- Specified by:
makeAndIndexTempSymbol
in interfaceTopLevelTransformationContext
-
makeAndIndexTempSymbol
- Specified by:
makeAndIndexTempSymbol
in interfaceTopLevelTransformationContext
-
getTypeParamIndex
- Specified by:
getTypeParamIndex
in interfaceTopLevelTransformationContext
-
getSymbol
- Specified by:
getSymbol
in interfaceTopLevelTransformationContext
-
hasSymbol
- Specified by:
hasSymbol
in interfaceTopLevelTransformationContext
-
pushScope
public void pushScope(boolean bInitialInstanceMethodScope) - Specified by:
pushScope
in interfaceTopLevelTransformationContext
-
popScope
public void popScope()- Specified by:
popScope
in interfaceTopLevelTransformationContext
-
putSymbol
- Specified by:
putSymbol
in interfaceTopLevelTransformationContext
-
putSymbols
- Specified by:
putSymbols
in interfaceTopLevelTransformationContext
-
makeTempSymbolName
- Specified by:
makeTempSymbolName
in interfaceTopLevelTransformationContext
-
isBlockInvoke
public boolean isBlockInvoke()- Specified by:
isBlockInvoke
in interfaceTopLevelTransformationContext
-
createSymbol
- Specified by:
createSymbol
in interfaceTopLevelTransformationContext
-
hasSuperBeenInvoked
public boolean hasSuperBeenInvoked()- Specified by:
hasSuperBeenInvoked
in interfaceTopLevelTransformationContext
-
isStatic
public boolean isStatic()- Specified by:
isStatic
in interfaceTopLevelTransformationContext
-
markSuperInvoked
public void markSuperInvoked()- Specified by:
markSuperInvoked
in interfaceTopLevelTransformationContext
-
markInvokingSuper
public void markInvokingSuper()- Specified by:
markInvokingSuper
in interfaceTopLevelTransformationContext
-
updateSuperInvokedAfterLastExpressionCompiles
public void updateSuperInvokedAfterLastExpressionCompiles()- Specified by:
updateSuperInvokedAfterLastExpressionCompiles
in interfaceTopLevelTransformationContext
-
getScopes
- Specified by:
getScopes
in interfaceTopLevelTransformationContext
-
getCurrentFunctionName
- Specified by:
getCurrentFunctionName
in interfaceTopLevelTransformationContext
-
getCurrentFunction
- Specified by:
getCurrentFunction
in interfaceTopLevelTransformationContext
-
incrementLazyTypeMethodCount
public int incrementLazyTypeMethodCount()- Specified by:
incrementLazyTypeMethodCount
in interfaceTopLevelTransformationContext
-
isCurrentFunctionStatic
public boolean isCurrentFunctionStatic()- Specified by:
isCurrentFunctionStatic
in interfaceTopLevelTransformationContext
-
getCurrentFunctionReturnType
- Specified by:
getCurrentFunctionReturnType
in interfaceTopLevelTransformationContext
-