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 protectedTransformationContextBase(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:
getIrClassin interfaceTopLevelTransformationContext
-
setIrClass
public void setIrClass(IRClass irClass)
- Specified by:
setIrClassin interfaceTopLevelTransformationContext
-
compile
public IRStatement compile(IStatement stmt)
- Specified by:
compilein interfaceTopLevelTransformationContext
-
compileInitializerAssignment
public IRStatement compileInitializerAssignment(InitializerAssignment stmt, IRExpression root)
- Specified by:
compileInitializerAssignmentin interfaceTopLevelTransformationContext
-
currentlyCompilingBlock
public boolean currentlyCompilingBlock()
- Specified by:
currentlyCompilingBlockin interfaceTopLevelTransformationContext
-
getGosuClass
public ICompilableTypeInternal getGosuClass()
- Specified by:
getGosuClassin interfaceTopLevelTransformationContext
-
getSuperType
public IType getSuperType()
- Specified by:
getSuperTypein interfaceTopLevelTransformationContext
-
getEnclosingType
public ICompilableTypeInternal getEnclosingType()
- Specified by:
getEnclosingTypein interfaceTopLevelTransformationContext
-
isNonStaticInnerClass
public boolean isNonStaticInnerClass()
- Specified by:
isNonStaticInnerClassin interfaceTopLevelTransformationContext
-
compilingEnhancement
public boolean compilingEnhancement()
- Specified by:
compilingEnhancementin interfaceTopLevelTransformationContext
-
compilingEnum
public boolean compilingEnum()
- Specified by:
compilingEnumin interfaceTopLevelTransformationContext
-
compilingBlock
public boolean compilingBlock()
- Specified by:
compilingBlockin interfaceTopLevelTransformationContext
-
compilingProgram
public boolean compilingProgram()
- Specified by:
compilingProgramin interfaceTopLevelTransformationContext
-
makeAndIndexTempSymbol
public IRSymbol makeAndIndexTempSymbol(IRType type)
- Specified by:
makeAndIndexTempSymbolin interfaceTopLevelTransformationContext
-
makeAndIndexTempSymbol
public IRSymbol makeAndIndexTempSymbol(String strNameSuffix, IRType type)
- Specified by:
makeAndIndexTempSymbolin interfaceTopLevelTransformationContext
-
getTypeParamIndex
public IRSymbol getTypeParamIndex(TypeVariableType type)
- Specified by:
getTypeParamIndexin interfaceTopLevelTransformationContext
-
getSymbol
public IRSymbol getSymbol(String symbolName)
- Specified by:
getSymbolin interfaceTopLevelTransformationContext
-
hasSymbol
public boolean hasSymbol(String strSymbol)
- Specified by:
hasSymbolin interfaceTopLevelTransformationContext
-
pushScope
public void pushScope(boolean bInitialInstanceMethodScope)
- Specified by:
pushScopein interfaceTopLevelTransformationContext
-
popScope
public void popScope()
- Specified by:
popScopein interfaceTopLevelTransformationContext
-
putSymbol
public void putSymbol(IRSymbol symbol)
- Specified by:
putSymbolin interfaceTopLevelTransformationContext
-
putSymbols
public void putSymbols(List<IRSymbol> symbols)
- Specified by:
putSymbolsin interfaceTopLevelTransformationContext
-
makeTempSymbolName
public String makeTempSymbolName()
- Specified by:
makeTempSymbolNamein interfaceTopLevelTransformationContext
-
isBlockInvoke
public boolean isBlockInvoke()
- Specified by:
isBlockInvokein interfaceTopLevelTransformationContext
-
createSymbol
public IRSymbol createSymbol(String name, IRType type)
- Specified by:
createSymbolin interfaceTopLevelTransformationContext
-
hasSuperBeenInvoked
public boolean hasSuperBeenInvoked()
- Specified by:
hasSuperBeenInvokedin interfaceTopLevelTransformationContext
-
isStatic
public boolean isStatic()
- Specified by:
isStaticin interfaceTopLevelTransformationContext
-
markSuperInvoked
public void markSuperInvoked()
- Specified by:
markSuperInvokedin interfaceTopLevelTransformationContext
-
markInvokingSuper
public void markInvokingSuper()
- Specified by:
markInvokingSuperin interfaceTopLevelTransformationContext
-
updateSuperInvokedAfterLastExpressionCompiles
public void updateSuperInvokedAfterLastExpressionCompiles()
- Specified by:
updateSuperInvokedAfterLastExpressionCompilesin interfaceTopLevelTransformationContext
-
getScopes
public Stack<IRScope> getScopes()
- Specified by:
getScopesin interfaceTopLevelTransformationContext
-
getCurrentFunctionName
public String getCurrentFunctionName()
- Specified by:
getCurrentFunctionNamein interfaceTopLevelTransformationContext
-
getCurrentFunction
public DynamicFunctionSymbol getCurrentFunction()
- Specified by:
getCurrentFunctionin interfaceTopLevelTransformationContext
-
incrementLazyTypeMethodCount
public int incrementLazyTypeMethodCount()
- Specified by:
incrementLazyTypeMethodCountin interfaceTopLevelTransformationContext
-
isCurrentFunctionStatic
public boolean isCurrentFunctionStatic()
- Specified by:
isCurrentFunctionStaticin interfaceTopLevelTransformationContext
-
getCurrentFunctionReturnType
public IType getCurrentFunctionReturnType()
- Specified by:
getCurrentFunctionReturnTypein interfaceTopLevelTransformationContext
-
-