jdk/src/java.base/share/classes/sun/reflect/ClassFileConstants.java
changeset 37377 bd3b98a11a14
parent 37376 5daa5fbad3ce
parent 37374 ee1b8619eddb
child 37380 55c2549714af
equal deleted inserted replaced
37376:5daa5fbad3ce 37377:bd3b98a11a14
     1 /*
       
     2  * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
       
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       
     4  *
       
     5  * This code is free software; you can redistribute it and/or modify it
       
     6  * under the terms of the GNU General Public License version 2 only, as
       
     7  * published by the Free Software Foundation.  Oracle designates this
       
     8  * particular file as subject to the "Classpath" exception as provided
       
     9  * by Oracle in the LICENSE file that accompanied this code.
       
    10  *
       
    11  * This code is distributed in the hope that it will be useful, but WITHOUT
       
    12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
       
    13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
       
    14  * version 2 for more details (a copy is included in the LICENSE file that
       
    15  * accompanied this code).
       
    16  *
       
    17  * You should have received a copy of the GNU General Public License version
       
    18  * 2 along with this work; if not, write to the Free Software Foundation,
       
    19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
       
    20  *
       
    21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
       
    22  * or visit www.oracle.com if you need additional information or have any
       
    23  * questions.
       
    24  */
       
    25 
       
    26 package sun.reflect;
       
    27 
       
    28 /** Minimal set of class file constants for assembly of field and
       
    29     method accessors. */
       
    30 
       
    31 interface ClassFileConstants {
       
    32     // Constants
       
    33     public static final byte opc_aconst_null   = (byte) 0x1;
       
    34     public static final byte opc_sipush        = (byte) 0x11;
       
    35     public static final byte opc_ldc           = (byte) 0x12;
       
    36 
       
    37     // Local variable loads and stores
       
    38     public static final byte opc_iload_0       = (byte) 0x1a;
       
    39     public static final byte opc_iload_1       = (byte) 0x1b;
       
    40     public static final byte opc_iload_2       = (byte) 0x1c;
       
    41     public static final byte opc_iload_3       = (byte) 0x1d;
       
    42     public static final byte opc_lload_0       = (byte) 0x1e;
       
    43     public static final byte opc_lload_1       = (byte) 0x1f;
       
    44     public static final byte opc_lload_2       = (byte) 0x20;
       
    45     public static final byte opc_lload_3       = (byte) 0x21;
       
    46     public static final byte opc_fload_0       = (byte) 0x22;
       
    47     public static final byte opc_fload_1       = (byte) 0x23;
       
    48     public static final byte opc_fload_2       = (byte) 0x24;
       
    49     public static final byte opc_fload_3       = (byte) 0x25;
       
    50     public static final byte opc_dload_0       = (byte) 0x26;
       
    51     public static final byte opc_dload_1       = (byte) 0x27;
       
    52     public static final byte opc_dload_2       = (byte) 0x28;
       
    53     public static final byte opc_dload_3       = (byte) 0x29;
       
    54     public static final byte opc_aload_0       = (byte) 0x2a;
       
    55     public static final byte opc_aload_1       = (byte) 0x2b;
       
    56     public static final byte opc_aload_2       = (byte) 0x2c;
       
    57     public static final byte opc_aload_3       = (byte) 0x2d;
       
    58     public static final byte opc_aaload        = (byte) 0x32;
       
    59     public static final byte opc_astore_0      = (byte) 0x4b;
       
    60     public static final byte opc_astore_1      = (byte) 0x4c;
       
    61     public static final byte opc_astore_2      = (byte) 0x4d;
       
    62     public static final byte opc_astore_3      = (byte) 0x4e;
       
    63 
       
    64     // Stack manipulation
       
    65     public static final byte opc_pop           = (byte) 0x57;
       
    66     public static final byte opc_dup           = (byte) 0x59;
       
    67     public static final byte opc_dup_x1        = (byte) 0x5a;
       
    68     public static final byte opc_swap          = (byte) 0x5f;
       
    69 
       
    70     // Conversions
       
    71     public static final byte opc_i2l           = (byte) 0x85;
       
    72     public static final byte opc_i2f           = (byte) 0x86;
       
    73     public static final byte opc_i2d           = (byte) 0x87;
       
    74     public static final byte opc_l2i           = (byte) 0x88;
       
    75     public static final byte opc_l2f           = (byte) 0x89;
       
    76     public static final byte opc_l2d           = (byte) 0x8a;
       
    77     public static final byte opc_f2i           = (byte) 0x8b;
       
    78     public static final byte opc_f2l           = (byte) 0x8c;
       
    79     public static final byte opc_f2d           = (byte) 0x8d;
       
    80     public static final byte opc_d2i           = (byte) 0x8e;
       
    81     public static final byte opc_d2l           = (byte) 0x8f;
       
    82     public static final byte opc_d2f           = (byte) 0x90;
       
    83     public static final byte opc_i2b           = (byte) 0x91;
       
    84     public static final byte opc_i2c           = (byte) 0x92;
       
    85     public static final byte opc_i2s           = (byte) 0x93;
       
    86 
       
    87     // Control flow
       
    88     public static final byte opc_ifeq          = (byte) 0x99;
       
    89     public static final byte opc_if_icmpeq     = (byte) 0x9f;
       
    90     public static final byte opc_goto          = (byte) 0xa7;
       
    91 
       
    92     // Return instructions
       
    93     public static final byte opc_ireturn       = (byte) 0xac;
       
    94     public static final byte opc_lreturn       = (byte) 0xad;
       
    95     public static final byte opc_freturn       = (byte) 0xae;
       
    96     public static final byte opc_dreturn       = (byte) 0xaf;
       
    97     public static final byte opc_areturn       = (byte) 0xb0;
       
    98     public static final byte opc_return        = (byte) 0xb1;
       
    99 
       
   100     // Field operations
       
   101     public static final byte opc_getstatic     = (byte) 0xb2;
       
   102     public static final byte opc_putstatic     = (byte) 0xb3;
       
   103     public static final byte opc_getfield      = (byte) 0xb4;
       
   104     public static final byte opc_putfield      = (byte) 0xb5;
       
   105 
       
   106     // Method invocations
       
   107     public static final byte opc_invokevirtual   = (byte) 0xb6;
       
   108     public static final byte opc_invokespecial   = (byte) 0xb7;
       
   109     public static final byte opc_invokestatic    = (byte) 0xb8;
       
   110     public static final byte opc_invokeinterface = (byte) 0xb9;
       
   111 
       
   112     // Array length
       
   113     public static final byte opc_arraylength     = (byte) 0xbe;
       
   114 
       
   115     // New
       
   116     public static final byte opc_new           = (byte) 0xbb;
       
   117 
       
   118     // Athrow
       
   119     public static final byte opc_athrow        = (byte) 0xbf;
       
   120 
       
   121     // Checkcast and instanceof
       
   122     public static final byte opc_checkcast     = (byte) 0xc0;
       
   123     public static final byte opc_instanceof    = (byte) 0xc1;
       
   124 
       
   125     // Ifnull and ifnonnull
       
   126     public static final byte opc_ifnull        = (byte) 0xc6;
       
   127     public static final byte opc_ifnonnull     = (byte) 0xc7;
       
   128 
       
   129     // Constant pool tags
       
   130     public static final byte CONSTANT_Class              = (byte) 7;
       
   131     public static final byte CONSTANT_Fieldref           = (byte) 9;
       
   132     public static final byte CONSTANT_Methodref          = (byte) 10;
       
   133     public static final byte CONSTANT_InterfaceMethodref = (byte) 11;
       
   134     public static final byte CONSTANT_NameAndType        = (byte) 12;
       
   135     public static final byte CONSTANT_String             = (byte) 8;
       
   136     public static final byte CONSTANT_Utf8               = (byte) 1;
       
   137 
       
   138     // Access flags
       
   139     public static final short ACC_PUBLIC = (short) 0x0001;
       
   140 }