Package com.tonic.analysis.ssa.lift
Class InstructionTranslator
- java.lang.Object
-
- com.tonic.analysis.ssa.lift.InstructionTranslator
-
public class InstructionTranslator extends Object
Translator from JVM bytecode instructions to IR instructions during lifting.
-
-
Constructor Summary
Constructors Constructor Description InstructionTranslator(ConstPool constPool)Creates a translator with no bootstrap methods attribute.InstructionTranslator(ConstPool constPool, BootstrapMethodsAttribute bsmAttr)Creates a translator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<Integer,IRBlock>getOffsetToBlock()voidregisterBlock(int offset, IRBlock block)Registers a block at a bytecode offset.voidtranslate(Instruction instr, AbstractState state, IRBlock block)Translates a bytecode instruction to IR.
-
-
-
Constructor Detail
-
InstructionTranslator
public InstructionTranslator(ConstPool constPool)
Creates a translator with no bootstrap methods attribute.- Parameters:
constPool- the constant pool of the class being lifted
-
InstructionTranslator
public InstructionTranslator(ConstPool constPool, BootstrapMethodsAttribute bsmAttr)
Creates a translator.- Parameters:
constPool- the constant pool of the class being liftedbsmAttr- the bootstrap methods attribute for invokedynamic resolution, or null
-
-
Method Detail
-
registerBlock
public void registerBlock(int offset, IRBlock block)Registers a block at a bytecode offset.- Parameters:
offset- the bytecode offsetblock- the IR block
-
translate
public void translate(Instruction instr, AbstractState state, IRBlock block)
Translates a bytecode instruction to IR.- Parameters:
instr- the bytecode instructionstate- the abstract interpreter stateblock- the current IR block
-
-