Class IRSwitchStatementCompiler
- java.lang.Object
-
- gw.internal.gosu.ir.compiler.bytecode.AbstractBytecodeCompiler
-
- gw.internal.gosu.ir.compiler.bytecode.statement.IRSwitchStatementCompiler
-
public class IRSwitchStatementCompiler extends AbstractBytecodeCompiler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classIRSwitchStatementCompiler.ConstantCase
-
Field Summary
-
Fields inherited from class gw.internal.gosu.ir.compiler.bytecode.AbstractBytecodeCompiler
OBJECT_TYPE
-
-
Constructor Summary
Constructors Constructor Description IRSwitchStatementCompiler()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static org.objectweb.asm.Label[]collectLabels(org.objectweb.asm.Label defaultL, IRSwitchStatementCompiler.ConstantCase[] cases)static voidcompile(IRSwitchStatement statement, IRBytecodeContext context)private static voidcompileCaseBody(org.objectweb.asm.Label endSwitchLabel, java.util.List<IRStatement> statements, IRBytecodeContext context)private static voidcompileWithTableSwitch(IRSwitchStatement switchStmt, IRBytecodeContext context)private static voidemitCaseBodies(org.objectweb.asm.Label endSwitch, IRSwitchStatementCompiler.ConstantCase[] cases, IRBytecodeContext context)private static IRSwitchStatementCompiler.ConstantCase[]generateConstantCases(IRSwitchStatement switchStmt)-
Methods inherited from class gw.internal.gosu.ir.compiler.bytecode.AbstractBytecodeCompiler
compileConditionAssignment, getIns, isNotPartOfBooleanExpr, isWide, negateOpcode
-
-
-
-
Method Detail
-
compile
public static void compile(IRSwitchStatement statement, IRBytecodeContext context)
-
generateConstantCases
private static IRSwitchStatementCompiler.ConstantCase[] generateConstantCases(IRSwitchStatement switchStmt)
-
compileWithTableSwitch
private static void compileWithTableSwitch(IRSwitchStatement switchStmt, IRBytecodeContext context)
-
emitCaseBodies
private static void emitCaseBodies(org.objectweb.asm.Label endSwitch, IRSwitchStatementCompiler.ConstantCase[] cases, IRBytecodeContext context)
-
collectLabels
private static org.objectweb.asm.Label[] collectLabels(org.objectweb.asm.Label defaultL, IRSwitchStatementCompiler.ConstantCase[] cases)
-
compileCaseBody
private static void compileCaseBody(org.objectweb.asm.Label endSwitchLabel, java.util.List<IRStatement> statements, IRBytecodeContext context)
-
-