Package gw.internal.gosu.ir.transform
Class GosuFragmentTransformationContext
- java.lang.Object
-
- gw.internal.gosu.ir.transform.TransformationContextBase
-
- gw.internal.gosu.ir.transform.GosuFragmentTransformationContext
-
- All Implemented Interfaces:
TopLevelTransformationContext
public class GosuFragmentTransformationContext extends TransformationContextBase
-
-
Constructor Summary
Constructors Constructor Description GosuFragmentTransformationContext(GosuFragment fragment, IRType compilingType, String sourceFile, boolean instrument)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAssertionsStaticField()ITypegetCurrentFunctionReturnType()IRTypegetIRTypeForCurrentClass()StringgetOuterThisFieldName()StringgetOuterThisParamName()StringgetSourceFileRef()StringgetSourceLine(int lineNumber)voidinitCapturedSymbolFields(List<IRStatement> statements)voidinitializeInstanceFields(List<IRStatement> statements)voidinitTypeVarFields(List<IRStatement> statements)booleanisExternalSymbol(String name)booleanisFragmentEvaluation()booleanisIllegalProtectedCall(IType declaringClass, IRType root, IRelativeTypeInfo.Accessibility accessibility)voidmaybeAssignOuterRef(List<IRStatement> statements)voidmaybePushSupersEnclosingThisRef(List<IRExpression> arguments)voidpushEnumNameAndOrdinal(IType type, List<IRExpression> args)booleanshouldUseReflection(IType declaringClass, IRType root, IRelativeTypeInfo.Accessibility accessibility)-
Methods inherited from class gw.internal.gosu.ir.transform.TransformationContextBase
compile, compileInitializerAssignment, compilingBlock, compilingEnhancement, compilingEnum, compilingProgram, createSymbol, currentlyCompilingBlock, getCurrentFunction, getCurrentFunctionName, getEnclosingType, getGosuClass, getIrClass, getScopes, getSuperType, getSymbol, getTypeParamIndex, hasSuperBeenInvoked, hasSymbol, incrementLazyTypeMethodCount, initBodyContext, initBodyContext, isBlockInvoke, isCurrentFunctionStatic, isNonStaticInnerClass, isStatic, makeAndIndexTempSymbol, makeAndIndexTempSymbol, makeTempSymbolName, markInvokingSuper, markSuperInvoked, popScope, pushScope, putSymbol, putSymbols, setIrClass, updateSuperInvokedAfterLastExpressionCompiles
-
-
-
-
Constructor Detail
-
GosuFragmentTransformationContext
public GosuFragmentTransformationContext(GosuFragment fragment, IRType compilingType, String sourceFile, boolean instrument)
-
-
Method Detail
-
maybeAssignOuterRef
public void maybeAssignOuterRef(List<IRStatement> statements)
-
maybePushSupersEnclosingThisRef
public void maybePushSupersEnclosingThisRef(List<IRExpression> arguments)
-
pushEnumNameAndOrdinal
public void pushEnumNameAndOrdinal(IType type, List<IRExpression> args)
-
initCapturedSymbolFields
public void initCapturedSymbolFields(List<IRStatement> statements)
-
initTypeVarFields
public void initTypeVarFields(List<IRStatement> statements)
-
initializeInstanceFields
public void initializeInstanceFields(List<IRStatement> statements)
-
getOuterThisFieldName
public String getOuterThisFieldName()
-
getOuterThisParamName
public String getOuterThisParamName()
-
getSourceFileRef
public String getSourceFileRef()
-
getSourceLine
public String getSourceLine(int lineNumber)
-
getIRTypeForCurrentClass
public IRType getIRTypeForCurrentClass()
-
shouldUseReflection
public boolean shouldUseReflection(IType declaringClass, IRType root, IRelativeTypeInfo.Accessibility accessibility)
-
isIllegalProtectedCall
public boolean isIllegalProtectedCall(IType declaringClass, IRType root, IRelativeTypeInfo.Accessibility accessibility)
-
isExternalSymbol
public boolean isExternalSymbol(String name)
-
isFragmentEvaluation
public boolean isFragmentEvaluation()
-
addAssertionsStaticField
public void addAssertionsStaticField()
-
getCurrentFunctionReturnType
public IType getCurrentFunctionReturnType()
- Specified by:
getCurrentFunctionReturnTypein interfaceTopLevelTransformationContext- Overrides:
getCurrentFunctionReturnTypein classTransformationContextBase
-
-