Class IRClassCompiler
- java.lang.Object
-
- gw.internal.gosu.ir.compiler.bytecode.AbstractBytecodeCompiler
-
- gw.internal.gosu.ir.compiler.bytecode.IRClassCompiler
-
public class IRClassCompiler extends AbstractBytecodeCompiler
-
-
Field Summary
Fields Modifier and Type Field Description private org.objectweb.asm.ClassVisitor_cvprivate static byte[]_gosuVersionprivate IRClass_irClassprivate static booleanCOMPILE_WITH_DEBUG_INFOstatic intJAVA_VER-
Fields inherited from class gw.internal.gosu.ir.compiler.bytecode.AbstractBytecodeCompiler
OBJECT_TYPE
-
-
Constructor Summary
Constructors Constructor Description IRClassCompiler(IRClass irClass)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAnnotations()private voidaddGosuVersion()private voidaddSourceFileRef()private byte[]compile()static byte[]compileClass(IRClass irClass, boolean debug)private voidcompileClassHeader()private voidcompileFields()private voidcompileInnerClasses()private voidcompileMethod(IRMethodStatement method)private voidcompileMethods()private java.io.StringWriterconfigClassVisitor(org.objectweb.asm.ClassVisitor writer)private java.lang.StringgetClassSignature()Deals with generics.private java.lang.String[]getInterfaceNames()static java.lang.StringgetMethodDescriptor(IRMethodStatement m)static booleanisDebugFlagSet(DebugFlag flag)private voidterminateFunction(IRBytecodeContext context)java.lang.StringtoString()static voidverify(byte[] bytes)private voidvisitAnnotationDefaultValue(java.lang.Object value, IRType type, org.objectweb.asm.AnnotationVisitor annotationVisitor)private voidvisitAnnotationDefaultValue(java.lang.Object value, IRType type, org.objectweb.asm.AnnotationVisitor annotationVisitor, java.lang.String name)private voidvisitInnerClass(IRClass.InnerClassInfo innerClass)-
Methods inherited from class gw.internal.gosu.ir.compiler.bytecode.AbstractBytecodeCompiler
compileConditionAssignment, getIns, isNotPartOfBooleanExpr, isWide, negateOpcode
-
-
-
-
Field Detail
-
COMPILE_WITH_DEBUG_INFO
private static boolean COMPILE_WITH_DEBUG_INFO
-
JAVA_VER
public static final int JAVA_VER
- See Also:
- Constant Field Values
-
_cv
private org.objectweb.asm.ClassVisitor _cv
-
_irClass
private IRClass _irClass
-
_gosuVersion
private static byte[] _gosuVersion
-
-
Constructor Detail
-
IRClassCompiler
public IRClassCompiler(IRClass irClass)
-
-
Method Detail
-
compileClass
public static byte[] compileClass(IRClass irClass, boolean debug)
-
compile
private byte[] compile()
-
addGosuVersion
private void addGosuVersion()
-
addAnnotations
public void addAnnotations()
-
configClassVisitor
private java.io.StringWriter configClassVisitor(org.objectweb.asm.ClassVisitor writer)
-
verify
public static void verify(byte[] bytes)
-
isDebugFlagSet
public static boolean isDebugFlagSet(DebugFlag flag)
-
compileClassHeader
private void compileClassHeader()
-
getClassSignature
private java.lang.String getClassSignature()
Deals with generics.
-
getInterfaceNames
private java.lang.String[] getInterfaceNames()
-
addSourceFileRef
private void addSourceFileRef()
-
compileInnerClasses
private void compileInnerClasses()
-
visitInnerClass
private void visitInnerClass(IRClass.InnerClassInfo innerClass)
-
compileFields
private void compileFields()
-
compileMethods
private void compileMethods()
-
compileMethod
private void compileMethod(IRMethodStatement method)
-
visitAnnotationDefaultValue
private void visitAnnotationDefaultValue(java.lang.Object value, IRType type, org.objectweb.asm.AnnotationVisitor annotationVisitor)
-
visitAnnotationDefaultValue
private void visitAnnotationDefaultValue(java.lang.Object value, IRType type, org.objectweb.asm.AnnotationVisitor annotationVisitor, java.lang.String name)
-
terminateFunction
private void terminateFunction(IRBytecodeContext context)
-
getMethodDescriptor
public static java.lang.String getMethodDescriptor(IRMethodStatement m)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-