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