annotate agent/src/share/classes/sun/jvm/hotspot/interpreter/Bytecodes.java @ 6725:da91efe96a93

6964458: Reimplement class meta-data storage to use native memory Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author coleenp
date Sat, 01 Sep 2012 13:25:18 -0400
parents 6a991dcb52bb
children c7957b458bf8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3838
diff changeset
2 * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
21 * questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 package sun.jvm.hotspot.interpreter;
a61af66fc99e Initial load
duke
parents:
diff changeset
26
a61af66fc99e Initial load
duke
parents:
diff changeset
27 import java.util.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
28 import sun.jvm.hotspot.oops.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
29 import sun.jvm.hotspot.runtime.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
30 import sun.jvm.hotspot.utilities.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
31
a61af66fc99e Initial load
duke
parents:
diff changeset
32 // Bytecodes specifies all bytecodes used in the VM and
a61af66fc99e Initial load
duke
parents:
diff changeset
33 // provides utility functions to get bytecode attributes.
a61af66fc99e Initial load
duke
parents:
diff changeset
34
a61af66fc99e Initial load
duke
parents:
diff changeset
35 public class Bytecodes {
a61af66fc99e Initial load
duke
parents:
diff changeset
36 public static final int _illegal = -1;
a61af66fc99e Initial load
duke
parents:
diff changeset
37
a61af66fc99e Initial load
duke
parents:
diff changeset
38 // Java bytecodes
a61af66fc99e Initial load
duke
parents:
diff changeset
39 public static final int _nop = 0; // 0x00
a61af66fc99e Initial load
duke
parents:
diff changeset
40 public static final int _aconst_null = 1; // 0x01
a61af66fc99e Initial load
duke
parents:
diff changeset
41 public static final int _iconst_m1 = 2; // 0x02
a61af66fc99e Initial load
duke
parents:
diff changeset
42 public static final int _iconst_0 = 3; // 0x03
a61af66fc99e Initial load
duke
parents:
diff changeset
43 public static final int _iconst_1 = 4; // 0x04
a61af66fc99e Initial load
duke
parents:
diff changeset
44 public static final int _iconst_2 = 5; // 0x05
a61af66fc99e Initial load
duke
parents:
diff changeset
45 public static final int _iconst_3 = 6; // 0x06
a61af66fc99e Initial load
duke
parents:
diff changeset
46 public static final int _iconst_4 = 7; // 0x07
a61af66fc99e Initial load
duke
parents:
diff changeset
47 public static final int _iconst_5 = 8; // 0x08
a61af66fc99e Initial load
duke
parents:
diff changeset
48 public static final int _lconst_0 = 9; // 0x09
a61af66fc99e Initial load
duke
parents:
diff changeset
49 public static final int _lconst_1 = 10; // 0x0a
a61af66fc99e Initial load
duke
parents:
diff changeset
50 public static final int _fconst_0 = 11; // 0x0b
a61af66fc99e Initial load
duke
parents:
diff changeset
51 public static final int _fconst_1 = 12; // 0x0c
a61af66fc99e Initial load
duke
parents:
diff changeset
52 public static final int _fconst_2 = 13; // 0x0d
a61af66fc99e Initial load
duke
parents:
diff changeset
53 public static final int _dconst_0 = 14; // 0x0e
a61af66fc99e Initial load
duke
parents:
diff changeset
54 public static final int _dconst_1 = 15; // 0x0f
a61af66fc99e Initial load
duke
parents:
diff changeset
55 public static final int _bipush = 16; // 0x10
a61af66fc99e Initial load
duke
parents:
diff changeset
56 public static final int _sipush = 17; // 0x11
a61af66fc99e Initial load
duke
parents:
diff changeset
57 public static final int _ldc = 18; // 0x12
a61af66fc99e Initial load
duke
parents:
diff changeset
58 public static final int _ldc_w = 19; // 0x13
a61af66fc99e Initial load
duke
parents:
diff changeset
59 public static final int _ldc2_w = 20; // 0x14
a61af66fc99e Initial load
duke
parents:
diff changeset
60 public static final int _iload = 21; // 0x15
a61af66fc99e Initial load
duke
parents:
diff changeset
61 public static final int _lload = 22; // 0x16
a61af66fc99e Initial load
duke
parents:
diff changeset
62 public static final int _fload = 23; // 0x17
a61af66fc99e Initial load
duke
parents:
diff changeset
63 public static final int _dload = 24; // 0x18
a61af66fc99e Initial load
duke
parents:
diff changeset
64 public static final int _aload = 25; // 0x19
a61af66fc99e Initial load
duke
parents:
diff changeset
65 public static final int _iload_0 = 26; // 0x1a
a61af66fc99e Initial load
duke
parents:
diff changeset
66 public static final int _iload_1 = 27; // 0x1b
a61af66fc99e Initial load
duke
parents:
diff changeset
67 public static final int _iload_2 = 28; // 0x1c
a61af66fc99e Initial load
duke
parents:
diff changeset
68 public static final int _iload_3 = 29; // 0x1d
a61af66fc99e Initial load
duke
parents:
diff changeset
69 public static final int _lload_0 = 30; // 0x1e
a61af66fc99e Initial load
duke
parents:
diff changeset
70 public static final int _lload_1 = 31; // 0x1f
a61af66fc99e Initial load
duke
parents:
diff changeset
71 public static final int _lload_2 = 32; // 0x20
a61af66fc99e Initial load
duke
parents:
diff changeset
72 public static final int _lload_3 = 33; // 0x21
a61af66fc99e Initial load
duke
parents:
diff changeset
73 public static final int _fload_0 = 34; // 0x22
a61af66fc99e Initial load
duke
parents:
diff changeset
74 public static final int _fload_1 = 35; // 0x23
a61af66fc99e Initial load
duke
parents:
diff changeset
75 public static final int _fload_2 = 36; // 0x24
a61af66fc99e Initial load
duke
parents:
diff changeset
76 public static final int _fload_3 = 37; // 0x25
a61af66fc99e Initial load
duke
parents:
diff changeset
77 public static final int _dload_0 = 38; // 0x26
a61af66fc99e Initial load
duke
parents:
diff changeset
78 public static final int _dload_1 = 39; // 0x27
a61af66fc99e Initial load
duke
parents:
diff changeset
79 public static final int _dload_2 = 40; // 0x28
a61af66fc99e Initial load
duke
parents:
diff changeset
80 public static final int _dload_3 = 41; // 0x29
a61af66fc99e Initial load
duke
parents:
diff changeset
81 public static final int _aload_0 = 42; // 0x2a
a61af66fc99e Initial load
duke
parents:
diff changeset
82 public static final int _aload_1 = 43; // 0x2b
a61af66fc99e Initial load
duke
parents:
diff changeset
83 public static final int _aload_2 = 44; // 0x2c
a61af66fc99e Initial load
duke
parents:
diff changeset
84 public static final int _aload_3 = 45; // 0x2d
a61af66fc99e Initial load
duke
parents:
diff changeset
85 public static final int _iaload = 46; // 0x2e
a61af66fc99e Initial load
duke
parents:
diff changeset
86 public static final int _laload = 47; // 0x2f
a61af66fc99e Initial load
duke
parents:
diff changeset
87 public static final int _faload = 48; // 0x30
a61af66fc99e Initial load
duke
parents:
diff changeset
88 public static final int _daload = 49; // 0x31
a61af66fc99e Initial load
duke
parents:
diff changeset
89 public static final int _aaload = 50; // 0x32
a61af66fc99e Initial load
duke
parents:
diff changeset
90 public static final int _baload = 51; // 0x33
a61af66fc99e Initial load
duke
parents:
diff changeset
91 public static final int _caload = 52; // 0x34
a61af66fc99e Initial load
duke
parents:
diff changeset
92 public static final int _saload = 53; // 0x35
a61af66fc99e Initial load
duke
parents:
diff changeset
93 public static final int _istore = 54; // 0x36
a61af66fc99e Initial load
duke
parents:
diff changeset
94 public static final int _lstore = 55; // 0x37
a61af66fc99e Initial load
duke
parents:
diff changeset
95 public static final int _fstore = 56; // 0x38
a61af66fc99e Initial load
duke
parents:
diff changeset
96 public static final int _dstore = 57; // 0x39
a61af66fc99e Initial load
duke
parents:
diff changeset
97 public static final int _astore = 58; // 0x3a
a61af66fc99e Initial load
duke
parents:
diff changeset
98 public static final int _istore_0 = 59; // 0x3b
a61af66fc99e Initial load
duke
parents:
diff changeset
99 public static final int _istore_1 = 60; // 0x3c
a61af66fc99e Initial load
duke
parents:
diff changeset
100 public static final int _istore_2 = 61; // 0x3d
a61af66fc99e Initial load
duke
parents:
diff changeset
101 public static final int _istore_3 = 62; // 0x3e
a61af66fc99e Initial load
duke
parents:
diff changeset
102 public static final int _lstore_0 = 63; // 0x3f
a61af66fc99e Initial load
duke
parents:
diff changeset
103 public static final int _lstore_1 = 64; // 0x40
a61af66fc99e Initial load
duke
parents:
diff changeset
104 public static final int _lstore_2 = 65; // 0x41
a61af66fc99e Initial load
duke
parents:
diff changeset
105 public static final int _lstore_3 = 66; // 0x42
a61af66fc99e Initial load
duke
parents:
diff changeset
106 public static final int _fstore_0 = 67; // 0x43
a61af66fc99e Initial load
duke
parents:
diff changeset
107 public static final int _fstore_1 = 68; // 0x44
a61af66fc99e Initial load
duke
parents:
diff changeset
108 public static final int _fstore_2 = 69; // 0x45
a61af66fc99e Initial load
duke
parents:
diff changeset
109 public static final int _fstore_3 = 70; // 0x46
a61af66fc99e Initial load
duke
parents:
diff changeset
110 public static final int _dstore_0 = 71; // 0x47
a61af66fc99e Initial load
duke
parents:
diff changeset
111 public static final int _dstore_1 = 72; // 0x48
a61af66fc99e Initial load
duke
parents:
diff changeset
112 public static final int _dstore_2 = 73; // 0x49
a61af66fc99e Initial load
duke
parents:
diff changeset
113 public static final int _dstore_3 = 74; // 0x4a
a61af66fc99e Initial load
duke
parents:
diff changeset
114 public static final int _astore_0 = 75; // 0x4b
a61af66fc99e Initial load
duke
parents:
diff changeset
115 public static final int _astore_1 = 76; // 0x4c
a61af66fc99e Initial load
duke
parents:
diff changeset
116 public static final int _astore_2 = 77; // 0x4d
a61af66fc99e Initial load
duke
parents:
diff changeset
117 public static final int _astore_3 = 78; // 0x4e
a61af66fc99e Initial load
duke
parents:
diff changeset
118 public static final int _iastore = 79; // 0x4f
a61af66fc99e Initial load
duke
parents:
diff changeset
119 public static final int _lastore = 80; // 0x50
a61af66fc99e Initial load
duke
parents:
diff changeset
120 public static final int _fastore = 81; // 0x51
a61af66fc99e Initial load
duke
parents:
diff changeset
121 public static final int _dastore = 82; // 0x52
a61af66fc99e Initial load
duke
parents:
diff changeset
122 public static final int _aastore = 83; // 0x53
a61af66fc99e Initial load
duke
parents:
diff changeset
123 public static final int _bastore = 84; // 0x54
a61af66fc99e Initial load
duke
parents:
diff changeset
124 public static final int _castore = 85; // 0x55
a61af66fc99e Initial load
duke
parents:
diff changeset
125 public static final int _sastore = 86; // 0x56
a61af66fc99e Initial load
duke
parents:
diff changeset
126 public static final int _pop = 87; // 0x57
a61af66fc99e Initial load
duke
parents:
diff changeset
127 public static final int _pop2 = 88; // 0x58
a61af66fc99e Initial load
duke
parents:
diff changeset
128 public static final int _dup = 89; // 0x59
a61af66fc99e Initial load
duke
parents:
diff changeset
129 public static final int _dup_x1 = 90; // 0x5a
a61af66fc99e Initial load
duke
parents:
diff changeset
130 public static final int _dup_x2 = 91; // 0x5b
a61af66fc99e Initial load
duke
parents:
diff changeset
131 public static final int _dup2 = 92; // 0x5c
a61af66fc99e Initial load
duke
parents:
diff changeset
132 public static final int _dup2_x1 = 93; // 0x5d
a61af66fc99e Initial load
duke
parents:
diff changeset
133 public static final int _dup2_x2 = 94; // 0x5e
a61af66fc99e Initial load
duke
parents:
diff changeset
134 public static final int _swap = 95; // 0x5f
a61af66fc99e Initial load
duke
parents:
diff changeset
135 public static final int _iadd = 96; // 0x60
a61af66fc99e Initial load
duke
parents:
diff changeset
136 public static final int _ladd = 97; // 0x61
a61af66fc99e Initial load
duke
parents:
diff changeset
137 public static final int _fadd = 98; // 0x62
a61af66fc99e Initial load
duke
parents:
diff changeset
138 public static final int _dadd = 99; // 0x63
a61af66fc99e Initial load
duke
parents:
diff changeset
139 public static final int _isub = 100; // 0x64
a61af66fc99e Initial load
duke
parents:
diff changeset
140 public static final int _lsub = 101; // 0x65
a61af66fc99e Initial load
duke
parents:
diff changeset
141 public static final int _fsub = 102; // 0x66
a61af66fc99e Initial load
duke
parents:
diff changeset
142 public static final int _dsub = 103; // 0x67
a61af66fc99e Initial load
duke
parents:
diff changeset
143 public static final int _imul = 104; // 0x68
a61af66fc99e Initial load
duke
parents:
diff changeset
144 public static final int _lmul = 105; // 0x69
a61af66fc99e Initial load
duke
parents:
diff changeset
145 public static final int _fmul = 106; // 0x6a
a61af66fc99e Initial load
duke
parents:
diff changeset
146 public static final int _dmul = 107; // 0x6b
a61af66fc99e Initial load
duke
parents:
diff changeset
147 public static final int _idiv = 108; // 0x6c
a61af66fc99e Initial load
duke
parents:
diff changeset
148 public static final int _ldiv = 109; // 0x6d
a61af66fc99e Initial load
duke
parents:
diff changeset
149 public static final int _fdiv = 110; // 0x6e
a61af66fc99e Initial load
duke
parents:
diff changeset
150 public static final int _ddiv = 111; // 0x6f
a61af66fc99e Initial load
duke
parents:
diff changeset
151 public static final int _irem = 112; // 0x70
a61af66fc99e Initial load
duke
parents:
diff changeset
152 public static final int _lrem = 113; // 0x71
a61af66fc99e Initial load
duke
parents:
diff changeset
153 public static final int _frem = 114; // 0x72
a61af66fc99e Initial load
duke
parents:
diff changeset
154 public static final int _drem = 115; // 0x73
a61af66fc99e Initial load
duke
parents:
diff changeset
155 public static final int _ineg = 116; // 0x74
a61af66fc99e Initial load
duke
parents:
diff changeset
156 public static final int _lneg = 117; // 0x75
a61af66fc99e Initial load
duke
parents:
diff changeset
157 public static final int _fneg = 118; // 0x76
a61af66fc99e Initial load
duke
parents:
diff changeset
158 public static final int _dneg = 119; // 0x77
a61af66fc99e Initial load
duke
parents:
diff changeset
159 public static final int _ishl = 120; // 0x78
a61af66fc99e Initial load
duke
parents:
diff changeset
160 public static final int _lshl = 121; // 0x79
a61af66fc99e Initial load
duke
parents:
diff changeset
161 public static final int _ishr = 122; // 0x7a
a61af66fc99e Initial load
duke
parents:
diff changeset
162 public static final int _lshr = 123; // 0x7b
a61af66fc99e Initial load
duke
parents:
diff changeset
163 public static final int _iushr = 124; // 0x7c
a61af66fc99e Initial load
duke
parents:
diff changeset
164 public static final int _lushr = 125; // 0x7d
a61af66fc99e Initial load
duke
parents:
diff changeset
165 public static final int _iand = 126; // 0x7e
a61af66fc99e Initial load
duke
parents:
diff changeset
166 public static final int _land = 127; // 0x7f
a61af66fc99e Initial load
duke
parents:
diff changeset
167 public static final int _ior = 128; // 0x80
a61af66fc99e Initial load
duke
parents:
diff changeset
168 public static final int _lor = 129; // 0x81
a61af66fc99e Initial load
duke
parents:
diff changeset
169 public static final int _ixor = 130; // 0x82
a61af66fc99e Initial load
duke
parents:
diff changeset
170 public static final int _lxor = 131; // 0x83
a61af66fc99e Initial load
duke
parents:
diff changeset
171 public static final int _iinc = 132; // 0x84
a61af66fc99e Initial load
duke
parents:
diff changeset
172 public static final int _i2l = 133; // 0x85
a61af66fc99e Initial load
duke
parents:
diff changeset
173 public static final int _i2f = 134; // 0x86
a61af66fc99e Initial load
duke
parents:
diff changeset
174 public static final int _i2d = 135; // 0x87
a61af66fc99e Initial load
duke
parents:
diff changeset
175 public static final int _l2i = 136; // 0x88
a61af66fc99e Initial load
duke
parents:
diff changeset
176 public static final int _l2f = 137; // 0x89
a61af66fc99e Initial load
duke
parents:
diff changeset
177 public static final int _l2d = 138; // 0x8a
a61af66fc99e Initial load
duke
parents:
diff changeset
178 public static final int _f2i = 139; // 0x8b
a61af66fc99e Initial load
duke
parents:
diff changeset
179 public static final int _f2l = 140; // 0x8c
a61af66fc99e Initial load
duke
parents:
diff changeset
180 public static final int _f2d = 141; // 0x8d
a61af66fc99e Initial load
duke
parents:
diff changeset
181 public static final int _d2i = 142; // 0x8e
a61af66fc99e Initial load
duke
parents:
diff changeset
182 public static final int _d2l = 143; // 0x8f
a61af66fc99e Initial load
duke
parents:
diff changeset
183 public static final int _d2f = 144; // 0x90
a61af66fc99e Initial load
duke
parents:
diff changeset
184 public static final int _i2b = 145; // 0x91
a61af66fc99e Initial load
duke
parents:
diff changeset
185 public static final int _i2c = 146; // 0x92
a61af66fc99e Initial load
duke
parents:
diff changeset
186 public static final int _i2s = 147; // 0x93
a61af66fc99e Initial load
duke
parents:
diff changeset
187 public static final int _lcmp = 148; // 0x94
a61af66fc99e Initial load
duke
parents:
diff changeset
188 public static final int _fcmpl = 149; // 0x95
a61af66fc99e Initial load
duke
parents:
diff changeset
189 public static final int _fcmpg = 150; // 0x96
a61af66fc99e Initial load
duke
parents:
diff changeset
190 public static final int _dcmpl = 151; // 0x97
a61af66fc99e Initial load
duke
parents:
diff changeset
191 public static final int _dcmpg = 152; // 0x98
a61af66fc99e Initial load
duke
parents:
diff changeset
192 public static final int _ifeq = 153; // 0x99
a61af66fc99e Initial load
duke
parents:
diff changeset
193 public static final int _ifne = 154; // 0x9a
a61af66fc99e Initial load
duke
parents:
diff changeset
194 public static final int _iflt = 155; // 0x9b
a61af66fc99e Initial load
duke
parents:
diff changeset
195 public static final int _ifge = 156; // 0x9c
a61af66fc99e Initial load
duke
parents:
diff changeset
196 public static final int _ifgt = 157; // 0x9d
a61af66fc99e Initial load
duke
parents:
diff changeset
197 public static final int _ifle = 158; // 0x9e
a61af66fc99e Initial load
duke
parents:
diff changeset
198 public static final int _if_icmpeq = 159; // 0x9f
a61af66fc99e Initial load
duke
parents:
diff changeset
199 public static final int _if_icmpne = 160; // 0xa0
a61af66fc99e Initial load
duke
parents:
diff changeset
200 public static final int _if_icmplt = 161; // 0xa1
a61af66fc99e Initial load
duke
parents:
diff changeset
201 public static final int _if_icmpge = 162; // 0xa2
a61af66fc99e Initial load
duke
parents:
diff changeset
202 public static final int _if_icmpgt = 163; // 0xa3
a61af66fc99e Initial load
duke
parents:
diff changeset
203 public static final int _if_icmple = 164; // 0xa4
a61af66fc99e Initial load
duke
parents:
diff changeset
204 public static final int _if_acmpeq = 165; // 0xa5
a61af66fc99e Initial load
duke
parents:
diff changeset
205 public static final int _if_acmpne = 166; // 0xa6
a61af66fc99e Initial load
duke
parents:
diff changeset
206 public static final int _goto = 167; // 0xa7
a61af66fc99e Initial load
duke
parents:
diff changeset
207 public static final int _jsr = 168; // 0xa8
a61af66fc99e Initial load
duke
parents:
diff changeset
208 public static final int _ret = 169; // 0xa9
a61af66fc99e Initial load
duke
parents:
diff changeset
209 public static final int _tableswitch = 170; // 0xaa
a61af66fc99e Initial load
duke
parents:
diff changeset
210 public static final int _lookupswitch = 171; // 0xab
a61af66fc99e Initial load
duke
parents:
diff changeset
211 public static final int _ireturn = 172; // 0xac
a61af66fc99e Initial load
duke
parents:
diff changeset
212 public static final int _lreturn = 173; // 0xad
a61af66fc99e Initial load
duke
parents:
diff changeset
213 public static final int _freturn = 174; // 0xae
a61af66fc99e Initial load
duke
parents:
diff changeset
214 public static final int _dreturn = 175; // 0xaf
a61af66fc99e Initial load
duke
parents:
diff changeset
215 public static final int _areturn = 176; // 0xb0
a61af66fc99e Initial load
duke
parents:
diff changeset
216 public static final int _return = 177; // 0xb1
a61af66fc99e Initial load
duke
parents:
diff changeset
217 public static final int _getstatic = 178; // 0xb2
a61af66fc99e Initial load
duke
parents:
diff changeset
218 public static final int _putstatic = 179; // 0xb3
a61af66fc99e Initial load
duke
parents:
diff changeset
219 public static final int _getfield = 180; // 0xb4
a61af66fc99e Initial load
duke
parents:
diff changeset
220 public static final int _putfield = 181; // 0xb5
a61af66fc99e Initial load
duke
parents:
diff changeset
221 public static final int _invokevirtual = 182; // 0xb6
a61af66fc99e Initial load
duke
parents:
diff changeset
222 public static final int _invokespecial = 183; // 0xb7
a61af66fc99e Initial load
duke
parents:
diff changeset
223 public static final int _invokestatic = 184; // 0xb8
a61af66fc99e Initial load
duke
parents:
diff changeset
224 public static final int _invokeinterface = 185; // 0xb9
1602
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
225 public static final int _invokedynamic = 186; // 0xba
0
a61af66fc99e Initial load
duke
parents:
diff changeset
226 public static final int _new = 187; // 0xbb
a61af66fc99e Initial load
duke
parents:
diff changeset
227 public static final int _newarray = 188; // 0xbc
a61af66fc99e Initial load
duke
parents:
diff changeset
228 public static final int _anewarray = 189; // 0xbd
a61af66fc99e Initial load
duke
parents:
diff changeset
229 public static final int _arraylength = 190; // 0xbe
a61af66fc99e Initial load
duke
parents:
diff changeset
230 public static final int _athrow = 191; // 0xbf
a61af66fc99e Initial load
duke
parents:
diff changeset
231 public static final int _checkcast = 192; // 0xc0
a61af66fc99e Initial load
duke
parents:
diff changeset
232 public static final int _instanceof = 193; // 0xc1
a61af66fc99e Initial load
duke
parents:
diff changeset
233 public static final int _monitorenter = 194; // 0xc2
a61af66fc99e Initial load
duke
parents:
diff changeset
234 public static final int _monitorexit = 195; // 0xc3
a61af66fc99e Initial load
duke
parents:
diff changeset
235 public static final int _wide = 196; // 0xc4
a61af66fc99e Initial load
duke
parents:
diff changeset
236 public static final int _multianewarray = 197; // 0xc5
a61af66fc99e Initial load
duke
parents:
diff changeset
237 public static final int _ifnull = 198; // 0xc6
a61af66fc99e Initial load
duke
parents:
diff changeset
238 public static final int _ifnonnull = 199; // 0xc7
a61af66fc99e Initial load
duke
parents:
diff changeset
239 public static final int _goto_w = 200; // 0xc8
a61af66fc99e Initial load
duke
parents:
diff changeset
240 public static final int _jsr_w = 201; // 0xc9
a61af66fc99e Initial load
duke
parents:
diff changeset
241 public static final int _breakpoint = 202; // 0xca
a61af66fc99e Initial load
duke
parents:
diff changeset
242
a61af66fc99e Initial load
duke
parents:
diff changeset
243 public static final int number_of_java_codes = 203;
a61af66fc99e Initial load
duke
parents:
diff changeset
244
a61af66fc99e Initial load
duke
parents:
diff changeset
245 // JVM bytecodes
a61af66fc99e Initial load
duke
parents:
diff changeset
246 public static final int _fast_agetfield = number_of_java_codes;
a61af66fc99e Initial load
duke
parents:
diff changeset
247 public static final int _fast_bgetfield = 204;
a61af66fc99e Initial load
duke
parents:
diff changeset
248 public static final int _fast_cgetfield = 205;
a61af66fc99e Initial load
duke
parents:
diff changeset
249 public static final int _fast_dgetfield = 206;
a61af66fc99e Initial load
duke
parents:
diff changeset
250 public static final int _fast_fgetfield = 207;
a61af66fc99e Initial load
duke
parents:
diff changeset
251 public static final int _fast_igetfield = 208;
a61af66fc99e Initial load
duke
parents:
diff changeset
252 public static final int _fast_lgetfield = 209;
a61af66fc99e Initial load
duke
parents:
diff changeset
253 public static final int _fast_sgetfield = 210;
a61af66fc99e Initial load
duke
parents:
diff changeset
254 public static final int _fast_aputfield = 211;
a61af66fc99e Initial load
duke
parents:
diff changeset
255 public static final int _fast_bputfield = 212;
a61af66fc99e Initial load
duke
parents:
diff changeset
256 public static final int _fast_cputfield = 213;
a61af66fc99e Initial load
duke
parents:
diff changeset
257 public static final int _fast_dputfield = 214;
a61af66fc99e Initial load
duke
parents:
diff changeset
258 public static final int _fast_fputfield = 215;
a61af66fc99e Initial load
duke
parents:
diff changeset
259 public static final int _fast_iputfield = 216;
a61af66fc99e Initial load
duke
parents:
diff changeset
260 public static final int _fast_lputfield = 217;
a61af66fc99e Initial load
duke
parents:
diff changeset
261 public static final int _fast_sputfield = 218;
a61af66fc99e Initial load
duke
parents:
diff changeset
262 public static final int _fast_aload_0 = 219;
a61af66fc99e Initial load
duke
parents:
diff changeset
263 public static final int _fast_iaccess_0 = 220;
a61af66fc99e Initial load
duke
parents:
diff changeset
264 public static final int _fast_aaccess_0 = 221;
a61af66fc99e Initial load
duke
parents:
diff changeset
265 public static final int _fast_faccess_0 = 222;
a61af66fc99e Initial load
duke
parents:
diff changeset
266 public static final int _fast_iload = 223;
a61af66fc99e Initial load
duke
parents:
diff changeset
267 public static final int _fast_iload2 = 224;
a61af66fc99e Initial load
duke
parents:
diff changeset
268 public static final int _fast_icaload = 225;
a61af66fc99e Initial load
duke
parents:
diff changeset
269 public static final int _fast_invokevfinal = 226;
a61af66fc99e Initial load
duke
parents:
diff changeset
270 public static final int _fast_linearswitch = 227;
a61af66fc99e Initial load
duke
parents:
diff changeset
271 public static final int _fast_binaryswitch = 228;
1602
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
272 public static final int _fast_aldc = 229;
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
273 public static final int _fast_aldc_w = 230;
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
274 public static final int _return_register_finalizer = 231;
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
275 public static final int _shouldnotreachhere = 232; // For debugging
0
a61af66fc99e Initial load
duke
parents:
diff changeset
276
1602
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
277 public static final int number_of_codes = 233;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
278
3838
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
279 // Flag bits derived from format strings, can_trap, can_rewrite, etc.:
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
280 // semantic flags:
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
281 static final int _bc_can_trap = 1<<0; // bytecode execution can trap or block
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
282 static final int _bc_can_rewrite = 1<<1; // bytecode execution has an alternate form
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
283
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
284 // format bits (determined only by the format string):
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
285 static final int _fmt_has_c = 1<<2; // constant, such as sipush "bcc"
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
286 static final int _fmt_has_j = 1<<3; // constant pool cache index, such as getfield "bjj"
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
287 static final int _fmt_has_k = 1<<4; // constant pool index, such as ldc "bk"
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
288 static final int _fmt_has_i = 1<<5; // local index, such as iload
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
289 static final int _fmt_has_o = 1<<6; // offset, such as ifeq
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
290 static final int _fmt_has_nbo = 1<<7; // contains native-order field(s)
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
291 static final int _fmt_has_u2 = 1<<8; // contains double-byte field(s)
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
292 static final int _fmt_has_u4 = 1<<9; // contains quad-byte field
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
293 static final int _fmt_not_variable = 1<<10; // not of variable length (simple or wide)
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
294 static final int _fmt_not_simple = 1<<11; // either wide or variable length
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
295 static final int _all_fmt_bits = (_fmt_not_simple*2 - _fmt_has_c);
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
296
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
297 // Example derived format syndromes:
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
298 static final int _fmt_b = _fmt_not_variable;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
299 static final int _fmt_bc = _fmt_b | _fmt_has_c;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
300 static final int _fmt_bi = _fmt_b | _fmt_has_i;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
301 static final int _fmt_bkk = _fmt_b | _fmt_has_k | _fmt_has_u2;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
302 static final int _fmt_bJJ = _fmt_b | _fmt_has_j | _fmt_has_u2 | _fmt_has_nbo;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
303 static final int _fmt_bo2 = _fmt_b | _fmt_has_o | _fmt_has_u2;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
304 static final int _fmt_bo4 = _fmt_b | _fmt_has_o | _fmt_has_u4;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
305
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
306
0
a61af66fc99e Initial load
duke
parents:
diff changeset
307 public static int specialLengthAt(Method method, int bci) {
a61af66fc99e Initial load
duke
parents:
diff changeset
308 int code = codeAt(method, bci);
a61af66fc99e Initial load
duke
parents:
diff changeset
309 switch (code) {
a61af66fc99e Initial load
duke
parents:
diff changeset
310 case _wide:
a61af66fc99e Initial load
duke
parents:
diff changeset
311 return wideLengthFor(method.getBytecodeOrBPAt(bci + 1));
a61af66fc99e Initial load
duke
parents:
diff changeset
312 case _tableswitch:
a61af66fc99e Initial load
duke
parents:
diff changeset
313 {
a61af66fc99e Initial load
duke
parents:
diff changeset
314 int alignedBCI = Bits.roundTo(bci + 1, jintSize);
a61af66fc99e Initial load
duke
parents:
diff changeset
315 int lo = method.getBytecodeIntArg(alignedBCI + 1*jintSize);
a61af66fc99e Initial load
duke
parents:
diff changeset
316 int hi = method.getBytecodeIntArg(alignedBCI + 2*jintSize);
a61af66fc99e Initial load
duke
parents:
diff changeset
317 return (alignedBCI - bci) + (3 + hi - lo + 1)*jintSize;
a61af66fc99e Initial load
duke
parents:
diff changeset
318 }
a61af66fc99e Initial load
duke
parents:
diff changeset
319
a61af66fc99e Initial load
duke
parents:
diff changeset
320 case _lookupswitch: // fall through
a61af66fc99e Initial load
duke
parents:
diff changeset
321 case _fast_binaryswitch: // fall through
a61af66fc99e Initial load
duke
parents:
diff changeset
322 case _fast_linearswitch:
a61af66fc99e Initial load
duke
parents:
diff changeset
323 {
a61af66fc99e Initial load
duke
parents:
diff changeset
324 int alignedBCI = Bits.roundTo(bci + 1, jintSize);
a61af66fc99e Initial load
duke
parents:
diff changeset
325 int npairs = method.getBytecodeIntArg(alignedBCI + jintSize);
a61af66fc99e Initial load
duke
parents:
diff changeset
326 return (alignedBCI - bci) + (2 + 2*npairs)*jintSize;
a61af66fc99e Initial load
duke
parents:
diff changeset
327 }
a61af66fc99e Initial load
duke
parents:
diff changeset
328
a61af66fc99e Initial load
duke
parents:
diff changeset
329 }
a61af66fc99e Initial load
duke
parents:
diff changeset
330 throw new RuntimeException("should not reach here");
a61af66fc99e Initial load
duke
parents:
diff changeset
331 }
a61af66fc99e Initial load
duke
parents:
diff changeset
332
a61af66fc99e Initial load
duke
parents:
diff changeset
333 // Conversion
a61af66fc99e Initial load
duke
parents:
diff changeset
334 public static void check(int code) {
a61af66fc99e Initial load
duke
parents:
diff changeset
335 if (Assert.ASSERTS_ENABLED) {
a61af66fc99e Initial load
duke
parents:
diff changeset
336 Assert.that(isDefined(code), "illegal code " + code);
a61af66fc99e Initial load
duke
parents:
diff changeset
337 }
a61af66fc99e Initial load
duke
parents:
diff changeset
338 }
a61af66fc99e Initial load
duke
parents:
diff changeset
339 public static void wideCheck(int code) {
a61af66fc99e Initial load
duke
parents:
diff changeset
340 if (Assert.ASSERTS_ENABLED) {
a61af66fc99e Initial load
duke
parents:
diff changeset
341 Assert.that(wideIsDefined(code), "illegal code " + code);
a61af66fc99e Initial load
duke
parents:
diff changeset
342 }
a61af66fc99e Initial load
duke
parents:
diff changeset
343 }
a61af66fc99e Initial load
duke
parents:
diff changeset
344
a61af66fc99e Initial load
duke
parents:
diff changeset
345 /** Fetches a bytecode, hiding breakpoints as necessary */
a61af66fc99e Initial load
duke
parents:
diff changeset
346 public static int codeAt(Method method, int bci) {
a61af66fc99e Initial load
duke
parents:
diff changeset
347 int res = codeOrBPAt(method, bci);
a61af66fc99e Initial load
duke
parents:
diff changeset
348 if (res == _breakpoint) {
a61af66fc99e Initial load
duke
parents:
diff changeset
349 res = method.getOrigBytecodeAt(bci);
a61af66fc99e Initial load
duke
parents:
diff changeset
350 }
a61af66fc99e Initial load
duke
parents:
diff changeset
351 return res;
a61af66fc99e Initial load
duke
parents:
diff changeset
352 }
a61af66fc99e Initial load
duke
parents:
diff changeset
353
a61af66fc99e Initial load
duke
parents:
diff changeset
354 /** Fetches a bytecode or a breakpoint */
a61af66fc99e Initial load
duke
parents:
diff changeset
355 public static int codeOrBPAt(Method method, int bci) {
a61af66fc99e Initial load
duke
parents:
diff changeset
356 return method.getBytecodeOrBPAt(bci);
a61af66fc99e Initial load
duke
parents:
diff changeset
357 }
a61af66fc99e Initial load
duke
parents:
diff changeset
358
a61af66fc99e Initial load
duke
parents:
diff changeset
359 public static boolean isActiveBreakpointAt(Method method, int bci) {
a61af66fc99e Initial load
duke
parents:
diff changeset
360 return (codeOrBPAt(method, bci) == _breakpoint);
a61af66fc99e Initial load
duke
parents:
diff changeset
361 }
a61af66fc99e Initial load
duke
parents:
diff changeset
362
a61af66fc99e Initial load
duke
parents:
diff changeset
363 // find a bytecode, behind a breakpoint if necessary:
a61af66fc99e Initial load
duke
parents:
diff changeset
364 // FIXME: not yet implementable
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3838
diff changeset
365 // static Code non_breakpoint_code_at(address bcp, Method* method = null);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
366
a61af66fc99e Initial load
duke
parents:
diff changeset
367 // Bytecode attributes
3838
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
368 public static boolean isDefined (int code) { return 0 <= code && code < number_of_codes && flags(code, false) != 0; }
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
369 public static boolean wideIsDefined(int code) { return isDefined(code) && flags(code, true) != 0; }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
370 public static String name (int code) { check(code); return _name [code]; }
a61af66fc99e Initial load
duke
parents:
diff changeset
371 public static String format (int code) { check(code); return _format [code]; }
a61af66fc99e Initial load
duke
parents:
diff changeset
372 public static String wideFormat (int code) { wideCheck(code); return _wide_format [code]; }
a61af66fc99e Initial load
duke
parents:
diff changeset
373 public static int resultType (int code) { check(code); return _result_type [code]; }
a61af66fc99e Initial load
duke
parents:
diff changeset
374 public static int depth (int code) { check(code); return _depth [code]; }
3838
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
375 public static int lengthFor (int code) { check(code); return _lengths [code] & 0xF; }
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
376 public static int wideLengthFor(int code) { check(code); return _lengths [code] >> 4; }
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
377 public static boolean canTrap (int code) { check(code); return has_all_flags(code, _bc_can_trap, false); }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
378 public static int javaCode (int code) { check(code); return _java_code [code]; }
3838
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
379 public static boolean canRewrite (int code) { check(code); return has_all_flags(code, _bc_can_rewrite, false); }
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
380 public static boolean native_byte_order(int code) { check(code); return has_all_flags(code, _fmt_has_nbo, false); }
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
381 public static boolean uses_cp_cache (int code) { check(code); return has_all_flags(code, _fmt_has_j, false); }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
382 public static int lengthAt (Method method, int bci) { int l = lengthFor(codeAt(method, bci)); return l > 0 ? l : specialLengthAt(method, bci); }
a61af66fc99e Initial load
duke
parents:
diff changeset
383 public static int javaLengthAt (Method method, int bci) { int l = lengthFor(javaCode(codeAt(method, bci))); return l > 0 ? l : specialLengthAt(method, bci); }
a61af66fc99e Initial load
duke
parents:
diff changeset
384 public static boolean isJavaCode (int code) { return 0 <= code && code < number_of_java_codes; }
a61af66fc99e Initial load
duke
parents:
diff changeset
385 public static boolean isFastCode (int code) { return number_of_java_codes <= code && code < number_of_codes; }
a61af66fc99e Initial load
duke
parents:
diff changeset
386
a61af66fc99e Initial load
duke
parents:
diff changeset
387 public static boolean isAload (int code) { return (code == _aload || code == _aload_0 || code == _aload_1
a61af66fc99e Initial load
duke
parents:
diff changeset
388 || code == _aload_2 || code == _aload_3); }
a61af66fc99e Initial load
duke
parents:
diff changeset
389 public static boolean isAstore (int code) { return (code == _astore || code == _astore_0 || code == _astore_1
a61af66fc99e Initial load
duke
parents:
diff changeset
390 || code == _astore_2 || code == _astore_3); }
a61af66fc99e Initial load
duke
parents:
diff changeset
391
a61af66fc99e Initial load
duke
parents:
diff changeset
392 public static boolean isZeroConst (int code) { return (code == _aconst_null || code == _iconst_0
a61af66fc99e Initial load
duke
parents:
diff changeset
393 || code == _fconst_0 || code == _dconst_0); }
a61af66fc99e Initial load
duke
parents:
diff changeset
394
3838
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
395 static int flags (int code, boolean is_wide) {
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
396 assert code == (code & 0xff) : "must be a byte";
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
397 return _flags[code + (is_wide ? 256 : 0)];
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
398 }
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
399 static int format_bits (int code, boolean is_wide) { return flags(code, is_wide) & _all_fmt_bits; }
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
400 static boolean has_all_flags (int code, int test_flags, boolean is_wide) {
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
401 return (flags(code, is_wide) & test_flags) == test_flags;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
402 }
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
403
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
404 static char compute_flags(String format) {
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
405 return compute_flags(format, 0);
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
406 }
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
407 static char compute_flags(String format, int more_flags) {
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
408 if (format == null) return 0; // not even more_flags
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
409 int flags = more_flags;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
410 int fp = 0;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
411 if (format.length() == 0) {
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
412 flags |= _fmt_not_simple; // but variable
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
413 } else {
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
414 switch (format.charAt(fp)) {
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
415 case 'b':
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
416 flags |= _fmt_not_variable; // but simple
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
417 ++fp; // skip 'b'
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
418 break;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
419 case 'w':
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
420 flags |= _fmt_not_variable | _fmt_not_simple;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
421 ++fp; // skip 'w'
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
422 assert(format.charAt(fp) == 'b') : "wide format must start with 'wb'";
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
423 ++fp; // skip 'b'
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
424 break;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
425 }
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
426 }
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
427
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
428 boolean has_nbo = false, has_jbo = false;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
429 int has_size = 0;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
430 while (fp < format.length()) {
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
431 int this_flag = 0;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
432 char fc = format.charAt(fp++);
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
433 switch (fc) {
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
434 case '_': continue; // ignore these
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
435
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
436 case 'j': this_flag = _fmt_has_j; has_jbo = true; break;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
437 case 'k': this_flag = _fmt_has_k; has_jbo = true; break;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
438 case 'i': this_flag = _fmt_has_i; has_jbo = true; break;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
439 case 'c': this_flag = _fmt_has_c; has_jbo = true; break;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
440 case 'o': this_flag = _fmt_has_o; has_jbo = true; break;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
441
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
442 // uppercase versions mark native byte order (from Rewriter)
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
443 // actually, only the 'J' case happens currently
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
444 case 'J': this_flag = _fmt_has_j; has_nbo = true; break;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
445 case 'K': this_flag = _fmt_has_k; has_nbo = true; break;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
446 case 'I': this_flag = _fmt_has_i; has_nbo = true; break;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
447 case 'C': this_flag = _fmt_has_c; has_nbo = true; break;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
448 case 'O': this_flag = _fmt_has_o; has_nbo = true; break;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
449 default: assert false : "bad char in format";
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
450 }
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
451
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
452 flags |= this_flag;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
453
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
454 assert !(has_jbo && has_nbo) : "mixed byte orders in format";
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
455 if (has_nbo)
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
456 flags |= _fmt_has_nbo;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
457
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
458 int this_size = 1;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
459 if (fp < format.length() && format.charAt(fp) == fc) {
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
460 // advance beyond run of the same characters
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
461 this_size = 2;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
462 while (fp + 1 < format.length() && format.charAt(++fp) == fc) this_size++;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
463 switch (this_size) {
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
464 case 2: flags |= _fmt_has_u2; break;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
465 case 4: flags |= _fmt_has_u4; break;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
466 default: assert false : "bad rep count in format";
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
467 }
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
468 }
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
469 assert has_size == 0 || // no field yet
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
470 this_size == has_size || // same size
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
471 this_size < has_size && fp == format.length() : // last field can be short
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
472 "mixed field sizes in format";
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
473 has_size = this_size;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
474 }
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
475
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
476 assert flags == (char)flags : "change _format_flags";
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
477 return (char)flags;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
478 }
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
479
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
480
0
a61af66fc99e Initial load
duke
parents:
diff changeset
481 //----------------------------------------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
482 // Internals only below this point
a61af66fc99e Initial load
duke
parents:
diff changeset
483 //
a61af66fc99e Initial load
duke
parents:
diff changeset
484
a61af66fc99e Initial load
duke
parents:
diff changeset
485 private static String[] _name;
a61af66fc99e Initial load
duke
parents:
diff changeset
486 private static String[] _format;
a61af66fc99e Initial load
duke
parents:
diff changeset
487 private static String[] _wide_format;
a61af66fc99e Initial load
duke
parents:
diff changeset
488 private static int[] _result_type;
a61af66fc99e Initial load
duke
parents:
diff changeset
489 private static byte[] _depth;
3838
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
490 private static byte[] _lengths;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
491 private static int[] _java_code;
3838
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
492 private static char[] _flags;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
493
a61af66fc99e Initial load
duke
parents:
diff changeset
494 static {
a61af66fc99e Initial load
duke
parents:
diff changeset
495 _name = new String [number_of_codes];
a61af66fc99e Initial load
duke
parents:
diff changeset
496 _format = new String [number_of_codes];
a61af66fc99e Initial load
duke
parents:
diff changeset
497 _wide_format = new String [number_of_codes];
a61af66fc99e Initial load
duke
parents:
diff changeset
498 _result_type = new int [number_of_codes]; // See BasicType.java
a61af66fc99e Initial load
duke
parents:
diff changeset
499 _depth = new byte [number_of_codes];
3838
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
500 _lengths = new byte [number_of_codes];
0
a61af66fc99e Initial load
duke
parents:
diff changeset
501 _java_code = new int [number_of_codes];
3838
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
502 _flags = new char[256 * 2]; // all second page for wide formats
0
a61af66fc99e Initial load
duke
parents:
diff changeset
503
a61af66fc99e Initial load
duke
parents:
diff changeset
504 // In case we want to fetch this information from the VM in the
a61af66fc99e Initial load
duke
parents:
diff changeset
505 // future
a61af66fc99e Initial load
duke
parents:
diff changeset
506 VM.registerVMInitializedObserver(new Observer() {
a61af66fc99e Initial load
duke
parents:
diff changeset
507 public void update(Observable o, Object data) {
a61af66fc99e Initial load
duke
parents:
diff changeset
508 initialize();
a61af66fc99e Initial load
duke
parents:
diff changeset
509 }
a61af66fc99e Initial load
duke
parents:
diff changeset
510 });
a61af66fc99e Initial load
duke
parents:
diff changeset
511 }
a61af66fc99e Initial load
duke
parents:
diff changeset
512
a61af66fc99e Initial load
duke
parents:
diff changeset
513 private static final int jintSize = 4;
a61af66fc99e Initial load
duke
parents:
diff changeset
514
a61af66fc99e Initial load
duke
parents:
diff changeset
515 // private static String[] _name = new String [number_of_codes];
a61af66fc99e Initial load
duke
parents:
diff changeset
516 // private static String[] _format = new String [number_of_codes];
a61af66fc99e Initial load
duke
parents:
diff changeset
517 // private static String[] _wide_format = new String [number_of_codes];
a61af66fc99e Initial load
duke
parents:
diff changeset
518 // private static int[] _result_type = new int [number_of_codes]; // See BasicType.java
a61af66fc99e Initial load
duke
parents:
diff changeset
519 // private static byte[] _depth = new byte [number_of_codes];
a61af66fc99e Initial load
duke
parents:
diff changeset
520 // private static byte[] _length = new byte [number_of_codes];
a61af66fc99e Initial load
duke
parents:
diff changeset
521 // private static boolean[] _can_trap = new boolean[number_of_codes];
a61af66fc99e Initial load
duke
parents:
diff changeset
522 // private static int[] _java_code = new int [number_of_codes];
a61af66fc99e Initial load
duke
parents:
diff changeset
523 // private static boolean[] _can_rewrite = new boolean[number_of_codes];
a61af66fc99e Initial load
duke
parents:
diff changeset
524
a61af66fc99e Initial load
duke
parents:
diff changeset
525 // Initialization
a61af66fc99e Initial load
duke
parents:
diff changeset
526 private static void initialize() {
a61af66fc99e Initial load
duke
parents:
diff changeset
527 if (Assert.ASSERTS_ENABLED) {
a61af66fc99e Initial load
duke
parents:
diff changeset
528 Assert.that(number_of_codes <= 256, "too many bytecodes");
a61af66fc99e Initial load
duke
parents:
diff changeset
529 }
a61af66fc99e Initial load
duke
parents:
diff changeset
530
a61af66fc99e Initial load
duke
parents:
diff changeset
531 // Format strings interpretation:
a61af66fc99e Initial load
duke
parents:
diff changeset
532 //
a61af66fc99e Initial load
duke
parents:
diff changeset
533 // b: bytecode
a61af66fc99e Initial load
duke
parents:
diff changeset
534 // c: signed constant, Java byte-ordering
a61af66fc99e Initial load
duke
parents:
diff changeset
535 // i: unsigned index , Java byte-ordering
a61af66fc99e Initial load
duke
parents:
diff changeset
536 // j: unsigned index , native byte-ordering
a61af66fc99e Initial load
duke
parents:
diff changeset
537 // o: branch offset , Java byte-ordering
a61af66fc99e Initial load
duke
parents:
diff changeset
538 // _: unused/ignored
a61af66fc99e Initial load
duke
parents:
diff changeset
539 // w: wide bytecode
a61af66fc99e Initial load
duke
parents:
diff changeset
540 //
a61af66fc99e Initial load
duke
parents:
diff changeset
541 // Note: Right now the format strings are used for 2 purposes:
a61af66fc99e Initial load
duke
parents:
diff changeset
542 // 1. to specify the length of the bytecode
a61af66fc99e Initial load
duke
parents:
diff changeset
543 // (= number of characters in format string)
a61af66fc99e Initial load
duke
parents:
diff changeset
544 // 2. to specify the bytecode attributes
a61af66fc99e Initial load
duke
parents:
diff changeset
545 //
a61af66fc99e Initial load
duke
parents:
diff changeset
546 // The bytecode attributes are currently used only for bytecode tracing
a61af66fc99e Initial load
duke
parents:
diff changeset
547 // (see BytecodeTracer); thus if more specific format information is
a61af66fc99e Initial load
duke
parents:
diff changeset
548 // used, one would also have to adjust the bytecode tracer.
a61af66fc99e Initial load
duke
parents:
diff changeset
549 //
a61af66fc99e Initial load
duke
parents:
diff changeset
550 // Note: For bytecodes with variable length, the format string is the empty string.
a61af66fc99e Initial load
duke
parents:
diff changeset
551
a61af66fc99e Initial load
duke
parents:
diff changeset
552 // Note 1: null for the format string means the bytecode doesn't exist
a61af66fc99e Initial load
duke
parents:
diff changeset
553 // in that form.
a61af66fc99e Initial load
duke
parents:
diff changeset
554 //
a61af66fc99e Initial load
duke
parents:
diff changeset
555 // Note 2: The result type is T_ILLEGAL for bytecodes where the top of stack
a61af66fc99e Initial load
duke
parents:
diff changeset
556 // type after execution is not only determined by the bytecode itself.
a61af66fc99e Initial load
duke
parents:
diff changeset
557
a61af66fc99e Initial load
duke
parents:
diff changeset
558 // Java bytecodes
a61af66fc99e Initial load
duke
parents:
diff changeset
559 // bytecode bytecode name format wide f. result tp stk traps
a61af66fc99e Initial load
duke
parents:
diff changeset
560 def(_nop , "nop" , "b" , null , BasicType.getTVoid() , 0, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
561 def(_aconst_null , "aconst_null" , "b" , null , BasicType.getTObject() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
562 def(_iconst_m1 , "iconst_m1" , "b" , null , BasicType.getTInt() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
563 def(_iconst_0 , "iconst_0" , "b" , null , BasicType.getTInt() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
564 def(_iconst_1 , "iconst_1" , "b" , null , BasicType.getTInt() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
565 def(_iconst_2 , "iconst_2" , "b" , null , BasicType.getTInt() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
566 def(_iconst_3 , "iconst_3" , "b" , null , BasicType.getTInt() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
567 def(_iconst_4 , "iconst_4" , "b" , null , BasicType.getTInt() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
568 def(_iconst_5 , "iconst_5" , "b" , null , BasicType.getTInt() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
569 def(_lconst_0 , "lconst_0" , "b" , null , BasicType.getTLong() , 2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
570 def(_lconst_1 , "lconst_1" , "b" , null , BasicType.getTLong() , 2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
571 def(_fconst_0 , "fconst_0" , "b" , null , BasicType.getTFloat() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
572 def(_fconst_1 , "fconst_1" , "b" , null , BasicType.getTFloat() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
573 def(_fconst_2 , "fconst_2" , "b" , null , BasicType.getTFloat() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
574 def(_dconst_0 , "dconst_0" , "b" , null , BasicType.getTDouble() , 2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
575 def(_dconst_1 , "dconst_1" , "b" , null , BasicType.getTDouble() , 2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
576 def(_bipush , "bipush" , "bc" , null , BasicType.getTInt() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
577 def(_sipush , "sipush" , "bcc" , null , BasicType.getTInt() , 1, false);
1602
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
578 def(_ldc , "ldc" , "bk" , null , BasicType.getTIllegal(), 1, true );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
579 def(_ldc_w , "ldc_w" , "bkk" , null , BasicType.getTIllegal(), 1, true );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
580 def(_ldc2_w , "ldc2_w" , "bkk" , null , BasicType.getTIllegal(), 2, true );
0
a61af66fc99e Initial load
duke
parents:
diff changeset
581 def(_iload , "iload" , "bi" , "wbii" , BasicType.getTInt() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
582 def(_lload , "lload" , "bi" , "wbii" , BasicType.getTLong() , 2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
583 def(_fload , "fload" , "bi" , "wbii" , BasicType.getTFloat() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
584 def(_dload , "dload" , "bi" , "wbii" , BasicType.getTDouble() , 2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
585 def(_aload , "aload" , "bi" , "wbii" , BasicType.getTObject() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
586 def(_iload_0 , "iload_0" , "b" , null , BasicType.getTInt() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
587 def(_iload_1 , "iload_1" , "b" , null , BasicType.getTInt() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
588 def(_iload_2 , "iload_2" , "b" , null , BasicType.getTInt() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
589 def(_iload_3 , "iload_3" , "b" , null , BasicType.getTInt() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
590 def(_lload_0 , "lload_0" , "b" , null , BasicType.getTLong() , 2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
591 def(_lload_1 , "lload_1" , "b" , null , BasicType.getTLong() , 2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
592 def(_lload_2 , "lload_2" , "b" , null , BasicType.getTLong() , 2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
593 def(_lload_3 , "lload_3" , "b" , null , BasicType.getTLong() , 2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
594 def(_fload_0 , "fload_0" , "b" , null , BasicType.getTFloat() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
595 def(_fload_1 , "fload_1" , "b" , null , BasicType.getTFloat() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
596 def(_fload_2 , "fload_2" , "b" , null , BasicType.getTFloat() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
597 def(_fload_3 , "fload_3" , "b" , null , BasicType.getTFloat() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
598 def(_dload_0 , "dload_0" , "b" , null , BasicType.getTDouble() , 2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
599 def(_dload_1 , "dload_1" , "b" , null , BasicType.getTDouble() , 2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
600 def(_dload_2 , "dload_2" , "b" , null , BasicType.getTDouble() , 2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
601 def(_dload_3 , "dload_3" , "b" , null , BasicType.getTDouble() , 2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
602 def(_aload_0 , "aload_0" , "b" , null , BasicType.getTObject() , 1, true ); // rewriting in interpreter
a61af66fc99e Initial load
duke
parents:
diff changeset
603 def(_aload_1 , "aload_1" , "b" , null , BasicType.getTObject() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
604 def(_aload_2 , "aload_2" , "b" , null , BasicType.getTObject() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
605 def(_aload_3 , "aload_3" , "b" , null , BasicType.getTObject() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
606 def(_iaload , "iaload" , "b" , null , BasicType.getTInt() , -1, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
607 def(_laload , "laload" , "b" , null , BasicType.getTLong() , 0, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
608 def(_faload , "faload" , "b" , null , BasicType.getTFloat() , -1, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
609 def(_daload , "daload" , "b" , null , BasicType.getTDouble() , 0, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
610 def(_aaload , "aaload" , "b" , null , BasicType.getTObject() , -1, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
611 def(_baload , "baload" , "b" , null , BasicType.getTInt() , -1, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
612 def(_caload , "caload" , "b" , null , BasicType.getTInt() , -1, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
613 def(_saload , "saload" , "b" , null , BasicType.getTInt() , -1, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
614 def(_istore , "istore" , "bi" , "wbii" , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
615 def(_lstore , "lstore" , "bi" , "wbii" , BasicType.getTVoid() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
616 def(_fstore , "fstore" , "bi" , "wbii" , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
617 def(_dstore , "dstore" , "bi" , "wbii" , BasicType.getTVoid() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
618 def(_astore , "astore" , "bi" , "wbii" , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
619 def(_istore_0 , "istore_0" , "b" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
620 def(_istore_1 , "istore_1" , "b" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
621 def(_istore_2 , "istore_2" , "b" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
622 def(_istore_3 , "istore_3" , "b" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
623 def(_lstore_0 , "lstore_0" , "b" , null , BasicType.getTVoid() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
624 def(_lstore_1 , "lstore_1" , "b" , null , BasicType.getTVoid() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
625 def(_lstore_2 , "lstore_2" , "b" , null , BasicType.getTVoid() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
626 def(_lstore_3 , "lstore_3" , "b" , null , BasicType.getTVoid() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
627 def(_fstore_0 , "fstore_0" , "b" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
628 def(_fstore_1 , "fstore_1" , "b" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
629 def(_fstore_2 , "fstore_2" , "b" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
630 def(_fstore_3 , "fstore_3" , "b" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
631 def(_dstore_0 , "dstore_0" , "b" , null , BasicType.getTVoid() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
632 def(_dstore_1 , "dstore_1" , "b" , null , BasicType.getTVoid() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
633 def(_dstore_2 , "dstore_2" , "b" , null , BasicType.getTVoid() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
634 def(_dstore_3 , "dstore_3" , "b" , null , BasicType.getTVoid() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
635 def(_astore_0 , "astore_0" , "b" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
636 def(_astore_1 , "astore_1" , "b" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
637 def(_astore_2 , "astore_2" , "b" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
638 def(_astore_3 , "astore_3" , "b" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
639 def(_iastore , "iastore" , "b" , null , BasicType.getTVoid() , -3, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
640 def(_lastore , "lastore" , "b" , null , BasicType.getTVoid() , -4, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
641 def(_fastore , "fastore" , "b" , null , BasicType.getTVoid() , -3, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
642 def(_dastore , "dastore" , "b" , null , BasicType.getTVoid() , -4, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
643 def(_aastore , "aastore" , "b" , null , BasicType.getTVoid() , -3, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
644 def(_bastore , "bastore" , "b" , null , BasicType.getTVoid() , -3, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
645 def(_castore , "castore" , "b" , null , BasicType.getTVoid() , -3, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
646 def(_sastore , "sastore" , "b" , null , BasicType.getTVoid() , -3, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
647 def(_pop , "pop" , "b" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
648 def(_pop2 , "pop2" , "b" , null , BasicType.getTVoid() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
649 def(_dup , "dup" , "b" , null , BasicType.getTVoid() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
650 def(_dup_x1 , "dup_x1" , "b" , null , BasicType.getTVoid() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
651 def(_dup_x2 , "dup_x2" , "b" , null , BasicType.getTVoid() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
652 def(_dup2 , "dup2" , "b" , null , BasicType.getTVoid() , 2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
653 def(_dup2_x1 , "dup2_x1" , "b" , null , BasicType.getTVoid() , 2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
654 def(_dup2_x2 , "dup2_x2" , "b" , null , BasicType.getTVoid() , 2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
655 def(_swap , "swap" , "b" , null , BasicType.getTVoid() , 0, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
656 def(_iadd , "iadd" , "b" , null , BasicType.getTInt() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
657 def(_ladd , "ladd" , "b" , null , BasicType.getTLong() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
658 def(_fadd , "fadd" , "b" , null , BasicType.getTFloat() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
659 def(_dadd , "dadd" , "b" , null , BasicType.getTDouble() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
660 def(_isub , "isub" , "b" , null , BasicType.getTInt() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
661 def(_lsub , "lsub" , "b" , null , BasicType.getTLong() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
662 def(_fsub , "fsub" , "b" , null , BasicType.getTFloat() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
663 def(_dsub , "dsub" , "b" , null , BasicType.getTDouble() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
664 def(_imul , "imul" , "b" , null , BasicType.getTInt() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
665 def(_lmul , "lmul" , "b" , null , BasicType.getTLong() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
666 def(_fmul , "fmul" , "b" , null , BasicType.getTFloat() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
667 def(_dmul , "dmul" , "b" , null , BasicType.getTDouble() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
668 def(_idiv , "idiv" , "b" , null , BasicType.getTInt() , -1, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
669 def(_ldiv , "ldiv" , "b" , null , BasicType.getTLong() , -2, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
670 def(_fdiv , "fdiv" , "b" , null , BasicType.getTFloat() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
671 def(_ddiv , "ddiv" , "b" , null , BasicType.getTDouble() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
672 def(_irem , "irem" , "b" , null , BasicType.getTInt() , -1, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
673 def(_lrem , "lrem" , "b" , null , BasicType.getTLong() , -2, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
674 def(_frem , "frem" , "b" , null , BasicType.getTFloat() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
675 def(_drem , "drem" , "b" , null , BasicType.getTDouble() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
676 def(_ineg , "ineg" , "b" , null , BasicType.getTInt() , 0, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
677 def(_lneg , "lneg" , "b" , null , BasicType.getTLong() , 0, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
678 def(_fneg , "fneg" , "b" , null , BasicType.getTFloat() , 0, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
679 def(_dneg , "dneg" , "b" , null , BasicType.getTDouble() , 0, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
680 def(_ishl , "ishl" , "b" , null , BasicType.getTInt() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
681 def(_lshl , "lshl" , "b" , null , BasicType.getTLong() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
682 def(_ishr , "ishr" , "b" , null , BasicType.getTInt() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
683 def(_lshr , "lshr" , "b" , null , BasicType.getTLong() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
684 def(_iushr , "iushr" , "b" , null , BasicType.getTInt() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
685 def(_lushr , "lushr" , "b" , null , BasicType.getTLong() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
686 def(_iand , "iand" , "b" , null , BasicType.getTInt() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
687 def(_land , "land" , "b" , null , BasicType.getTLong() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
688 def(_ior , "ior" , "b" , null , BasicType.getTInt() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
689 def(_lor , "lor" , "b" , null , BasicType.getTLong() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
690 def(_ixor , "ixor" , "b" , null , BasicType.getTInt() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
691 def(_lxor , "lxor" , "b" , null , BasicType.getTLong() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
692 def(_iinc , "iinc" , "bic" , "wbiicc", BasicType.getTVoid() , 0, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
693 def(_i2l , "i2l" , "b" , null , BasicType.getTLong() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
694 def(_i2f , "i2f" , "b" , null , BasicType.getTFloat() , 0, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
695 def(_i2d , "i2d" , "b" , null , BasicType.getTDouble() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
696 def(_l2i , "l2i" , "b" , null , BasicType.getTInt() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
697 def(_l2f , "l2f" , "b" , null , BasicType.getTFloat() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
698 def(_l2d , "l2d" , "b" , null , BasicType.getTDouble() , 0, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
699 def(_f2i , "f2i" , "b" , null , BasicType.getTInt() , 0, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
700 def(_f2l , "f2l" , "b" , null , BasicType.getTLong() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
701 def(_f2d , "f2d" , "b" , null , BasicType.getTDouble() , 1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
702 def(_d2i , "d2i" , "b" , null , BasicType.getTInt() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
703 def(_d2l , "d2l" , "b" , null , BasicType.getTLong() , 0, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
704 def(_d2f , "d2f" , "b" , null , BasicType.getTFloat() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
705 def(_i2b , "i2b" , "b" , null , BasicType.getTByte() , 0, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
706 def(_i2c , "i2c" , "b" , null , BasicType.getTChar() , 0, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
707 def(_i2s , "i2s" , "b" , null , BasicType.getTShort() , 0, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
708 def(_lcmp , "lcmp" , "b" , null , BasicType.getTVoid() , -3, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
709 def(_fcmpl , "fcmpl" , "b" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
710 def(_fcmpg , "fcmpg" , "b" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
711 def(_dcmpl , "dcmpl" , "b" , null , BasicType.getTVoid() , -3, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
712 def(_dcmpg , "dcmpg" , "b" , null , BasicType.getTVoid() , -3, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
713 def(_ifeq , "ifeq" , "boo" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
714 def(_ifne , "ifne" , "boo" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
715 def(_iflt , "iflt" , "boo" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
716 def(_ifge , "ifge" , "boo" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
717 def(_ifgt , "ifgt" , "boo" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
718 def(_ifle , "ifle" , "boo" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
719 def(_if_icmpeq , "if_icmpeq" , "boo" , null , BasicType.getTVoid() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
720 def(_if_icmpne , "if_icmpne" , "boo" , null , BasicType.getTVoid() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
721 def(_if_icmplt , "if_icmplt" , "boo" , null , BasicType.getTVoid() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
722 def(_if_icmpge , "if_icmpge" , "boo" , null , BasicType.getTVoid() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
723 def(_if_icmpgt , "if_icmpgt" , "boo" , null , BasicType.getTVoid() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
724 def(_if_icmple , "if_icmple" , "boo" , null , BasicType.getTVoid() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
725 def(_if_acmpeq , "if_acmpeq" , "boo" , null , BasicType.getTVoid() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
726 def(_if_acmpne , "if_acmpne" , "boo" , null , BasicType.getTVoid() , -2, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
727 def(_goto , "goto" , "boo" , null , BasicType.getTVoid() , 0, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
728 def(_jsr , "jsr" , "boo" , null , BasicType.getTInt() , 0, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
729 def(_ret , "ret" , "bi" , "wbii" , BasicType.getTVoid() , 0, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
730 def(_tableswitch , "tableswitch" , "" , null , BasicType.getTVoid() , -1, false); // may have backward branches
a61af66fc99e Initial load
duke
parents:
diff changeset
731 def(_lookupswitch , "lookupswitch" , "" , null , BasicType.getTVoid() , -1, false); // rewriting in interpreter
a61af66fc99e Initial load
duke
parents:
diff changeset
732 def(_ireturn , "ireturn" , "b" , null , BasicType.getTInt() , -1, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
733 def(_lreturn , "lreturn" , "b" , null , BasicType.getTLong() , -2, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
734 def(_freturn , "freturn" , "b" , null , BasicType.getTFloat() , -1, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
735 def(_dreturn , "dreturn" , "b" , null , BasicType.getTDouble() , -2, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
736 def(_areturn , "areturn" , "b" , null , BasicType.getTObject() , -1, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
737 def(_return , "return" , "b" , null , BasicType.getTVoid() , 0, true );
1602
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
738 def(_getstatic , "getstatic" , "bJJ" , null , BasicType.getTIllegal(), 1, true );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
739 def(_putstatic , "putstatic" , "bJJ" , null , BasicType.getTIllegal(), -1, true );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
740 def(_getfield , "getfield" , "bJJ" , null , BasicType.getTIllegal(), 0, true );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
741 def(_putfield , "putfield" , "bJJ" , null , BasicType.getTIllegal(), -2, true );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
742 def(_invokevirtual , "invokevirtual" , "bJJ" , null , BasicType.getTIllegal(), -1, true );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
743 def(_invokespecial , "invokespecial" , "bJJ" , null , BasicType.getTIllegal(), -1, true );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
744 def(_invokestatic , "invokestatic" , "bJJ" , null , BasicType.getTIllegal(), 0, true );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
745 def(_invokeinterface , "invokeinterface" , "bJJ__", null , BasicType.getTIllegal(), -1, true );
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3838
diff changeset
746 def(_invokedynamic , "invokedynamic" , "bJJJJ", null , BasicType.getTIllegal(), 0, true );
1602
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
747 def(_new , "new" , "bkk" , null , BasicType.getTObject() , 1, true );
0
a61af66fc99e Initial load
duke
parents:
diff changeset
748 def(_newarray , "newarray" , "bc" , null , BasicType.getTObject() , 0, true );
1602
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
749 def(_anewarray , "anewarray" , "bkk" , null , BasicType.getTObject() , 0, true );
0
a61af66fc99e Initial load
duke
parents:
diff changeset
750 def(_arraylength , "arraylength" , "b" , null , BasicType.getTVoid() , 0, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
751 def(_athrow , "athrow" , "b" , null , BasicType.getTVoid() , -1, true );
1602
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
752 def(_checkcast , "checkcast" , "bkk" , null , BasicType.getTObject() , 0, true );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
753 def(_instanceof , "instanceof" , "bkk" , null , BasicType.getTInt() , 0, true );
0
a61af66fc99e Initial load
duke
parents:
diff changeset
754 def(_monitorenter , "monitorenter" , "b" , null , BasicType.getTVoid() , -1, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
755 def(_monitorexit , "monitorexit" , "b" , null , BasicType.getTVoid() , -1, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
756 def(_wide , "wide" , "" , null , BasicType.getTVoid() , 0, false);
1602
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
757 def(_multianewarray , "multianewarray" , "bkkc" , null , BasicType.getTObject() , 1, true );
0
a61af66fc99e Initial load
duke
parents:
diff changeset
758 def(_ifnull , "ifnull" , "boo" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
759 def(_ifnonnull , "ifnonnull" , "boo" , null , BasicType.getTVoid() , -1, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
760 def(_goto_w , "goto_w" , "boooo", null , BasicType.getTVoid() , 0, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
761 def(_jsr_w , "jsr_w" , "boooo", null , BasicType.getTInt() , 0, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
762 def(_breakpoint , "breakpoint" , "" , null , BasicType.getTVoid() , 0, true );
a61af66fc99e Initial load
duke
parents:
diff changeset
763
a61af66fc99e Initial load
duke
parents:
diff changeset
764 // JVM bytecodes
a61af66fc99e Initial load
duke
parents:
diff changeset
765 // bytecode bytecode name format wide f. result tp stk traps std code
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3838
diff changeset
766
1602
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
767 def(_fast_agetfield , "fast_agetfield" , "bJJ" , null , BasicType.getTObject() , 0, true , _getfield );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
768 def(_fast_bgetfield , "fast_bgetfield" , "bJJ" , null , BasicType.getTInt() , 0, true , _getfield );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
769 def(_fast_cgetfield , "fast_cgetfield" , "bJJ" , null , BasicType.getTChar() , 0, true , _getfield );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
770 def(_fast_dgetfield , "fast_dgetfield" , "bJJ" , null , BasicType.getTDouble() , 0, true , _getfield );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
771 def(_fast_fgetfield , "fast_fgetfield" , "bJJ" , null , BasicType.getTFloat() , 0, true , _getfield );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
772 def(_fast_igetfield , "fast_igetfield" , "bJJ" , null , BasicType.getTInt() , 0, true , _getfield );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
773 def(_fast_lgetfield , "fast_lgetfield" , "bJJ" , null , BasicType.getTLong() , 0, true , _getfield );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
774 def(_fast_sgetfield , "fast_sgetfield" , "bJJ" , null , BasicType.getTShort() , 0, true , _getfield );
0
a61af66fc99e Initial load
duke
parents:
diff changeset
775
1602
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
776 def(_fast_aputfield , "fast_aputfield" , "bJJ" , null , BasicType.getTObject() , 0, true , _putfield );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
777 def(_fast_bputfield , "fast_bputfield" , "bJJ" , null , BasicType.getTInt() , 0, true , _putfield );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
778 def(_fast_cputfield , "fast_cputfield" , "bJJ" , null , BasicType.getTChar() , 0, true , _putfield );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
779 def(_fast_dputfield , "fast_dputfield" , "bJJ" , null , BasicType.getTDouble() , 0, true , _putfield );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
780 def(_fast_fputfield , "fast_fputfield" , "bJJ" , null , BasicType.getTFloat() , 0, true , _putfield );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
781 def(_fast_iputfield , "fast_iputfield" , "bJJ" , null , BasicType.getTInt() , 0, true , _putfield );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
782 def(_fast_lputfield , "fast_lputfield" , "bJJ" , null , BasicType.getTLong() , 0, true , _putfield );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
783 def(_fast_sputfield , "fast_sputfield" , "bJJ" , null , BasicType.getTShort() , 0, true , _putfield );
0
a61af66fc99e Initial load
duke
parents:
diff changeset
784
a61af66fc99e Initial load
duke
parents:
diff changeset
785 def(_fast_aload_0 , "fast_aload_0" , "b" , null , BasicType.getTObject() , 1, true , _aload_0 );
1602
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
786 def(_fast_iaccess_0 , "fast_iaccess_0" , "b_JJ" , null , BasicType.getTInt() , 1, true , _aload_0 );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
787 def(_fast_aaccess_0 , "fast_aaccess_0" , "b_JJ" , null , BasicType.getTObject() , 1, true , _aload_0 );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
788 def(_fast_faccess_0 , "fast_faccess_0" , "b_JJ" , null , BasicType.getTObject() , 1, true , _aload_0 );
0
a61af66fc99e Initial load
duke
parents:
diff changeset
789
a61af66fc99e Initial load
duke
parents:
diff changeset
790 def(_fast_iload , "fast_iload" , "bi" , null , BasicType.getTInt() , 1, false, _iload);
a61af66fc99e Initial load
duke
parents:
diff changeset
791 def(_fast_iload2 , "fast_iload2" , "bi_i" , null , BasicType.getTInt() , 2, false, _iload);
a61af66fc99e Initial load
duke
parents:
diff changeset
792 def(_fast_icaload , "fast_icaload" , "bi_" , null , BasicType.getTInt() , 0, false, _iload);
a61af66fc99e Initial load
duke
parents:
diff changeset
793
a61af66fc99e Initial load
duke
parents:
diff changeset
794 // Faster method invocation.
1602
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
795 def(_fast_invokevfinal , "fast_invokevfinal" , "bJJ" , null , BasicType.getTIllegal(), -1, true, _invokevirtual);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
796
a61af66fc99e Initial load
duke
parents:
diff changeset
797 def(_fast_linearswitch , "fast_linearswitch" , "" , null , BasicType.getTVoid() , -1, false, _lookupswitch );
a61af66fc99e Initial load
duke
parents:
diff changeset
798 def(_fast_binaryswitch , "fast_binaryswitch" , "" , null , BasicType.getTVoid() , -1, false, _lookupswitch );
1602
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
799
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
800 def(_return_register_finalizer, "return_register_finalizer", "b" , null , BasicType.getTVoid() , 0, true, _return );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
801
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
802 def(_fast_aldc , "fast_aldc" , "bj" , null , BasicType.getTObject(), 1, true, _ldc );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
803 def(_fast_aldc_w , "fast_aldc_w" , "bJJ" , null , BasicType.getTObject(), 1, true, _ldc_w );
136b78722a08 6939203: JSR 292 needs method handle constants
jrose
parents: 1552
diff changeset
804
0
a61af66fc99e Initial load
duke
parents:
diff changeset
805 def(_shouldnotreachhere , "_shouldnotreachhere" , "b" , null , BasicType.getTVoid() , 0, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
806
a61af66fc99e Initial load
duke
parents:
diff changeset
807 if (Assert.ASSERTS_ENABLED) {
a61af66fc99e Initial load
duke
parents:
diff changeset
808 // compare can_trap information for each bytecode with the
a61af66fc99e Initial load
duke
parents:
diff changeset
809 // can_trap information for the corresponding base bytecode
a61af66fc99e Initial load
duke
parents:
diff changeset
810 // (if a rewritten bytecode can trap, so must the base bytecode)
a61af66fc99e Initial load
duke
parents:
diff changeset
811 for (int i = 0; i < number_of_codes; i++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
812 if (isDefined(i)) {
a61af66fc99e Initial load
duke
parents:
diff changeset
813 int j = javaCode(i);
a61af66fc99e Initial load
duke
parents:
diff changeset
814 if (canTrap(i) && !canTrap(j)) {
a61af66fc99e Initial load
duke
parents:
diff changeset
815 Assert.that(false, name(i) + " can trap => " + name(j) + " can trap, too");
a61af66fc99e Initial load
duke
parents:
diff changeset
816 }
a61af66fc99e Initial load
duke
parents:
diff changeset
817 }
a61af66fc99e Initial load
duke
parents:
diff changeset
818 }
a61af66fc99e Initial load
duke
parents:
diff changeset
819 }
a61af66fc99e Initial load
duke
parents:
diff changeset
820 }
a61af66fc99e Initial load
duke
parents:
diff changeset
821
a61af66fc99e Initial load
duke
parents:
diff changeset
822 private static void def(int code, String name, String format, String wide_format, int result_type, int depth, boolean can_trap) {
a61af66fc99e Initial load
duke
parents:
diff changeset
823 def(code, name, format, wide_format, result_type, depth, can_trap, code);
a61af66fc99e Initial load
duke
parents:
diff changeset
824 }
a61af66fc99e Initial load
duke
parents:
diff changeset
825
a61af66fc99e Initial load
duke
parents:
diff changeset
826 private static void def(int code, String name, String format, String wide_format, int result_type, int depth, boolean can_trap, int java_code) {
a61af66fc99e Initial load
duke
parents:
diff changeset
827 if (Assert.ASSERTS_ENABLED) {
a61af66fc99e Initial load
duke
parents:
diff changeset
828 Assert.that(wide_format == null || format != null, "short form must exist if there's a wide form");
a61af66fc99e Initial load
duke
parents:
diff changeset
829 }
3838
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
830 int len = (format != null ? format.length() : 0);
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
831 int wlen = (wide_format != null ? wide_format.length() : 0);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
832 _name [code] = name;
a61af66fc99e Initial load
duke
parents:
diff changeset
833 _result_type [code] = result_type;
a61af66fc99e Initial load
duke
parents:
diff changeset
834 _depth [code] = (byte) depth;
3838
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
835 _lengths [code] = (byte)((wlen << 4) | (len & 0xF));
0
a61af66fc99e Initial load
duke
parents:
diff changeset
836 _java_code [code] = java_code;
3838
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
837 _format [code] = format;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
838 _wide_format [code] = wide_format;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
839 int bc_flags = 0;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
840 if (can_trap) bc_flags |= _bc_can_trap;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
841 if (java_code != code) bc_flags |= _bc_can_rewrite;
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
842 _flags[code+0*256] = compute_flags(format, bc_flags);
6a991dcb52bb 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents: 2042
diff changeset
843 _flags[code+1*256] = compute_flags(wide_format, bc_flags);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
844 }
a61af66fc99e Initial load
duke
parents:
diff changeset
845 }