Class BytecodeLifter


  • public class BytecodeLifter
    extends Object
    Lifts bytecode to SSA-form IR.
    • Constructor Detail

      • BytecodeLifter

        public BytecodeLifter​(ConstPool constPool)
        Creates a new bytecode lifter.
        Parameters:
        constPool - the constant pool
    • Method Detail

      • lift

        public IRMethod lift​(MethodEntry method)
        Lifts a method from bytecode to SSA-form IR.
        Parameters:
        method - the method to lift
        Returns:
        the SSA-form IR representation
      • refinePhiTypes

        public static void refinePhiTypes​(IRMethod method)
        Re-types phi results to the common type of their incoming values when every non-null incoming is the same primitive type.
        Parameters:
        method - the SSA method whose phi results are re-typed in place
      • addExceptionEdges

        public static List<IRBlock[]> addExceptionEdges​(IRMethod irMethod)
        Adds an exception edge from every protected block to its handler block.
        Parameters:
        irMethod - the method whose handler blocks to connect
        Returns:
        the list of (fromBlock, handlerBlock) edges that were actually added