< prev index next >

src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java

Print this page
rev 47452 : imported patch jdk-new-asmv6.patch


  53  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  54  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  55  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  56  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  57  * THE POSSIBILITY OF SUCH DAMAGE.
  58  */
  59 package jdk.internal.org.objectweb.asm;
  60 
  61 /**
  62  * Defines the JVM opcodes, access flags and array type codes. This interface
  63  * does not define all the JVM opcodes because some opcodes are automatically
  64  * handled. For example, the xLOAD and xSTORE opcodes are automatically replaced
  65  * by xLOAD_n and xSTORE_n opcodes when possible. The xLOAD_n and xSTORE_n
  66  * opcodes are therefore not defined in this interface. Likewise for LDC,
  67  * automatically replaced by LDC_W or LDC2_W when necessary, WIDE, GOTO_W and
  68  * JSR_W.
  69  *
  70  * @author Eric Bruneton
  71  * @author Eugene Kuleshov
  72  */
  73 @SuppressWarnings("deprecation") // for Integer(int) constructor
  74 public interface Opcodes {
  75 
  76     // ASM API versions
  77 
  78     int ASM4 = 4 << 16 | 0 << 8 | 0;
  79     int ASM5 = 5 << 16 | 0 << 8 | 0;

  80 
  81     // versions
  82 
  83     int V1_1 = 3 << 16 | 45;
  84     int V1_2 = 0 << 16 | 46;
  85     int V1_3 = 0 << 16 | 47;
  86     int V1_4 = 0 << 16 | 48;
  87     int V1_5 = 0 << 16 | 49;
  88     int V1_6 = 0 << 16 | 50;
  89     int V1_7 = 0 << 16 | 51;
  90     int V1_8 = 0 << 16 | 52;
  91     int V1_9 = 0 << 16 | 53;
  92 
  93     // access flags
  94 
  95     int ACC_PUBLIC = 0x0001; // class, field, method
  96     int ACC_PRIVATE = 0x0002; // class, field, method
  97     int ACC_PROTECTED = 0x0004; // class, field, method
  98     int ACC_STATIC = 0x0008; // field, method
  99     int ACC_FINAL = 0x0010; // class, field, method, parameter
 100     int ACC_SUPER = 0x0020; // class
 101     int ACC_SYNCHRONIZED = 0x0020; // method


 102     int ACC_VOLATILE = 0x0040; // field
 103     int ACC_BRIDGE = 0x0040; // method

 104     int ACC_VARARGS = 0x0080; // method
 105     int ACC_TRANSIENT = 0x0080; // field
 106     int ACC_NATIVE = 0x0100; // method
 107     int ACC_INTERFACE = 0x0200; // class
 108     int ACC_ABSTRACT = 0x0400; // class, method
 109     int ACC_STRICT = 0x0800; // method
 110     int ACC_SYNTHETIC = 0x1000; // class, field, method, parameter
 111     int ACC_ANNOTATION = 0x2000; // class
 112     int ACC_ENUM = 0x4000; // class(?) field inner
 113     int ACC_MANDATED = 0x8000; // parameter

 114 

 115     // ASM specific pseudo access flags
 116 
 117     int ACC_DEPRECATED = 0x20000; // class, field, method
 118 
 119     // types for NEWARRAY
 120 
 121     int T_BOOLEAN = 4;
 122     int T_CHAR = 5;
 123     int T_FLOAT = 6;
 124     int T_DOUBLE = 7;
 125     int T_BYTE = 8;
 126     int T_SHORT = 9;
 127     int T_INT = 10;
 128     int T_LONG = 11;
 129 
 130     // tags for Handle
 131 
 132     int H_GETFIELD = 1;
 133     int H_GETSTATIC = 2;
 134     int H_PUTFIELD = 3;


 160 
 161     /**
 162      * Represents a compressed frame where locals are the same as the locals in
 163      * the previous frame, except that the last 1-3 locals are absent and with
 164      * an empty stack.
 165      */
 166     int F_CHOP = 2;
 167 
 168     /**
 169      * Represents a compressed frame with exactly the same locals as the
 170      * previous frame and with an empty stack.
 171      */
 172     int F_SAME = 3;
 173 
 174     /**
 175      * Represents a compressed frame with exactly the same locals as the
 176      * previous frame and with a single value on the stack.
 177      */
 178     int F_SAME1 = 4;
 179 
 180     // For reference comparison purposes, construct new instances
 181     // instead of using valueOf() or autoboxing.
 182     Integer TOP = new Integer(0);
 183     Integer INTEGER = new Integer(1);
 184     Integer FLOAT = new Integer(2);
 185     Integer DOUBLE = new Integer(3);
 186     Integer LONG = new Integer(4);
 187     Integer NULL = new Integer(5);
 188     Integer UNINITIALIZED_THIS = new Integer(6);


 189 
 190     // opcodes // visit method (- = idem)
 191 
 192     int NOP = 0; // visitInsn
 193     int ACONST_NULL = 1; // -
 194     int ICONST_M1 = 2; // -
 195     int ICONST_0 = 3; // -
 196     int ICONST_1 = 4; // -
 197     int ICONST_2 = 5; // -
 198     int ICONST_3 = 6; // -
 199     int ICONST_4 = 7; // -
 200     int ICONST_5 = 8; // -
 201     int LCONST_0 = 9; // -
 202     int LCONST_1 = 10; // -
 203     int FCONST_0 = 11; // -
 204     int FCONST_1 = 12; // -
 205     int FCONST_2 = 13; // -
 206     int DCONST_0 = 14; // -
 207     int DCONST_1 = 15; // -
 208     int BIPUSH = 16; // visitIntInsn




  53  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  54  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  55  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  56  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  57  * THE POSSIBILITY OF SUCH DAMAGE.
  58  */
  59 package jdk.internal.org.objectweb.asm;
  60 
  61 /**
  62  * Defines the JVM opcodes, access flags and array type codes. This interface
  63  * does not define all the JVM opcodes because some opcodes are automatically
  64  * handled. For example, the xLOAD and xSTORE opcodes are automatically replaced
  65  * by xLOAD_n and xSTORE_n opcodes when possible. The xLOAD_n and xSTORE_n
  66  * opcodes are therefore not defined in this interface. Likewise for LDC,
  67  * automatically replaced by LDC_W or LDC2_W when necessary, WIDE, GOTO_W and
  68  * JSR_W.
  69  *
  70  * @author Eric Bruneton
  71  * @author Eugene Kuleshov
  72  */

  73 public interface Opcodes {
  74 
  75     // ASM API versions
  76 
  77     int ASM4 = 4 << 16 | 0 << 8 | 0;
  78     int ASM5 = 5 << 16 | 0 << 8 | 0;
  79     int ASM6 = 6 << 16 | 0 << 8 | 0;
  80 
  81     // versions
  82 
  83     int V1_1 = 3 << 16 | 45;
  84     int V1_2 = 0 << 16 | 46;
  85     int V1_3 = 0 << 16 | 47;
  86     int V1_4 = 0 << 16 | 48;
  87     int V1_5 = 0 << 16 | 49;
  88     int V1_6 = 0 << 16 | 50;
  89     int V1_7 = 0 << 16 | 51;
  90     int V1_8 = 0 << 16 | 52;
  91     int V9 = 0 << 16 | 53;
  92 
  93     // access flags
  94 
  95     int ACC_PUBLIC = 0x0001; // class, field, method
  96     int ACC_PRIVATE = 0x0002; // class, field, method
  97     int ACC_PROTECTED = 0x0004; // class, field, method
  98     int ACC_STATIC = 0x0008; // field, method
  99     int ACC_FINAL = 0x0010; // class, field, method, parameter
 100     int ACC_SUPER = 0x0020; // class
 101     int ACC_SYNCHRONIZED = 0x0020; // method
 102     int ACC_OPEN = 0x0020; // module
 103     int ACC_TRANSITIVE = 0x0020; // module requires
 104     int ACC_VOLATILE = 0x0040; // field
 105     int ACC_BRIDGE = 0x0040; // method
 106     int ACC_STATIC_PHASE = 0x0040; // module requires
 107     int ACC_VARARGS = 0x0080; // method
 108     int ACC_TRANSIENT = 0x0080; // field
 109     int ACC_NATIVE = 0x0100; // method
 110     int ACC_INTERFACE = 0x0200; // class
 111     int ACC_ABSTRACT = 0x0400; // class, method
 112     int ACC_STRICT = 0x0800; // method
 113     int ACC_SYNTHETIC = 0x1000; // class, field, method, parameter, module *
 114     int ACC_ANNOTATION = 0x2000; // class
 115     int ACC_ENUM = 0x4000; // class(?) field inner
 116     int ACC_MANDATED = 0x8000; // parameter, module, module *
 117     int ACC_MODULE = 0x8000; // class
 118 
 119 
 120     // ASM specific pseudo access flags
 121 
 122     int ACC_DEPRECATED = 0x20000; // class, field, method
 123 
 124     // types for NEWARRAY
 125 
 126     int T_BOOLEAN = 4;
 127     int T_CHAR = 5;
 128     int T_FLOAT = 6;
 129     int T_DOUBLE = 7;
 130     int T_BYTE = 8;
 131     int T_SHORT = 9;
 132     int T_INT = 10;
 133     int T_LONG = 11;
 134 
 135     // tags for Handle
 136 
 137     int H_GETFIELD = 1;
 138     int H_GETSTATIC = 2;
 139     int H_PUTFIELD = 3;


 165 
 166     /**
 167      * Represents a compressed frame where locals are the same as the locals in
 168      * the previous frame, except that the last 1-3 locals are absent and with
 169      * an empty stack.
 170      */
 171     int F_CHOP = 2;
 172 
 173     /**
 174      * Represents a compressed frame with exactly the same locals as the
 175      * previous frame and with an empty stack.
 176      */
 177     int F_SAME = 3;
 178 
 179     /**
 180      * Represents a compressed frame with exactly the same locals as the
 181      * previous frame and with a single value on the stack.
 182      */
 183     int F_SAME1 = 4;
 184 
 185     // Do not try to change the following code to use auto-boxing,
 186     // these values are compared by reference and not by value
 187     // The constructor of Integer was deprecated in 9
 188     // but we are stuck with it by backward compatibility
 189     @SuppressWarnings("deprecation") Integer TOP = new Integer(0);
 190     @SuppressWarnings("deprecation") Integer INTEGER = new Integer(1);
 191     @SuppressWarnings("deprecation") Integer FLOAT = new Integer(2);
 192     @SuppressWarnings("deprecation") Integer DOUBLE = new Integer(3);
 193     @SuppressWarnings("deprecation") Integer LONG = new Integer(4);
 194     @SuppressWarnings("deprecation") Integer NULL = new Integer(5);
 195     @SuppressWarnings("deprecation") Integer UNINITIALIZED_THIS = new Integer(6);
 196 
 197     // opcodes // visit method (- = idem)
 198 
 199     int NOP = 0; // visitInsn
 200     int ACONST_NULL = 1; // -
 201     int ICONST_M1 = 2; // -
 202     int ICONST_0 = 3; // -
 203     int ICONST_1 = 4; // -
 204     int ICONST_2 = 5; // -
 205     int ICONST_3 = 6; // -
 206     int ICONST_4 = 7; // -
 207     int ICONST_5 = 8; // -
 208     int LCONST_0 = 9; // -
 209     int LCONST_1 = 10; // -
 210     int FCONST_0 = 11; // -
 211     int FCONST_1 = 12; // -
 212     int FCONST_2 = 13; // -
 213     int DCONST_0 = 14; // -
 214     int DCONST_1 = 15; // -
 215     int BIPUSH = 16; // visitIntInsn


< prev index next >