Package gw.internal.gosu.ir.transform
Class GosuClassTransformationContext
- java.lang.Object
-
- gw.internal.gosu.ir.transform.TransformationContextBase
-
- gw.internal.gosu.ir.transform.GosuClassTransformationContext
-
- All Implemented Interfaces:
TopLevelTransformationContext
public class GosuClassTransformationContext extends TransformationContextBase
-
-
Field Summary
Fields Modifier and Type Field Description private GosuClassTransformer_classTransformerprivate IGosuClassInternal_gsClassprivate java.util.List<java.lang.String>_sourceLinesprivate static booleanINCLUDE_SOURCE_COMMENTS
-
Constructor Summary
Constructors Constructor Description GosuClassTransformationContext(GosuClassTransformer classTransformer, IGosuClassInternal gsClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAssertionsStaticField()booleancurrentlyCompilingBlock()IRTypegetIRTypeForCurrentClass()java.lang.StringgetOuterThisFieldName()java.lang.StringgetOuterThisParamName()java.lang.StringgetSourceFileRef()java.lang.StringgetSourceLine(int lineNumber)private IGosuClassInternalhandleTemplatePrograms(IGosuClassInternal outermostClass)voidinitCapturedSymbolFields(java.util.List<IRStatement> statements)voidinitializeInstanceFields(java.util.List<IRStatement> statements)voidinitTypeVarFields(java.util.List<IRStatement> statements)booleanisExternalSymbol(java.lang.String name)booleanisFragmentEvaluation()booleanisIllegalProtectedCall(IType declaringClass, IRType root, IRelativeTypeInfo.Accessibility accessibility)voidmaybeAssignOuterRef(java.util.List<IRStatement> statements)private voidmaybeIndexSourceCode()voidmaybePushSupersEnclosingThisRef(java.util.List<IRExpression> arguments)voidpushEnumNameAndOrdinal(IType type, java.util.List<IRExpression> args)booleanshouldUseReflection(IType declaringClass, IRType root, IRelativeTypeInfo.Accessibility accessibility)private java.util.List<java.lang.String>split(java.lang.String source)-
Methods inherited from class gw.internal.gosu.ir.transform.TransformationContextBase
compile, compileInitializerAssignment, compilingBlock, compilingEnhancement, compilingEnum, compilingProgram, createSymbol, getCurrentFunction, getCurrentFunctionName, getCurrentFunctionReturnType, 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
-
-
-
-
Field Detail
-
_classTransformer
private GosuClassTransformer _classTransformer
-
_gsClass
private IGosuClassInternal _gsClass
-
_sourceLines
private java.util.List<java.lang.String> _sourceLines
-
INCLUDE_SOURCE_COMMENTS
private static final boolean INCLUDE_SOURCE_COMMENTS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GosuClassTransformationContext
public GosuClassTransformationContext(GosuClassTransformer classTransformer, IGosuClassInternal gsClass)
-
-
Method Detail
-
maybeAssignOuterRef
public void maybeAssignOuterRef(java.util.List<IRStatement> statements)
-
maybePushSupersEnclosingThisRef
public void maybePushSupersEnclosingThisRef(java.util.List<IRExpression> arguments)
-
pushEnumNameAndOrdinal
public void pushEnumNameAndOrdinal(IType type, java.util.List<IRExpression> args)
-
initCapturedSymbolFields
public void initCapturedSymbolFields(java.util.List<IRStatement> statements)
-
initTypeVarFields
public void initTypeVarFields(java.util.List<IRStatement> statements)
-
initializeInstanceFields
public void initializeInstanceFields(java.util.List<IRStatement> statements)
-
addAssertionsStaticField
public void addAssertionsStaticField()
-
getOuterThisParamName
public java.lang.String getOuterThisParamName()
-
getSourceFileRef
public java.lang.String getSourceFileRef()
-
handleTemplatePrograms
private IGosuClassInternal handleTemplatePrograms(IGosuClassInternal outermostClass)
-
getSourceLine
public java.lang.String getSourceLine(int lineNumber)
-
getOuterThisFieldName
public java.lang.String getOuterThisFieldName()
-
getIRTypeForCurrentClass
public IRType getIRTypeForCurrentClass()
-
isExternalSymbol
public boolean isExternalSymbol(java.lang.String name)
-
isFragmentEvaluation
public boolean isFragmentEvaluation()
-
maybeIndexSourceCode
private void maybeIndexSourceCode()
-
split
private java.util.List<java.lang.String> split(java.lang.String source)
-
shouldUseReflection
public boolean shouldUseReflection(IType declaringClass, IRType root, IRelativeTypeInfo.Accessibility accessibility)
-
isIllegalProtectedCall
public boolean isIllegalProtectedCall(IType declaringClass, IRType root, IRelativeTypeInfo.Accessibility accessibility)
-
currentlyCompilingBlock
public boolean currentlyCompilingBlock()
- Specified by:
currentlyCompilingBlockin interfaceTopLevelTransformationContext- Overrides:
currentlyCompilingBlockin classTransformationContextBase
-
-