Path: blob/master/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/interpreter/Bytecodes.java
41161 views
/*1* Copyright (c) 2001, 2020, 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.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324package sun.jvm.hotspot.interpreter;2526import java.util.*;27import sun.jvm.hotspot.oops.*;28import sun.jvm.hotspot.runtime.*;29import sun.jvm.hotspot.utilities.*;30import sun.jvm.hotspot.utilities.Observable;31import sun.jvm.hotspot.utilities.Observer;3233// Bytecodes specifies all bytecodes used in the VM and34// provides utility functions to get bytecode attributes.3536public class Bytecodes {37public static final int _illegal = -1;3839// Java bytecodes40public static final int _nop = 0; // 0x0041public static final int _aconst_null = 1; // 0x0142public static final int _iconst_m1 = 2; // 0x0243public static final int _iconst_0 = 3; // 0x0344public static final int _iconst_1 = 4; // 0x0445public static final int _iconst_2 = 5; // 0x0546public static final int _iconst_3 = 6; // 0x0647public static final int _iconst_4 = 7; // 0x0748public static final int _iconst_5 = 8; // 0x0849public static final int _lconst_0 = 9; // 0x0950public static final int _lconst_1 = 10; // 0x0a51public static final int _fconst_0 = 11; // 0x0b52public static final int _fconst_1 = 12; // 0x0c53public static final int _fconst_2 = 13; // 0x0d54public static final int _dconst_0 = 14; // 0x0e55public static final int _dconst_1 = 15; // 0x0f56public static final int _bipush = 16; // 0x1057public static final int _sipush = 17; // 0x1158public static final int _ldc = 18; // 0x1259public static final int _ldc_w = 19; // 0x1360public static final int _ldc2_w = 20; // 0x1461public static final int _iload = 21; // 0x1562public static final int _lload = 22; // 0x1663public static final int _fload = 23; // 0x1764public static final int _dload = 24; // 0x1865public static final int _aload = 25; // 0x1966public static final int _iload_0 = 26; // 0x1a67public static final int _iload_1 = 27; // 0x1b68public static final int _iload_2 = 28; // 0x1c69public static final int _iload_3 = 29; // 0x1d70public static final int _lload_0 = 30; // 0x1e71public static final int _lload_1 = 31; // 0x1f72public static final int _lload_2 = 32; // 0x2073public static final int _lload_3 = 33; // 0x2174public static final int _fload_0 = 34; // 0x2275public static final int _fload_1 = 35; // 0x2376public static final int _fload_2 = 36; // 0x2477public static final int _fload_3 = 37; // 0x2578public static final int _dload_0 = 38; // 0x2679public static final int _dload_1 = 39; // 0x2780public static final int _dload_2 = 40; // 0x2881public static final int _dload_3 = 41; // 0x2982public static final int _aload_0 = 42; // 0x2a83public static final int _aload_1 = 43; // 0x2b84public static final int _aload_2 = 44; // 0x2c85public static final int _aload_3 = 45; // 0x2d86public static final int _iaload = 46; // 0x2e87public static final int _laload = 47; // 0x2f88public static final int _faload = 48; // 0x3089public static final int _daload = 49; // 0x3190public static final int _aaload = 50; // 0x3291public static final int _baload = 51; // 0x3392public static final int _caload = 52; // 0x3493public static final int _saload = 53; // 0x3594public static final int _istore = 54; // 0x3695public static final int _lstore = 55; // 0x3796public static final int _fstore = 56; // 0x3897public static final int _dstore = 57; // 0x3998public static final int _astore = 58; // 0x3a99public static final int _istore_0 = 59; // 0x3b100public static final int _istore_1 = 60; // 0x3c101public static final int _istore_2 = 61; // 0x3d102public static final int _istore_3 = 62; // 0x3e103public static final int _lstore_0 = 63; // 0x3f104public static final int _lstore_1 = 64; // 0x40105public static final int _lstore_2 = 65; // 0x41106public static final int _lstore_3 = 66; // 0x42107public static final int _fstore_0 = 67; // 0x43108public static final int _fstore_1 = 68; // 0x44109public static final int _fstore_2 = 69; // 0x45110public static final int _fstore_3 = 70; // 0x46111public static final int _dstore_0 = 71; // 0x47112public static final int _dstore_1 = 72; // 0x48113public static final int _dstore_2 = 73; // 0x49114public static final int _dstore_3 = 74; // 0x4a115public static final int _astore_0 = 75; // 0x4b116public static final int _astore_1 = 76; // 0x4c117public static final int _astore_2 = 77; // 0x4d118public static final int _astore_3 = 78; // 0x4e119public static final int _iastore = 79; // 0x4f120public static final int _lastore = 80; // 0x50121public static final int _fastore = 81; // 0x51122public static final int _dastore = 82; // 0x52123public static final int _aastore = 83; // 0x53124public static final int _bastore = 84; // 0x54125public static final int _castore = 85; // 0x55126public static final int _sastore = 86; // 0x56127public static final int _pop = 87; // 0x57128public static final int _pop2 = 88; // 0x58129public static final int _dup = 89; // 0x59130public static final int _dup_x1 = 90; // 0x5a131public static final int _dup_x2 = 91; // 0x5b132public static final int _dup2 = 92; // 0x5c133public static final int _dup2_x1 = 93; // 0x5d134public static final int _dup2_x2 = 94; // 0x5e135public static final int _swap = 95; // 0x5f136public static final int _iadd = 96; // 0x60137public static final int _ladd = 97; // 0x61138public static final int _fadd = 98; // 0x62139public static final int _dadd = 99; // 0x63140public static final int _isub = 100; // 0x64141public static final int _lsub = 101; // 0x65142public static final int _fsub = 102; // 0x66143public static final int _dsub = 103; // 0x67144public static final int _imul = 104; // 0x68145public static final int _lmul = 105; // 0x69146public static final int _fmul = 106; // 0x6a147public static final int _dmul = 107; // 0x6b148public static final int _idiv = 108; // 0x6c149public static final int _ldiv = 109; // 0x6d150public static final int _fdiv = 110; // 0x6e151public static final int _ddiv = 111; // 0x6f152public static final int _irem = 112; // 0x70153public static final int _lrem = 113; // 0x71154public static final int _frem = 114; // 0x72155public static final int _drem = 115; // 0x73156public static final int _ineg = 116; // 0x74157public static final int _lneg = 117; // 0x75158public static final int _fneg = 118; // 0x76159public static final int _dneg = 119; // 0x77160public static final int _ishl = 120; // 0x78161public static final int _lshl = 121; // 0x79162public static final int _ishr = 122; // 0x7a163public static final int _lshr = 123; // 0x7b164public static final int _iushr = 124; // 0x7c165public static final int _lushr = 125; // 0x7d166public static final int _iand = 126; // 0x7e167public static final int _land = 127; // 0x7f168public static final int _ior = 128; // 0x80169public static final int _lor = 129; // 0x81170public static final int _ixor = 130; // 0x82171public static final int _lxor = 131; // 0x83172public static final int _iinc = 132; // 0x84173public static final int _i2l = 133; // 0x85174public static final int _i2f = 134; // 0x86175public static final int _i2d = 135; // 0x87176public static final int _l2i = 136; // 0x88177public static final int _l2f = 137; // 0x89178public static final int _l2d = 138; // 0x8a179public static final int _f2i = 139; // 0x8b180public static final int _f2l = 140; // 0x8c181public static final int _f2d = 141; // 0x8d182public static final int _d2i = 142; // 0x8e183public static final int _d2l = 143; // 0x8f184public static final int _d2f = 144; // 0x90185public static final int _i2b = 145; // 0x91186public static final int _i2c = 146; // 0x92187public static final int _i2s = 147; // 0x93188public static final int _lcmp = 148; // 0x94189public static final int _fcmpl = 149; // 0x95190public static final int _fcmpg = 150; // 0x96191public static final int _dcmpl = 151; // 0x97192public static final int _dcmpg = 152; // 0x98193public static final int _ifeq = 153; // 0x99194public static final int _ifne = 154; // 0x9a195public static final int _iflt = 155; // 0x9b196public static final int _ifge = 156; // 0x9c197public static final int _ifgt = 157; // 0x9d198public static final int _ifle = 158; // 0x9e199public static final int _if_icmpeq = 159; // 0x9f200public static final int _if_icmpne = 160; // 0xa0201public static final int _if_icmplt = 161; // 0xa1202public static final int _if_icmpge = 162; // 0xa2203public static final int _if_icmpgt = 163; // 0xa3204public static final int _if_icmple = 164; // 0xa4205public static final int _if_acmpeq = 165; // 0xa5206public static final int _if_acmpne = 166; // 0xa6207public static final int _goto = 167; // 0xa7208public static final int _jsr = 168; // 0xa8209public static final int _ret = 169; // 0xa9210public static final int _tableswitch = 170; // 0xaa211public static final int _lookupswitch = 171; // 0xab212public static final int _ireturn = 172; // 0xac213public static final int _lreturn = 173; // 0xad214public static final int _freturn = 174; // 0xae215public static final int _dreturn = 175; // 0xaf216public static final int _areturn = 176; // 0xb0217public static final int _return = 177; // 0xb1218public static final int _getstatic = 178; // 0xb2219public static final int _putstatic = 179; // 0xb3220public static final int _getfield = 180; // 0xb4221public static final int _putfield = 181; // 0xb5222public static final int _invokevirtual = 182; // 0xb6223public static final int _invokespecial = 183; // 0xb7224public static final int _invokestatic = 184; // 0xb8225public static final int _invokeinterface = 185; // 0xb9226public static final int _invokedynamic = 186; // 0xba227public static final int _new = 187; // 0xbb228public static final int _newarray = 188; // 0xbc229public static final int _anewarray = 189; // 0xbd230public static final int _arraylength = 190; // 0xbe231public static final int _athrow = 191; // 0xbf232public static final int _checkcast = 192; // 0xc0233public static final int _instanceof = 193; // 0xc1234public static final int _monitorenter = 194; // 0xc2235public static final int _monitorexit = 195; // 0xc3236public static final int _wide = 196; // 0xc4237public static final int _multianewarray = 197; // 0xc5238public static final int _ifnull = 198; // 0xc6239public static final int _ifnonnull = 199; // 0xc7240public static final int _goto_w = 200; // 0xc8241public static final int _jsr_w = 201; // 0xc9242public static final int _breakpoint = 202; // 0xca243244public static final int number_of_java_codes = 203;245246// JVM bytecodes247public static final int _fast_agetfield = number_of_java_codes;248public static final int _fast_bgetfield = 204;249public static final int _fast_cgetfield = 205;250public static final int _fast_dgetfield = 206;251public static final int _fast_fgetfield = 207;252public static final int _fast_igetfield = 208;253public static final int _fast_lgetfield = 209;254public static final int _fast_sgetfield = 210;255public static final int _fast_aputfield = 211;256public static final int _fast_bputfield = 212;257public static final int _fast_zputfield = 213;258public static final int _fast_cputfield = 214;259public static final int _fast_dputfield = 215;260public static final int _fast_fputfield = 216;261public static final int _fast_iputfield = 217;262public static final int _fast_lputfield = 218;263public static final int _fast_sputfield = 219;264public static final int _fast_aload_0 = 220;265public static final int _fast_iaccess_0 = 221;266public static final int _fast_aaccess_0 = 222;267public static final int _fast_faccess_0 = 223;268public static final int _fast_iload = 224;269public static final int _fast_iload2 = 225;270public static final int _fast_icaload = 226;271public static final int _fast_invokevfinal = 227;272public static final int _fast_linearswitch = 228;273public static final int _fast_binaryswitch = 229;274public static final int _fast_aldc = 230;275public static final int _fast_aldc_w = 231;276public static final int _return_register_finalizer = 232;277public static final int _invokehandle = 233;278279// Bytecodes rewritten at CDS dump time280public static final int _nofast_getfield = 234;281public static final int _nofast_putfield = 235;282public static final int _nofast_aload_0 = 236;283public static final int _nofast_iload = 237;284public static final int _shouldnotreachhere = 238; // For debugging285286public static final int number_of_codes = 239;287288// Flag bits derived from format strings, can_trap, can_rewrite, etc.:289// semantic flags:290static final int _bc_can_trap = 1<<0; // bytecode execution can trap or block291static final int _bc_can_rewrite = 1<<1; // bytecode execution has an alternate form292293// format bits (determined only by the format string):294static final int _fmt_has_c = 1<<2; // constant, such as sipush "bcc"295static final int _fmt_has_j = 1<<3; // constant pool cache index, such as getfield "bjj"296static final int _fmt_has_k = 1<<4; // constant pool index, such as ldc "bk"297static final int _fmt_has_i = 1<<5; // local index, such as iload298static final int _fmt_has_o = 1<<6; // offset, such as ifeq299static final int _fmt_has_nbo = 1<<7; // contains native-order field(s)300static final int _fmt_has_u2 = 1<<8; // contains double-byte field(s)301static final int _fmt_has_u4 = 1<<9; // contains quad-byte field302static final int _fmt_not_variable = 1<<10; // not of variable length (simple or wide)303static final int _fmt_not_simple = 1<<11; // either wide or variable length304static final int _all_fmt_bits = (_fmt_not_simple*2 - _fmt_has_c);305306// Example derived format syndromes:307static final int _fmt_b = _fmt_not_variable;308static final int _fmt_bc = _fmt_b | _fmt_has_c;309static final int _fmt_bi = _fmt_b | _fmt_has_i;310static final int _fmt_bkk = _fmt_b | _fmt_has_k | _fmt_has_u2;311static final int _fmt_bJJ = _fmt_b | _fmt_has_j | _fmt_has_u2 | _fmt_has_nbo;312static final int _fmt_bo2 = _fmt_b | _fmt_has_o | _fmt_has_u2;313static final int _fmt_bo4 = _fmt_b | _fmt_has_o | _fmt_has_u4;314315316public static int specialLengthAt(Method method, int bci) {317int code = codeAt(method, bci);318switch (code) {319case _wide:320return wideLengthFor(method.getBytecodeOrBPAt(bci + 1));321case _tableswitch:322{323int alignedBCI = Bits.roundTo(bci + 1, jintSize);324int lo = method.getBytecodeIntArg(alignedBCI + 1*jintSize);325int hi = method.getBytecodeIntArg(alignedBCI + 2*jintSize);326return (alignedBCI - bci) + (3 + hi - lo + 1)*jintSize;327}328329case _lookupswitch: // fall through330case _fast_binaryswitch: // fall through331case _fast_linearswitch:332{333int alignedBCI = Bits.roundTo(bci + 1, jintSize);334int npairs = method.getBytecodeIntArg(alignedBCI + jintSize);335return (alignedBCI - bci) + (2 + 2*npairs)*jintSize;336}337338}339throw new RuntimeException("should not reach here");340}341342// Conversion343public static void check(int code) {344if (Assert.ASSERTS_ENABLED) {345Assert.that(isDefined(code), "illegal code " + code);346}347}348public static void wideCheck(int code) {349if (Assert.ASSERTS_ENABLED) {350Assert.that(wideIsDefined(code), "illegal code " + code);351}352}353354/** Fetches a bytecode, hiding breakpoints as necessary */355public static int codeAt(Method method, int bci) {356int res = codeOrBPAt(method, bci);357if (res == _breakpoint) {358res = method.getOrigBytecodeAt(bci);359}360return res;361}362363/** Fetches a bytecode or a breakpoint */364public static int codeOrBPAt(Method method, int bci) {365return method.getBytecodeOrBPAt(bci);366}367368public static boolean isActiveBreakpointAt(Method method, int bci) {369return (codeOrBPAt(method, bci) == _breakpoint);370}371372// find a bytecode, behind a breakpoint if necessary:373// FIXME: not yet implementable374// static Code non_breakpoint_code_at(address bcp, Method* method = null);375376// Bytecode attributes377public static boolean isDefined (int code) { return 0 <= code && code < number_of_codes && flags(code, false) != 0; }378public static boolean wideIsDefined(int code) { return isDefined(code) && flags(code, true) != 0; }379public static String name (int code) { check(code); return _name [code]; }380public static String format (int code) { check(code); return _format [code]; }381public static String wideFormat (int code) { wideCheck(code); return _wide_format [code]; }382public static int resultType (int code) { check(code); return _result_type [code]; }383public static int depth (int code) { check(code); return _depth [code]; }384public static int lengthFor (int code) { check(code); return _lengths [code] & 0xF; }385public static int wideLengthFor(int code) { check(code); return _lengths [code] >> 4; }386public static boolean canTrap (int code) { check(code); return has_all_flags(code, _bc_can_trap, false); }387public static int javaCode (int code) { check(code); return _java_code [code]; }388public static boolean canRewrite (int code) { check(code); return has_all_flags(code, _bc_can_rewrite, false); }389public static boolean native_byte_order(int code) { check(code); return has_all_flags(code, _fmt_has_nbo, false); }390public static boolean uses_cp_cache (int code) { check(code); return has_all_flags(code, _fmt_has_j, false); }391public static int lengthAt (Method method, int bci) { int l = lengthFor(codeAt(method, bci)); return l > 0 ? l : specialLengthAt(method, bci); }392public static int javaLengthAt (Method method, int bci) { int l = lengthFor(javaCode(codeAt(method, bci))); return l > 0 ? l : specialLengthAt(method, bci); }393public static boolean isJavaCode (int code) { return 0 <= code && code < number_of_java_codes; }394public static boolean isFastCode (int code) { return number_of_java_codes <= code && code < number_of_codes; }395396public static boolean isAload (int code) { return (code == _aload || code == _aload_0 || code == _aload_1397|| code == _aload_2 || code == _aload_3); }398public static boolean isAstore (int code) { return (code == _astore || code == _astore_0 || code == _astore_1399|| code == _astore_2 || code == _astore_3); }400401public static boolean isZeroConst (int code) { return (code == _aconst_null || code == _iconst_0402|| code == _fconst_0 || code == _dconst_0); }403404static int flags (int code, boolean is_wide) {405assert code == (code & 0xff) : "must be a byte";406return _flags[code + (is_wide ? 256 : 0)];407}408static int format_bits (int code, boolean is_wide) { return flags(code, is_wide) & _all_fmt_bits; }409static boolean has_all_flags (int code, int test_flags, boolean is_wide) {410return (flags(code, is_wide) & test_flags) == test_flags;411}412413static char compute_flags(String format) {414return compute_flags(format, 0);415}416static char compute_flags(String format, int more_flags) {417if (format == null) return 0; // not even more_flags418int flags = more_flags;419int fp = 0;420if (format.length() == 0) {421flags |= _fmt_not_simple; // but variable422} else {423switch (format.charAt(fp)) {424case 'b':425flags |= _fmt_not_variable; // but simple426++fp; // skip 'b'427break;428case 'w':429flags |= _fmt_not_variable | _fmt_not_simple;430++fp; // skip 'w'431assert(format.charAt(fp) == 'b') : "wide format must start with 'wb'";432++fp; // skip 'b'433break;434}435}436437boolean has_nbo = false, has_jbo = false;438int has_size = 0;439while (fp < format.length()) {440int this_flag = 0;441char fc = format.charAt(fp++);442switch (fc) {443case '_': continue; // ignore these444445case 'j': this_flag = _fmt_has_j; has_jbo = true; break;446case 'k': this_flag = _fmt_has_k; has_jbo = true; break;447case 'i': this_flag = _fmt_has_i; has_jbo = true; break;448case 'c': this_flag = _fmt_has_c; has_jbo = true; break;449case 'o': this_flag = _fmt_has_o; has_jbo = true; break;450451// uppercase versions mark native byte order (from Rewriter)452// actually, only the 'J' case happens currently453case 'J': this_flag = _fmt_has_j; has_nbo = true; break;454case 'K': this_flag = _fmt_has_k; has_nbo = true; break;455case 'I': this_flag = _fmt_has_i; has_nbo = true; break;456case 'C': this_flag = _fmt_has_c; has_nbo = true; break;457case 'O': this_flag = _fmt_has_o; has_nbo = true; break;458default: assert false : "bad char in format";459}460461flags |= this_flag;462463assert !(has_jbo && has_nbo) : "mixed byte orders in format";464if (has_nbo)465flags |= _fmt_has_nbo;466467int this_size = 1;468if (fp < format.length() && format.charAt(fp) == fc) {469// advance beyond run of the same characters470this_size = 2;471while (fp + 1 < format.length() && format.charAt(++fp) == fc) this_size++;472switch (this_size) {473case 2: flags |= _fmt_has_u2; break;474case 4: flags |= _fmt_has_u4; break;475default: assert false : "bad rep count in format";476}477}478assert has_size == 0 || // no field yet479this_size == has_size || // same size480this_size < has_size && fp == format.length() : // last field can be short481"mixed field sizes in format";482has_size = this_size;483}484485assert flags == (char)flags : "change _format_flags";486return (char)flags;487}488489490//----------------------------------------------------------------------491// Internals only below this point492//493494private static String[] _name;495private static String[] _format;496private static String[] _wide_format;497private static int[] _result_type;498private static byte[] _depth;499private static byte[] _lengths;500private static int[] _java_code;501private static char[] _flags;502503static {504_name = new String [number_of_codes];505_format = new String [number_of_codes];506_wide_format = new String [number_of_codes];507_result_type = new int [number_of_codes]; // See BasicType.java508_depth = new byte [number_of_codes];509_lengths = new byte [number_of_codes];510_java_code = new int [number_of_codes];511_flags = new char[256 * 2]; // all second page for wide formats512513// In case we want to fetch this information from the VM in the514// future515VM.registerVMInitializedObserver(new Observer() {516public void update(Observable o, Object data) {517initialize();518}519});520}521522private static final int jintSize = 4;523524// private static String[] _name = new String [number_of_codes];525// private static String[] _format = new String [number_of_codes];526// private static String[] _wide_format = new String [number_of_codes];527// private static int[] _result_type = new int [number_of_codes]; // See BasicType.java528// private static byte[] _depth = new byte [number_of_codes];529// private static byte[] _length = new byte [number_of_codes];530// private static boolean[] _can_trap = new boolean[number_of_codes];531// private static int[] _java_code = new int [number_of_codes];532// private static boolean[] _can_rewrite = new boolean[number_of_codes];533534// Initialization535private static void initialize() {536if (Assert.ASSERTS_ENABLED) {537Assert.that(number_of_codes <= 256, "too many bytecodes");538}539540// Format strings interpretation:541//542// b: bytecode543// c: signed constant, Java byte-ordering544// i: unsigned index , Java byte-ordering545// j: unsigned index , native byte-ordering546// o: branch offset , Java byte-ordering547// _: unused/ignored548// w: wide bytecode549//550// Note: Right now the format strings are used for 2 purposes:551// 1. to specify the length of the bytecode552// (= number of characters in format string)553// 2. to specify the bytecode attributes554//555// The bytecode attributes are currently used only for bytecode tracing556// (see BytecodeTracer); thus if more specific format information is557// used, one would also have to adjust the bytecode tracer.558//559// Note: For bytecodes with variable length, the format string is the empty string.560561// Note 1: null for the format string means the bytecode doesn't exist562// in that form.563//564// Note 2: The result type is T_ILLEGAL for bytecodes where the top of stack565// type after execution is not only determined by the bytecode itself.566567// Java bytecodes568// bytecode bytecode name format wide f. result tp stk traps569def(_nop , "nop" , "b" , null , BasicType.getTVoid() , 0, false);570def(_aconst_null , "aconst_null" , "b" , null , BasicType.getTObject() , 1, false);571def(_iconst_m1 , "iconst_m1" , "b" , null , BasicType.getTInt() , 1, false);572def(_iconst_0 , "iconst_0" , "b" , null , BasicType.getTInt() , 1, false);573def(_iconst_1 , "iconst_1" , "b" , null , BasicType.getTInt() , 1, false);574def(_iconst_2 , "iconst_2" , "b" , null , BasicType.getTInt() , 1, false);575def(_iconst_3 , "iconst_3" , "b" , null , BasicType.getTInt() , 1, false);576def(_iconst_4 , "iconst_4" , "b" , null , BasicType.getTInt() , 1, false);577def(_iconst_5 , "iconst_5" , "b" , null , BasicType.getTInt() , 1, false);578def(_lconst_0 , "lconst_0" , "b" , null , BasicType.getTLong() , 2, false);579def(_lconst_1 , "lconst_1" , "b" , null , BasicType.getTLong() , 2, false);580def(_fconst_0 , "fconst_0" , "b" , null , BasicType.getTFloat() , 1, false);581def(_fconst_1 , "fconst_1" , "b" , null , BasicType.getTFloat() , 1, false);582def(_fconst_2 , "fconst_2" , "b" , null , BasicType.getTFloat() , 1, false);583def(_dconst_0 , "dconst_0" , "b" , null , BasicType.getTDouble() , 2, false);584def(_dconst_1 , "dconst_1" , "b" , null , BasicType.getTDouble() , 2, false);585def(_bipush , "bipush" , "bc" , null , BasicType.getTInt() , 1, false);586def(_sipush , "sipush" , "bcc" , null , BasicType.getTInt() , 1, false);587def(_ldc , "ldc" , "bk" , null , BasicType.getTIllegal(), 1, true );588def(_ldc_w , "ldc_w" , "bkk" , null , BasicType.getTIllegal(), 1, true );589def(_ldc2_w , "ldc2_w" , "bkk" , null , BasicType.getTIllegal(), 2, true );590def(_iload , "iload" , "bi" , "wbii" , BasicType.getTInt() , 1, false);591def(_lload , "lload" , "bi" , "wbii" , BasicType.getTLong() , 2, false);592def(_fload , "fload" , "bi" , "wbii" , BasicType.getTFloat() , 1, false);593def(_dload , "dload" , "bi" , "wbii" , BasicType.getTDouble() , 2, false);594def(_aload , "aload" , "bi" , "wbii" , BasicType.getTObject() , 1, false);595def(_iload_0 , "iload_0" , "b" , null , BasicType.getTInt() , 1, false);596def(_iload_1 , "iload_1" , "b" , null , BasicType.getTInt() , 1, false);597def(_iload_2 , "iload_2" , "b" , null , BasicType.getTInt() , 1, false);598def(_iload_3 , "iload_3" , "b" , null , BasicType.getTInt() , 1, false);599def(_lload_0 , "lload_0" , "b" , null , BasicType.getTLong() , 2, false);600def(_lload_1 , "lload_1" , "b" , null , BasicType.getTLong() , 2, false);601def(_lload_2 , "lload_2" , "b" , null , BasicType.getTLong() , 2, false);602def(_lload_3 , "lload_3" , "b" , null , BasicType.getTLong() , 2, false);603def(_fload_0 , "fload_0" , "b" , null , BasicType.getTFloat() , 1, false);604def(_fload_1 , "fload_1" , "b" , null , BasicType.getTFloat() , 1, false);605def(_fload_2 , "fload_2" , "b" , null , BasicType.getTFloat() , 1, false);606def(_fload_3 , "fload_3" , "b" , null , BasicType.getTFloat() , 1, false);607def(_dload_0 , "dload_0" , "b" , null , BasicType.getTDouble() , 2, false);608def(_dload_1 , "dload_1" , "b" , null , BasicType.getTDouble() , 2, false);609def(_dload_2 , "dload_2" , "b" , null , BasicType.getTDouble() , 2, false);610def(_dload_3 , "dload_3" , "b" , null , BasicType.getTDouble() , 2, false);611def(_aload_0 , "aload_0" , "b" , null , BasicType.getTObject() , 1, true ); // rewriting in interpreter612def(_aload_1 , "aload_1" , "b" , null , BasicType.getTObject() , 1, false);613def(_aload_2 , "aload_2" , "b" , null , BasicType.getTObject() , 1, false);614def(_aload_3 , "aload_3" , "b" , null , BasicType.getTObject() , 1, false);615def(_iaload , "iaload" , "b" , null , BasicType.getTInt() , -1, true );616def(_laload , "laload" , "b" , null , BasicType.getTLong() , 0, true );617def(_faload , "faload" , "b" , null , BasicType.getTFloat() , -1, true );618def(_daload , "daload" , "b" , null , BasicType.getTDouble() , 0, true );619def(_aaload , "aaload" , "b" , null , BasicType.getTObject() , -1, true );620def(_baload , "baload" , "b" , null , BasicType.getTInt() , -1, true );621def(_caload , "caload" , "b" , null , BasicType.getTInt() , -1, true );622def(_saload , "saload" , "b" , null , BasicType.getTInt() , -1, true );623def(_istore , "istore" , "bi" , "wbii" , BasicType.getTVoid() , -1, false);624def(_lstore , "lstore" , "bi" , "wbii" , BasicType.getTVoid() , -2, false);625def(_fstore , "fstore" , "bi" , "wbii" , BasicType.getTVoid() , -1, false);626def(_dstore , "dstore" , "bi" , "wbii" , BasicType.getTVoid() , -2, false);627def(_astore , "astore" , "bi" , "wbii" , BasicType.getTVoid() , -1, false);628def(_istore_0 , "istore_0" , "b" , null , BasicType.getTVoid() , -1, false);629def(_istore_1 , "istore_1" , "b" , null , BasicType.getTVoid() , -1, false);630def(_istore_2 , "istore_2" , "b" , null , BasicType.getTVoid() , -1, false);631def(_istore_3 , "istore_3" , "b" , null , BasicType.getTVoid() , -1, false);632def(_lstore_0 , "lstore_0" , "b" , null , BasicType.getTVoid() , -2, false);633def(_lstore_1 , "lstore_1" , "b" , null , BasicType.getTVoid() , -2, false);634def(_lstore_2 , "lstore_2" , "b" , null , BasicType.getTVoid() , -2, false);635def(_lstore_3 , "lstore_3" , "b" , null , BasicType.getTVoid() , -2, false);636def(_fstore_0 , "fstore_0" , "b" , null , BasicType.getTVoid() , -1, false);637def(_fstore_1 , "fstore_1" , "b" , null , BasicType.getTVoid() , -1, false);638def(_fstore_2 , "fstore_2" , "b" , null , BasicType.getTVoid() , -1, false);639def(_fstore_3 , "fstore_3" , "b" , null , BasicType.getTVoid() , -1, false);640def(_dstore_0 , "dstore_0" , "b" , null , BasicType.getTVoid() , -2, false);641def(_dstore_1 , "dstore_1" , "b" , null , BasicType.getTVoid() , -2, false);642def(_dstore_2 , "dstore_2" , "b" , null , BasicType.getTVoid() , -2, false);643def(_dstore_3 , "dstore_3" , "b" , null , BasicType.getTVoid() , -2, false);644def(_astore_0 , "astore_0" , "b" , null , BasicType.getTVoid() , -1, false);645def(_astore_1 , "astore_1" , "b" , null , BasicType.getTVoid() , -1, false);646def(_astore_2 , "astore_2" , "b" , null , BasicType.getTVoid() , -1, false);647def(_astore_3 , "astore_3" , "b" , null , BasicType.getTVoid() , -1, false);648def(_iastore , "iastore" , "b" , null , BasicType.getTVoid() , -3, true );649def(_lastore , "lastore" , "b" , null , BasicType.getTVoid() , -4, true );650def(_fastore , "fastore" , "b" , null , BasicType.getTVoid() , -3, true );651def(_dastore , "dastore" , "b" , null , BasicType.getTVoid() , -4, true );652def(_aastore , "aastore" , "b" , null , BasicType.getTVoid() , -3, true );653def(_bastore , "bastore" , "b" , null , BasicType.getTVoid() , -3, true );654def(_castore , "castore" , "b" , null , BasicType.getTVoid() , -3, true );655def(_sastore , "sastore" , "b" , null , BasicType.getTVoid() , -3, true );656def(_pop , "pop" , "b" , null , BasicType.getTVoid() , -1, false);657def(_pop2 , "pop2" , "b" , null , BasicType.getTVoid() , -2, false);658def(_dup , "dup" , "b" , null , BasicType.getTVoid() , 1, false);659def(_dup_x1 , "dup_x1" , "b" , null , BasicType.getTVoid() , 1, false);660def(_dup_x2 , "dup_x2" , "b" , null , BasicType.getTVoid() , 1, false);661def(_dup2 , "dup2" , "b" , null , BasicType.getTVoid() , 2, false);662def(_dup2_x1 , "dup2_x1" , "b" , null , BasicType.getTVoid() , 2, false);663def(_dup2_x2 , "dup2_x2" , "b" , null , BasicType.getTVoid() , 2, false);664def(_swap , "swap" , "b" , null , BasicType.getTVoid() , 0, false);665def(_iadd , "iadd" , "b" , null , BasicType.getTInt() , -1, false);666def(_ladd , "ladd" , "b" , null , BasicType.getTLong() , -2, false);667def(_fadd , "fadd" , "b" , null , BasicType.getTFloat() , -1, false);668def(_dadd , "dadd" , "b" , null , BasicType.getTDouble() , -2, false);669def(_isub , "isub" , "b" , null , BasicType.getTInt() , -1, false);670def(_lsub , "lsub" , "b" , null , BasicType.getTLong() , -2, false);671def(_fsub , "fsub" , "b" , null , BasicType.getTFloat() , -1, false);672def(_dsub , "dsub" , "b" , null , BasicType.getTDouble() , -2, false);673def(_imul , "imul" , "b" , null , BasicType.getTInt() , -1, false);674def(_lmul , "lmul" , "b" , null , BasicType.getTLong() , -2, false);675def(_fmul , "fmul" , "b" , null , BasicType.getTFloat() , -1, false);676def(_dmul , "dmul" , "b" , null , BasicType.getTDouble() , -2, false);677def(_idiv , "idiv" , "b" , null , BasicType.getTInt() , -1, true );678def(_ldiv , "ldiv" , "b" , null , BasicType.getTLong() , -2, true );679def(_fdiv , "fdiv" , "b" , null , BasicType.getTFloat() , -1, false);680def(_ddiv , "ddiv" , "b" , null , BasicType.getTDouble() , -2, false);681def(_irem , "irem" , "b" , null , BasicType.getTInt() , -1, true );682def(_lrem , "lrem" , "b" , null , BasicType.getTLong() , -2, true );683def(_frem , "frem" , "b" , null , BasicType.getTFloat() , -1, false);684def(_drem , "drem" , "b" , null , BasicType.getTDouble() , -2, false);685def(_ineg , "ineg" , "b" , null , BasicType.getTInt() , 0, false);686def(_lneg , "lneg" , "b" , null , BasicType.getTLong() , 0, false);687def(_fneg , "fneg" , "b" , null , BasicType.getTFloat() , 0, false);688def(_dneg , "dneg" , "b" , null , BasicType.getTDouble() , 0, false);689def(_ishl , "ishl" , "b" , null , BasicType.getTInt() , -1, false);690def(_lshl , "lshl" , "b" , null , BasicType.getTLong() , -1, false);691def(_ishr , "ishr" , "b" , null , BasicType.getTInt() , -1, false);692def(_lshr , "lshr" , "b" , null , BasicType.getTLong() , -1, false);693def(_iushr , "iushr" , "b" , null , BasicType.getTInt() , -1, false);694def(_lushr , "lushr" , "b" , null , BasicType.getTLong() , -1, false);695def(_iand , "iand" , "b" , null , BasicType.getTInt() , -1, false);696def(_land , "land" , "b" , null , BasicType.getTLong() , -2, false);697def(_ior , "ior" , "b" , null , BasicType.getTInt() , -1, false);698def(_lor , "lor" , "b" , null , BasicType.getTLong() , -2, false);699def(_ixor , "ixor" , "b" , null , BasicType.getTInt() , -1, false);700def(_lxor , "lxor" , "b" , null , BasicType.getTLong() , -2, false);701def(_iinc , "iinc" , "bic" , "wbiicc", BasicType.getTVoid() , 0, false);702def(_i2l , "i2l" , "b" , null , BasicType.getTLong() , 1, false);703def(_i2f , "i2f" , "b" , null , BasicType.getTFloat() , 0, false);704def(_i2d , "i2d" , "b" , null , BasicType.getTDouble() , 1, false);705def(_l2i , "l2i" , "b" , null , BasicType.getTInt() , -1, false);706def(_l2f , "l2f" , "b" , null , BasicType.getTFloat() , -1, false);707def(_l2d , "l2d" , "b" , null , BasicType.getTDouble() , 0, false);708def(_f2i , "f2i" , "b" , null , BasicType.getTInt() , 0, false);709def(_f2l , "f2l" , "b" , null , BasicType.getTLong() , 1, false);710def(_f2d , "f2d" , "b" , null , BasicType.getTDouble() , 1, false);711def(_d2i , "d2i" , "b" , null , BasicType.getTInt() , -1, false);712def(_d2l , "d2l" , "b" , null , BasicType.getTLong() , 0, false);713def(_d2f , "d2f" , "b" , null , BasicType.getTFloat() , -1, false);714def(_i2b , "i2b" , "b" , null , BasicType.getTByte() , 0, false);715def(_i2c , "i2c" , "b" , null , BasicType.getTChar() , 0, false);716def(_i2s , "i2s" , "b" , null , BasicType.getTShort() , 0, false);717def(_lcmp , "lcmp" , "b" , null , BasicType.getTVoid() , -3, false);718def(_fcmpl , "fcmpl" , "b" , null , BasicType.getTVoid() , -1, false);719def(_fcmpg , "fcmpg" , "b" , null , BasicType.getTVoid() , -1, false);720def(_dcmpl , "dcmpl" , "b" , null , BasicType.getTVoid() , -3, false);721def(_dcmpg , "dcmpg" , "b" , null , BasicType.getTVoid() , -3, false);722def(_ifeq , "ifeq" , "boo" , null , BasicType.getTVoid() , -1, false);723def(_ifne , "ifne" , "boo" , null , BasicType.getTVoid() , -1, false);724def(_iflt , "iflt" , "boo" , null , BasicType.getTVoid() , -1, false);725def(_ifge , "ifge" , "boo" , null , BasicType.getTVoid() , -1, false);726def(_ifgt , "ifgt" , "boo" , null , BasicType.getTVoid() , -1, false);727def(_ifle , "ifle" , "boo" , null , BasicType.getTVoid() , -1, false);728def(_if_icmpeq , "if_icmpeq" , "boo" , null , BasicType.getTVoid() , -2, false);729def(_if_icmpne , "if_icmpne" , "boo" , null , BasicType.getTVoid() , -2, false);730def(_if_icmplt , "if_icmplt" , "boo" , null , BasicType.getTVoid() , -2, false);731def(_if_icmpge , "if_icmpge" , "boo" , null , BasicType.getTVoid() , -2, false);732def(_if_icmpgt , "if_icmpgt" , "boo" , null , BasicType.getTVoid() , -2, false);733def(_if_icmple , "if_icmple" , "boo" , null , BasicType.getTVoid() , -2, false);734def(_if_acmpeq , "if_acmpeq" , "boo" , null , BasicType.getTVoid() , -2, false);735def(_if_acmpne , "if_acmpne" , "boo" , null , BasicType.getTVoid() , -2, false);736def(_goto , "goto" , "boo" , null , BasicType.getTVoid() , 0, false);737def(_jsr , "jsr" , "boo" , null , BasicType.getTInt() , 0, false);738def(_ret , "ret" , "bi" , "wbii" , BasicType.getTVoid() , 0, false);739def(_tableswitch , "tableswitch" , "" , null , BasicType.getTVoid() , -1, false); // may have backward branches740def(_lookupswitch , "lookupswitch" , "" , null , BasicType.getTVoid() , -1, false); // rewriting in interpreter741def(_ireturn , "ireturn" , "b" , null , BasicType.getTInt() , -1, true );742def(_lreturn , "lreturn" , "b" , null , BasicType.getTLong() , -2, true );743def(_freturn , "freturn" , "b" , null , BasicType.getTFloat() , -1, true );744def(_dreturn , "dreturn" , "b" , null , BasicType.getTDouble() , -2, true );745def(_areturn , "areturn" , "b" , null , BasicType.getTObject() , -1, true );746def(_return , "return" , "b" , null , BasicType.getTVoid() , 0, true );747def(_getstatic , "getstatic" , "bJJ" , null , BasicType.getTIllegal(), 1, true );748def(_putstatic , "putstatic" , "bJJ" , null , BasicType.getTIllegal(), -1, true );749def(_getfield , "getfield" , "bJJ" , null , BasicType.getTIllegal(), 0, true );750def(_putfield , "putfield" , "bJJ" , null , BasicType.getTIllegal(), -2, true );751def(_invokevirtual , "invokevirtual" , "bJJ" , null , BasicType.getTIllegal(), -1, true );752def(_invokespecial , "invokespecial" , "bJJ" , null , BasicType.getTIllegal(), -1, true );753def(_invokestatic , "invokestatic" , "bJJ" , null , BasicType.getTIllegal(), 0, true );754def(_invokeinterface , "invokeinterface" , "bJJ__", null , BasicType.getTIllegal(), -1, true );755def(_invokedynamic , "invokedynamic" , "bJJJJ", null , BasicType.getTIllegal(), 0, true );756def(_new , "new" , "bkk" , null , BasicType.getTObject() , 1, true );757def(_newarray , "newarray" , "bc" , null , BasicType.getTObject() , 0, true );758def(_anewarray , "anewarray" , "bkk" , null , BasicType.getTObject() , 0, true );759def(_arraylength , "arraylength" , "b" , null , BasicType.getTVoid() , 0, true );760def(_athrow , "athrow" , "b" , null , BasicType.getTVoid() , -1, true );761def(_checkcast , "checkcast" , "bkk" , null , BasicType.getTObject() , 0, true );762def(_instanceof , "instanceof" , "bkk" , null , BasicType.getTInt() , 0, true );763def(_monitorenter , "monitorenter" , "b" , null , BasicType.getTVoid() , -1, true );764def(_monitorexit , "monitorexit" , "b" , null , BasicType.getTVoid() , -1, true );765def(_wide , "wide" , "" , null , BasicType.getTVoid() , 0, false);766def(_multianewarray , "multianewarray" , "bkkc" , null , BasicType.getTObject() , 1, true );767def(_ifnull , "ifnull" , "boo" , null , BasicType.getTVoid() , -1, false);768def(_ifnonnull , "ifnonnull" , "boo" , null , BasicType.getTVoid() , -1, false);769def(_goto_w , "goto_w" , "boooo", null , BasicType.getTVoid() , 0, false);770def(_jsr_w , "jsr_w" , "boooo", null , BasicType.getTInt() , 0, false);771def(_breakpoint , "breakpoint" , "" , null , BasicType.getTVoid() , 0, true );772773// JVM bytecodes774// bytecode bytecode name format wide f. result tp stk traps std code775776def(_fast_agetfield , "fast_agetfield" , "bJJ" , null , BasicType.getTObject() , 0, true , _getfield );777def(_fast_bgetfield , "fast_bgetfield" , "bJJ" , null , BasicType.getTInt() , 0, true , _getfield );778def(_fast_cgetfield , "fast_cgetfield" , "bJJ" , null , BasicType.getTChar() , 0, true , _getfield );779def(_fast_dgetfield , "fast_dgetfield" , "bJJ" , null , BasicType.getTDouble() , 0, true , _getfield );780def(_fast_fgetfield , "fast_fgetfield" , "bJJ" , null , BasicType.getTFloat() , 0, true , _getfield );781def(_fast_igetfield , "fast_igetfield" , "bJJ" , null , BasicType.getTInt() , 0, true , _getfield );782def(_fast_lgetfield , "fast_lgetfield" , "bJJ" , null , BasicType.getTLong() , 0, true , _getfield );783def(_fast_sgetfield , "fast_sgetfield" , "bJJ" , null , BasicType.getTShort() , 0, true , _getfield );784785def(_fast_aputfield , "fast_aputfield" , "bJJ" , null , BasicType.getTObject() , 0, true , _putfield );786def(_fast_bputfield , "fast_bputfield" , "bJJ" , null , BasicType.getTInt() , 0, true , _putfield );787def(_fast_zputfield , "fast_zputfield" , "bJJ" , null , BasicType.getTInt() , 0, true , _putfield );788def(_fast_cputfield , "fast_cputfield" , "bJJ" , null , BasicType.getTChar() , 0, true , _putfield );789def(_fast_dputfield , "fast_dputfield" , "bJJ" , null , BasicType.getTDouble() , 0, true , _putfield );790def(_fast_fputfield , "fast_fputfield" , "bJJ" , null , BasicType.getTFloat() , 0, true , _putfield );791def(_fast_iputfield , "fast_iputfield" , "bJJ" , null , BasicType.getTInt() , 0, true , _putfield );792def(_fast_lputfield , "fast_lputfield" , "bJJ" , null , BasicType.getTLong() , 0, true , _putfield );793def(_fast_sputfield , "fast_sputfield" , "bJJ" , null , BasicType.getTShort() , 0, true , _putfield );794795def(_fast_aload_0 , "fast_aload_0" , "b" , null , BasicType.getTObject() , 1, true , _aload_0 );796def(_fast_iaccess_0 , "fast_iaccess_0" , "b_JJ" , null , BasicType.getTInt() , 1, true , _aload_0 );797def(_fast_aaccess_0 , "fast_aaccess_0" , "b_JJ" , null , BasicType.getTObject() , 1, true , _aload_0 );798def(_fast_faccess_0 , "fast_faccess_0" , "b_JJ" , null , BasicType.getTObject() , 1, true , _aload_0 );799800def(_fast_iload , "fast_iload" , "bi" , null , BasicType.getTInt() , 1, false, _iload );801def(_fast_iload2 , "fast_iload2" , "bi_i" , null , BasicType.getTInt() , 2, false, _iload );802def(_fast_icaload , "fast_icaload" , "bi_" , null , BasicType.getTInt() , 0, false, _iload );803804// Faster method invocation.805def(_fast_invokevfinal , "fast_invokevfinal" , "bJJ" , null , BasicType.getTIllegal(), -1, true, _invokevirtual );806807def(_fast_linearswitch , "fast_linearswitch" , "" , null , BasicType.getTVoid() , -1, false, _lookupswitch );808def(_fast_binaryswitch , "fast_binaryswitch" , "" , null , BasicType.getTVoid() , -1, false, _lookupswitch );809def(_fast_aldc , "fast_aldc" , "bj" , null , BasicType.getTObject(), 1, true, _ldc );810def(_fast_aldc_w , "fast_aldc_w" , "bJJ" , null , BasicType.getTObject(), 1, true, _ldc_w );811812def(_return_register_finalizer, "return_register_finalizer", "b" , null , BasicType.getTVoid() , 0, true, _return );813814// special handling of signature-polymorphic methods815def(_invokehandle , "invokehandle" , "bJJ" , null , BasicType.getTIllegal(), -1, true, _invokevirtual );816817// CDS specific. Bytecodes rewritten at CDS dump time818def(_nofast_getfield , "_nofast_getfield" , "bJJ" , null , BasicType.getTIllegal() , 0, true, _getfield );819def(_nofast_putfield , "_nofast_putfield" , "bJJ" , null , BasicType.getTIllegal() ,-2, true, _putfield );820def(_nofast_aload_0 , "_nofast_aload_0" , "b" , null , BasicType.getTObject() , 1, true, _aload_0 );821def(_nofast_iload , "_nofast_iload" , "bi" , null , BasicType.getTInt() , 1, false, _iload );822823def(_shouldnotreachhere , "_shouldnotreachhere" , "b" , null , BasicType.getTVoid() , 0, false);824825if (Assert.ASSERTS_ENABLED) {826// compare can_trap information for each bytecode with the827// can_trap information for the corresponding base bytecode828// (if a rewritten bytecode can trap, so must the base bytecode)829for (int i = 0; i < number_of_codes; i++) {830if (isDefined(i)) {831int j = javaCode(i);832if (canTrap(i) && !canTrap(j)) {833Assert.that(false, name(i) + " can trap => " + name(j) + " can trap, too");834}835}836}837}838}839840private static void def(int code, String name, String format, String wide_format, int result_type, int depth, boolean can_trap) {841def(code, name, format, wide_format, result_type, depth, can_trap, code);842}843844private static void def(int code, String name, String format, String wide_format, int result_type, int depth, boolean can_trap, int java_code) {845if (Assert.ASSERTS_ENABLED) {846Assert.that(wide_format == null || format != null, "short form must exist if there's a wide form");847}848int len = (format != null ? format.length() : 0);849int wlen = (wide_format != null ? wide_format.length() : 0);850_name [code] = name;851_result_type [code] = result_type;852_depth [code] = (byte) depth;853_lengths [code] = (byte)((wlen << 4) | (len & 0xF));854_java_code [code] = java_code;855_format [code] = format;856_wide_format [code] = wide_format;857int bc_flags = 0;858if (can_trap) bc_flags |= _bc_can_trap;859if (java_code != code) bc_flags |= _bc_can_rewrite;860_flags[code+0*256] = compute_flags(format, bc_flags);861_flags[code+1*256] = compute_flags(wide_format, bc_flags);862}863}864865866