Class InsnUtils

  • All Implemented Interfaces:
    VMConstants

    public class InsnUtils
    extends Object
    implements VMConstants
    InsnUtils provides a set of static methods which serve to select vm instructions during code annotation.
    • Constructor Detail

      • InsnUtils

        public InsnUtils()
    • Method Detail

      • integerConstant

        public static Insn integerConstant​(int i,
                                           ConstantPool pool)
        Return the best instruction for loading the specified integer constant onto the stack - hopefully use short form
      • longConstant

        public static Insn longConstant​(long l,
                                        ConstantPool pool)
        Return the best instruction for loading the specified long constant onto the stack.
      • floatConstant

        public static Insn floatConstant​(float f,
                                         ConstantPool pool)
        Return the best instruction for loading the specified float constant onto the stack.
      • doubleConstant

        public static Insn doubleConstant​(double d,
                                          ConstantPool pool)
        Return the best instruction for loading the specified double constant onto the stack.
      • aStore

        public static Insn aStore​(int i,
                                  ConstantPool pool)
        Return the best instruction for storing a reference to a local variable slot
      • iStore

        public static Insn iStore​(int i,
                                  ConstantPool pool)
        Return the best instruction for storing an int to a local variable slot
      • fStore

        public static Insn fStore​(int i,
                                  ConstantPool pool)
        Return the best instruction for storing a float to a local variable slot
      • lStore

        public static Insn lStore​(int i,
                                  ConstantPool pool)
        Return the best instruction for storing a long to a local variable slot
      • dStore

        public static Insn dStore​(int i,
                                  ConstantPool pool)
        Return the best instruction for storing a double to a local variable slot
      • aLoad

        public static Insn aLoad​(int i,
                                 ConstantPool pool)
        Return the best instruction for loading a reference from a local variable slot
      • iLoad

        public static Insn iLoad​(int i,
                                 ConstantPool pool)
        Return the best instruction for loading an int from a local variable slot
      • fLoad

        public static Insn fLoad​(int i,
                                 ConstantPool pool)
        Return the best instruction for loading a float from a local variable slot
      • lLoad

        public static Insn lLoad​(int i,
                                 ConstantPool pool)
        Return the best instruction for loading a long from a local variable slot
      • dLoad

        public static Insn dLoad​(int i,
                                 ConstantPool pool)
        Return the best instruction for loading a double from a local variable slot
      • load

        public static Insn load​(int tp,
                                int i,
                                ConstantPool pool)
        Return the best instruction for loading a value from a local variable slot
      • store

        public static Insn store​(int tp,
                                 int i,
                                 ConstantPool pool)
        Return the best instruction for storing a value to a local variable slot