Package com.tonic.analysis.ssa.lower
Class BytecodeLowerer
- java.lang.Object
-
- com.tonic.analysis.ssa.lower.BytecodeLowerer
-
public class BytecodeLowerer extends Object
The lowering pipeline from SSA-form IR back to JVM bytecode.
-
-
Constructor Summary
Constructors Constructor Description BytecodeLowerer(ConstPool constPool)Creates a lowerer that emits a LocalVariableTable.BytecodeLowerer(ConstPool constPool, boolean emitLocalVariableTable)Creates a lowerer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConstPoolgetConstPool()booleanisEmitLocalVariableTable()voidlower(IRMethod irMethod, MethodEntry targetMethod)Lowers the SSA method to bytecode and installs the result on the target method.
-
-
-
Constructor Detail
-
BytecodeLowerer
public BytecodeLowerer(ConstPool constPool)
Creates a lowerer that emits a LocalVariableTable.- Parameters:
constPool- the constant pool to emit against
-
BytecodeLowerer
public BytecodeLowerer(ConstPool constPool, boolean emitLocalVariableTable)
Creates a lowerer.- Parameters:
constPool- the constant pool to emit againstemitLocalVariableTable- whether to build a LocalVariableTable for the lowered code
-
-
Method Detail
-
getConstPool
public ConstPool getConstPool()
- Returns:
- the const pool
-
isEmitLocalVariableTable
public boolean isEmitLocalVariableTable()
- Returns:
- whether emit local variable table
-
lower
public void lower(IRMethod irMethod, MethodEntry targetMethod)
Lowers the SSA method to bytecode and installs the result on the target method.- Parameters:
irMethod- the SSA method to lowertargetMethod- the class-file method receiving the new code
-
-