Path: blob/master/src/java.base/share/classes/jdk/internal/reflect/ClassFileConstants.java
41159 views
/*1* Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package jdk.internal.reflect;2627/** Minimal set of class file constants for assembly of field and28method accessors. */2930interface ClassFileConstants {31// Constants32public static final byte opc_aconst_null = (byte) 0x1;33public static final byte opc_sipush = (byte) 0x11;34public static final byte opc_ldc = (byte) 0x12;3536// Local variable loads and stores37public static final byte opc_iload_0 = (byte) 0x1a;38public static final byte opc_iload_1 = (byte) 0x1b;39public static final byte opc_iload_2 = (byte) 0x1c;40public static final byte opc_iload_3 = (byte) 0x1d;41public static final byte opc_lload_0 = (byte) 0x1e;42public static final byte opc_lload_1 = (byte) 0x1f;43public static final byte opc_lload_2 = (byte) 0x20;44public static final byte opc_lload_3 = (byte) 0x21;45public static final byte opc_fload_0 = (byte) 0x22;46public static final byte opc_fload_1 = (byte) 0x23;47public static final byte opc_fload_2 = (byte) 0x24;48public static final byte opc_fload_3 = (byte) 0x25;49public static final byte opc_dload_0 = (byte) 0x26;50public static final byte opc_dload_1 = (byte) 0x27;51public static final byte opc_dload_2 = (byte) 0x28;52public static final byte opc_dload_3 = (byte) 0x29;53public static final byte opc_aload_0 = (byte) 0x2a;54public static final byte opc_aload_1 = (byte) 0x2b;55public static final byte opc_aload_2 = (byte) 0x2c;56public static final byte opc_aload_3 = (byte) 0x2d;57public static final byte opc_aaload = (byte) 0x32;58public static final byte opc_astore_0 = (byte) 0x4b;59public static final byte opc_astore_1 = (byte) 0x4c;60public static final byte opc_astore_2 = (byte) 0x4d;61public static final byte opc_astore_3 = (byte) 0x4e;6263// Stack manipulation64public static final byte opc_pop = (byte) 0x57;65public static final byte opc_dup = (byte) 0x59;66public static final byte opc_dup_x1 = (byte) 0x5a;67public static final byte opc_swap = (byte) 0x5f;6869// Conversions70public static final byte opc_i2l = (byte) 0x85;71public static final byte opc_i2f = (byte) 0x86;72public static final byte opc_i2d = (byte) 0x87;73public static final byte opc_l2i = (byte) 0x88;74public static final byte opc_l2f = (byte) 0x89;75public static final byte opc_l2d = (byte) 0x8a;76public static final byte opc_f2i = (byte) 0x8b;77public static final byte opc_f2l = (byte) 0x8c;78public static final byte opc_f2d = (byte) 0x8d;79public static final byte opc_d2i = (byte) 0x8e;80public static final byte opc_d2l = (byte) 0x8f;81public static final byte opc_d2f = (byte) 0x90;82public static final byte opc_i2b = (byte) 0x91;83public static final byte opc_i2c = (byte) 0x92;84public static final byte opc_i2s = (byte) 0x93;8586// Control flow87public static final byte opc_ifeq = (byte) 0x99;88public static final byte opc_if_icmpeq = (byte) 0x9f;89public static final byte opc_goto = (byte) 0xa7;9091// Return instructions92public static final byte opc_ireturn = (byte) 0xac;93public static final byte opc_lreturn = (byte) 0xad;94public static final byte opc_freturn = (byte) 0xae;95public static final byte opc_dreturn = (byte) 0xaf;96public static final byte opc_areturn = (byte) 0xb0;97public static final byte opc_return = (byte) 0xb1;9899// Field operations100public static final byte opc_getstatic = (byte) 0xb2;101public static final byte opc_putstatic = (byte) 0xb3;102public static final byte opc_getfield = (byte) 0xb4;103public static final byte opc_putfield = (byte) 0xb5;104105// Method invocations106public static final byte opc_invokevirtual = (byte) 0xb6;107public static final byte opc_invokespecial = (byte) 0xb7;108public static final byte opc_invokestatic = (byte) 0xb8;109public static final byte opc_invokeinterface = (byte) 0xb9;110111// Array length112public static final byte opc_arraylength = (byte) 0xbe;113114// New115public static final byte opc_new = (byte) 0xbb;116117// Athrow118public static final byte opc_athrow = (byte) 0xbf;119120// Checkcast and instanceof121public static final byte opc_checkcast = (byte) 0xc0;122public static final byte opc_instanceof = (byte) 0xc1;123124// Ifnull and ifnonnull125public static final byte opc_ifnull = (byte) 0xc6;126public static final byte opc_ifnonnull = (byte) 0xc7;127128// Constant pool tags129public static final byte CONSTANT_Class = (byte) 7;130public static final byte CONSTANT_Fieldref = (byte) 9;131public static final byte CONSTANT_Methodref = (byte) 10;132public static final byte CONSTANT_InterfaceMethodref = (byte) 11;133public static final byte CONSTANT_NameAndType = (byte) 12;134public static final byte CONSTANT_String = (byte) 8;135public static final byte CONSTANT_Utf8 = (byte) 1;136137// Access flags138public static final short ACC_PUBLIC = (short) 0x0001;139}140141142