package sun.jvm.hotspot.interpreter;
import java.util.*;
import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.utilities.*;
public class Bytecodes {
public static final int _illegal = -1;
public static final int _nop = 0;
public static final int _aconst_null = 1;
public static final int _iconst_m1 = 2;
public static final int _iconst_0 = 3;
public static final int _iconst_1 = 4;
public static final int _iconst_2 = 5;
public static final int _iconst_3 = 6;
public static final int _iconst_4 = 7;
public static final int _iconst_5 = 8;
public static final int _lconst_0 = 9;
public static final int _lconst_1 = 10;
public static final int _fconst_0 = 11;
public static final int _fconst_1 = 12;
public static final int _fconst_2 = 13;
public static final int _dconst_0 = 14;
public static final int _dconst_1 = 15;
public static final int _bipush = 16;
public static final int _sipush = 17;
public static final int _ldc = 18;
public static final int _ldc_w = 19;
public static final int _ldc2_w = 20;
public static final int _iload = 21;
public static final int _lload = 22;
public static final int _fload = 23;
public static final int _dload = 24;
public static final int _aload = 25;
public static final int _iload_0 = 26;
public static final int _iload_1 = 27;
public static final int _iload_2 = 28;
public static final int _iload_3 = 29;
public static final int _lload_0 = 30;
public static final int _lload_1 = 31;
public static final int _lload_2 = 32;
public static final int _lload_3 = 33;
public static final int _fload_0 = 34;
public static final int _fload_1 = 35;
public static final int _fload_2 = 36;
public static final int _fload_3 = 37;
public static final int _dload_0 = 38;
public static final int _dload_1 = 39;
public static final int _dload_2 = 40;
public static final int _dload_3 = 41;
public static final int _aload_0 = 42;
public static final int _aload_1 = 43;
public static final int _aload_2 = 44;
public static final int _aload_3 = 45;
public static final int _iaload = 46;
public static final int _laload = 47;
public static final int _faload = 48;
public static final int _daload = 49;
public static final int _aaload = 50;
public static final int _baload = 51;
public static final int _caload = 52;
public static final int _saload = 53;
public static final int _istore = 54;
public static final int _lstore = 55;
public static final int _fstore = 56;
public static final int _dstore = 57;
public static final int _astore = 58;
public static final int _istore_0 = 59;
public static final int _istore_1 = 60;
public static final int _istore_2 = 61;
public static final int _istore_3 = 62;
public static final int _lstore_0 = 63;
public static final int _lstore_1 = 64;
public static final int _lstore_2 = 65;
public static final int _lstore_3 = 66;
public static final int _fstore_0 = 67;
public static final int _fstore_1 = 68;
public static final int _fstore_2 = 69;
public static final int _fstore_3 = 70;
public static final int _dstore_0 = 71;
public static final int _dstore_1 = 72;
public static final int _dstore_2 = 73;
public static final int _dstore_3 = 74;
public static final int _astore_0 = 75;
public static final int _astore_1 = 76;
public static final int _astore_2 = 77;
public static final int _astore_3 = 78;
public static final int _iastore = 79;
public static final int _lastore = 80;
public static final int _fastore = 81;
public static final int _dastore = 82;
public static final int _aastore = 83;
public static final int _bastore = 84;
public static final int _castore = 85;
public static final int _sastore = 86;
public static final int _pop = 87;
public static final int _pop2 = 88;
public static final int _dup = 89;
public static final int _dup_x1 = 90;
public static final int _dup_x2 = 91;
public static final int _dup2 = 92;
public static final int _dup2_x1 = 93;
public static final int _dup2_x2 = 94;
public static final int _swap = 95;
public static final int _iadd = 96;
public static final int _ladd = 97;
public static final int _fadd = 98;
public static final int _dadd = 99;
public static final int _isub = 100;
public static final int _lsub = 101;
public static final int _fsub = 102;
public static final int _dsub = 103;
public static final int _imul = 104;
public static final int _lmul = 105;
public static final int _fmul = 106;
public static final int _dmul = 107;
public static final int _idiv = 108;
public static final int _ldiv = 109;
public static final int _fdiv = 110;
public static final int _ddiv = 111;
public static final int _irem = 112;
public static final int _lrem = 113;
public static final int _frem = 114;
public static final int _drem = 115;
public static final int _ineg = 116;
public static final int _lneg = 117;
public static final int _fneg = 118;
public static final int _dneg = 119;
public static final int _ishl = 120;
public static final int _lshl = 121;
public static final int _ishr = 122;
public static final int _lshr = 123;
public static final int _iushr = 124;
public static final int _lushr = 125;
public static final int _iand = 126;
public static final int _land = 127;
public static final int _ior = 128;
public static final int _lor = 129;
public static final int _ixor = 130;
public static final int _lxor = 131;
public static final int _iinc = 132;
public static final int _i2l = 133;
public static final int _i2f = 134;
public static final int _i2d = 135;
public static final int _l2i = 136;
public static final int _l2f = 137;
public static final int _l2d = 138;
public static final int _f2i = 139;
public static final int _f2l = 140;
public static final int _f2d = 141;
public static final int _d2i = 142;
public static final int _d2l = 143;
public static final int _d2f = 144;
public static final int _i2b = 145;
public static final int _i2c = 146;
public static final int _i2s = 147;
public static final int _lcmp = 148;
public static final int _fcmpl = 149;
public static final int _fcmpg = 150;
public static final int _dcmpl = 151;
public static final int _dcmpg = 152;
public static final int _ifeq = 153;
public static final int _ifne = 154;
public static final int _iflt = 155;
public static final int _ifge = 156;
public static final int _ifgt = 157;
public static final int _ifle = 158;
public static final int _if_icmpeq = 159;
public static final int _if_icmpne = 160;
public static final int _if_icmplt = 161;
public static final int _if_icmpge = 162;
public static final int _if_icmpgt = 163;
public static final int _if_icmple = 164;
public static final int _if_acmpeq = 165;
public static final int _if_acmpne = 166;
public static final int _goto = 167;
public static final int _jsr = 168;
public static final int _ret = 169;
public static final int _tableswitch = 170;
public static final int _lookupswitch = 171;
public static final int _ireturn = 172;
public static final int _lreturn = 173;
public static final int _freturn = 174;
public static final int _dreturn = 175;
public static final int _areturn = 176;
public static final int _return = 177;
public static final int _getstatic = 178;
public static final int _putstatic = 179;
public static final int _getfield = 180;
public static final int _putfield = 181;
public static final int _invokevirtual = 182;
public static final int _invokespecial = 183;
public static final int _invokestatic = 184;
public static final int _invokeinterface = 185;
public static final int _invokedynamic = 186;
public static final int _new = 187;
public static final int _newarray = 188;
public static final int _anewarray = 189;
public static final int _arraylength = 190;
public static final int _athrow = 191;
public static final int _checkcast = 192;
public static final int _instanceof = 193;
public static final int _monitorenter = 194;
public static final int _monitorexit = 195;
public static final int _wide = 196;
public static final int _multianewarray = 197;
public static final int _ifnull = 198;
public static final int _ifnonnull = 199;
public static final int _goto_w = 200;
public static final int _jsr_w = 201;
public static final int _breakpoint = 202;
public static final int number_of_java_codes = 203;
public static final int _fast_agetfield = number_of_java_codes;
public static final int _fast_bgetfield = 204;
public static final int _fast_cgetfield = 205;
public static final int _fast_dgetfield = 206;
public static final int _fast_fgetfield = 207;
public static final int _fast_igetfield = 208;
public static final int _fast_lgetfield = 209;
public static final int _fast_sgetfield = 210;
public static final int _fast_aputfield = 211;
public static final int _fast_bputfield = 212;
public static final int _fast_zputfield = 213;
public static final int _fast_cputfield = 214;
public static final int _fast_dputfield = 215;
public static final int _fast_fputfield = 216;
public static final int _fast_iputfield = 217;
public static final int _fast_lputfield = 218;
public static final int _fast_sputfield = 219;
public static final int _fast_aload_0 = 220;
public static final int _fast_iaccess_0 = 221;
public static final int _fast_aaccess_0 = 222;
public static final int _fast_faccess_0 = 223;
public static final int _fast_iload = 224;
public static final int _fast_iload2 = 225;
public static final int _fast_icaload = 226;
public static final int _fast_invokevfinal = 227;
public static final int _fast_linearswitch = 228;
public static final int _fast_binaryswitch = 229;
public static final int _fast_aldc = 230;
public static final int _fast_aldc_w = 231;
public static final int _return_register_finalizer = 232;
public static final int _invokehandle = 233;
public static final int _shouldnotreachhere = 234;
public static final int number_of_codes = 235;
static final int _bc_can_trap = 1<<0;
static final int _bc_can_rewrite = 1<<1;
static final int _fmt_has_c = 1<<2;
static final int _fmt_has_j = 1<<3;
static final int _fmt_has_k = 1<<4;
static final int _fmt_has_i = 1<<5;
static final int _fmt_has_o = 1<<6;
static final int _fmt_has_nbo = 1<<7;
static final int _fmt_has_u2 = 1<<8;
static final int _fmt_has_u4 = 1<<9;
static final int _fmt_not_variable = 1<<10;
static final int _fmt_not_simple = 1<<11;
static final int _all_fmt_bits = (_fmt_not_simple*2 - _fmt_has_c);
static final int _fmt_b = _fmt_not_variable;
static final int _fmt_bc = _fmt_b | _fmt_has_c;
static final int _fmt_bi = _fmt_b | _fmt_has_i;
static final int _fmt_bkk = _fmt_b | _fmt_has_k | _fmt_has_u2;
static final int _fmt_bJJ = _fmt_b | _fmt_has_j | _fmt_has_u2 | _fmt_has_nbo;
static final int _fmt_bo2 = _fmt_b | _fmt_has_o | _fmt_has_u2;
static final int _fmt_bo4 = _fmt_b | _fmt_has_o | _fmt_has_u4;
public static int specialLengthAt(Method method, int bci) {
int code = codeAt(method, bci);
switch (code) {
case _wide:
return wideLengthFor(method.getBytecodeOrBPAt(bci + 1));
case _tableswitch:
{
int alignedBCI = Bits.roundTo(bci + 1, jintSize);
int lo = method.getBytecodeIntArg(alignedBCI + 1*jintSize);
int hi = method.getBytecodeIntArg(alignedBCI + 2*jintSize);
return (alignedBCI - bci) + (3 + hi - lo + 1)*jintSize;
}
case _lookupswitch:
case _fast_binaryswitch:
case _fast_linearswitch:
{
int alignedBCI = Bits.roundTo(bci + 1, jintSize);
int npairs = method.getBytecodeIntArg(alignedBCI + jintSize);
return (alignedBCI - bci) + (2 + 2*npairs)*jintSize;
}
}
throw new RuntimeException("should not reach here");
}
public static void check(int code) {
if (Assert.ASSERTS_ENABLED) {
Assert.that(isDefined(code), "illegal code " + code);
}
}
public static void wideCheck(int code) {
if (Assert.ASSERTS_ENABLED) {
Assert.that(wideIsDefined(code), "illegal code " + code);
}
}
public static int codeAt(Method method, int bci) {
int res = codeOrBPAt(method, bci);
if (res == _breakpoint) {
res = method.getOrigBytecodeAt(bci);
}
return res;
}
public static int codeOrBPAt(Method method, int bci) {
return method.getBytecodeOrBPAt(bci);
}
public static boolean isActiveBreakpointAt(Method method, int bci) {
return (codeOrBPAt(method, bci) == _breakpoint);
}
public static boolean isDefined (int code) { return 0 <= code && code < number_of_codes && flags(code, false) != 0; }
public static boolean wideIsDefined(int code) { return isDefined(code) && flags(code, true) != 0; }
public static String name (int code) { check(code); return _name [code]; }
public static String format (int code) { check(code); return _format [code]; }
public static String wideFormat (int code) { wideCheck(code); return _wide_format [code]; }
public static int resultType (int code) { check(code); return _result_type [code]; }
public static int depth (int code) { check(code); return _depth [code]; }
public static int lengthFor (int code) { check(code); return _lengths [code] & 0xF; }
public static int wideLengthFor(int code) { check(code); return _lengths [code] >> 4; }
public static boolean canTrap (int code) { check(code); return has_all_flags(code, _bc_can_trap, false); }
public static int javaCode (int code) { check(code); return _java_code [code]; }
public static boolean canRewrite (int code) { check(code); return has_all_flags(code, _bc_can_rewrite, false); }
public static boolean native_byte_order(int code) { check(code); return has_all_flags(code, _fmt_has_nbo, false); }
public static boolean uses_cp_cache (int code) { check(code); return has_all_flags(code, _fmt_has_j, false); }
public static int lengthAt (Method method, int bci) { int l = lengthFor(codeAt(method, bci)); return l > 0 ? l : specialLengthAt(method, bci); }
public static int javaLengthAt (Method method, int bci) { int l = lengthFor(javaCode(codeAt(method, bci))); return l > 0 ? l : specialLengthAt(method, bci); }
public static boolean isJavaCode (int code) { return 0 <= code && code < number_of_java_codes; }
public static boolean isFastCode (int code) { return number_of_java_codes <= code && code < number_of_codes; }
public static boolean isAload (int code) { return (code == _aload || code == _aload_0 || code == _aload_1
|| code == _aload_2 || code == _aload_3); }
public static boolean isAstore (int code) { return (code == _astore || code == _astore_0 || code == _astore_1
|| code == _astore_2 || code == _astore_3); }
public static boolean isZeroConst (int code) { return (code == _aconst_null || code == _iconst_0
|| code == _fconst_0 || code == _dconst_0); }
static int flags (int code, boolean is_wide) {
assert code == (code & 0xff) : "must be a byte";
return _flags[code + (is_wide ? 256 : 0)];
}
static int format_bits (int code, boolean is_wide) { return flags(code, is_wide) & _all_fmt_bits; }
static boolean has_all_flags (int code, int test_flags, boolean is_wide) {
return (flags(code, is_wide) & test_flags) == test_flags;
}
static char compute_flags(String format) {
return compute_flags(format, 0);
}
static char compute_flags(String format, int more_flags) {
if (format == null) return 0;
int flags = more_flags;
int fp = 0;
if (format.length() == 0) {
flags |= _fmt_not_simple;
} else {
switch (format.charAt(fp)) {
case 'b':
flags |= _fmt_not_variable;
++fp;
break;
case 'w':
flags |= _fmt_not_variable | _fmt_not_simple;
++fp;
assert(format.charAt(fp) == 'b') : "wide format must start with 'wb'";
++fp;
break;
}
}
boolean has_nbo = false, has_jbo = false;
int has_size = 0;
while (fp < format.length()) {
int this_flag = 0;
char fc = format.charAt(fp++);
switch (fc) {
case '_': continue;
case 'j': this_flag = _fmt_has_j; has_jbo = true; break;
case 'k': this_flag = _fmt_has_k; has_jbo = true; break;
case 'i': this_flag = _fmt_has_i; has_jbo = true; break;
case 'c': this_flag = _fmt_has_c; has_jbo = true; break;
case 'o': this_flag = _fmt_has_o; has_jbo = true; break;
case 'J': this_flag = _fmt_has_j; has_nbo = true; break;
case 'K': this_flag = _fmt_has_k; has_nbo = true; break;
case 'I': this_flag = _fmt_has_i; has_nbo = true; break;
case 'C': this_flag = _fmt_has_c; has_nbo = true; break;
case 'O': this_flag = _fmt_has_o; has_nbo = true; break;
default: assert false : "bad char in format";
}
flags |= this_flag;
assert !(has_jbo && has_nbo) : "mixed byte orders in format";
if (has_nbo)
flags |= _fmt_has_nbo;
int this_size = 1;
if (fp < format.length() && format.charAt(fp) == fc) {
this_size = 2;
while (fp + 1 < format.length() && format.charAt(++fp) == fc) this_size++;
switch (this_size) {
case 2: flags |= _fmt_has_u2; break;
case 4: flags |= _fmt_has_u4; break;
default: assert false : "bad rep count in format";
}
}
assert has_size == 0 ||
this_size == has_size ||
this_size < has_size && fp == format.length() :
"mixed field sizes in format";
has_size = this_size;
}
assert flags == (char)flags : "change _format_flags";
return (char)flags;
}
private static String[] _name;
private static String[] _format;
private static String[] _wide_format;
private static int[] _result_type;
private static byte[] _depth;
private static byte[] _lengths;
private static int[] _java_code;
private static char[] _flags;
static {
_name = new String [number_of_codes];
_format = new String [number_of_codes];
_wide_format = new String [number_of_codes];
_result_type = new int [number_of_codes];
_depth = new byte [number_of_codes];
_lengths = new byte [number_of_codes];
_java_code = new int [number_of_codes];
_flags = new char[256 * 2];
VM.registerVMInitializedObserver(new Observer() {
public void update(Observable o, Object data) {
initialize();
}
});
}
private static final int jintSize = 4;
private static void initialize() {
if (Assert.ASSERTS_ENABLED) {
Assert.that(number_of_codes <= 256, "too many bytecodes");
}
def(_nop , "nop" , "b" , null , BasicType.getTVoid() , 0, false);
def(_aconst_null , "aconst_null" , "b" , null , BasicType.getTObject() , 1, false);
def(_iconst_m1 , "iconst_m1" , "b" , null , BasicType.getTInt() , 1, false);
def(_iconst_0 , "iconst_0" , "b" , null , BasicType.getTInt() , 1, false);
def(_iconst_1 , "iconst_1" , "b" , null , BasicType.getTInt() , 1, false);
def(_iconst_2 , "iconst_2" , "b" , null , BasicType.getTInt() , 1, false);
def(_iconst_3 , "iconst_3" , "b" , null , BasicType.getTInt() , 1, false);
def(_iconst_4 , "iconst_4" , "b" , null , BasicType.getTInt() , 1, false);
def(_iconst_5 , "iconst_5" , "b" , null , BasicType.getTInt() , 1, false);
def(_lconst_0 , "lconst_0" , "b" , null , BasicType.getTLong() , 2, false);
def(_lconst_1 , "lconst_1" , "b" , null , BasicType.getTLong() , 2, false);
def(_fconst_0 , "fconst_0" , "b" , null , BasicType.getTFloat() , 1, false);
def(_fconst_1 , "fconst_1" , "b" , null , BasicType.getTFloat() , 1, false);
def(_fconst_2 , "fconst_2" , "b" , null , BasicType.getTFloat() , 1, false);
def(_dconst_0 , "dconst_0" , "b" , null , BasicType.getTDouble() , 2, false);
def(_dconst_1 , "dconst_1" , "b" , null , BasicType.getTDouble() , 2, false);
def(_bipush , "bipush" , "bc" , null , BasicType.getTInt() , 1, false);
def(_sipush , "sipush" , "bcc" , null , BasicType.getTInt() , 1, false);
def(_ldc , "ldc" , "bk" , null , BasicType.getTIllegal(), 1, true );
def(_ldc_w , "ldc_w" , "bkk" , null , BasicType.getTIllegal(), 1, true );
def(_ldc2_w , "ldc2_w" , "bkk" , null , BasicType.getTIllegal(), 2, true );
def(_iload , "iload" , "bi" , "wbii" , BasicType.getTInt() , 1, false);
def(_lload , "lload" , "bi" , "wbii" , BasicType.getTLong() , 2, false);
def(_fload , "fload" , "bi" , "wbii" , BasicType.getTFloat() , 1, false);
def(_dload , "dload" , "bi" , "wbii" , BasicType.getTDouble() , 2, false);
def(_aload , "aload" , "bi" , "wbii" , BasicType.getTObject() , 1, false);
def(_iload_0 , "iload_0" , "b" , null , BasicType.getTInt() , 1, false);
def(_iload_1 , "iload_1" , "b" , null , BasicType.getTInt() , 1, false);
def(_iload_2 , "iload_2" , "b" , null , BasicType.getTInt() , 1, false);
def(_iload_3 , "iload_3" , "b" , null , BasicType.getTInt() , 1, false);
def(_lload_0 , "lload_0" , "b" , null , BasicType.getTLong() , 2, false);
def(_lload_1 , "lload_1" , "b" , null , BasicType.getTLong() , 2, false);
def(_lload_2 , "lload_2" , "b" , null , BasicType.getTLong() , 2, false);
def(_lload_3 , "lload_3" , "b" , null , BasicType.getTLong() , 2, false);
def(_fload_0 , "fload_0" , "b" , null , BasicType.getTFloat() , 1, false);
def(_fload_1 , "fload_1" , "b" , null , BasicType.getTFloat() , 1, false);
def(_fload_2 , "fload_2" , "b" , null , BasicType.getTFloat() , 1, false);
def(_fload_3 , "fload_3" , "b" , null , BasicType.getTFloat() , 1, false);
def(_dload_0 , "dload_0" , "b" , null , BasicType.getTDouble() , 2, false);
def(_dload_1 , "dload_1" , "b" , null , BasicType.getTDouble() , 2, false);
def(_dload_2 , "dload_2" , "b" , null , BasicType.getTDouble() , 2, false);
def(_dload_3 , "dload_3" , "b" , null , BasicType.getTDouble() , 2, false);
def(_aload_0 , "aload_0" , "b" , null , BasicType.getTObject() , 1, true );
def(_aload_1 , "aload_1" , "b" , null , BasicType.getTObject() , 1, false);
def(_aload_2 , "aload_2" , "b" , null , BasicType.getTObject() , 1, false);
def(_aload_3 , "aload_3" , "b" , null , BasicType.getTObject() , 1, false);
def(_iaload , "iaload" , "b" , null , BasicType.getTInt() , -1, true );
def(_laload , "laload" , "b" , null , BasicType.getTLong() , 0, true );
def(_faload , "faload" , "b" , null , BasicType.getTFloat() , -1, true );
def(_daload , "daload" , "b" , null , BasicType.getTDouble() , 0, true );
def(_aaload , "aaload" , "b" , null , BasicType.getTObject() , -1, true );
def(_baload , "baload" , "b" , null , BasicType.getTInt() , -1, true );
def(_caload , "caload" , "b" , null , BasicType.getTInt() , -1, true );
def(_saload , "saload" , "b" , null , BasicType.getTInt() , -1, true );
def(_istore , "istore" , "bi" , "wbii" , BasicType.getTVoid() , -1, false);
def(_lstore , "lstore" , "bi" , "wbii" , BasicType.getTVoid() , -2, false);
def(_fstore , "fstore" , "bi" , "wbii" , BasicType.getTVoid() , -1, false);
def(_dstore , "dstore" , "bi" , "wbii" , BasicType.getTVoid() , -2, false);
def(_astore , "astore" , "bi" , "wbii" , BasicType.getTVoid() , -1, false);
def(_istore_0 , "istore_0" , "b" , null , BasicType.getTVoid() , -1, false);
def(_istore_1 , "istore_1" , "b" , null , BasicType.getTVoid() , -1, false);
def(_istore_2 , "istore_2" , "b" , null , BasicType.getTVoid() , -1, false);
def(_istore_3 , "istore_3" , "b" , null , BasicType.getTVoid() , -1, false);
def(_lstore_0 , "lstore_0" , "b" , null , BasicType.getTVoid() , -2, false);
def(_lstore_1 , "lstore_1" , "b" , null , BasicType.getTVoid() , -2, false);
def(_lstore_2 , "lstore_2" , "b" , null , BasicType.getTVoid() , -2, false);
def(_lstore_3 , "lstore_3" , "b" , null , BasicType.getTVoid() , -2, false);
def(_fstore_0 , "fstore_0" , "b" , null , BasicType.getTVoid() , -1, false);
def(_fstore_1 , "fstore_1" , "b" , null , BasicType.getTVoid() , -1, false);
def(_fstore_2 , "fstore_2" , "b" , null , BasicType.getTVoid() , -1, false);
def(_fstore_3 , "fstore_3" , "b" , null , BasicType.getTVoid() , -1, false);
def(_dstore_0 , "dstore_0" , "b" , null , BasicType.getTVoid() , -2, false);
def(_dstore_1 , "dstore_1" , "b" , null , BasicType.getTVoid() , -2, false);
def(_dstore_2 , "dstore_2" , "b" , null , BasicType.getTVoid() , -2, false);
def(_dstore_3 , "dstore_3" , "b" , null , BasicType.getTVoid() , -2, false);
def(_astore_0 , "astore_0" , "b" , null , BasicType.getTVoid() , -1, false);
def(_astore_1 , "astore_1" , "b" , null , BasicType.getTVoid() , -1, false);
def(_astore_2 , "astore_2" , "b" , null , BasicType.getTVoid() , -1, false);
def(_astore_3 , "astore_3" , "b" , null , BasicType.getTVoid() , -1, false);
def(_iastore , "iastore" , "b" , null , BasicType.getTVoid() , -3, true );
def(_lastore , "lastore" , "b" , null , BasicType.getTVoid() , -4, true );
def(_fastore , "fastore" , "b" , null , BasicType.getTVoid() , -3, true );
def(_dastore , "dastore" , "b" , null , BasicType.getTVoid() , -4, true );
def(_aastore , "aastore" , "b" , null , BasicType.getTVoid() , -3, true );
def(_bastore , "bastore" , "b" , null , BasicType.getTVoid() , -3, true );
def(_castore , "castore" , "b" , null , BasicType.getTVoid() , -3, true );
def(_sastore , "sastore" , "b" , null , BasicType.getTVoid() , -3, true );
def(_pop , "pop" , "b" , null , BasicType.getTVoid() , -1, false);
def(_pop2 , "pop2" , "b" , null , BasicType.getTVoid() , -2, false);
def(_dup , "dup" , "b" , null , BasicType.getTVoid() , 1, false);
def(_dup_x1 , "dup_x1" , "b" , null , BasicType.getTVoid() , 1, false);
def(_dup_x2 , "dup_x2" , "b" , null , BasicType.getTVoid() , 1, false);
def(_dup2 , "dup2" , "b" , null , BasicType.getTVoid() , 2, false);
def(_dup2_x1 , "dup2_x1" , "b" , null , BasicType.getTVoid() , 2, false);
def(_dup2_x2 , "dup2_x2" , "b" , null , BasicType.getTVoid() , 2, false);
def(_swap , "swap" , "b" , null , BasicType.getTVoid() , 0, false);
def(_iadd , "iadd" , "b" , null , BasicType.getTInt() , -1, false);
def(_ladd , "ladd" , "b" , null , BasicType.getTLong() , -2, false);
def(_fadd , "fadd" , "b" , null , BasicType.getTFloat() , -1, false);
def(_dadd , "dadd" , "b" , null , BasicType.getTDouble() , -2, false);
def(_isub , "isub" , "b" , null , BasicType.getTInt() , -1, false);
def(_lsub , "lsub" , "b" , null , BasicType.getTLong() , -2, false);
def(_fsub , "fsub" , "b" , null , BasicType.getTFloat() , -1, false);
def(_dsub , "dsub" , "b" , null , BasicType.getTDouble() , -2, false);
def(_imul , "imul" , "b" , null , BasicType.getTInt() , -1, false);
def(_lmul , "lmul" , "b" , null , BasicType.getTLong() , -2, false);
def(_fmul , "fmul" , "b" , null , BasicType.getTFloat() , -1, false);
def(_dmul , "dmul" , "b" , null , BasicType.getTDouble() , -2, false);
def(_idiv , "idiv" , "b" , null , BasicType.getTInt() , -1, true );
def(_ldiv , "ldiv" , "b" , null , BasicType.getTLong() , -2, true );
def(_fdiv , "fdiv" , "b" , null , BasicType.getTFloat() , -1, false);
def(_ddiv , "ddiv" , "b" , null , BasicType.getTDouble() , -2, false);
def(_irem , "irem" , "b" , null , BasicType.getTInt() , -1, true );
def(_lrem , "lrem" , "b" , null , BasicType.getTLong() , -2, true );
def(_frem , "frem" , "b" , null , BasicType.getTFloat() , -1, false);
def(_drem , "drem" , "b" , null , BasicType.getTDouble() , -2, false);
def(_ineg , "ineg" , "b" , null , BasicType.getTInt() , 0, false);
def(_lneg , "lneg" , "b" , null , BasicType.getTLong() , 0, false);
def(_fneg , "fneg" , "b" , null , BasicType.getTFloat() , 0, false);
def(_dneg , "dneg" , "b" , null , BasicType.getTDouble() , 0, false);
def(_ishl , "ishl" , "b" , null , BasicType.getTInt() , -1, false);
def(_lshl , "lshl" , "b" , null , BasicType.getTLong() , -1, false);
def(_ishr , "ishr" , "b" , null , BasicType.getTInt() , -1, false);
def(_lshr , "lshr" , "b" , null , BasicType.getTLong() , -1, false);
def(_iushr , "iushr" , "b" , null , BasicType.getTInt() , -1, false);
def(_lushr , "lushr" , "b" , null , BasicType.getTLong() , -1, false);
def(_iand , "iand" , "b" , null , BasicType.getTInt() , -1, false);
def(_land , "land" , "b" , null , BasicType.getTLong() , -2, false);
def(_ior , "ior" , "b" , null , BasicType.getTInt() , -1, false);
def(_lor , "lor" , "b" , null , BasicType.getTLong() , -2, false);
def(_ixor , "ixor" , "b" , null , BasicType.getTInt() , -1, false);
def(_lxor , "lxor" , "b" , null , BasicType.getTLong() , -2, false);
def(_iinc , "iinc" , "bic" , "wbiicc", BasicType.getTVoid() , 0, false);
def(_i2l , "i2l" , "b" , null , BasicType.getTLong() , 1, false);
def(_i2f , "i2f" , "b" , null , BasicType.getTFloat() , 0, false);
def(_i2d , "i2d" , "b" , null , BasicType.getTDouble() , 1, false);
def(_l2i , "l2i" , "b" , null , BasicType.getTInt() , -1, false);
def(_l2f , "l2f" , "b" , null , BasicType.getTFloat() , -1, false);
def(_l2d , "l2d" , "b" , null , BasicType.getTDouble() , 0, false);
def(_f2i , "f2i" , "b" , null , BasicType.getTInt() , 0, false);
def(_f2l , "f2l" , "b" , null , BasicType.getTLong() , 1, false);
def(_f2d , "f2d" , "b" , null , BasicType.getTDouble() , 1, false);
def(_d2i , "d2i" , "b" , null , BasicType.getTInt() , -1, false);
def(_d2l , "d2l" , "b" , null , BasicType.getTLong() , 0, false);
def(_d2f , "d2f" , "b" , null , BasicType.getTFloat() , -1, false);
def(_i2b , "i2b" , "b" , null , BasicType.getTByte() , 0, false);
def(_i2c , "i2c" , "b" , null , BasicType.getTChar() , 0, false);
def(_i2s , "i2s" , "b" , null , BasicType.getTShort() , 0, false);
def(_lcmp , "lcmp" , "b" , null , BasicType.getTVoid() , -3, false);
def(_fcmpl , "fcmpl" , "b" , null , BasicType.getTVoid() , -1, false);
def(_fcmpg , "fcmpg" , "b" , null , BasicType.getTVoid() , -1, false);
def(_dcmpl , "dcmpl" , "b" , null , BasicType.getTVoid() , -3, false);
def(_dcmpg , "dcmpg" , "b" , null , BasicType.getTVoid() , -3, false);
def(_ifeq , "ifeq" , "boo" , null , BasicType.getTVoid() , -1, false);
def(_ifne , "ifne" , "boo" , null , BasicType.getTVoid() , -1, false);
def(_iflt , "iflt" , "boo" , null , BasicType.getTVoid() , -1, false);
def(_ifge , "ifge" , "boo" , null , BasicType.getTVoid() , -1, false);
def(_ifgt , "ifgt" , "boo" , null , BasicType.getTVoid() , -1, false);
def(_ifle , "ifle" , "boo" , null , BasicType.getTVoid() , -1, false);
def(_if_icmpeq , "if_icmpeq" , "boo" , null , BasicType.getTVoid() , -2, false);
def(_if_icmpne , "if_icmpne" , "boo" , null , BasicType.getTVoid() , -2, false);
def(_if_icmplt , "if_icmplt" , "boo" , null , BasicType.getTVoid() , -2, false);
def(_if_icmpge , "if_icmpge" , "boo" , null , BasicType.getTVoid() , -2, false);
def(_if_icmpgt , "if_icmpgt" , "boo" , null , BasicType.getTVoid() , -2, false);
def(_if_icmple , "if_icmple" , "boo" , null , BasicType.getTVoid() , -2, false);
def(_if_acmpeq , "if_acmpeq" , "boo" , null , BasicType.getTVoid() , -2, false);
def(_if_acmpne , "if_acmpne" , "boo" , null , BasicType.getTVoid() , -2, false);
def(_goto , "goto" , "boo" , null , BasicType.getTVoid() , 0, false);
def(_jsr , "jsr" , "boo" , null , BasicType.getTInt() , 0, false);
def(_ret , "ret" , "bi" , "wbii" , BasicType.getTVoid() , 0, false);
def(_tableswitch , "tableswitch" , "" , null , BasicType.getTVoid() , -1, false);
def(_lookupswitch , "lookupswitch" , "" , null , BasicType.getTVoid() , -1, false);
def(_ireturn , "ireturn" , "b" , null , BasicType.getTInt() , -1, true );
def(_lreturn , "lreturn" , "b" , null , BasicType.getTLong() , -2, true );
def(_freturn , "freturn" , "b" , null , BasicType.getTFloat() , -1, true );
def(_dreturn , "dreturn" , "b" , null , BasicType.getTDouble() , -2, true );
def(_areturn , "areturn" , "b" , null , BasicType.getTObject() , -1, true );
def(_return , "return" , "b" , null , BasicType.getTVoid() , 0, true );
def(_getstatic , "getstatic" , "bJJ" , null , BasicType.getTIllegal(), 1, true );
def(_putstatic , "putstatic" , "bJJ" , null , BasicType.getTIllegal(), -1, true );
def(_getfield , "getfield" , "bJJ" , null , BasicType.getTIllegal(), 0, true );
def(_putfield , "putfield" , "bJJ" , null , BasicType.getTIllegal(), -2, true );
def(_invokevirtual , "invokevirtual" , "bJJ" , null , BasicType.getTIllegal(), -1, true );
def(_invokespecial , "invokespecial" , "bJJ" , null , BasicType.getTIllegal(), -1, true );
def(_invokestatic , "invokestatic" , "bJJ" , null , BasicType.getTIllegal(), 0, true );
def(_invokeinterface , "invokeinterface" , "bJJ__", null , BasicType.getTIllegal(), -1, true );
def(_invokedynamic , "invokedynamic" , "bJJJJ", null , BasicType.getTIllegal(), 0, true );
def(_new , "new" , "bkk" , null , BasicType.getTObject() , 1, true );
def(_newarray , "newarray" , "bc" , null , BasicType.getTObject() , 0, true );
def(_anewarray , "anewarray" , "bkk" , null , BasicType.getTObject() , 0, true );
def(_arraylength , "arraylength" , "b" , null , BasicType.getTVoid() , 0, true );
def(_athrow , "athrow" , "b" , null , BasicType.getTVoid() , -1, true );
def(_checkcast , "checkcast" , "bkk" , null , BasicType.getTObject() , 0, true );
def(_instanceof , "instanceof" , "bkk" , null , BasicType.getTInt() , 0, true );
def(_monitorenter , "monitorenter" , "b" , null , BasicType.getTVoid() , -1, true );
def(_monitorexit , "monitorexit" , "b" , null , BasicType.getTVoid() , -1, true );
def(_wide , "wide" , "" , null , BasicType.getTVoid() , 0, false);
def(_multianewarray , "multianewarray" , "bkkc" , null , BasicType.getTObject() , 1, true );
def(_ifnull , "ifnull" , "boo" , null , BasicType.getTVoid() , -1, false);
def(_ifnonnull , "ifnonnull" , "boo" , null , BasicType.getTVoid() , -1, false);
def(_goto_w , "goto_w" , "boooo", null , BasicType.getTVoid() , 0, false);
def(_jsr_w , "jsr_w" , "boooo", null , BasicType.getTInt() , 0, false);
def(_breakpoint , "breakpoint" , "" , null , BasicType.getTVoid() , 0, true );
def(_fast_agetfield , "fast_agetfield" , "bJJ" , null , BasicType.getTObject() , 0, true , _getfield );
def(_fast_bgetfield , "fast_bgetfield" , "bJJ" , null , BasicType.getTInt() , 0, true , _getfield );
def(_fast_cgetfield , "fast_cgetfield" , "bJJ" , null , BasicType.getTChar() , 0, true , _getfield );
def(_fast_dgetfield , "fast_dgetfield" , "bJJ" , null , BasicType.getTDouble() , 0, true , _getfield );
def(_fast_fgetfield , "fast_fgetfield" , "bJJ" , null , BasicType.getTFloat() , 0, true , _getfield );
def(_fast_igetfield , "fast_igetfield" , "bJJ" , null , BasicType.getTInt() , 0, true , _getfield );
def(_fast_lgetfield , "fast_lgetfield" , "bJJ" , null , BasicType.getTLong() , 0, true , _getfield );
def(_fast_sgetfield , "fast_sgetfield" , "bJJ" , null , BasicType.getTShort() , 0, true , _getfield );
def(_fast_aputfield , "fast_aputfield" , "bJJ" , null , BasicType.getTObject() , 0, true , _putfield );
def(_fast_bputfield , "fast_bputfield" , "bJJ" , null , BasicType.getTInt() , 0, true , _putfield );
def(_fast_zputfield , "fast_zputfield" , "bJJ" , null , BasicType.getTInt() , 0, true , _putfield );
def(_fast_cputfield , "fast_cputfield" , "bJJ" , null , BasicType.getTChar() , 0, true , _putfield );
def(_fast_dputfield , "fast_dputfield" , "bJJ" , null , BasicType.getTDouble() , 0, true , _putfield );
def(_fast_fputfield , "fast_fputfield" , "bJJ" , null , BasicType.getTFloat() , 0, true , _putfield );
def(_fast_iputfield , "fast_iputfield" , "bJJ" , null , BasicType.getTInt() , 0, true , _putfield );
def(_fast_lputfield , "fast_lputfield" , "bJJ" , null , BasicType.getTLong() , 0, true , _putfield );
def(_fast_sputfield , "fast_sputfield" , "bJJ" , null , BasicType.getTShort() , 0, true , _putfield );
def(_fast_aload_0 , "fast_aload_0" , "b" , null , BasicType.getTObject() , 1, true , _aload_0 );
def(_fast_iaccess_0 , "fast_iaccess_0" , "b_JJ" , null , BasicType.getTInt() , 1, true , _aload_0 );
def(_fast_aaccess_0 , "fast_aaccess_0" , "b_JJ" , null , BasicType.getTObject() , 1, true , _aload_0 );
def(_fast_faccess_0 , "fast_faccess_0" , "b_JJ" , null , BasicType.getTObject() , 1, true , _aload_0 );
def(_fast_iload , "fast_iload" , "bi" , null , BasicType.getTInt() , 1, false, _iload );
def(_fast_iload2 , "fast_iload2" , "bi_i" , null , BasicType.getTInt() , 2, false, _iload );
def(_fast_icaload , "fast_icaload" , "bi_" , null , BasicType.getTInt() , 0, false, _iload );
def(_fast_invokevfinal , "fast_invokevfinal" , "bJJ" , null , BasicType.getTIllegal(), -1, true, _invokevirtual );
def(_fast_linearswitch , "fast_linearswitch" , "" , null , BasicType.getTVoid() , -1, false, _lookupswitch );
def(_fast_binaryswitch , "fast_binaryswitch" , "" , null , BasicType.getTVoid() , -1, false, _lookupswitch );
def(_fast_aldc , "fast_aldc" , "bj" , null , BasicType.getTObject(), 1, true, _ldc );
def(_fast_aldc_w , "fast_aldc_w" , "bJJ" , null , BasicType.getTObject(), 1, true, _ldc_w );
def(_return_register_finalizer, "return_register_finalizer", "b" , null , BasicType.getTVoid() , 0, true, _return );
def(_invokehandle , "invokehandle" , "bJJ" , null , BasicType.getTIllegal(), -1, true, _invokevirtual );
def(_shouldnotreachhere , "_shouldnotreachhere" , "b" , null , BasicType.getTVoid() , 0, false);
if (Assert.ASSERTS_ENABLED) {
for (int i = 0; i < number_of_codes; i++) {
if (isDefined(i)) {
int j = javaCode(i);
if (canTrap(i) && !canTrap(j)) {
Assert.that(false, name(i) + " can trap => " + name(j) + " can trap, too");
}
}
}
}
}
private static void def(int code, String name, String format, String wide_format, int result_type, int depth, boolean can_trap) {
def(code, name, format, wide_format, result_type, depth, can_trap, code);
}
private static void def(int code, String name, String format, String wide_format, int result_type, int depth, boolean can_trap, int java_code) {
if (Assert.ASSERTS_ENABLED) {
Assert.that(wide_format == null || format != null, "short form must exist if there's a wide form");
}
int len = (format != null ? format.length() : 0);
int wlen = (wide_format != null ? wide_format.length() : 0);
_name [code] = name;
_result_type [code] = result_type;
_depth [code] = (byte) depth;
_lengths [code] = (byte)((wlen << 4) | (len & 0xF));
_java_code [code] = java_code;
_format [code] = format;
_wide_format [code] = wide_format;
int bc_flags = 0;
if (can_trap) bc_flags |= _bc_can_trap;
if (java_code != code) bc_flags |= _bc_can_rewrite;
_flags[code+0*256] = compute_flags(format, bc_flags);
_flags[code+1*256] = compute_flags(wide_format, bc_flags);
}
}