author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 22 May 2013 21:15:02 +0100 | |
branch | builtin-class-support |
changeset 2618 | e7757e5d593c |
parent 2429 | ebece4dcaab9 |
child 2695 | 11ef104a9971 |
permissions | -rw-r--r-- |
749 | 1 |
" |
2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
3 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
4 |
New code and modifications done at SWING Research Group [1]: |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
5 |
|
749 | 6 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
7 |
SWING Research Group, Czech Technical University in Prague |
|
8 |
||
9 |
This software is furnished under a license and may be used |
|
10 |
only in accordance with the terms of that license and with the |
|
11 |
inclusion of the above copyright notice. This software may not |
|
12 |
be provided or otherwise made available to, or used by, any |
|
13 |
other person. No title to or ownership of the software is |
|
14 |
hereby transferred. |
|
15 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
16 |
[1] Code written at SWING Research Group contains a signature |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
17 |
of one of the above copright owners. For exact set of such code, |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
18 |
see the differences between this version and version stx:libjava |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
19 |
as of 1.9.2010 |
749 | 20 |
" |
21 |
"{ Package: 'stx:libjava' }" |
|
22 |
||
23 |
Object subclass:#JavaByteCodeProcessor |
|
24 |
instanceVariableNames:'byteCode pc method constantPool context receiver sp retVal |
|
25 |
instrPointer op wide numArgs numVars leaveProcessor' |
|
26 |
classVariableNames:'OpSwitchTable Verbose' |
|
27 |
poolDictionaries:'' |
|
28 |
category:'Languages-Java-Bytecode' |
|
29 |
! |
|
30 |
||
31 |
!JavaByteCodeProcessor class methodsFor:'documentation'! |
|
32 |
||
33 |
copyright |
|
34 |
" |
|
35 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
36 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
37 |
New code and modifications done at SWING Research Group [1]: |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
38 |
|
749 | 39 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
40 |
SWING Research Group, Czech Technical University in Prague |
|
41 |
||
42 |
This software is furnished under a license and may be used |
|
43 |
only in accordance with the terms of that license and with the |
|
44 |
inclusion of the above copyright notice. This software may not |
|
45 |
be provided or otherwise made available to, or used by, any |
|
46 |
other person. No title to or ownership of the software is |
|
47 |
hereby transferred. |
|
48 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
49 |
[1] Code written at SWING Research Group contains a signature |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
50 |
of one of the above copright owners. For exact set of such code, |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
51 |
see the differences between this version and version stx:libjava |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
52 |
as of 1.9.2010 |
749 | 53 |
|
54 |
" |
|
55 |
! ! |
|
56 |
||
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
57 |
|
749 | 58 |
!JavaByteCodeProcessor class methodsFor:'initialization'! |
59 |
||
60 |
initialize |
|
61 |
OpSwitchTable := Array new: 256. |
|
62 |
OpSwitchTable at: 1 + 0 put: #nop. |
|
63 |
OpSwitchTable at: 1 + 1 put: #'aconst_null'. |
|
64 |
OpSwitchTable at: 1 + 2 put: #'iconst_m1'. |
|
65 |
OpSwitchTable at: 1 + 3 put: #'iconst_0'. |
|
66 |
OpSwitchTable at: 1 + 4 put: #'iconst_1'. |
|
67 |
OpSwitchTable at: 1 + 5 put: #'iconst_2'. |
|
68 |
OpSwitchTable at: 1 + 6 put: #'iconst_3'. |
|
69 |
OpSwitchTable at: 1 + 7 put: #'iconst_4'. |
|
70 |
OpSwitchTable at: 1 + 8 put: #'iconst_5'. |
|
71 |
OpSwitchTable at: 1 + 9 put: #'lconst_0'. |
|
72 |
OpSwitchTable at: 1 + 10 put: #'lconst_1'. |
|
73 |
OpSwitchTable at: 1 + 11 put: #'fconst_0'. |
|
74 |
OpSwitchTable at: 1 + 12 put: #'fconst_1'. |
|
75 |
OpSwitchTable at: 1 + 13 put: #'fconst_2'. |
|
76 |
OpSwitchTable at: 1 + 14 put: #'dconst_0'. |
|
77 |
OpSwitchTable at: 1 + 15 put: #'dconst_1'. |
|
78 |
OpSwitchTable at: 1 + 16 put: #bipush. |
|
79 |
OpSwitchTable at: 1 + 17 put: #sipush. |
|
80 |
OpSwitchTable at: 1 + 18 put: #ldc1. |
|
81 |
OpSwitchTable at: 1 + 19 put: #ldc2. |
|
82 |
OpSwitchTable at: 1 + 20 put: #ldc2w. |
|
83 |
OpSwitchTable at: 1 + 21 put: #iload. |
|
84 |
OpSwitchTable at: 1 + 22 put: #lload. |
|
85 |
OpSwitchTable at: 1 + 23 put: #fload. |
|
86 |
OpSwitchTable at: 1 + 24 put: #dload. |
|
87 |
OpSwitchTable at: 1 + 25 put: #aload. |
|
88 |
OpSwitchTable at: 1 + 26 put: #'iload_0'. |
|
89 |
OpSwitchTable at: 1 + 27 put: #'iload_1'. |
|
90 |
OpSwitchTable at: 1 + 28 put: #'iload_2'. |
|
91 |
OpSwitchTable at: 1 + 29 put: #'iload_3'. |
|
92 |
OpSwitchTable at: 1 + 30 put: #'lload_0'. |
|
93 |
OpSwitchTable at: 1 + 31 put: #'lload_1'. |
|
94 |
OpSwitchTable at: 1 + 32 put: #'lload_2'. |
|
95 |
OpSwitchTable at: 1 + 33 put: #'lload_3'. |
|
96 |
OpSwitchTable at: 1 + 34 put: #'fload_0'. |
|
97 |
OpSwitchTable at: 1 + 35 put: #'fload_1'. |
|
98 |
OpSwitchTable at: 1 + 36 put: #'fload_2'. |
|
99 |
OpSwitchTable at: 1 + 37 put: #'fload_3'. |
|
100 |
OpSwitchTable at: 1 + 38 put: #'dload_0'. |
|
101 |
OpSwitchTable at: 1 + 39 put: #'dload_1'. |
|
102 |
OpSwitchTable at: 1 + 40 put: #'dload_2'. |
|
103 |
OpSwitchTable at: 1 + 41 put: #'dload_3'. |
|
104 |
OpSwitchTable at: 1 + 42 put: #'aload_0'. |
|
105 |
OpSwitchTable at: 1 + 43 put: #'aload_1'. |
|
106 |
OpSwitchTable at: 1 + 44 put: #'aload_2'. |
|
107 |
OpSwitchTable at: 1 + 45 put: #'aload_3'. |
|
108 |
OpSwitchTable at: 1 + 46 put: #iaload. |
|
109 |
OpSwitchTable at: 1 + 47 put: #laload. |
|
110 |
OpSwitchTable at: 1 + 48 put: #faload. |
|
111 |
OpSwitchTable at: 1 + 49 put: #daload. |
|
112 |
OpSwitchTable at: 1 + 50 put: #aaload. |
|
113 |
OpSwitchTable at: 1 + 51 put: #baload. |
|
114 |
OpSwitchTable at: 1 + 52 put: #caload. |
|
115 |
OpSwitchTable at: 1 + 53 put: #saload. |
|
116 |
OpSwitchTable at: 1 + 54 put: #istore. |
|
117 |
OpSwitchTable at: 1 + 55 put: #lstore. |
|
118 |
OpSwitchTable at: 1 + 56 put: #fstore. |
|
119 |
OpSwitchTable at: 1 + 57 put: #dstore. |
|
120 |
OpSwitchTable at: 1 + 58 put: #astore. |
|
121 |
OpSwitchTable at: 1 + 59 put: #'istore_0'. |
|
122 |
OpSwitchTable at: 1 + 60 put: #'istore_1'. |
|
123 |
OpSwitchTable at: 1 + 61 put: #'istore_2'. |
|
124 |
OpSwitchTable at: 1 + 62 put: #'istore_3'. |
|
125 |
OpSwitchTable at: 1 + 63 put: #'lstore_0'. |
|
126 |
OpSwitchTable at: 1 + 64 put: #'lstore_1'. |
|
127 |
OpSwitchTable at: 1 + 65 put: #'lstore_2'. |
|
128 |
OpSwitchTable at: 1 + 66 put: #'lstore_3'. |
|
129 |
OpSwitchTable at: 1 + 67 put: #'fstore_0'. |
|
130 |
OpSwitchTable at: 1 + 68 put: #'fstore_1'. |
|
131 |
OpSwitchTable at: 1 + 69 put: #'fstore_2'. |
|
132 |
OpSwitchTable at: 1 + 70 put: #'fstore_3'. |
|
133 |
OpSwitchTable at: 1 + 71 put: #'dstore_0'. |
|
134 |
OpSwitchTable at: 1 + 72 put: #'dstore_1'. |
|
135 |
OpSwitchTable at: 1 + 73 put: #'dstore_2'. |
|
136 |
OpSwitchTable at: 1 + 74 put: #'dstore_3'. |
|
137 |
OpSwitchTable at: 1 + 75 put: #'astore_0'. |
|
138 |
OpSwitchTable at: 1 + 76 put: #'astore_1'. |
|
139 |
OpSwitchTable at: 1 + 77 put: #'astore_2'. |
|
140 |
OpSwitchTable at: 1 + 78 put: #'astore_3'. |
|
141 |
OpSwitchTable at: 1 + 79 put: #iastore. |
|
142 |
OpSwitchTable at: 1 + 80 put: #lastore. |
|
143 |
OpSwitchTable at: 1 + 81 put: #fastore. |
|
144 |
OpSwitchTable at: 1 + 82 put: #dastore. |
|
145 |
OpSwitchTable at: 1 + 83 put: #aastore. |
|
146 |
OpSwitchTable at: 1 + 84 put: #bastore. |
|
147 |
OpSwitchTable at: 1 + 85 put: #castore. |
|
148 |
OpSwitchTable at: 1 + 86 put: #sastore. |
|
149 |
OpSwitchTable at: 1 + 87 put: #pop1. |
|
150 |
OpSwitchTable at: 1 + 88 put: #pop2. |
|
151 |
OpSwitchTable at: 1 + 89 put: #dup. |
|
152 |
OpSwitchTable at: 1 + 90 put: #'dup_x1'. |
|
153 |
OpSwitchTable at: 1 + 91 put: #'dup_x2'. |
|
154 |
OpSwitchTable at: 1 + 92 put: #dup2. |
|
155 |
OpSwitchTable at: 1 + 93 put: #'dup2_x1'. |
|
156 |
OpSwitchTable at: 1 + 94 put: #'dup2_x2'. |
|
157 |
OpSwitchTable at: 1 + 95 put: #swap. |
|
158 |
OpSwitchTable at: 1 + 96 put: #iadd. |
|
159 |
OpSwitchTable at: 1 + 97 put: #ladd. |
|
160 |
OpSwitchTable at: 1 + 98 put: #fadd. |
|
161 |
OpSwitchTable at: 1 + 99 put: #dadd. |
|
162 |
OpSwitchTable at: 1 + 100 put: #isub. |
|
163 |
OpSwitchTable at: 1 + 101 put: #lsub. |
|
164 |
OpSwitchTable at: 1 + 102 put: #fsub. |
|
165 |
OpSwitchTable at: 1 + 103 put: #dsub. |
|
166 |
OpSwitchTable at: 1 + 104 put: #imul. |
|
167 |
OpSwitchTable at: 1 + 105 put: #lmul. |
|
168 |
OpSwitchTable at: 1 + 106 put: #fmul. |
|
169 |
OpSwitchTable at: 1 + 107 put: #dmul. |
|
170 |
OpSwitchTable at: 1 + 108 put: #idiv. |
|
171 |
OpSwitchTable at: 1 + 109 put: #ldiv. |
|
172 |
OpSwitchTable at: 1 + 110 put: #fdiv. |
|
173 |
OpSwitchTable at: 1 + 111 put: #ddiv. |
|
174 |
OpSwitchTable at: 1 + 112 put: #irem. |
|
175 |
OpSwitchTable at: 1 + 113 put: #lrem. |
|
176 |
OpSwitchTable at: 1 + 114 put: #frem. |
|
177 |
OpSwitchTable at: 1 + 115 put: #drem. |
|
178 |
OpSwitchTable at: 1 + 116 put: #ineg. |
|
179 |
OpSwitchTable at: 1 + 117 put: #lneg. |
|
180 |
OpSwitchTable at: 1 + 118 put: #fneg. |
|
181 |
OpSwitchTable at: 1 + 119 put: #dneg. |
|
182 |
OpSwitchTable at: 1 + 120 put: #ishl. |
|
183 |
OpSwitchTable at: 1 + 121 put: #lshl. |
|
184 |
OpSwitchTable at: 1 + 122 put: #ishr. |
|
185 |
OpSwitchTable at: 1 + 123 put: #lshr. |
|
186 |
OpSwitchTable at: 1 + 124 put: #iushr. |
|
187 |
OpSwitchTable at: 1 + 125 put: #lushr. |
|
188 |
OpSwitchTable at: 1 + 126 put: #iand. |
|
189 |
OpSwitchTable at: 1 + 127 put: #land. |
|
190 |
OpSwitchTable at: 1 + 128 put: #ior. |
|
191 |
OpSwitchTable at: 1 + 129 put: #lor. |
|
192 |
OpSwitchTable at: 1 + 130 put: #ixor. |
|
193 |
OpSwitchTable at: 1 + 131 put: #lxor. |
|
194 |
OpSwitchTable at: 1 + 132 put: #iinc. |
|
195 |
OpSwitchTable at: 1 + 133 put: #i2l. |
|
196 |
OpSwitchTable at: 1 + 134 put: #i2f. |
|
197 |
OpSwitchTable at: 1 + 135 put: #i2d. |
|
198 |
OpSwitchTable at: 1 + 136 put: #l2i. |
|
199 |
OpSwitchTable at: 1 + 137 put: #l2f. |
|
200 |
OpSwitchTable at: 1 + 138 put: #l2d. |
|
201 |
OpSwitchTable at: 1 + 139 put: #f2i. |
|
202 |
OpSwitchTable at: 1 + 140 put: #f2l. |
|
203 |
OpSwitchTable at: 1 + 141 put: #f2d. |
|
204 |
OpSwitchTable at: 1 + 142 put: #d2i. |
|
205 |
OpSwitchTable at: 1 + 143 put: #d2l. |
|
206 |
OpSwitchTable at: 1 + 144 put: #d2f. |
|
207 |
OpSwitchTable at: 1 + 145 put: #int2byte. |
|
208 |
OpSwitchTable at: 1 + 146 put: #int2char. |
|
209 |
OpSwitchTable at: 1 + 147 put: #int2short. |
|
210 |
OpSwitchTable at: 1 + 148 put: #lcmp. |
|
211 |
OpSwitchTable at: 1 + 149 put: #fcmpl. |
|
212 |
OpSwitchTable at: 1 + 150 put: #fcmpg. |
|
213 |
OpSwitchTable at: 1 + 151 put: #dcmpl. |
|
214 |
OpSwitchTable at: 1 + 152 put: #dcmpg. |
|
215 |
OpSwitchTable at: 1 + 153 put: #ifeq. |
|
216 |
OpSwitchTable at: 1 + 154 put: #ifne. |
|
217 |
OpSwitchTable at: 1 + 155 put: #iflt. |
|
218 |
OpSwitchTable at: 1 + 156 put: #ifge. |
|
219 |
OpSwitchTable at: 1 + 157 put: #ifgt. |
|
220 |
OpSwitchTable at: 1 + 158 put: #ifle. |
|
221 |
OpSwitchTable at: 1 + 159 put: #ificmpeq. |
|
222 |
OpSwitchTable at: 1 + 160 put: #ificmpne. |
|
223 |
OpSwitchTable at: 1 + 161 put: #ificmplt. |
|
224 |
OpSwitchTable at: 1 + 162 put: #ificmpge. |
|
225 |
OpSwitchTable at: 1 + 163 put: #ificmpgt. |
|
226 |
OpSwitchTable at: 1 + 164 put: #ificmple. |
|
227 |
OpSwitchTable at: 1 + 165 put: #ifacmpeq. |
|
228 |
OpSwitchTable at: 1 + 166 put: #ifacmpne. |
|
229 |
OpSwitchTable at: 1 + 167 put: #goto. |
|
230 |
OpSwitchTable at: 1 + 168 put: #jsr. |
|
231 |
OpSwitchTable at: 1 + 169 put: #ret. |
|
232 |
OpSwitchTable at: 1 + 170 put: #tableswtch. |
|
233 |
OpSwitchTable at: 1 + 171 put: #lookupswtch. |
|
234 |
OpSwitchTable at: 1 + 172 put: #ireturn. |
|
235 |
OpSwitchTable at: 1 + 173 put: #lreturn. |
|
236 |
OpSwitchTable at: 1 + 174 put: #freturn. |
|
237 |
OpSwitchTable at: 1 + 175 put: #dreturn. |
|
238 |
OpSwitchTable at: 1 + 176 put: #areturn. |
|
239 |
OpSwitchTable at: 1 + 177 put: #return. |
|
240 |
OpSwitchTable at: 1 + 178 put: #getstatic. |
|
241 |
OpSwitchTable at: 1 + 179 put: #putstatic. |
|
242 |
OpSwitchTable at: 1 + 180 put: #getfield. |
|
243 |
OpSwitchTable at: 1 + 181 put: #putfield. |
|
244 |
OpSwitchTable at: 1 + 182 put: #invvirt. |
|
245 |
OpSwitchTable at: 1 + 183 put: #invnonvirt. |
|
246 |
OpSwitchTable at: 1 + 184 put: #invstatic. |
|
247 |
OpSwitchTable at: 1 + 185 put: #invinterface. |
|
248 |
OpSwitchTable at: 1 + 187 put: #new. |
|
249 |
OpSwitchTable at: 1 + 188 put: #newarray. |
|
250 |
OpSwitchTable at: 1 + 189 put: #anewarray. |
|
251 |
OpSwitchTable at: 1 + 190 put: #arraylength. |
|
252 |
OpSwitchTable at: 1 + 191 put: #athrow. |
|
253 |
OpSwitchTable at: 1 + 192 put: #checkcast. |
|
254 |
OpSwitchTable at: 1 + 193 put: #instanceof. |
|
255 |
OpSwitchTable at: 1 + 194 put: #monenter. |
|
256 |
OpSwitchTable at: 1 + 195 put: #monexit. |
|
257 |
OpSwitchTable at: 1 + 196 put: #wide. |
|
258 |
OpSwitchTable at: 1 + 197 put: #multianewarray. |
|
259 |
OpSwitchTable at: 1 + 198 put: #ifnull. |
|
260 |
OpSwitchTable at: 1 + 199 put: #ifnonnull. |
|
261 |
OpSwitchTable at: 1 + 200 put: #'goto_w'. |
|
262 |
OpSwitchTable at: 1 + 201 put: #'jsr_w'. |
|
263 |
OpSwitchTable at: 1 + 202 put: #breakpoint. |
|
264 |
OpSwitchTable at: 1 + 203 put: #'ret_w'. |
|
265 |
||
266 |
Verbose := false. |
|
267 |
" |
|
268 |
self initialize" |
|
269 |
||
270 |
"Created: / 17-03-2011 / 14:56:13 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
271 |
"Modified: / 17-03-2011 / 16:43:17 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
272 |
"Modified: / 21-03-2011 / 20:23:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
273 |
! ! |
|
274 |
||
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
275 |
|
749 | 276 |
!JavaByteCodeProcessor class methodsFor:'accessing'! |
277 |
||
278 |
verbose: bool |
|
279 |
Verbose := bool. |
|
280 |
||
281 |
"Created: / 21-03-2011 / 18:32:37 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
282 |
! ! |
|
283 |
||
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
284 |
|
749 | 285 |
!JavaByteCodeProcessor class methodsFor:'private-logging'! |
286 |
||
287 |
log: aMessage |
|
288 |
Verbose ifTrue: [ |
|
289 |
('JAVA [info]: ' , aMessage) infoPrintCR.]. |
|
290 |
||
291 |
"Created: / 17-03-2011 / 14:59:24 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
292 |
! ! |
|
293 |
||
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
294 |
|
749 | 295 |
!JavaByteCodeProcessor methodsFor:'initialization'! |
296 |
||
297 |
reset |
|
298 |
pc := method startPC. |
|
299 |
byteCode := method byteCode. |
|
300 |
constantPool := method javaClass constantPool. |
|
301 |
||
302 |
"Modified: / 17-03-2011 / 14:53:03 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
303 |
! ! |
|
304 |
||
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
305 |
|
749 | 306 |
!JavaByteCodeProcessor methodsFor:'instructions'! |
307 |
||
308 |
aaload |
|
309 |
"raise an error: must be redefined in concrete subclass(es)" |
|
310 |
||
311 |
^ self subclassResponsibility |
|
312 |
! |
|
313 |
||
314 |
aastore |
|
315 |
"raise an error: must be redefined in concrete subclass(es)" |
|
316 |
||
317 |
^ self subclassResponsibility |
|
318 |
! |
|
319 |
||
320 |
aconst_null |
|
321 |
"raise an error: must be redefined in concrete subclass(es)" |
|
322 |
||
323 |
^ self subclassResponsibility |
|
324 |
! |
|
325 |
||
326 |
aload |
|
327 |
"raise an error: must be redefined in concrete subclass(es)" |
|
328 |
||
329 |
^ self subclassResponsibility |
|
330 |
||
331 |
"Created: / 17-03-2011 / 15:07:27 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
332 |
! |
|
333 |
||
334 |
aload: arg |
|
335 |
" |
|
336 |
Load reference from local variable 0 |
|
337 |
nothing -> objectRef" |
|
338 |
"raise an error: must be redefined in concrete subclass(es)" |
|
339 |
||
340 |
^ self subclassResponsibility |
|
341 |
" |
|
342 |
Description |
|
343 |
The <n> must be an index into the local variable array of the |
|
344 |
current frame (§3.6). The local variable at <n> must contain a |
|
345 |
reference. The objectref in the local variable at index is pushed |
|
346 |
onto the operand stack. |
|
347 |
||
348 |
Notes |
|
349 |
An aload_<n> instruction cannot be used to load a value of type |
|
350 |
returnAddress from a local variable onto the operand stack. This |
|
351 |
asymmetry with the corresponding astore_<n> instruction is intentional. |
|
352 |
Each of the aload_<n> instructions is the same as aload with an index |
|
353 |
of <n>, except that the operand <n> is implicit." |
|
354 |
||
355 |
"Modified: / 17-03-2011 / 15:26:53 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
356 |
! |
|
357 |
||
358 |
aload_0 |
|
359 |
" |
|
360 |
Load reference from local variable 0 |
|
361 |
nothing -> objectRef" |
|
362 |
||
363 |
self aload: 0. |
|
364 |
||
365 |
" |
|
366 |
Description |
|
367 |
The <n> must be an index into the local variable array of the |
|
368 |
current frame (§3.6). The local variable at <n> must contain a |
|
369 |
reference. The objectref in the local variable at index is pushed |
|
370 |
onto the operand stack. |
|
371 |
||
372 |
Notes |
|
373 |
An aload_<n> instruction cannot be used to load a value of type |
|
374 |
returnAddress from a local variable onto the operand stack. This |
|
375 |
asymmetry with the corresponding astore_<n> instruction is intentional. |
|
376 |
Each of the aload_<n> instructions is the same as aload with an index |
|
377 |
of <n>, except that the operand <n> is implicit." |
|
378 |
||
379 |
"Created: / 10-03-2011 / 21:42:22 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
380 |
"Modified: / 13-03-2011 / 16:56:04 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
381 |
! |
|
382 |
||
383 |
aload_1 |
|
384 |
self aload: 1. |
|
385 |
||
386 |
"Created: / 10-03-2011 / 21:42:27 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
387 |
"Modified: / 13-03-2011 / 16:56:20 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
388 |
! |
|
389 |
||
390 |
aload_2 |
|
391 |
self aload: 2. |
|
392 |
||
393 |
"Created: / 10-03-2011 / 21:42:31 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
394 |
"Modified: / 13-03-2011 / 16:56:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
395 |
! |
|
396 |
||
397 |
aload_3 |
|
398 |
self aload: 3. |
|
399 |
||
400 |
"Created: / 10-03-2011 / 21:43:07 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
401 |
"Modified: / 13-03-2011 / 16:56:24 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
402 |
! |
|
403 |
||
404 |
anewarray |
|
405 |
"raise an error: must be redefined in concrete subclass(es)" |
|
406 |
||
407 |
^ self subclassResponsibility |
|
408 |
||
409 |
"Created: / 17-03-2011 / 16:57:13 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
410 |
! |
|
411 |
||
412 |
areturn |
|
413 |
"raise an error: must be redefined in concrete subclass(es)" |
|
414 |
||
415 |
^ self subclassResponsibility |
|
416 |
! |
|
417 |
||
418 |
arraylength |
|
419 |
"raise an error: must be redefined in concrete subclass(es)" |
|
420 |
||
421 |
^ self subclassResponsibility |
|
422 |
! |
|
423 |
||
424 |
astore |
|
425 |
"raise an error: must be redefined in concrete subclass(es)" |
|
426 |
||
427 |
^ self subclassResponsibility |
|
428 |
||
429 |
"Created: / 17-03-2011 / 16:37:49 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
430 |
! |
|
431 |
||
432 |
astore:arg |
|
433 |
"raise an error: must be redefined in concrete subclass(es)" |
|
434 |
||
435 |
^ self subclassResponsibility |
|
436 |
! |
|
437 |
||
438 |
astore_0 |
|
439 |
||
440 |
||
441 |
^self astore: 0. |
|
442 |
||
443 |
"Created: / 17-03-2011 / 16:39:06 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
444 |
! |
|
445 |
||
446 |
astore_1 |
|
447 |
^ self astore: 1. |
|
448 |
||
449 |
"Created: / 17-03-2011 / 16:39:10 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
450 |
! |
|
451 |
||
452 |
astore_2 |
|
453 |
^ self astore: 2. |
|
454 |
||
455 |
"Created: / 17-03-2011 / 16:39:13 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
456 |
! |
|
457 |
||
458 |
astore_3 |
|
459 |
^ self astore: 3. |
|
460 |
||
461 |
"Created: / 17-03-2011 / 16:39:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
462 |
! |
|
463 |
||
464 |
athrow |
|
465 |
"raise an error: must be redefined in concrete subclass(es)" |
|
466 |
||
467 |
^ self subclassResponsibility |
|
468 |
||
469 |
"Created: / 17-03-2011 / 16:57:25 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
470 |
! |
|
471 |
||
472 |
baload |
|
473 |
"raise an error: must be redefined in concrete subclass(es)" |
|
474 |
||
475 |
^ self subclassResponsibility |
|
476 |
! |
|
477 |
||
478 |
bastore |
|
479 |
"raise an error: must be redefined in concrete subclass(es)" |
|
480 |
||
481 |
^ self subclassResponsibility |
|
482 |
! |
|
483 |
||
484 |
bipush |
|
485 |
"raise an error: must be redefined in concrete subclass(es)" |
|
486 |
||
487 |
^ self subclassResponsibility |
|
488 |
! |
|
489 |
||
490 |
breakpoint |
|
491 |
"raise an error: must be redefined in concrete subclass(es)" |
|
492 |
||
493 |
^ self subclassResponsibility |
|
494 |
||
495 |
"Created: / 17-03-2011 / 16:59:04 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
496 |
! |
|
497 |
||
498 |
caload |
|
499 |
"raise an error: must be redefined in concrete subclass(es)" |
|
500 |
||
501 |
^ self subclassResponsibility |
|
502 |
! |
|
503 |
||
504 |
castore |
|
505 |
"raise an error: must be redefined in concrete subclass(es)" |
|
506 |
||
507 |
^ self subclassResponsibility |
|
508 |
! |
|
509 |
||
510 |
checkcast |
|
511 |
"raise an error: must be redefined in concrete subclass(es)" |
|
512 |
||
513 |
^ self subclassResponsibility |
|
514 |
||
515 |
"Created: / 17-03-2011 / 16:57:39 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
516 |
! |
|
517 |
||
518 |
d2f |
|
519 |
"raise an error: must be redefined in concrete subclass(es)" |
|
520 |
||
521 |
^ self subclassResponsibility |
|
522 |
||
523 |
"Created: / 17-03-2011 / 16:50:50 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
524 |
! |
|
525 |
||
526 |
d2i |
|
527 |
"raise an error: must be redefined in concrete subclass(es)" |
|
528 |
||
529 |
^ self subclassResponsibility |
|
530 |
||
531 |
"Created: / 17-03-2011 / 16:50:42 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
532 |
! |
|
533 |
||
534 |
d2l |
|
535 |
"raise an error: must be redefined in concrete subclass(es)" |
|
536 |
||
537 |
^ self subclassResponsibility |
|
538 |
||
539 |
"Created: / 17-03-2011 / 16:50:46 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
540 |
! |
|
541 |
||
542 |
dadd |
|
543 |
"raise an error: must be redefined in concrete subclass(es)" |
|
544 |
||
545 |
^ self subclassResponsibility |
|
546 |
! |
|
547 |
||
548 |
daload |
|
549 |
"raise an error: must be redefined in concrete subclass(es)" |
|
550 |
||
551 |
^ self subclassResponsibility |
|
552 |
! |
|
553 |
||
554 |
dastore |
|
555 |
"raise an error: must be redefined in concrete subclass(es)" |
|
556 |
||
557 |
^ self subclassResponsibility |
|
558 |
! |
|
559 |
||
560 |
dcmpg |
|
561 |
"raise an error: must be redefined in concrete subclass(es)" |
|
562 |
||
563 |
^ self subclassResponsibility |
|
564 |
||
565 |
"Created: / 17-03-2011 / 16:52:17 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
566 |
! |
|
567 |
||
568 |
dcmpl |
|
569 |
"raise an error: must be redefined in concrete subclass(es)" |
|
570 |
||
571 |
^ self subclassResponsibility |
|
572 |
||
573 |
"Created: / 17-03-2011 / 16:52:11 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
574 |
! |
|
575 |
||
576 |
dconst: arg |
|
577 |
"Push the double constant <d> (0.0 or 1.0) onto the operand stack. |
|
578 |
stack: nothing -> const |
|
579 |
args: nothing" |
|
580 |
"raise an error: must be redefined in concrete subclass(es)" |
|
581 |
||
582 |
^ self subclassResponsibility |
|
583 |
||
584 |
"Modified: / 17-03-2011 / 15:27:29 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
585 |
! |
|
586 |
||
587 |
dconst_0 |
|
588 |
" |
|
589 |
Push the double constant <d> (0.0 or 1.0) onto the operand stack. |
|
590 |
stack: nothing -> const |
|
591 |
args: nothing |
|
592 |
" |
|
593 |
self dconst: 0. |
|
594 |
||
595 |
"Created: / 14-03-2011 / 18:02:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
596 |
! |
|
597 |
||
598 |
dconst_1 |
|
599 |
" |
|
600 |
Push the double constant <d> (0.0 or 1.0) onto the operand stack. |
|
601 |
stack: nothing -> const |
|
602 |
args: nothing" |
|
603 |
||
604 |
self dconst: 1. |
|
605 |
||
606 |
"Created: / 14-03-2011 / 18:03:26 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
607 |
! |
|
608 |
||
609 |
ddiv |
|
610 |
"raise an error: must be redefined in concrete subclass(es)" |
|
611 |
||
612 |
^ self subclassResponsibility |
|
613 |
||
614 |
"Created: / 17-03-2011 / 16:46:25 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
615 |
! |
|
616 |
||
617 |
dload |
|
618 |
"raise an error: must be redefined in concrete subclass(es)" |
|
619 |
||
620 |
^ self subclassResponsibility |
|
621 |
||
622 |
"Created: / 17-03-2011 / 15:07:14 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
623 |
! |
|
624 |
||
625 |
dload: arg |
|
626 |
" |
|
627 |
Load double from local variable |
|
628 |
stack: nothing -> value |
|
629 |
args: nothing" |
|
630 |
"raise an error: must be redefined in concrete subclass(es)" |
|
631 |
||
632 |
^ self subclassResponsibility |
|
633 |
" |
|
634 |
Description |
|
635 |
Both <n> and <n> + 1 must be indices into the local variable array of the current frame (§3.6). |
|
636 |
The local variable at <n> must contain a double. The value of the local variable at <n> is pushed |
|
637 |
onto the operand stack. |
|
638 |
||
639 |
Notes |
|
640 |
Each of the dload_<n> instructions is the same as dload with an index of <n>, except that the |
|
641 |
operand <n> is implicit." |
|
642 |
||
643 |
"Modified: / 17-03-2011 / 15:26:26 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
644 |
! |
|
645 |
||
646 |
dload_0 |
|
647 |
" |
|
648 |
Load double from local variable |
|
649 |
stack: nothing -> value |
|
650 |
args: nothing" |
|
651 |
||
652 |
self dload: 0. |
|
653 |
||
654 |
" |
|
655 |
Description |
|
656 |
Both <n> and <n> + 1 must be indices into the local variable array of the current frame (§3.6). |
|
657 |
The local variable at <n> must contain a double. The value of the local variable at <n> is pushed |
|
658 |
onto the operand stack. |
|
659 |
||
660 |
Notes |
|
661 |
Each of the dload_<n> instructions is the same as dload with an index of <n>, except that the |
|
662 |
operand <n> is implicit." |
|
663 |
||
664 |
"Created: / 13-03-2011 / 17:55:29 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
665 |
! |
|
666 |
||
667 |
dload_1 |
|
668 |
self dload: 1. |
|
669 |
||
670 |
"Created: / 13-03-2011 / 17:55:33 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
671 |
! |
|
672 |
||
673 |
dload_2 |
|
674 |
self dload: 2. |
|
675 |
||
676 |
"Created: / 13-03-2011 / 17:55:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
677 |
! |
|
678 |
||
679 |
dload_3 |
|
680 |
self dload: 3. |
|
681 |
||
682 |
"Created: / 13-03-2011 / 17:55:45 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
683 |
! |
|
684 |
||
685 |
dmul |
|
686 |
"raise an error: must be redefined in concrete subclass(es)" |
|
687 |
||
688 |
^ self subclassResponsibility |
|
689 |
||
690 |
"Created: / 17-03-2011 / 16:46:01 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
691 |
! |
|
692 |
||
693 |
dneg |
|
694 |
"raise an error: must be redefined in concrete subclass(es)" |
|
695 |
||
696 |
^ self subclassResponsibility |
|
697 |
||
698 |
"Created: / 17-03-2011 / 16:47:42 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
699 |
! |
|
700 |
||
701 |
drem |
|
702 |
"raise an error: must be redefined in concrete subclass(es)" |
|
703 |
||
704 |
^ self subclassResponsibility |
|
705 |
||
706 |
"Created: / 17-03-2011 / 16:47:05 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
707 |
! |
|
708 |
||
709 |
dreturn |
|
710 |
"raise an error: must be redefined in concrete subclass(es)" |
|
711 |
||
712 |
^ self subclassResponsibility |
|
713 |
! |
|
714 |
||
715 |
dstore |
|
716 |
"raise an error: must be redefined in concrete subclass(es)" |
|
717 |
||
718 |
^ self subclassResponsibility |
|
719 |
! |
|
720 |
||
721 |
dstore: arg |
|
722 |
" |
|
723 |
Store double into local variable |
|
724 |
stack: value -> nothing |
|
725 |
args: nothing" |
|
726 |
"raise an error: must be redefined in concrete subclass(es)" |
|
727 |
||
728 |
^ self subclassResponsibility |
|
729 |
" |
|
730 |
Description |
|
731 |
Both <n> and <n> + 1 must be indices into the local variable array of the |
|
732 |
current frame (§3.6). The value on the top of the operand stack must be of |
|
733 |
type double. It is popped from the operand stack and undergoes value set |
|
734 |
conversion (§3.8.3), resulting in value'. The local variables at <n> and |
|
735 |
<n> + 1 are set to value'. |
|
736 |
||
737 |
Notes |
|
738 |
Each of the dstore_<n> instructions is the same as dstore with an index |
|
739 |
of <n>, except that the operand <n> is implicit." |
|
740 |
||
741 |
"Modified: / 17-03-2011 / 15:28:07 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
742 |
! |
|
743 |
||
744 |
dstore_0 |
|
745 |
" |
|
746 |
Store double into local variable |
|
747 |
stack: value -> nothing |
|
748 |
args: nothing" |
|
749 |
||
750 |
self dstore: 0. |
|
751 |
||
752 |
" |
|
753 |
Description |
|
754 |
Both <n> and <n> + 1 must be indices into the local variable array of the |
|
755 |
current frame (§3.6). The value on the top of the operand stack must be of |
|
756 |
type double. It is popped from the operand stack and undergoes value set |
|
757 |
conversion (§3.8.3), resulting in value'. The local variables at <n> and |
|
758 |
<n> + 1 are set to value'. |
|
759 |
||
760 |
Notes |
|
761 |
Each of the dstore_<n> instructions is the same as dstore with an index |
|
762 |
of <n>, except that the operand <n> is implicit." |
|
763 |
||
764 |
"Created: / 14-03-2011 / 19:04:44 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
765 |
! |
|
766 |
||
767 |
dstore_1 |
|
768 |
" |
|
769 |
Store double into local variable |
|
770 |
stack: value -> nothing |
|
771 |
args: nothing |
|
772 |
" |
|
773 |
||
774 |
self dstore: 1. |
|
775 |
" |
|
776 |
Description |
|
777 |
Both <n> and <n> + 1 must be indices into the local variable array of the |
|
778 |
current frame (§3.6). The value on the top of the operand stack must be of |
|
779 |
type double. It is popped from the operand stack and undergoes value set |
|
780 |
conversion (§3.8.3), resulting in value'. The local variables at <n> and |
|
781 |
<n> + 1 are set to value'. |
|
782 |
||
783 |
Notes |
|
784 |
Each of the dstore_<n> instructions is the same as dstore with an index |
|
785 |
of <n>, except that the operand <n> is implicit. |
|
786 |
" |
|
787 |
||
788 |
"Created: / 14-03-2011 / 19:04:39 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
789 |
! |
|
790 |
||
791 |
dstore_2 |
|
792 |
" |
|
793 |
Store double into local variable |
|
794 |
stack: value -> nothing |
|
795 |
args: nothing" |
|
796 |
||
797 |
self dstore: 2. |
|
798 |
||
799 |
" |
|
800 |
Description |
|
801 |
Both <n> and <n> + 1 must be indices into the local variable array of the |
|
802 |
current frame (§3.6). The value on the top of the operand stack must be of |
|
803 |
type double. It is popped from the operand stack and undergoes value set |
|
804 |
conversion (§3.8.3), resulting in value'. The local variables at <n> and |
|
805 |
<n> + 1 are set to value'. |
|
806 |
||
807 |
Notes |
|
808 |
Each of the dstore_<n> instructions is the same as dstore with an index |
|
809 |
of <n>, except that the operand <n> is implicit." |
|
810 |
||
811 |
"Created: / 14-03-2011 / 19:04:49 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
812 |
! |
|
813 |
||
814 |
dstore_3 |
|
815 |
" |
|
816 |
Store double into local variable |
|
817 |
stack: value -> nothing |
|
818 |
args: nothing" |
|
819 |
||
820 |
self dstore: 3. |
|
821 |
||
822 |
" |
|
823 |
Description |
|
824 |
Both <n> and <n> + 1 must be indices into the local variable array of the |
|
825 |
current frame (§3.6). The value on the top of the operand stack must be of |
|
826 |
type double. It is popped from the operand stack and undergoes value set |
|
827 |
conversion (§3.8.3), resulting in value'. The local variables at <n> and |
|
828 |
<n> + 1 are set to value'. |
|
829 |
||
830 |
Notes |
|
831 |
Each of the dstore_<n> instructions is the same as dstore with an index |
|
832 |
of <n>, except that the operand <n> is implicit." |
|
833 |
||
834 |
"Created: / 14-03-2011 / 19:04:54 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
835 |
! |
|
836 |
||
837 |
dsub |
|
838 |
"raise an error: must be redefined in concrete subclass(es)" |
|
839 |
||
840 |
^ self subclassResponsibility |
|
841 |
||
842 |
"Created: / 17-03-2011 / 16:45:33 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
843 |
! |
|
844 |
||
845 |
dup |
|
846 |
"raise an error: must be redefined in concrete subclass(es)" |
|
847 |
||
848 |
^ self subclassResponsibility |
|
849 |
||
850 |
"Created: / 17-03-2011 / 16:44:08 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
851 |
! |
|
852 |
||
853 |
dup2 |
|
854 |
"raise an error: must be redefined in concrete subclass(es)" |
|
855 |
||
856 |
^ self subclassResponsibility |
|
857 |
! |
|
858 |
||
859 |
dup2_x1 |
|
860 |
"raise an error: must be redefined in concrete subclass(es)" |
|
861 |
||
862 |
^ self subclassResponsibility |
|
863 |
! |
|
864 |
||
865 |
dup2_x2 |
|
866 |
"raise an error: must be redefined in concrete subclass(es)" |
|
867 |
||
868 |
^ self subclassResponsibility |
|
869 |
! |
|
870 |
||
871 |
dup_x1 |
|
872 |
"raise an error: must be redefined in concrete subclass(es)" |
|
873 |
||
874 |
^ self subclassResponsibility |
|
875 |
! |
|
876 |
||
877 |
dup_x2 |
|
878 |
"raise an error: must be redefined in concrete subclass(es)" |
|
879 |
||
880 |
^ self subclassResponsibility |
|
881 |
! |
|
882 |
||
883 |
f2d |
|
884 |
"raise an error: must be redefined in concrete subclass(es)" |
|
885 |
||
886 |
^ self subclassResponsibility |
|
887 |
||
888 |
"Created: / 17-03-2011 / 16:50:35 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
889 |
! |
|
890 |
||
891 |
f2i |
|
892 |
"raise an error: must be redefined in concrete subclass(es)" |
|
893 |
||
894 |
^ self subclassResponsibility |
|
895 |
||
896 |
"Created: / 17-03-2011 / 16:50:26 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
897 |
! |
|
898 |
||
899 |
f2l |
|
900 |
"raise an error: must be redefined in concrete subclass(es)" |
|
901 |
||
902 |
^ self subclassResponsibility |
|
903 |
||
904 |
"Created: / 17-03-2011 / 16:50:31 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
905 |
! |
|
906 |
||
907 |
fadd |
|
908 |
"raise an error: must be redefined in concrete subclass(es)" |
|
909 |
||
910 |
^ self subclassResponsibility |
|
911 |
||
912 |
"Created: / 17-03-2011 / 16:44:46 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
913 |
! |
|
914 |
||
915 |
faload |
|
916 |
"raise an error: must be redefined in concrete subclass(es)" |
|
917 |
||
918 |
^ self subclassResponsibility |
|
919 |
! |
|
920 |
||
921 |
fastore |
|
922 |
"raise an error: must be redefined in concrete subclass(es)" |
|
923 |
||
924 |
^ self subclassResponsibility |
|
925 |
! |
|
926 |
||
927 |
fcmpg |
|
928 |
"raise an error: must be redefined in concrete subclass(es)" |
|
929 |
||
930 |
^ self subclassResponsibility |
|
931 |
||
932 |
"Created: / 17-03-2011 / 16:52:00 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
933 |
! |
|
934 |
||
935 |
fcmpl |
|
936 |
"raise an error: must be redefined in concrete subclass(es)" |
|
937 |
||
938 |
^ self subclassResponsibility |
|
939 |
||
940 |
"Created: / 17-03-2011 / 16:51:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
941 |
! |
|
942 |
||
943 |
fconst: arg |
|
944 |
" |
|
945 |
Push float constant |
|
946 |
stack: nothing -> const |
|
947 |
arg: nothing" |
|
948 |
"raise an error: must be redefined in concrete subclass(es)" |
|
949 |
||
950 |
^ self subclassResponsibility. |
|
951 |
" |
|
952 |
Description |
|
953 |
Push the float constant <f> (0.0, 1.0, or 2.0) onto the operand stack." |
|
954 |
||
955 |
"Modified: / 17-03-2011 / 15:28:47 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
956 |
! |
|
957 |
||
958 |
fconst_0 |
|
959 |
" |
|
960 |
Push float constant |
|
961 |
stack: nothing -> const |
|
962 |
arg: nothing" |
|
963 |
||
964 |
self fconst: 0. |
|
965 |
||
966 |
" |
|
967 |
Description |
|
968 |
Push the float constant <f> (0.0, 1.0, or 2.0) onto the operand stack." |
|
969 |
||
970 |
"Created: / 14-03-2011 / 17:56:55 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
971 |
! |
|
972 |
||
973 |
fconst_1 |
|
974 |
" |
|
975 |
Push float constant |
|
976 |
stack: nothing -> const |
|
977 |
arg: nothing" |
|
978 |
||
979 |
self fconst: 1. |
|
980 |
||
981 |
" |
|
982 |
Description |
|
983 |
Push the float constant <f> (0.0, 1.0, or 2.0) onto the operand stack." |
|
984 |
||
985 |
"Created: / 14-03-2011 / 17:57:50 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
986 |
! |
|
987 |
||
988 |
fconst_2 |
|
989 |
" |
|
990 |
Push float constant |
|
991 |
stack: nothing -> const |
|
992 |
arg: nothing" |
|
993 |
||
994 |
self fconst: 2. |
|
995 |
||
996 |
" |
|
997 |
Description |
|
998 |
Push the float constant <f> (0.0, 1.0, or 2.0) onto the operand stack." |
|
999 |
||
1000 |
"Created: / 14-03-2011 / 17:57:56 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1001 |
! |
|
1002 |
||
1003 |
fdiv |
|
1004 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1005 |
||
1006 |
^ self subclassResponsibility |
|
1007 |
||
1008 |
"Created: / 17-03-2011 / 16:46:20 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1009 |
! |
|
1010 |
||
1011 |
fload |
|
1012 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1013 |
||
1014 |
^ self subclassResponsibility |
|
1015 |
||
1016 |
"Created: / 17-03-2011 / 15:07:02 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1017 |
! |
|
1018 |
||
1019 |
fload:arg |
|
1020 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1021 |
||
1022 |
^ self subclassResponsibility |
|
1023 |
! |
|
1024 |
||
1025 |
fload_0 |
|
1026 |
^ self fload: 0. |
|
1027 |
||
1028 |
"Created: / 17-03-2011 / 16:34:59 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1029 |
! |
|
1030 |
||
1031 |
fload_1 |
|
1032 |
^ self fload: 1. |
|
1033 |
||
1034 |
"Created: / 17-03-2011 / 16:35:03 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1035 |
! |
|
1036 |
||
1037 |
fload_2 |
|
1038 |
^ self fload: 2. |
|
1039 |
||
1040 |
"Created: / 17-03-2011 / 16:35:06 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1041 |
! |
|
1042 |
||
1043 |
fload_3 |
|
1044 |
^ self fload: 3. |
|
1045 |
||
1046 |
"Created: / 17-03-2011 / 16:35:11 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1047 |
! |
|
1048 |
||
1049 |
fmul |
|
1050 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1051 |
||
1052 |
^ self subclassResponsibility |
|
1053 |
||
1054 |
"Created: / 17-03-2011 / 16:45:57 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1055 |
! |
|
1056 |
||
1057 |
fneg |
|
1058 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1059 |
||
1060 |
^ self subclassResponsibility |
|
1061 |
||
1062 |
"Created: / 17-03-2011 / 16:47:40 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1063 |
! |
|
1064 |
||
1065 |
frem |
|
1066 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1067 |
||
1068 |
^ self subclassResponsibility |
|
1069 |
||
1070 |
"Created: / 17-03-2011 / 16:46:47 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1071 |
! |
|
1072 |
||
1073 |
freturn |
|
1074 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1075 |
||
1076 |
^ self subclassResponsibility |
|
1077 |
||
1078 |
"Created: / 17-03-2011 / 16:55:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1079 |
! |
|
1080 |
||
1081 |
fstore |
|
1082 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1083 |
||
1084 |
^ self subclassResponsibility |
|
1085 |
! |
|
1086 |
||
1087 |
fstore: arg |
|
1088 |
" |
|
1089 |
Store float into local variable |
|
1090 |
stack: value -> nothing |
|
1091 |
args: index" |
|
1092 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1093 |
||
1094 |
^ self subclassResponsibility |
|
1095 |
" |
|
1096 |
Description |
|
1097 |
The index is an unsigned byte that must be an index into the local |
|
1098 |
variable array of the current frame (§3.6). The value on the top of |
|
1099 |
the operand stack must be of type float. It is popped from the operand |
|
1100 |
stack and undergoes value set conversion (§3.8.3), resulting in value'. |
|
1101 |
The value of the local variable at index is set to value'. |
|
1102 |
||
1103 |
Notes |
|
1104 |
The fstore opcode can be used in conjunction with the wide instruction |
|
1105 |
to access a local variable using a two-byte unsigned index." |
|
1106 |
||
1107 |
"Modified: / 17-03-2011 / 15:29:22 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1108 |
! |
|
1109 |
||
1110 |
fstore_0 |
|
1111 |
" |
|
1112 |
Store float into local variable |
|
1113 |
stack: value -> nothing |
|
1114 |
args: index" |
|
1115 |
||
1116 |
self fstore: 0. |
|
1117 |
||
1118 |
" |
|
1119 |
Description |
|
1120 |
The index is an unsigned byte that must be an index into the local |
|
1121 |
variable array of the current frame (§3.6). The value on the top of |
|
1122 |
the operand stack must be of type float. It is popped from the operand |
|
1123 |
stack and undergoes value set conversion (§3.8.3), resulting in value'. |
|
1124 |
The value of the local variable at index is set to value'. |
|
1125 |
||
1126 |
Notes |
|
1127 |
The fstore opcode can be used in conjunction with the wide instruction |
|
1128 |
to access a local variable using a two-byte unsigned index." |
|
1129 |
||
1130 |
"Created: / 14-03-2011 / 17:59:42 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1131 |
! |
|
1132 |
||
1133 |
fstore_1 |
|
1134 |
" |
|
1135 |
Store float into local variable |
|
1136 |
stack: value -> nothing |
|
1137 |
args: index" |
|
1138 |
||
1139 |
self fstore: 1. |
|
1140 |
||
1141 |
" |
|
1142 |
Description |
|
1143 |
The index is an unsigned byte that must be an index into the local |
|
1144 |
variable array of the current frame (§3.6). The value on the top of |
|
1145 |
the operand stack must be of type float. It is popped from the operand |
|
1146 |
stack and undergoes value set conversion (§3.8.3), resulting in value'. |
|
1147 |
The value of the local variable at index is set to value'. |
|
1148 |
||
1149 |
Notes |
|
1150 |
The fstore opcode can be used in conjunction with the wide instruction |
|
1151 |
to access a local variable using a two-byte unsigned index." |
|
1152 |
||
1153 |
"Created: / 14-03-2011 / 17:59:49 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1154 |
! |
|
1155 |
||
1156 |
fstore_2 |
|
1157 |
" |
|
1158 |
Store float into local variable |
|
1159 |
stack: value -> nothing |
|
1160 |
args: index" |
|
1161 |
||
1162 |
self fstore: 2. |
|
1163 |
||
1164 |
" |
|
1165 |
Description |
|
1166 |
The index is an unsigned byte that must be an index into the local |
|
1167 |
variable array of the current frame (§3.6). The value on the top of |
|
1168 |
the operand stack must be of type float. It is popped from the operand |
|
1169 |
stack and undergoes value set conversion (§3.8.3), resulting in value'. |
|
1170 |
The value of the local variable at index is set to value'. |
|
1171 |
||
1172 |
Notes |
|
1173 |
The fstore opcode can be used in conjunction with the wide instruction |
|
1174 |
to access a local variable using a two-byte unsigned index." |
|
1175 |
||
1176 |
"Created: / 14-03-2011 / 18:00:03 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1177 |
! |
|
1178 |
||
1179 |
fstore_3 |
|
1180 |
" |
|
1181 |
Store float into local variable |
|
1182 |
stack: value -> nothing |
|
1183 |
args: index" |
|
1184 |
||
1185 |
self fstore: 3. |
|
1186 |
||
1187 |
" |
|
1188 |
Description |
|
1189 |
The index is an unsigned byte that must be an index into the local |
|
1190 |
variable array of the current frame (§3.6). The value on the top of |
|
1191 |
the operand stack must be of type float. It is popped from the operand |
|
1192 |
stack and undergoes value set conversion (§3.8.3), resulting in value'. |
|
1193 |
The value of the local variable at index is set to value'. |
|
1194 |
||
1195 |
Notes |
|
1196 |
The fstore opcode can be used in conjunction with the wide instruction |
|
1197 |
to access a local variable using a two-byte unsigned index." |
|
1198 |
||
1199 |
"Created: / 14-03-2011 / 18:00:08 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1200 |
! |
|
1201 |
||
1202 |
fsub |
|
1203 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1204 |
||
1205 |
^ self subclassResponsibility |
|
1206 |
||
1207 |
"Created: / 17-03-2011 / 16:45:29 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1208 |
! |
|
1209 |
||
1210 |
getfield |
|
1211 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1212 |
||
1213 |
^ self subclassResponsibility |
|
1214 |
! |
|
1215 |
||
1216 |
getstatic |
|
1217 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1218 |
||
1219 |
^ self subclassResponsibility |
|
1220 |
||
1221 |
"Created: / 17-03-2011 / 16:55:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1222 |
! |
|
1223 |
||
1224 |
goto |
|
1225 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1226 |
||
1227 |
^ self subclassResponsibility |
|
1228 |
! |
|
1229 |
||
1230 |
goto_w |
|
1231 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1232 |
||
1233 |
^ self subclassResponsibility |
|
1234 |
||
1235 |
"Created: / 17-03-2011 / 16:58:54 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1236 |
! |
|
1237 |
||
1238 |
i2d |
|
1239 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1240 |
||
1241 |
^ self subclassResponsibility |
|
1242 |
||
1243 |
"Created: / 17-03-2011 / 16:50:02 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1244 |
! |
|
1245 |
||
1246 |
i2f |
|
1247 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1248 |
||
1249 |
^ self subclassResponsibility |
|
1250 |
||
1251 |
"Created: / 17-03-2011 / 16:49:57 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1252 |
! |
|
1253 |
||
1254 |
i2l |
|
1255 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1256 |
||
1257 |
^ self subclassResponsibility |
|
1258 |
||
1259 |
"Created: / 17-03-2011 / 16:49:52 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1260 |
! |
|
1261 |
||
1262 |
i_dup |
|
1263 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1264 |
||
1265 |
^ self subclassResponsibility |
|
1266 |
! |
|
1267 |
||
1268 |
iadd |
|
1269 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1270 |
||
1271 |
^ self subclassResponsibility |
|
1272 |
! |
|
1273 |
||
1274 |
iaload |
|
1275 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1276 |
||
1277 |
^ self subclassResponsibility |
|
1278 |
! |
|
1279 |
||
1280 |
iand |
|
1281 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1282 |
||
1283 |
^ self subclassResponsibility |
|
1284 |
! |
|
1285 |
||
1286 |
iastore |
|
1287 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1288 |
||
1289 |
^ self subclassResponsibility |
|
1290 |
! |
|
1291 |
||
1292 |
iconst: arg |
|
1293 |
" |
|
1294 |
Push int constant |
|
1295 |
stack: nothing -> const |
|
1296 |
arg: nothing" |
|
1297 |
||
1298 |
self subclassResponsibility. |
|
1299 |
||
1300 |
" |
|
1301 |
Description |
|
1302 |
Push the int constant <i> (-1, 0, 1, 2, 3, 4 or 5) onto the operand stack. |
|
1303 |
||
1304 |
Notes |
|
1305 |
Each of this family of instructions is equivalent to bipush <i> for the |
|
1306 |
respective value of <i>, except that the operand <i> is implicit." |
|
1307 |
||
1308 |
"Created: / 17-03-2011 / 15:29:48 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1309 |
"Modified: / 20-03-2011 / 20:41:04 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1310 |
! |
|
1311 |
||
1312 |
iconst_0 |
|
1313 |
" |
|
1314 |
Push int constant |
|
1315 |
stack: nothing -> const |
|
1316 |
arg: nothing" |
|
1317 |
||
1318 |
self iconst: 0. |
|
1319 |
||
1320 |
" |
|
1321 |
Description |
|
1322 |
Push the int constant <i> (-1, 0, 1, 2, 3, 4 or 5) onto the operand stack. |
|
1323 |
||
1324 |
Notes |
|
1325 |
Each of this family of instructions is equivalent to bipush <i> for the |
|
1326 |
respective value of <i>, except that the operand <i> is implicit." |
|
1327 |
||
1328 |
"Modified: / 17-03-2011 / 15:30:00 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1329 |
! |
|
1330 |
||
1331 |
iconst_1 |
|
1332 |
self iconst:1. |
|
1333 |
||
1334 |
"Modified: / 17-03-2011 / 15:30:07 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1335 |
! |
|
1336 |
||
1337 |
iconst_2 |
|
1338 |
self iconst: 2. |
|
1339 |
||
1340 |
"Modified: / 17-03-2011 / 15:30:11 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1341 |
! |
|
1342 |
||
1343 |
iconst_3 |
|
1344 |
self iconst: 3. |
|
1345 |
||
1346 |
"Modified: / 17-03-2011 / 15:30:15 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1347 |
! |
|
1348 |
||
1349 |
iconst_4 |
|
1350 |
self iconst: 4. |
|
1351 |
||
1352 |
"Modified: / 17-03-2011 / 15:30:19 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1353 |
! |
|
1354 |
||
1355 |
iconst_5 |
|
1356 |
self iconst: 5. |
|
1357 |
||
1358 |
"Modified: / 17-03-2011 / 15:30:22 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1359 |
! |
|
1360 |
||
1361 |
iconst_m1 |
|
1362 |
self iconst: -1. |
|
1363 |
||
1364 |
"Modified: / 17-03-2011 / 15:30:27 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1365 |
! |
|
1366 |
||
1367 |
idiv |
|
1368 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1369 |
||
1370 |
^ self subclassResponsibility |
|
1371 |
! |
|
1372 |
||
1373 |
ifacmpeq |
|
1374 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1375 |
||
1376 |
^ self subclassResponsibility |
|
1377 |
||
1378 |
"Created: / 17-03-2011 / 16:53:47 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1379 |
! |
|
1380 |
||
1381 |
ifacmpne |
|
1382 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1383 |
||
1384 |
^ self subclassResponsibility |
|
1385 |
||
1386 |
"Created: / 17-03-2011 / 16:53:54 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1387 |
! |
|
1388 |
||
1389 |
ifeq |
|
1390 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1391 |
||
1392 |
^ self subclassResponsibility |
|
1393 |
! |
|
1394 |
||
1395 |
ifge |
|
1396 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1397 |
||
1398 |
^ self subclassResponsibility |
|
1399 |
! |
|
1400 |
||
1401 |
ifgt |
|
1402 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1403 |
||
1404 |
^ self subclassResponsibility |
|
1405 |
! |
|
1406 |
||
1407 |
ificmpeq |
|
1408 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1409 |
||
1410 |
^ self subclassResponsibility |
|
1411 |
! |
|
1412 |
||
1413 |
ificmpge |
|
1414 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1415 |
||
1416 |
^ self subclassResponsibility |
|
1417 |
! |
|
1418 |
||
1419 |
ificmpgt |
|
1420 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1421 |
||
1422 |
^ self subclassResponsibility |
|
1423 |
! |
|
1424 |
||
1425 |
ificmple |
|
1426 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1427 |
||
1428 |
^ self subclassResponsibility |
|
1429 |
! |
|
1430 |
||
1431 |
ificmplt |
|
1432 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1433 |
||
1434 |
^ self subclassResponsibility |
|
1435 |
! |
|
1436 |
||
1437 |
ificmpne |
|
1438 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1439 |
||
1440 |
^ self subclassResponsibility |
|
1441 |
! |
|
1442 |
||
1443 |
ifle |
|
1444 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1445 |
||
1446 |
^ self subclassResponsibility |
|
1447 |
! |
|
1448 |
||
1449 |
iflt |
|
1450 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1451 |
||
1452 |
^ self subclassResponsibility |
|
1453 |
! |
|
1454 |
||
1455 |
ifne |
|
1456 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1457 |
||
1458 |
^ self subclassResponsibility |
|
1459 |
! |
|
1460 |
||
1461 |
ifnonnull |
|
1462 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1463 |
||
1464 |
^ self subclassResponsibility |
|
1465 |
||
1466 |
"Created: / 17-03-2011 / 16:58:39 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1467 |
! |
|
1468 |
||
1469 |
ifnull |
|
1470 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1471 |
||
1472 |
^ self subclassResponsibility |
|
1473 |
||
1474 |
"Created: / 17-03-2011 / 16:58:32 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1475 |
! |
|
1476 |
||
1477 |
iinc |
|
1478 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1479 |
||
1480 |
^ self subclassResponsibility |
|
1481 |
! |
|
1482 |
||
1483 |
iload |
|
1484 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1485 |
||
1486 |
^ self subclassResponsibility |
|
1487 |
||
1488 |
"Created: / 17-03-2011 / 15:06:42 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1489 |
! |
|
1490 |
||
1491 |
iload: arg |
|
1492 |
" |
|
1493 |
loads an int value from local variable 0 |
|
1494 |
stack: nothing -> value |
|
1495 |
args: nothing" |
|
1496 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1497 |
||
1498 |
^ self subclassResponsibility |
|
1499 |
" |
|
1500 |
Description |
|
1501 |
The <n> must be an index into the local variable array of the current frame (§3.6). |
|
1502 |
The local variable at <n> must contain an int. The value of the local variable |
|
1503 |
at <n> is pushed onto the operand stack. |
|
1504 |
||
1505 |
Notes |
|
1506 |
Each of the iload_<n> instructions is the same as iload with an index of <n>, |
|
1507 |
except that the operand <n> is implicit." |
|
1508 |
||
1509 |
"Modified: / 17-03-2011 / 15:30:58 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1510 |
! |
|
1511 |
||
1512 |
iload_0 |
|
1513 |
" |
|
1514 |
loads an int value from local variable 0 |
|
1515 |
stack: nothing -> value |
|
1516 |
args: nothing" |
|
1517 |
||
1518 |
self iload: 0. |
|
1519 |
||
1520 |
" |
|
1521 |
Description |
|
1522 |
The <n> must be an index into the local variable array of the current frame (§3.6). |
|
1523 |
The local variable at <n> must contain an int. The value of the local variable |
|
1524 |
at <n> is pushed onto the operand stack. |
|
1525 |
||
1526 |
Notes |
|
1527 |
Each of the iload_<n> instructions is the same as iload with an index of <n>, |
|
1528 |
except that the operand <n> is implicit." |
|
1529 |
||
1530 |
"Created: / 06-03-2011 / 21:22:17 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1531 |
"Modified: / 13-03-2011 / 20:58:31 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1532 |
! |
|
1533 |
||
1534 |
iload_1 |
|
1535 |
"check iload_0" |
|
1536 |
self iload: 1. |
|
1537 |
||
1538 |
"Created: / 06-03-2011 / 21:22:30 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1539 |
"Modified: / 13-03-2011 / 16:36:59 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1540 |
! |
|
1541 |
||
1542 |
iload_2 |
|
1543 |
"check iload_0" |
|
1544 |
self iload:2. |
|
1545 |
||
1546 |
"Created: / 06-03-2011 / 21:24:02 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1547 |
! |
|
1548 |
||
1549 |
iload_3 |
|
1550 |
"check iload_0" |
|
1551 |
||
1552 |
self iload: 3. |
|
1553 |
||
1554 |
"Created: / 14-03-2011 / 19:05:26 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1555 |
! |
|
1556 |
||
1557 |
imul |
|
1558 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1559 |
||
1560 |
^ self subclassResponsibility |
|
1561 |
! |
|
1562 |
||
1563 |
ineg |
|
1564 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1565 |
||
1566 |
^ self subclassResponsibility |
|
1567 |
||
1568 |
"Created: / 17-03-2011 / 16:47:24 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1569 |
! |
|
1570 |
||
1571 |
instanceof |
|
1572 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1573 |
||
1574 |
^ self subclassResponsibility |
|
1575 |
||
1576 |
"Created: / 17-03-2011 / 16:57:57 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1577 |
! |
|
1578 |
||
1579 |
int2byte |
|
1580 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1581 |
||
1582 |
^ self subclassResponsibility |
|
1583 |
||
1584 |
"Created: / 17-03-2011 / 16:51:03 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1585 |
! |
|
1586 |
||
1587 |
int2char |
|
1588 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1589 |
||
1590 |
^ self subclassResponsibility |
|
1591 |
||
1592 |
"Created: / 17-03-2011 / 16:51:08 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1593 |
! |
|
1594 |
||
1595 |
int2short |
|
1596 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1597 |
||
1598 |
^ self subclassResponsibility |
|
1599 |
||
1600 |
"Created: / 17-03-2011 / 16:51:13 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1601 |
! |
|
1602 |
||
1603 |
invinterface |
|
1604 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1605 |
||
1606 |
^ self subclassResponsibility |
|
1607 |
||
1608 |
"Created: / 17-03-2011 / 16:56:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1609 |
! |
|
1610 |
||
1611 |
invnonvirt |
|
1612 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1613 |
||
1614 |
^ self subclassResponsibility |
|
1615 |
||
1616 |
"Created: / 17-03-2011 / 16:56:26 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1617 |
! |
|
1618 |
||
1619 |
invstatic |
|
1620 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1621 |
||
1622 |
^ self subclassResponsibility |
|
1623 |
! |
|
1624 |
||
1625 |
invvirt |
|
1626 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1627 |
||
1628 |
^ self subclassResponsibility |
|
1629 |
||
1630 |
"Created: / 17-03-2011 / 16:56:21 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1631 |
! |
|
1632 |
||
1633 |
ior |
|
1634 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1635 |
||
1636 |
^ self subclassResponsibility |
|
1637 |
! |
|
1638 |
||
1639 |
irem |
|
1640 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1641 |
||
1642 |
^ self subclassResponsibility |
|
1643 |
! |
|
1644 |
||
1645 |
ireturn |
|
1646 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1647 |
||
1648 |
^ self subclassResponsibility |
|
1649 |
! |
|
1650 |
||
1651 |
ishl |
|
1652 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1653 |
||
1654 |
^ self subclassResponsibility |
|
1655 |
! |
|
1656 |
||
1657 |
ishr |
|
1658 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1659 |
||
1660 |
^ self subclassResponsibility |
|
1661 |
! |
|
1662 |
||
1663 |
istore |
|
1664 |
||
1665 |
^ self subclassResponsibility |
|
1666 |
||
1667 |
"Created: / 17-03-2011 / 16:36:55 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1668 |
! |
|
1669 |
||
1670 |
istore: arg |
|
1671 |
"store int value into variable 0 |
|
1672 |
stack: value -> nothing |
|
1673 |
args: nothing" |
|
1674 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1675 |
||
1676 |
^ self subclassResponsibility |
|
1677 |
" |
|
1678 |
Description |
|
1679 |
The <n> must be an index into the local variable array of the current frame (§3.6). |
|
1680 |
The value on the top of the operand stack must be of type int. It is popped from |
|
1681 |
the operand stack, and the value of the local variable at <n> is set to value. |
|
1682 |
||
1683 |
Notes |
|
1684 |
Each of the istore_<n> instructions is the same as istore with an index of <n>, |
|
1685 |
except that the operand <n> is implicit." |
|
1686 |
||
1687 |
"Modified: / 17-03-2011 / 15:31:20 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1688 |
! |
|
1689 |
||
1690 |
istore_0 |
|
1691 |
"store int value into variable 0 |
|
1692 |
stack: value -> nothing |
|
1693 |
args: nothing" |
|
1694 |
||
1695 |
self istore: 0. |
|
1696 |
||
1697 |
" |
|
1698 |
Description |
|
1699 |
The <n> must be an index into the local variable array of the current frame (§3.6). |
|
1700 |
The value on the top of the operand stack must be of type int. It is popped from |
|
1701 |
the operand stack, and the value of the local variable at <n> is set to value. |
|
1702 |
||
1703 |
Notes |
|
1704 |
Each of the istore_<n> instructions is the same as istore with an index of <n>, |
|
1705 |
except that the operand <n> is implicit." |
|
1706 |
||
1707 |
"Created: / 06-03-2011 / 21:01:27 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1708 |
"Modified: / 17-03-2011 / 15:31:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1709 |
! |
|
1710 |
||
1711 |
istore_1 |
|
1712 |
"check istore_0" |
|
1713 |
self istore: 1. |
|
1714 |
||
1715 |
"Created: / 06-03-2011 / 21:18:15 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1716 |
! |
|
1717 |
||
1718 |
istore_2 |
|
1719 |
"check istore_0" |
|
1720 |
self istore: 2. |
|
1721 |
||
1722 |
"Created: / 06-03-2011 / 21:23:54 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1723 |
! |
|
1724 |
||
1725 |
istore_3 |
|
1726 |
"check istore_0" |
|
1727 |
||
1728 |
self istore: 3. |
|
1729 |
||
1730 |
"Created: / 14-03-2011 / 19:05:12 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1731 |
! |
|
1732 |
||
1733 |
isub |
|
1734 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1735 |
||
1736 |
^ self subclassResponsibility |
|
1737 |
! |
|
1738 |
||
1739 |
iushr |
|
1740 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1741 |
||
1742 |
^ self subclassResponsibility |
|
1743 |
! |
|
1744 |
||
1745 |
ixor |
|
1746 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1747 |
||
1748 |
^ self subclassResponsibility |
|
1749 |
! |
|
1750 |
||
1751 |
jsr |
|
1752 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1753 |
||
1754 |
^ self subclassResponsibility |
|
1755 |
||
1756 |
"Created: / 17-03-2011 / 16:54:10 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1757 |
! |
|
1758 |
||
1759 |
jsr_w |
|
1760 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1761 |
||
1762 |
^ self subclassResponsibility |
|
1763 |
||
1764 |
"Created: / 17-03-2011 / 16:58:58 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1765 |
! |
|
1766 |
||
1767 |
l2d |
|
1768 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1769 |
||
1770 |
^ self subclassResponsibility |
|
1771 |
||
1772 |
"Created: / 17-03-2011 / 16:50:17 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1773 |
! |
|
1774 |
||
1775 |
l2f |
|
1776 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1777 |
||
1778 |
^ self subclassResponsibility |
|
1779 |
||
1780 |
"Created: / 17-03-2011 / 16:50:14 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1781 |
! |
|
1782 |
||
1783 |
l2i |
|
1784 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1785 |
||
1786 |
^ self subclassResponsibility |
|
1787 |
||
1788 |
"Created: / 17-03-2011 / 16:50:09 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1789 |
! |
|
1790 |
||
1791 |
ladd |
|
1792 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1793 |
||
1794 |
^ self subclassResponsibility |
|
1795 |
||
1796 |
"Created: / 17-03-2011 / 16:44:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1797 |
! |
|
1798 |
||
1799 |
laload |
|
1800 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1801 |
||
1802 |
^ self subclassResponsibility |
|
1803 |
! |
|
1804 |
||
1805 |
land |
|
1806 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1807 |
||
1808 |
^ self subclassResponsibility |
|
1809 |
||
1810 |
"Created: / 17-03-2011 / 16:48:57 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1811 |
! |
|
1812 |
||
1813 |
lastore |
|
1814 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1815 |
||
1816 |
^ self subclassResponsibility |
|
1817 |
! |
|
1818 |
||
1819 |
lcmp |
|
1820 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1821 |
||
1822 |
^ self subclassResponsibility |
|
1823 |
||
1824 |
"Created: / 17-03-2011 / 16:51:30 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1825 |
! |
|
1826 |
||
1827 |
lconst: arg |
|
1828 |
" |
|
1829 |
Push long constant |
|
1830 |
stack: nothing -> const |
|
1831 |
arg: nothing" |
|
1832 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1833 |
||
1834 |
^ self subclassResponsibility |
|
1835 |
" |
|
1836 |
Push the long constant <l> (0 or 1) onto the operand stack." |
|
1837 |
||
1838 |
"Modified: / 17-03-2011 / 16:30:28 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1839 |
! |
|
1840 |
||
1841 |
lconst_0 |
|
1842 |
" |
|
1843 |
Push long constant |
|
1844 |
stack: nothing -> const |
|
1845 |
arg: nothing" |
|
1846 |
||
1847 |
self lconst: 0. |
|
1848 |
||
1849 |
" |
|
1850 |
Push the long constant <l> (0 or 1) onto the operand stack." |
|
1851 |
||
1852 |
"Created: / 14-03-2011 / 17:53:32 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1853 |
"Modified: / 17-03-2011 / 16:28:58 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1854 |
! |
|
1855 |
||
1856 |
lconst_1 |
|
1857 |
" |
|
1858 |
Push long constant |
|
1859 |
stack: nothing -> const |
|
1860 |
arg: nothing" |
|
1861 |
||
1862 |
self lconst: 1. |
|
1863 |
||
1864 |
" |
|
1865 |
Push the long constant <l> (0 or 1) onto the operand stack." |
|
1866 |
||
1867 |
"Created: / 14-03-2011 / 17:53:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1868 |
"Modified: / 17-03-2011 / 16:29:04 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1869 |
! |
|
1870 |
||
1871 |
ldc1 |
|
1872 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1873 |
||
1874 |
^ self subclassResponsibility |
|
1875 |
! |
|
1876 |
||
1877 |
ldc2 |
|
1878 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1879 |
||
1880 |
^ self subclassResponsibility |
|
1881 |
! |
|
1882 |
||
1883 |
ldc2w |
|
1884 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1885 |
||
1886 |
^ self subclassResponsibility |
|
1887 |
! |
|
1888 |
||
1889 |
ldiv |
|
1890 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1891 |
||
1892 |
^ self subclassResponsibility |
|
1893 |
||
1894 |
"Created: / 17-03-2011 / 16:46:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1895 |
! |
|
1896 |
||
1897 |
lload |
|
1898 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1899 |
||
1900 |
^ self subclassResponsibility |
|
1901 |
||
1902 |
"Created: / 17-03-2011 / 15:06:08 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1903 |
! |
|
1904 |
||
1905 |
lload: arg |
|
1906 |
" |
|
1907 |
Load long from local variable |
|
1908 |
stack: nothing -> value |
|
1909 |
args: nothing" |
|
1910 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1911 |
||
1912 |
^ self subclassResponsibility. |
|
1913 |
||
1914 |
" |
|
1915 |
Description |
|
1916 |
Both <n> and <n> + 1 must be indices into the local variable array of the |
|
1917 |
current frame (§3.6). The local variable at <n> must contain a long. The |
|
1918 |
value of the local variable at <n> is pushed onto the operand stack. |
|
1919 |
||
1920 |
Notes |
|
1921 |
Each of the lload_<n> instructions is the same as lload with an index |
|
1922 |
of <n>, except that the operand <n> is implicit." |
|
1923 |
||
1924 |
"Modified: / 17-03-2011 / 16:33:33 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1925 |
! |
|
1926 |
||
1927 |
lload_0 |
|
1928 |
" |
|
1929 |
Load long from local variable |
|
1930 |
stack: nothing -> value |
|
1931 |
args: nothing |
|
1932 |
" |
|
1933 |
self lload: 0. |
|
1934 |
||
1935 |
" |
|
1936 |
Description |
|
1937 |
Both <n> and <n> + 1 must be indices into the local variable array of the |
|
1938 |
current frame (§3.6). The local variable at <n> must contain a long. The |
|
1939 |
value of the local variable at <n> is pushed onto the operand stack. |
|
1940 |
||
1941 |
Notes |
|
1942 |
Each of the lload_<n> instructions is the same as lload with an index |
|
1943 |
of <n>, except that the operand <n> is implicit. |
|
1944 |
" |
|
1945 |
||
1946 |
"Created: / 14-03-2011 / 13:38:11 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1947 |
! |
|
1948 |
||
1949 |
lload_1 |
|
1950 |
self lload: 1. |
|
1951 |
||
1952 |
"Created: / 14-03-2011 / 13:37:42 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1953 |
! |
|
1954 |
||
1955 |
lload_2 |
|
1956 |
self lload: 2. |
|
1957 |
||
1958 |
"Created: / 14-03-2011 / 13:38:39 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1959 |
! |
|
1960 |
||
1961 |
lload_3 |
|
1962 |
self lload: 3. |
|
1963 |
||
1964 |
"Created: / 14-03-2011 / 13:38:43 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1965 |
! |
|
1966 |
||
1967 |
lmul |
|
1968 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1969 |
||
1970 |
^ self subclassResponsibility |
|
1971 |
||
1972 |
"Created: / 17-03-2011 / 16:45:53 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1973 |
! |
|
1974 |
||
1975 |
lneg |
|
1976 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1977 |
||
1978 |
^ self subclassResponsibility |
|
1979 |
||
1980 |
"Created: / 17-03-2011 / 16:47:29 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1981 |
! |
|
1982 |
||
1983 |
lookupswtch |
|
1984 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1985 |
||
1986 |
^ self subclassResponsibility |
|
1987 |
||
1988 |
"Created: / 17-03-2011 / 16:55:04 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1989 |
! |
|
1990 |
||
1991 |
lor |
|
1992 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1993 |
||
1994 |
^ self subclassResponsibility |
|
1995 |
||
1996 |
"Created: / 17-03-2011 / 16:49:03 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1997 |
! |
|
1998 |
||
1999 |
lrem |
|
2000 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2001 |
||
2002 |
^ self subclassResponsibility |
|
2003 |
||
2004 |
"Created: / 17-03-2011 / 16:46:58 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2005 |
! |
|
2006 |
||
2007 |
lreturn |
|
2008 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2009 |
||
2010 |
^ self subclassResponsibility |
|
2011 |
! |
|
2012 |
||
2013 |
lshl |
|
2014 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2015 |
||
2016 |
^ self subclassResponsibility |
|
2017 |
||
2018 |
"Created: / 17-03-2011 / 16:48:09 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2019 |
! |
|
2020 |
||
2021 |
lshr |
|
2022 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2023 |
||
2024 |
^ self subclassResponsibility |
|
2025 |
||
2026 |
"Created: / 17-03-2011 / 16:48:21 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2027 |
! |
|
2028 |
||
2029 |
lstore |
|
2030 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2031 |
||
2032 |
^ self subclassResponsibility |
|
2033 |
||
2034 |
"Created: / 17-03-2011 / 16:37:14 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2035 |
! |
|
2036 |
||
2037 |
lstore:arg |
|
2038 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2039 |
||
2040 |
^ self subclassResponsibility |
|
2041 |
! |
|
2042 |
||
2043 |
lstore_0 |
|
2044 |
"store long into local variable 0 |
|
2045 |
stack: value -> nothing |
|
2046 |
args: nothing" |
|
2047 |
||
2048 |
self lstore: 0. |
|
2049 |
||
2050 |
" |
|
2051 |
Description |
|
2052 |
Both <n> and <n> + 1 must be indices into the local variable array of the |
|
2053 |
current frame (§3.6). The value on the top of the operand stack must be |
|
2054 |
of type long. It is popped from the operand stack, and the local variables |
|
2055 |
at <n> and <n> + 1 are set to value. |
|
2056 |
||
2057 |
Notes |
|
2058 |
Each of the lstore_<n> instructions is the same as lstore with an index |
|
2059 |
of <n>, except that the operand <n> is implicit." |
|
2060 |
||
2061 |
"Created: / 14-03-2011 / 17:54:43 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2062 |
! |
|
2063 |
||
2064 |
lstore_1 |
|
2065 |
"store long into local variable |
|
2066 |
stack: value -> nothing |
|
2067 |
args: nothing" |
|
2068 |
||
2069 |
self lstore: 1. |
|
2070 |
||
2071 |
" |
|
2072 |
Description |
|
2073 |
Both <n> and <n> + 1 must be indices into the local variable array of the |
|
2074 |
current frame (§3.6). The value on the top of the operand stack must be |
|
2075 |
of type long. It is popped from the operand stack, and the local variables |
|
2076 |
at <n> and <n> + 1 are set to value. |
|
2077 |
||
2078 |
Notes |
|
2079 |
Each of the lstore_<n> instructions is the same as lstore with an index |
|
2080 |
of <n>, except that the operand <n> is implicit." |
|
2081 |
||
2082 |
"Created: / 14-03-2011 / 17:55:15 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2083 |
! |
|
2084 |
||
2085 |
lstore_2 |
|
2086 |
"store long into local variable |
|
2087 |
stack: value -> nothing |
|
2088 |
args: nothing" |
|
2089 |
||
2090 |
self lstore: 2. |
|
2091 |
||
2092 |
" |
|
2093 |
Description |
|
2094 |
Both <n> and <n> + 1 must be indices into the local variable array of the |
|
2095 |
current frame (§3.6). The value on the top of the operand stack must be |
|
2096 |
of type long. It is popped from the operand stack, and the local variables |
|
2097 |
at <n> and <n> + 1 are set to value. |
|
2098 |
||
2099 |
Notes |
|
2100 |
Each of the lstore_<n> instructions is the same as lstore with an index |
|
2101 |
of <n>, except that the operand <n> is implicit." |
|
2102 |
||
2103 |
"Created: / 14-03-2011 / 17:55:20 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2104 |
! |
|
2105 |
||
2106 |
lstore_3 |
|
2107 |
"store long into local variable |
|
2108 |
stack: value -> nothing |
|
2109 |
args: nothing" |
|
2110 |
||
2111 |
self lstore: 3. |
|
2112 |
||
2113 |
" |
|
2114 |
Description |
|
2115 |
Both <n> and <n> + 1 must be indices into the local variable array of the |
|
2116 |
current frame (§3.6). The value on the top of the operand stack must be |
|
2117 |
of type long. It is popped from the operand stack, and the local variables |
|
2118 |
at <n> and <n> + 1 are set to value. |
|
2119 |
||
2120 |
Notes |
|
2121 |
Each of the lstore_<n> instructions is the same as lstore with an index |
|
2122 |
of <n>, except that the operand <n> is implicit." |
|
2123 |
||
2124 |
"Created: / 14-03-2011 / 17:56:04 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2125 |
! |
|
2126 |
||
2127 |
lsub |
|
2128 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2129 |
||
2130 |
^ self subclassResponsibility |
|
2131 |
||
2132 |
"Created: / 17-03-2011 / 16:45:25 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2133 |
! |
|
2134 |
||
2135 |
lushr |
|
2136 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2137 |
||
2138 |
^ self subclassResponsibility |
|
2139 |
||
2140 |
"Created: / 17-03-2011 / 16:48:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2141 |
! |
|
2142 |
||
2143 |
lxor |
|
2144 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2145 |
||
2146 |
^ self subclassResponsibility |
|
2147 |
||
2148 |
"Created: / 17-03-2011 / 16:49:09 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2149 |
! |
|
2150 |
||
2151 |
monenter |
|
2152 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2153 |
||
2154 |
^ self subclassResponsibility |
|
2155 |
||
2156 |
"Created: / 17-03-2011 / 16:58:06 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2157 |
! |
|
2158 |
||
2159 |
monexit |
|
2160 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2161 |
||
2162 |
^ self subclassResponsibility |
|
2163 |
||
2164 |
"Created: / 17-03-2011 / 16:58:10 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2165 |
! |
|
2166 |
||
2167 |
multianewarray |
|
2168 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2169 |
||
2170 |
^ self subclassResponsibility |
|
2171 |
||
2172 |
"Created: / 17-03-2011 / 16:58:28 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2173 |
! |
|
2174 |
||
2175 |
new |
|
2176 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2177 |
||
2178 |
^ self subclassResponsibility |
|
2179 |
! |
|
2180 |
||
2181 |
newarray |
|
2182 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2183 |
||
2184 |
^ self subclassResponsibility |
|
2185 |
! |
|
2186 |
||
2187 |
nop |
|
2188 |
"Do nothing" |
|
2189 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2190 |
||
2191 |
^ self subclassResponsibility |
|
2192 |
||
2193 |
"Modified: / 17-03-2011 / 16:27:12 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2194 |
! |
|
2195 |
||
2196 |
pop1 |
|
2197 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2198 |
||
2199 |
^ self subclassResponsibility |
|
2200 |
||
2201 |
"Created: / 17-03-2011 / 16:43:07 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2202 |
! |
|
2203 |
||
2204 |
pop2 |
|
2205 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2206 |
||
2207 |
^ self subclassResponsibility |
|
2208 |
! |
|
2209 |
||
2210 |
putfield |
|
2211 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2212 |
||
2213 |
^ self subclassResponsibility |
|
2214 |
! |
|
2215 |
||
2216 |
putstatic |
|
2217 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2218 |
||
2219 |
^ self subclassResponsibility |
|
2220 |
! |
|
2221 |
||
2222 |
ret |
|
2223 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2224 |
||
2225 |
^ self subclassResponsibility |
|
2226 |
||
2227 |
"Created: / 17-03-2011 / 16:54:31 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2228 |
! |
|
2229 |
||
2230 |
ret_w |
|
2231 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2232 |
||
2233 |
^ self subclassResponsibility |
|
2234 |
||
2235 |
"Created: / 17-03-2011 / 16:59:12 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2236 |
! |
|
2237 |
||
2238 |
return |
|
2239 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2240 |
||
2241 |
^ self subclassResponsibility |
|
2242 |
! |
|
2243 |
||
2244 |
saload |
|
2245 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2246 |
||
2247 |
^ self subclassResponsibility |
|
2248 |
! |
|
2249 |
||
2250 |
sastore |
|
2251 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2252 |
||
2253 |
^ self subclassResponsibility |
|
2254 |
! |
|
2255 |
||
2256 |
sipush |
|
2257 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2258 |
||
2259 |
^ self subclassResponsibility |
|
2260 |
! |
|
2261 |
||
2262 |
swap |
|
2263 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2264 |
||
2265 |
^ self subclassResponsibility |
|
2266 |
! |
|
2267 |
||
2268 |
tableswtch |
|
2269 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2270 |
||
2271 |
^ self subclassResponsibility |
|
2272 |
||
2273 |
"Created: / 17-03-2011 / 16:54:55 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2274 |
! |
|
2275 |
||
2276 |
wide |
|
2277 |
"raise an error: must be redefined in concrete subclass(es)" |
|
2278 |
||
2279 |
^ self subclassResponsibility |
|
2280 |
||
2281 |
"Created: / 17-03-2011 / 16:58:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2282 |
! ! |
|
2283 |
||
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
2284 |
|
749 | 2285 |
!JavaByteCodeProcessor methodsFor:'private-helpers'! |
2286 |
||
2287 |
fetchByte |
|
2288 |
"fetch sign extended byte value stored in bytecode" |
|
2289 |
pc := pc + 1. |
|
2290 |
^ (byteCode at: (pc - 1)) signExtendedByteValue. |
|
2291 |
||
2292 |
"Created: / 06-03-2011 / 22:26:09 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2293 |
"Modified: / 17-03-2011 / 17:00:30 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2294 |
! |
|
2295 |
||
2296 |
fetchBytes2 |
|
2297 |
"fetch sign extended 2 byte value stored in bytecode" |
|
2298 |
pc := pc + 2. |
|
2299 |
^ (((byteCode at: (pc - 2)) bitShift: 8) + (byteCode at: (pc - 1))) |
|
2300 |
signExtendedShortValue. |
|
2301 |
||
2302 |
"Created: / 06-03-2011 / 21:12:07 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2303 |
"Modified: / 17-03-2011 / 17:00:43 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2304 |
! |
|
2305 |
||
2306 |
fetchBytes4 |
|
2307 |
"fetch sign extended 4 byte value stored in bytecode" |
|
2308 |
||
2309 |
pc := pc + 4. |
|
2310 |
^ (((((byteCode at: (pc - 4)) bitShift: 24) |
|
2311 |
bitOr: ((byteCode at: (pc - 3)) bitShift: 16)) |
|
2312 |
bitOr: ((byteCode at: (pc - 2)) bitShift: 8)) |
|
2313 |
bitOr: (byteCode at: (pc - 1))) asSigned32. |
|
2314 |
||
2315 |
"Created: / 21-03-2011 / 12:59:26 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2316 |
"Modified: / 21-03-2011 / 15:10:22 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2317 |
! |
|
2318 |
||
2319 |
fetchIndex |
|
2320 |
"fetch index value from bytecode" |
|
2321 |
pc := pc + 1. |
|
2322 |
^ (byteCode at: (pc - 1)). |
|
2323 |
||
2324 |
"Created: / 24-02-2011 / 22:37:18 / Marcel Hlopko <hlopik@gmail.com>" |
|
2325 |
"Modified: / 17-03-2011 / 17:01:14 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2326 |
! |
|
2327 |
||
2328 |
fetchIndex2 |
|
2329 |
"fetch index 2 byte value from bytecode" |
|
2330 |
pc := pc + 2. |
|
2331 |
^ ((byteCode at: (pc - 2)) bitShift: 8) bitOr: (byteCode at: (pc - 1)). |
|
2332 |
||
2333 |
"Modified: / 24-02-2011 / 21:33:53 / Marcel Hlopko <hlopik@gmail.com>" |
|
2334 |
"Modified: / 17-03-2011 / 17:01:24 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2335 |
! |
|
2336 |
||
2337 |
pop |
|
2338 |
"return and remove top of the stack" |
|
2339 |
||
2340 |
sp := sp - 1. |
|
2341 |
^ context at: sp + 1. |
|
2342 |
||
2343 |
"Modified: / 17-03-2011 / 17:39:09 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2344 |
! |
|
2345 |
||
2346 |
popDouble |
|
2347 |
"so far I didn't find a reason to handle doubles and long on stack differently" |
|
2348 |
^ self pop. |
|
2349 |
||
2350 |
"Modified: / 17-03-2011 / 17:02:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2351 |
! |
|
2352 |
||
2353 |
popLong |
|
2354 |
"so far I didn't find a reason to handle doubles and long on stack differently" |
|
2355 |
^ self pop. |
|
2356 |
||
2357 |
"Modified: / 17-03-2011 / 17:02:38 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2358 |
! |
|
2359 |
||
2360 |
pushConstant: something |
|
2361 |
"push constant value on the stack - is there really not any better push method?" |
|
2362 |
sp := sp + 1. |
|
2363 |
context at: sp put: something |
|
2364 |
||
2365 |
"Modified: / 17-03-2011 / 17:05:56 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2366 |
! |
|
2367 |
||
2368 |
pushDouble: something |
|
2369 |
"push double value on the stack" |
|
2370 |
||
2371 |
^ self pushInt: something. |
|
2372 |
||
2373 |
"Modified: / 17-03-2011 / 17:06:28 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2374 |
! |
|
2375 |
||
2376 |
pushFloat: something |
|
2377 |
"push float value on the stack" |
|
2378 |
self pushInt: something. |
|
2379 |
||
2380 |
"Created: / 13-03-2011 / 16:39:52 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2381 |
"Modified: / 17-03-2011 / 17:06:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2382 |
! |
|
2383 |
||
2384 |
pushInt: something |
|
2385 |
"push integer value on the stack" |
|
2386 |
sp := sp + 1. |
|
2387 |
context at: sp put: something |
|
2388 |
||
2389 |
"Created: / 13-03-2011 / 17:28:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2390 |
"Modified: / 17-03-2011 / 17:06:52 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2391 |
! |
|
2392 |
||
2393 |
pushLong: something |
|
2394 |
"push long value on the stack" |
|
2395 |
||
2396 |
^ self pushInt: something. |
|
2397 |
||
2398 |
"sp := sp + 2. |
|
2399 |
context at: sp - 1 put: #'dummy long complement'. |
|
2400 |
context at: sp put: something asLargeInteger." |
|
2401 |
||
2402 |
"Modified: / 17-03-2011 / 17:07:06 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2403 |
! |
|
2404 |
||
2405 |
pushNewArrayOf: type sized: size |
|
2406 |
"push new array of type with <size> slots" |
|
2407 |
||
2408 |
self pushRef: ((JavaArray javaArrayClassFor: type) new: size). |
|
2409 |
||
2410 |
"Created: / 14-03-2011 / 18:36:15 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2411 |
"Modified: / 27-03-2011 / 21:06:30 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2412 |
! |
|
2413 |
||
2414 |
pushNewPrimitiveArrayOf: typeName sized: size |
|
2415 |
"push new array of <typeName> (e.g. 'long', only primitive types) with <size> slots" |
|
2416 |
||
2417 |
self |
|
2418 |
pushRef: ((JavaArray |
|
2419 |
javaArrayClassFor: (JavaDescriptor baseTypesByTypeName at: typeName)) |
|
2420 |
new: size). |
|
2421 |
||
2422 |
"Created: / 27-03-2011 / 21:06:07 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2423 |
! |
|
2424 |
||
2425 |
pushRef: something |
|
2426 |
"push java ref on the stack" |
|
2427 |
sp := sp + 1. |
|
2428 |
context at: sp put: something |
|
2429 |
||
2430 |
"Created: / 13-03-2011 / 16:35:55 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2431 |
"Modified: / 21-03-2011 / 16:49:30 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2432 |
! |
|
2433 |
||
2434 |
relativeJump: pos |
|
2435 |
"move pc relatively by the position <pos>." |
|
2436 |
||
2437 |
pc := instrPointer + pos. |
|
2438 |
||
2439 |
"Created: / 21-03-2011 / 18:19:44 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2440 |
! |
|
2441 |
||
2442 |
skipPadding |
|
2443 |
"in tableswitch and lookupswitch instructions, there's a padding after instruction to ensure |
|
2444 |
32bit values following begin at address that is multiple of 4 bytes from the start of the current |
|
2445 |
method bytecode" |
|
2446 |
||
2447 |
| jmpSize | |
|
2448 |
||
2449 |
jmpSize := ((4 - (pc \\ 4)) + 1) \\ 4. |
|
2450 |
pc := pc + jmpSize. |
|
2451 |
^ jmpSize. |
|
2452 |
||
2453 |
"Created: / 21-03-2011 / 13:13:55 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2454 |
"Modified: / 22-03-2011 / 15:54:23 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2455 |
! |
|
2456 |
||
2457 |
tos |
|
2458 |
^ context at:sp. |
|
2459 |
! ! |
|
2460 |
||
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
2461 |
|
749 | 2462 |
!JavaByteCodeProcessor methodsFor:'private-logging'! |
2463 |
||
2464 |
log: aMessage |
|
2465 |
self class log: aMessage. |
|
2466 |
||
2467 |
"Created: / 17-03-2011 / 14:59:56 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2468 |
! ! |
|
2469 |
||
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
2470 |
|
749 | 2471 |
!JavaByteCodeProcessor methodsFor:'processing loop'! |
2472 |
||
2473 |
enterProcessingLoop |
|
2474 |
Context cannotReturnSignal handle: |
|
2475 |
[:ex | |
|
2476 |
"/ this is required for blocks of this method, which do a homeReturn. |
|
2477 |
"/ since my context is not really on the stack (and therefore not returnable), |
|
2478 |
"/ catch the error and return manually. |
|
2479 |
^ ex parameter ] |
|
2480 |
do: |
|
2481 |
[ [ leaveProcessor ] whileFalse: |
|
2482 |
[ instrPointer := pc. |
|
2483 |
op := byteCode at: pc. |
|
2484 |
pc := pc + 1. |
|
2485 |
self switch: op. ]. ]. |
|
2486 |
||
2487 |
"Created: / 31-03-2011 / 16:38:01 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2488 |
! |
|
2489 |
||
2490 |
handleAbstractMethod |
|
2491 |
self subclassResponsibility. |
|
2492 |
||
2493 |
"Created: / 22-03-2011 / 14:49:43 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2494 |
! |
|
2495 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2496 |
handleNativeMethod |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2497 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2498 |
"Created: / 09-02-2012 / 22:47:03 / mh <hlopik@gmail.com>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2499 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2500 |
|
749 | 2501 |
initializeContextArgsFrom: argArray |
2502 |
1 to: numArgs do: [:idx | context at: idx put: (argArray at: idx). ] |
|
2503 |
||
2504 |
"Created: / 21-03-2011 / 15:17:23 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2505 |
! |
|
2506 |
||
2507 |
initializeContextVars |
|
2508 |
1 to: numVars do: [:idx | context at: (numArgs + idx) put: nil. ] |
|
2509 |
! |
|
2510 |
||
2511 |
leaveProcessorWith: aReturnObject |
|
2512 |
retVal := aReturnObject. |
|
2513 |
leaveProcessor := true |
|
2514 |
||
2515 |
"Modified: / 17-03-2011 / 17:39:21 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2516 |
! |
|
2517 |
||
2518 |
process: aMethod receiver: aReceiver arguments: args |
|
2519 |
| argArray | |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2520 |
aMethod isAbstract ifTrue: [ |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2521 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2522 |
^ self handleAbstractMethod. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2523 |
]. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2524 |
aMethod isNative ifTrue: [ ^ self handleNativeMethod ]. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2525 |
args size ~~ aMethod javaNumArgs ifTrue: [ |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2526 |
self error: 'bad number of arguments' |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2527 |
]. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2528 |
aMethod isStatic ifTrue: [ argArray := args ] ifFalse: [ |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2529 |
argArray := OrderedCollection with: aReceiver. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2530 |
args ifNotNil: [ argArray addAll: args. ]. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2531 |
]. |
749 | 2532 |
numArgs := argArray size. |
2533 |
numVars := aMethod numVars. |
|
2534 |
method := aMethod. |
|
2535 |
context := JavaContext new: (numArgs + numVars + aMethod stackSize). |
|
2536 |
context setNumArgs: numArgs numVars: numVars. |
|
2537 |
receiver := aReceiver. |
|
2538 |
byteCode := aMethod byteCode. |
|
2539 |
constantPool := aMethod constantPool. |
|
2540 |
pc := 1. |
|
2541 |
wide := false. |
|
2542 |
self initializeContextArgsFrom: argArray. |
|
2543 |
self initializeContextVars. |
|
2544 |
sp := numArgs + numVars. |
|
2545 |
leaveProcessor := false. |
|
2546 |
self enterProcessingLoop. |
|
2547 |
^ retVal |
|
2548 |
||
2549 |
"Modified: / 24-02-2011 / 11:09:07 / Marcel Hlopko <hlopik@gmail.com>" |
|
2550 |
"Created: / 17-03-2011 / 17:25:31 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2551 |
"Modified: / 31-03-2011 / 16:38:05 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2552 |
"Modified: / 09-02-2012 / 22:51:38 / mh <hlopik@gmail.com>" |
749 | 2553 |
! |
2554 |
||
2555 |
switch: op |
|
2556 |
||
2557 |
self log: 'invoking ' , (OpSwitchTable at: op + 1) printString , '(' , op printString , ')'. |
|
2558 |
self perform: (OpSwitchTable at: op + 1) |
|
2559 |
||
2560 |
"Modified: / 17-03-2011 / 15:01:15 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2561 |
"Modified: / 22-03-2011 / 20:55:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2562 |
! ! |
|
2563 |
||
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
2564 |
|
749 | 2565 |
!JavaByteCodeProcessor class methodsFor:'documentation'! |
2566 |
||
2567 |
version |
|
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
2568 |
^ '$Header: /cvs/stx/stx/libjava/JavaByteCodeProcessor.st,v 1.5 2013-02-25 11:15:31 vrany Exp $' |
2190 | 2569 |
! |
2570 |
||
2571 |
version_CVS |
|
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
2572 |
^ '$Header: /cvs/stx/stx/libjava/JavaByteCodeProcessor.st,v 1.5 2013-02-25 11:15:31 vrany Exp $' |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2573 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2574 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2575 |
version_HG |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2576 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2577 |
^ '$Changeset: <not expanded> $' |
749 | 2578 |
! |
2579 |
||
2580 |
version_SVN |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2581 |
^ '§Id§' |
749 | 2582 |
! ! |
2583 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2290
diff
changeset
|
2584 |
|
2152 | 2585 |
JavaByteCodeProcessor initialize! |