Class InstructionTranslator


  • public class InstructionTranslator
    extends Object
    Translator from JVM bytecode instructions to IR instructions during lifting.
    • 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 lifted
        bsmAttr - the bootstrap methods attribute for invokedynamic resolution, or null
    • Method Detail

      • getOffsetToBlock

        public Map<Integer,​IRBlock> getOffsetToBlock()
        Returns:
        the offset to block
      • registerBlock

        public void registerBlock​(int offset,
                                  IRBlock block)
        Registers a block at a bytecode offset.
        Parameters:
        offset - the bytecode offset
        block - the IR block
      • translate

        public void translate​(Instruction instr,
                              AbstractState state,
                              IRBlock block)
        Translates a bytecode instruction to IR.
        Parameters:
        instr - the bytecode instruction
        state - the abstract interpreter state
        block - the current IR block