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
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TransformationContextBase(ICompilableTypeInternal compilingType)
-
Method Summary
-
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
-
-
-
-
Constructor Detail
-
TransformationContextBase
protected TransformationContextBase(ICompilableTypeInternal compilingType)
-
-
Method Detail
-
initBodyContext
public void initBodyContext(boolean isStatic)
-
initBodyContext
public void initBodyContext(boolean isStatic, DynamicFunctionSymbol dfs)
-
getIrClass
public IRClass getIrClass()
- Specified by:
getIrClass
in interfaceTopLevelTransformationContext
-
setIrClass
public void setIrClass(IRClass irClass)
- Specified by:
setIrClass
in interfaceTopLevelTransformationContext
-
compile
public IRStatement compile(IStatement stmt)
- Specified by:
compile
in interfaceTopLevelTransformationContext
-
compileInitializerAssignment
public IRStatement compileInitializerAssignment(InitializerAssignment stmt, IRExpression root)
- Specified by:
compileInitializerAssignment
in interfaceTopLevelTransformationContext
-
currentlyCompilingBlock
public boolean currentlyCompilingBlock()
- Specified by:
currentlyCompilingBlock
in interfaceTopLevelTransformationContext
-
getGosuClass
public ICompilableTypeInternal getGosuClass()
- Specified by:
getGosuClass
in interfaceTopLevelTransformationContext
-
getSuperType
public IType getSuperType()
- Specified by:
getSuperType
in interfaceTopLevelTransformationContext
-
getEnclosingType
public ICompilableTypeInternal 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
public IRSymbol makeAndIndexTempSymbol(IRType type)
- Specified by:
makeAndIndexTempSymbol
in interfaceTopLevelTransformationContext
-
makeAndIndexTempSymbol
public IRSymbol makeAndIndexTempSymbol(String strNameSuffix, IRType type)
- Specified by:
makeAndIndexTempSymbol
in interfaceTopLevelTransformationContext
-
getTypeParamIndex
public IRSymbol getTypeParamIndex(TypeVariableType type)
- Specified by:
getTypeParamIndex
in interfaceTopLevelTransformationContext
-
getSymbol
public IRSymbol getSymbol(String symbolName)
- Specified by:
getSymbol
in interfaceTopLevelTransformationContext
-
hasSymbol
public boolean hasSymbol(String strSymbol)
- 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
public void putSymbol(IRSymbol symbol)
- Specified by:
putSymbol
in interfaceTopLevelTransformationContext
-
putSymbols
public void putSymbols(List<IRSymbol> symbols)
- Specified by:
putSymbols
in interfaceTopLevelTransformationContext
-
makeTempSymbolName
public String makeTempSymbolName()
- Specified by:
makeTempSymbolName
in interfaceTopLevelTransformationContext
-
isBlockInvoke
public boolean isBlockInvoke()
- Specified by:
isBlockInvoke
in interfaceTopLevelTransformationContext
-
createSymbol
public IRSymbol createSymbol(String name, IRType type)
- 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
public Stack<IRScope> getScopes()
- Specified by:
getScopes
in interfaceTopLevelTransformationContext
-
getCurrentFunctionName
public String getCurrentFunctionName()
- Specified by:
getCurrentFunctionName
in interfaceTopLevelTransformationContext
-
getCurrentFunction
public DynamicFunctionSymbol 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
public IType getCurrentFunctionReturnType()
- Specified by:
getCurrentFunctionReturnType
in interfaceTopLevelTransformationContext
-
-