Package gw.internal.gosu.ir.transform
Class FunctionBodyTransformationContext
- java.lang.Object
-
- gw.internal.gosu.ir.transform.FunctionBodyTransformationContext
-
- Direct Known Subclasses:
DFSFunctionBodyTransformationContext
public class FunctionBodyTransformationContext extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classFunctionBodyTransformationContext.ConstructorState
-
Field Summary
Fields Modifier and Type Field Description private FunctionBodyTransformationContext.ConstructorState_constructorStateprotected TopLevelTransformationContext_contextprivate boolean_isStaticprivate Stack<IRScope>_scopesprivate int_tempVarCountstatic java.lang.StringTEMP_VAR_PREFIX
-
Constructor Summary
Constructors Constructor Description FunctionBodyTransformationContext(TopLevelTransformationContext context, boolean isStatic)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IRSymbolcreateSymbol(java.lang.String name, IRType type)DynamicFunctionSymbolgetCurrentDFS()Stack<IRScope>getScopes()IRSymbolgetSymbol(java.lang.String symbolName)IRSymbolgetTypeParamIndex(TypeVariableType type)booleanhasSuperBeenInvoked()booleanhasSymbol(java.lang.String symbolName)booleanisBlockInvoke()booleanisStatic()IRSymbolmakeAndIndexTempSymbol(IRType type)IRSymbolmakeAndIndexTempSymbol(java.lang.String strNameSuffix, IRType type)java.lang.StringmakeTempSymbolName()voidmarkInvokingSuper()voidmarkSuperInvoked()voidpopScope()voidpushScope(boolean bInitialInstanceMethodScope)voidputSymbol(IRSymbol symbol)voidputSymbols(java.util.List<IRSymbol> symbols)voidupdateSuperInvokedAfterLastExpressionCompiles()
-
-
-
Field Detail
-
TEMP_VAR_PREFIX
public static final java.lang.String TEMP_VAR_PREFIX
- See Also:
- Constant Field Values
-
_tempVarCount
private int _tempVarCount
-
_constructorState
private FunctionBodyTransformationContext.ConstructorState _constructorState
-
_context
protected TopLevelTransformationContext _context
-
_isStatic
private boolean _isStatic
-
-
Constructor Detail
-
FunctionBodyTransformationContext
public FunctionBodyTransformationContext(TopLevelTransformationContext context, boolean isStatic)
-
-
Method Detail
-
updateSuperInvokedAfterLastExpressionCompiles
public void updateSuperInvokedAfterLastExpressionCompiles()
-
hasSuperBeenInvoked
public boolean hasSuperBeenInvoked()
-
markInvokingSuper
public void markInvokingSuper()
-
markSuperInvoked
public void markSuperInvoked()
-
makeAndIndexTempSymbol
public IRSymbol makeAndIndexTempSymbol(java.lang.String strNameSuffix, IRType type)
-
makeTempSymbolName
public java.lang.String makeTempSymbolName()
-
pushScope
public void pushScope(boolean bInitialInstanceMethodScope)
-
popScope
public void popScope()
-
getTypeParamIndex
public IRSymbol getTypeParamIndex(TypeVariableType type)
-
getSymbol
public IRSymbol getSymbol(java.lang.String symbolName)
-
hasSymbol
public boolean hasSymbol(java.lang.String symbolName)
-
putSymbols
public void putSymbols(java.util.List<IRSymbol> symbols)
-
putSymbol
public void putSymbol(IRSymbol symbol)
-
isBlockInvoke
public boolean isBlockInvoke()
-
getCurrentDFS
public DynamicFunctionSymbol getCurrentDFS()
-
isStatic
public boolean isStatic()
-
-