author | Claus Gittinger <cg@exept.de> |
Fri, 22 Oct 2010 12:37:27 +0200 | |
changeset 2431 | 1e94ebcb9157 |
parent 2423 | 76872ad5c630 |
child 2751 | 12e5d1a3ef5a |
permissions | -rw-r--r-- |
0 | 1 |
" |
4 | 2 |
COPYRIGHT (c) 1991 by Claus Gittinger |
1796 | 3 |
All Rights Reserved |
0 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
1140 | 12 |
"{ Package: 'stx:libcomp' }" |
13 |
||
0 | 14 |
ByteCodeCompiler subclass:#Decompiler |
1800 | 15 |
instanceVariableNames:'hasLineNo bytes literals index listStream outputStream' |
16 |
classVariableNames:'' |
|
17 |
poolDictionaries:'' |
|
18 |
category:'System-Compiler' |
|
0 | 19 |
! |
20 |
||
378 | 21 |
!Decompiler class methodsFor:'documentation'! |
0 | 22 |
|
135
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
4
diff
changeset
|
23 |
copyright |
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
4
diff
changeset
|
24 |
" |
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
4
diff
changeset
|
25 |
COPYRIGHT (c) 1991 by Claus Gittinger |
1796 | 26 |
All Rights Reserved |
0 | 27 |
|
135
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
4
diff
changeset
|
28 |
This software is furnished under a license and may be used |
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
4
diff
changeset
|
29 |
only in accordance with the terms of that license and with the |
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
4
diff
changeset
|
30 |
inclusion of the above copyright notice. This software may not |
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
4
diff
changeset
|
31 |
be provided or otherwise made available to, or used by, any |
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
4
diff
changeset
|
32 |
other person. No title to or ownership of the software is |
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
4
diff
changeset
|
33 |
hereby transferred. |
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
4
diff
changeset
|
34 |
" |
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
4
diff
changeset
|
35 |
! |
0 | 36 |
|
135
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
4
diff
changeset
|
37 |
documentation |
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
4
diff
changeset
|
38 |
" |
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
4
diff
changeset
|
39 |
only for stx-debugging. Not for public eyes. |
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
4
diff
changeset
|
40 |
|
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
4
diff
changeset
|
41 |
Decompiler decompile:(someClass compiledMethodAt:#someSelector) |
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
4
diff
changeset
|
42 |
" |
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
4
diff
changeset
|
43 |
! ! |
0 | 44 |
|
378 | 45 |
!Decompiler class methodsFor:'decompiling'! |
0 | 46 |
|
47 |
decompile:aMethod |
|
1789 | 48 |
^ self decompile:aMethod to:Transcript |
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
49 |
|
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
50 |
" |
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
51 |
Decompiler decompile:(FileBrowser compiledMethodAt:#initialize) |
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
52 |
Decompiler decompile:(Decompiler compiledMethodAt:#decompile:to:) |
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
53 |
" |
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
54 |
|
1789 | 55 |
"Modified: / 06-08-2006 / 15:31:39 / cg" |
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
56 |
! |
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
57 |
|
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
58 |
decompile:aMethod to:aStream |
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
59 |
^ (self new) decompile:aMethod to:aStream |
0 | 60 |
|
61 |
"Decompiler decompile:(FileBrowser compiledMethodAt:#initialize)" |
|
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
62 |
|
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
63 |
"Created: 16.4.1996 / 20:25:55 / cg" |
0 | 64 |
! ! |
65 |
||
66 |
!Decompiler methodsFor:'decompiling'! |
|
67 |
||
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
68 |
decompile:aMethod to:aStream |
1800 | 69 |
|nBytes byte sym sel lineNr who method insnIndex1 insnIndex2 n nCol| |
206 | 70 |
|
1800 | 71 |
nCol := 7. |
532 | 72 |
listStream := nil. |
73 |
outputStream := aStream. |
|
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
74 |
|
384
92c963b7922b
handle decompilation of wrapped methods
Claus Gittinger <cg@exept.de>
parents:
378
diff
changeset
|
75 |
(method := aMethod) isNil ifTrue:[ |
278 | 76 |
aStream showCR:'nil method'. |
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
77 |
^ self |
206 | 78 |
]. |
2431 | 79 |
method := method originalMethodIfWrapped. |
206 | 80 |
|
1360 | 81 |
aStream cr. |
82 |
aStream show:'decompiling '. |
|
83 |
||
2423 | 84 |
method isMethod ifTrue:[ |
85 |
who := method who. |
|
86 |
who notNil ifTrue:[ |
|
87 |
classToCompileFor := who at:1. |
|
88 |
aStream showCR:(classToCompileFor name , '>>' , (who at:2)). |
|
89 |
] |
|
206 | 90 |
]. |
1360 | 91 |
aStream show:('nA: ' , method numArgs printString). |
92 |
aStream show:(' nV: ' , method numVars printString). |
|
93 |
aStream show:(' nT: ' , method stackSize printString). |
|
94 |
aStream cr. |
|
95 |
aStream cr. |
|
206 | 96 |
|
384
92c963b7922b
handle decompilation of wrapped methods
Claus Gittinger <cg@exept.de>
parents:
378
diff
changeset
|
97 |
bytes := method byteCode. |
206 | 98 |
bytes isNil ifTrue:[ |
740 | 99 |
method isLazyMethod ifTrue:[ |
100 |
method := method asExecutableMethod. |
|
101 |
bytes := method byteCode. |
|
102 |
aStream showCR:'(lazyMethod; showing resulting code when compiled on first invokation)'. |
|
103 |
aStream cr. |
|
104 |
]. |
|
105 |
]. |
|
106 |
bytes isNil ifTrue:[ |
|
278 | 107 |
aStream showCR:'no bytecode'. |
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
108 |
^ self |
206 | 109 |
]. |
384
92c963b7922b
handle decompilation of wrapped methods
Claus Gittinger <cg@exept.de>
parents:
378
diff
changeset
|
110 |
literals := method literals. |
206 | 111 |
index := 1. |
112 |
nBytes := bytes size. |
|
113 |
[index <= nBytes] whileTrue:[ |
|
532 | 114 |
listStream := '' writeStream. |
115 |
||
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
116 |
self showPC. |
532 | 117 |
insnIndex1 := index. |
118 |
||
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
119 |
sym := self symbolicCodeFor:(bytes at:index). |
532 | 120 |
listStream show:sym. |
206 | 121 |
" |
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
122 |
extra notNil ifTrue:[Transcript show:(extra printString)]. |
206 | 123 |
" |
347
c41b9c9c0e50
oops - sendWIDTH & sendHEIGHT have lineNumber info
Claus Gittinger <cg@exept.de>
parents:
344
diff
changeset
|
124 |
index := index + 1. |
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
125 |
hasLineNo ifTrue:[ |
347
c41b9c9c0e50
oops - sendWIDTH & sendHEIGHT have lineNumber info
Claus Gittinger <cg@exept.de>
parents:
344
diff
changeset
|
126 |
lineNr := bytes at:index. |
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
127 |
index := index + 1. |
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
128 |
] ifFalse:[ |
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
129 |
lineNr := nil |
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
130 |
]. |
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
131 |
extra notNil ifTrue:[ |
532 | 132 |
listStream show:' '. |
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
133 |
byte := bytes at:index. |
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
134 |
|
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
135 |
"compute argument showXXX selector from extra ..." |
206 | 136 |
|
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
137 |
sel := 'show' , extra , ':'. |
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
138 |
sel at:5 put:(sel at:5) asUppercase. |
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
139 |
self perform:sel asSymbol with:byte |
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
140 |
]. |
532 | 141 |
insnIndex2 := index-1. |
142 |
||
143 |
insnIndex1 to:insnIndex2 do:[:i | |
|
144 |
outputStream show:((bytes at:i) printStringRadix:16 size:2 fill:$0). |
|
145 |
outputStream show:' '. |
|
146 |
]. |
|
147 |
n := (insnIndex2-insnIndex1) * 3. |
|
1800 | 148 |
outputStream spaces:(nCol*3 - n). |
532 | 149 |
outputStream show:(listStream contents). |
150 |
||
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
151 |
lineNr notNil ifTrue:[ |
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
152 |
aStream show:'['; show:lineNr; show:']' |
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
153 |
]. |
278 | 154 |
aStream showCR:'' |
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
155 |
] |
206 | 156 |
|
1789 | 157 |
"Created: / 16-04-1996 / 20:27:18 / cg" |
2431 | 158 |
"Modified: / 22-10-2010 / 11:48:15 / cg" |
0 | 159 |
! |
160 |
||
217 | 161 |
showAbsOffset:byte |
162 |
|offs b2| |
|
163 |
||
164 |
index := index + 1. |
|
165 |
b2 := (bytes at:index). |
|
166 |
offs := byte + (b2 bitShift:8). |
|
167 |
index := index + 1. |
|
293 | 168 |
listStream show:offs printString. |
169 |
listStream show:' ('. |
|
170 |
listStream show:offs printString. |
|
171 |
listStream show:')' |
|
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
172 |
|
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
173 |
"Modified: 16.4.1996 / 20:27:53 / cg" |
217 | 174 |
! |
175 |
||
176 |
showAbsOffsetLevel:byte |
|
177 |
|offs b2| |
|
178 |
||
179 |
index := index + 1. |
|
180 |
b2 := (bytes at:index). |
|
181 |
offs := byte + (b2 bitShift:8). |
|
182 |
index := index + 1. |
|
293 | 183 |
listStream show:offs printString. |
184 |
listStream show:' ('. |
|
185 |
listStream show:offs printString. |
|
186 |
listStream show:')'. |
|
217 | 187 |
self showNvarNargsAt:index. |
188 |
index := index + 2 |
|
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
189 |
|
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
190 |
"Modified: 16.4.1996 / 20:27:57 / cg" |
217 | 191 |
! |
192 |
||
1793 | 193 |
showExtraOp:op |
194 |
"/ listStream show:(op printString); show:' '. |
|
195 |
||
1800 | 196 |
index := index + 1. |
1793 | 197 |
op == 0 ifTrue:[ |
1800 | 198 |
listStream show:'SEND_VL '. |
199 |
self showLineNo:(bytes at:index). |
|
200 |
listStream show:' nargs:' , (bytes at:index) printString; show:' '. |
|
201 |
index := index + 1. |
|
202 |
self showLiteral32:0. |
|
203 |
^ self. |
|
1793 | 204 |
]. |
205 |
op == 1 ifTrue:[ |
|
1800 | 206 |
listStream show:'SUPERSEND_VL '. |
207 |
self showLineNo:(bytes at:index). |
|
208 |
listStream show:' nargs:' , (bytes at:index) printString; show:' '. |
|
209 |
index := index + 1. |
|
210 |
self showLiteral32:0. |
|
211 |
self showLiteral32:0. |
|
212 |
^ self. |
|
1793 | 213 |
]. |
214 |
op == 2 ifTrue:[ |
|
215 |
listStream show:'PUSH_VL_LIT '. |
|
216 |
self showLiteral32:0. |
|
217 |
^ self. |
|
218 |
]. |
|
2128
3cdbf4f6704f
Change #halt: to #shouldImplement or #assert:
Stefan Vogel <sv@exept.de>
parents:
1826
diff
changeset
|
219 |
self shouldImplement. |
1793 | 220 |
op == 3 ifTrue:[ |
221 |
]. |
|
222 |
op == 4 ifTrue:[ |
|
223 |
]. |
|
224 |
! |
|
225 |
||
217 | 226 |
showIndex:byte |
293 | 227 |
listStream show:byte printString. |
217 | 228 |
index := index + 1 |
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
229 |
|
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
230 |
"Modified: 16.4.1996 / 20:27:59 / cg" |
217 | 231 |
! |
232 |
||
233 |
showIndexLevel:byte |
|
234 |
self showIndex:byte. |
|
235 |
self showNvarNargsAt:index. |
|
236 |
index := index + 2 |
|
237 |
! |
|
238 |
||
239 |
showInstvarIndex:byte |
|
293 | 240 |
listStream show:byte printString. |
217 | 241 |
classToCompileFor notNil ifTrue:[ |
293 | 242 |
listStream show:'('. |
763 | 243 |
listStream show:(classToCompileFor allInstVarNames at:byte ifAbsent:'???? [' , byte printString ,']'). |
293 | 244 |
listStream show:')'. |
217 | 245 |
]. |
246 |
index := index + 1 |
|
247 |
||
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
248 |
"Modified: 16.4.1996 / 20:28:06 / cg" |
217 | 249 |
! |
250 |
||
251 |
showLevelIndex:byte |
|
1148 | 252 |
|lvl idx| |
253 |
||
254 |
lvl := byte. |
|
255 |
index := index + 1. |
|
256 |
idx := bytes at:index. |
|
257 |
||
258 |
listStream show:idx printString. |
|
217 | 259 |
index := index + 1. |
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
260 |
|
1148 | 261 |
listStream show:' lvl: '; show:lvl printString. |
217 | 262 |
! |
263 |
||
264 |
showLineNo:byte |
|
293 | 265 |
listStream show:' line:' , byte printString. |
217 | 266 |
index := index + 1 |
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
267 |
|
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
268 |
"Modified: 16.4.1996 / 20:28:10 / cg" |
217 | 269 |
! |
270 |
||
271 |
showLit1:ignored |
|
272 |
self showLit:1 |
|
273 |
! |
|
274 |
||
275 |
showLit2:ignored |
|
276 |
self showLit:2 |
|
277 |
! |
|
278 |
||
279 |
showLit3:ignored |
|
280 |
self showLit:3 |
|
281 |
! |
|
282 |
||
283 |
showLit4:ignored |
|
284 |
self showLit:4 |
|
285 |
! |
|
286 |
||
287 |
showLit5:ignored |
|
288 |
self showLit:5 |
|
289 |
! |
|
290 |
||
291 |
showLit6:ignored |
|
292 |
self showLit:6 |
|
293 |
! |
|
294 |
||
295 |
showLit7:ignored |
|
296 |
self showLit:7 |
|
297 |
! |
|
298 |
||
299 |
showLit8:ignored |
|
300 |
self showLit:8 |
|
301 |
! |
|
302 |
||
303 |
showLit9:ignored |
|
304 |
self showLit:9 |
|
305 |
! |
|
306 |
||
307 |
showLit:litIndex |
|
308 |
|lit| |
|
309 |
||
573 | 310 |
lit := literals at:litIndex ifAbsent:'*** badIndex ***'. |
217 | 311 |
lit isBehavior ifTrue:[ |
293 | 312 |
listStream show:lit name |
217 | 313 |
] ifFalse:[ |
378 | 314 |
lit isBlock ifTrue:[ |
315 |
listStream show:'[a block]' |
|
316 |
] ifFalse:[ |
|
1796 | 317 |
(lit isNumber or:[lit isString or:[lit isSymbol]]) ifTrue:[ |
318 |
listStream show:lit storeString |
|
319 |
] ifFalse:[ |
|
320 |
listStream show:'{', lit printString , '}' |
|
321 |
] |
|
378 | 322 |
] |
217 | 323 |
] |
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
324 |
|
1796 | 325 |
"Modified: / 08-08-2006 / 00:45:46 / cg" |
217 | 326 |
! |
327 |
||
328 |
showLiteral16:byte |
|
329 |
|litIndex| |
|
330 |
||
331 |
litIndex := bytes wordAt:index MSB:false. |
|
332 |
self showLit:litIndex. |
|
333 |
index := index + 2 |
|
334 |
! |
|
335 |
||
1793 | 336 |
showLiteral32:byte |
337 |
|litIndex| |
|
338 |
||
339 |
litIndex := bytes doubleWordAt:index MSB:false. |
|
340 |
self showLit:litIndex. |
|
341 |
index := index + 4 |
|
342 |
! |
|
343 |
||
217 | 344 |
showLiteral:byte |
345 |
index := index + 1. |
|
346 |
self showLit:byte |
|
347 |
! |
|
348 |
||
349 |
showLiteralAt:index |
|
350 |
|offs| |
|
351 |
||
352 |
offs := bytes at:index. |
|
353 |
self showLit:offs |
|
354 |
! |
|
355 |
||
356 |
showLongOffset:byte |
|
357 |
|offs| |
|
358 |
||
359 |
index := index + 1. |
|
360 |
(byte > 127) ifTrue:[ |
|
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
361 |
offs := byte - 256 - 128 |
217 | 362 |
] ifFalse:[ |
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
363 |
offs := byte + 128 |
217 | 364 |
]. |
293 | 365 |
listStream show:offs printString. |
366 |
listStream show:' ('. |
|
367 |
listStream show:(index + offs) printString. |
|
368 |
listStream show:')' |
|
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
369 |
|
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
370 |
"Modified: 16.4.1996 / 20:28:30 / cg" |
217 | 371 |
! |
372 |
||
373 |
showLongOffsetLevel:byte |
|
374 |
self showLongOffset:byte. |
|
375 |
self showNvarNargsAt:index. |
|
376 |
index := index + 2 |
|
377 |
! |
|
378 |
||
379 |
showLsendArgs:byte |
|
380 |
|litIndex| |
|
381 |
||
293 | 382 |
listStream show:byte printString. |
383 |
listStream show:' '. |
|
217 | 384 |
index := index + 1. |
385 |
litIndex := bytes wordAt:index MSB:false. |
|
293 | 386 |
listStream show:(literals at:litIndex) printString. |
217 | 387 |
index := index + 2 |
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
388 |
|
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
389 |
"Modified: 16.4.1996 / 20:28:35 / cg" |
217 | 390 |
! |
391 |
||
1141 | 392 |
showLsuperSendArgs:byte |
393 |
|litIndex| |
|
394 |
||
395 |
listStream show:byte printString. |
|
396 |
listStream show:' '. |
|
397 |
index := index + 1. |
|
398 |
litIndex := bytes wordAt:index MSB:false. |
|
399 |
listStream show:(literals at:litIndex) printString. |
|
400 |
index := index + 2. |
|
401 |
||
402 |
litIndex := bytes wordAt:index MSB:false. |
|
403 |
listStream show:(literals at:litIndex) printString. |
|
404 |
index := index + 2 |
|
405 |
! |
|
406 |
||
217 | 407 |
showNumber16:byte |
293 | 408 |
listStream show:(bytes signedWordAt:index MSB:false) printString. |
217 | 409 |
index := index + 2 |
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
410 |
|
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
411 |
"Modified: 16.4.1996 / 20:28:37 / cg" |
217 | 412 |
! |
413 |
||
414 |
showNumber:byte |
|
767 | 415 |
listStream show:byte signExtendedByteValue printString. |
217 | 416 |
index := index + 1 |
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
417 |
|
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
418 |
"Modified: 16.4.1996 / 20:28:38 / cg" |
217 | 419 |
! |
420 |
||
421 |
showNvarNargsAt:index |
|
293 | 422 |
listStream show:' nv='. |
423 |
listStream show:(bytes at:index) printString. |
|
424 |
listStream show:' na='. |
|
425 |
listStream show:(bytes at:(index + 1)) printString |
|
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
426 |
|
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
427 |
"Modified: 16.4.1996 / 20:28:40 / cg" |
217 | 428 |
! |
429 |
||
430 |
showOffset:byte |
|
431 |
|offs| |
|
432 |
||
433 |
index := index + 1. |
|
434 |
(byte > 127) ifTrue:[ |
|
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
435 |
offs := byte - 256 |
217 | 436 |
] ifFalse:[ |
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
437 |
offs := byte |
217 | 438 |
]. |
293 | 439 |
listStream show:(offs printString). |
440 |
listStream show:' ('. |
|
441 |
listStream show:(index + offs) printString. |
|
442 |
listStream show:')' |
|
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
443 |
|
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
444 |
"Modified: 16.4.1996 / 20:28:43 / cg" |
217 | 445 |
! |
446 |
||
447 |
showOffsetLevel:byte |
|
448 |
self showOffset:byte. |
|
449 |
self showNvarNargsAt:index. |
|
450 |
index := index + 2 |
|
451 |
! |
|
452 |
||
453 |
showPC |
|
532 | 454 |
outputStream show:(index printStringRadix:10 size:3 fill:(Character space)). |
455 |
outputStream show:': '. |
|
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
456 |
|
532 | 457 |
"Modified: 4.6.1997 / 12:07:33 / cg" |
217 | 458 |
! |
459 |
||
460 |
showSendArgs:byte |
|
293 | 461 |
listStream show:byte printString. |
462 |
listStream show:' '. |
|
217 | 463 |
index := index + 1. |
464 |
self showLiteralAt:index. |
|
465 |
index := index + 1 |
|
466 |
||
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
467 |
"Modified: 16.4.1996 / 20:28:50 / cg" |
217 | 468 |
! |
469 |
||
246
abf09d4821fe
new code for faster global pushes
Claus Gittinger <cg@exept.de>
parents:
217
diff
changeset
|
470 |
showSpecialGlobal:byte |
abf09d4821fe
new code for faster global pushes
Claus Gittinger <cg@exept.de>
parents:
217
diff
changeset
|
471 |
|specialIndex| |
abf09d4821fe
new code for faster global pushes
Claus Gittinger <cg@exept.de>
parents:
217
diff
changeset
|
472 |
|
abf09d4821fe
new code for faster global pushes
Claus Gittinger <cg@exept.de>
parents:
217
diff
changeset
|
473 |
specialIndex := bytes at:index. |
abf09d4821fe
new code for faster global pushes
Claus Gittinger <cg@exept.de>
parents:
217
diff
changeset
|
474 |
index := index + 1. |
293 | 475 |
"/ listStream show:specialIndex printString. |
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
476 |
|
532 | 477 |
listStream |
478 |
show:((self specialGlobals) at:specialIndex + 1) |
|
479 |
||
480 |
"Modified: 4.6.1997 / 12:18:45 / cg" |
|
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
481 |
! |
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
482 |
|
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
483 |
showSpecialSend:byte |
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
484 |
|specialIndex| |
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
485 |
|
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
486 |
specialIndex := bytes at:index. |
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
487 |
index := index + 1. |
293 | 488 |
"/ listStream show:specialIndex printString. |
489 |
listStream show:'#'. |
|
532 | 490 |
listStream show:((self specialSends) at:specialIndex + 1) |
401 | 491 |
|
532 | 492 |
"Modified: 4.6.1997 / 12:34:01 / cg" |
246
abf09d4821fe
new code for faster global pushes
Claus Gittinger <cg@exept.de>
parents:
217
diff
changeset
|
493 |
! |
abf09d4821fe
new code for faster global pushes
Claus Gittinger <cg@exept.de>
parents:
217
diff
changeset
|
494 |
|
217 | 495 |
showSuperSendArgs:byte |
293 | 496 |
listStream show:byte printString. |
497 |
listStream show:' '. |
|
217 | 498 |
index := index + 1. |
499 |
self showLiteralAt:index. |
|
500 |
index := index + 1. |
|
293 | 501 |
listStream show:' '. |
217 | 502 |
self showLiteralAt:index. |
503 |
index := index + 1 |
|
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
504 |
|
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
505 |
"Modified: 16.4.1996 / 20:28:58 / cg" |
217 | 506 |
! |
507 |
||
508 |
showVeryLongOffset:byte |
|
509 |
|offs| |
|
510 |
||
511 |
index := index + 1. |
|
512 |
(byte > 127) ifTrue:[ |
|
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
513 |
offs := byte - 256 - 256 |
217 | 514 |
] ifFalse:[ |
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
515 |
offs := byte + 256 |
217 | 516 |
]. |
293 | 517 |
listStream show:offs printString. |
518 |
listStream show:' ('. |
|
519 |
listStream show:(index + offs) printString. |
|
520 |
listStream show:')' |
|
250
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
521 |
|
6c26bc3fb154
allow decompile onto a stream
Claus Gittinger <cg@exept.de>
parents:
246
diff
changeset
|
522 |
"Modified: 16.4.1996 / 20:29:00 / cg" |
217 | 523 |
! |
524 |
||
525 |
showVeryLongOffsetLevel:byte |
|
526 |
self showVeryLongOffset:byte. |
|
527 |
self showNvarNargsAt:index. |
|
528 |
index := index + 2 |
|
529 |
! |
|
530 |
||
0 | 531 |
symbolicCodeFor:aByte |
401 | 532 |
|syms extras lnos sym| |
0 | 533 |
|
534 |
syms := #( retTop " 0 " |
|
342 | 535 |
retNil |
536 |
retTrue |
|
537 |
retFalse |
|
538 |
ret0 |
|
539 |
retSelf " 5 " |
|
551 | 540 |
over |
344 | 541 |
homeRetTop |
342 | 542 |
LINE |
543 |
nil |
|
544 |
pushNil " 10 " |
|
545 |
pushTrue |
|
546 |
pushFalse |
|
547 |
sendSelf |
|
548 |
pushLit |
|
549 |
pushSelf " 15 " |
|
550 |
pushNum |
|
551 |
pushNum16 |
|
552 |
drop |
|
553 |
send |
|
554 |
superSend " 20 " |
|
555 |
send0 |
|
556 |
send1 |
|
557 |
send2 |
|
558 |
send3 |
|
559 |
sendDrop " 25 " |
|
560 |
sendDrop0 |
|
561 |
sendDrop1 |
|
562 |
sendDrop2 |
|
563 |
sendDrop3 |
|
564 |
pushMethodArg " 30 " |
|
565 |
pushMethodVar |
|
566 |
pushBlockArg |
|
567 |
pushBlockVar |
|
568 |
pushInstVar |
|
569 |
pushClassVar " 35 " |
|
570 |
pushGlobal |
|
571 |
storeMethodVar |
|
572 |
storeBlockVar |
|
573 |
storeInstVar |
|
574 |
storeClassVar " 40 " |
|
356
bb3beb18de1f
6empty slots in GLOBL/CLASSVAR bytecodes removed
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
575 |
storeGlobal |
342 | 576 |
pushOuterBlockArg |
577 |
pushOuter1BlockArg |
|
578 |
pushOuter2BlockArg |
|
579 |
equal " 45 " |
|
580 |
notEqual |
|
581 |
dup |
|
582 |
equal0 |
|
583 |
notEqual0 |
|
584 |
falseJump " 50 " |
|
585 |
trueJump |
|
586 |
nilJump |
|
587 |
notNilJump |
|
588 |
jump |
|
589 |
makeBlock " 55 " |
|
590 |
zeroJump |
|
591 |
notZeroJump |
|
592 |
eqJump |
|
593 |
notEqJump |
|
594 |
falseJump " 60 " |
|
595 |
trueJump |
|
596 |
nilJump |
|
597 |
notNilJump |
|
598 |
jump |
|
599 |
makeBlock " 65 " |
|
600 |
zeroJump |
|
601 |
notZeroJump |
|
602 |
eqJump |
|
603 |
notEqJump |
|
604 |
falseJump " 70 " |
|
605 |
trueJump |
|
606 |
nilJump |
|
607 |
notNilJump |
|
608 |
jump |
|
609 |
makeBlock " 75 " |
|
610 |
zeroJump |
|
611 |
notZeroJump |
|
612 |
eqJump |
|
613 |
notEqJump |
|
614 |
pushMethodVar1 " 80 " |
|
615 |
pushMethodVar2 |
|
616 |
pushMethodVar3 |
|
617 |
pushMethodVar4 |
|
618 |
pushMethodVar5 |
|
619 |
pushMethodVar6 " 85 " |
|
620 |
pushMethodArg1 |
|
621 |
pushMethodArg2 |
|
622 |
pushMethodArg3 |
|
623 |
pushMethodArg4 |
|
624 |
pushInstVar1 " 90 " |
|
625 |
pushInstVar2 |
|
626 |
pushInstVar3 |
|
627 |
pushInstVar4 |
|
628 |
pushInstVar5 |
|
629 |
pushInstVar6 " 95 " |
|
630 |
pushInstVar7 |
|
631 |
pushInstVar8 |
|
632 |
pushInstVar9 |
|
633 |
pushInstVar10 |
|
634 |
storeMethodVar1 " 100 " |
|
635 |
storeMethodVar2 |
|
636 |
storeMethodVar3 |
|
637 |
storeMethodVar4 |
|
638 |
storeMethodVar5 |
|
639 |
storeMethodVar6 " 105 " |
|
401 | 640 |
nil |
641 |
nil |
|
642 |
nil |
|
643 |
nil |
|
342 | 644 |
storeInstVar1 " 110 " |
645 |
storeInstVar2 |
|
646 |
storeInstVar3 |
|
647 |
storeInstVar4 |
|
648 |
storeInstVar5 |
|
649 |
storeInstVar6 " 115 " |
|
650 |
storeInstVar7 |
|
651 |
storeInstVar8 |
|
652 |
storeInstVar9 |
|
653 |
storeInstVar10 |
|
654 |
push0 " 120 " |
|
655 |
push1 |
|
656 |
pushMinus1 |
|
657 |
sendPlus1 |
|
658 |
sendMinus1 |
|
659 |
incMethodVar " 125 " |
|
660 |
decMethodVar |
|
661 |
retNum |
|
662 |
pushOuterBlockVar "16r80" |
|
663 |
storeOuterBlockVar |
|
655 | 664 |
'send1 #=' " 130 " |
665 |
'send1 #+' |
|
666 |
'send1 #~=' |
|
667 |
'send1 #-' |
|
668 |
'send0 #class' |
|
669 |
'send1 #at:' " 135 " |
|
670 |
'send2 #at:put:' |
|
671 |
'send1 #bitAnd:' |
|
672 |
'send1 #bitOr:' |
|
342 | 673 |
push2 |
674 |
pushBlockArg1 " 140 " |
|
675 |
pushBlockArg2 |
|
676 |
pushBlockArg3 |
|
677 |
pushBlockArg4 |
|
678 |
pushContext "16r90" |
|
655 | 679 |
'send1 #>' " 145 " |
680 |
'send1 #>=' |
|
681 |
'send1 #<' |
|
682 |
'send1 #<=' |
|
401 | 683 |
nil |
684 |
nil " 150 " |
|
655 | 685 |
'send0 #value' |
686 |
'send1 #value:' |
|
687 |
'send0 #size' |
|
401 | 688 |
nil |
689 |
nil " 155 " |
|
342 | 690 |
make0Block |
691 |
makeNILBlock |
|
401 | 692 |
nil " 158 " |
693 |
nil " 159 " |
|
342 | 694 |
retMvar1 " 160 " "16rA0" |
695 |
retMvar2 |
|
696 |
retMvar3 |
|
697 |
retMvar4 |
|
698 |
retMvar5 |
|
699 |
retMvar6 " 165 " |
|
700 |
retIvar1 |
|
701 |
retIvar2 |
|
702 |
retIvar3 |
|
703 |
retIvar4 |
|
704 |
retIvar5 " 170 " |
|
705 |
retIvar6 |
|
706 |
retIvar7 |
|
707 |
retIvar8 |
|
708 |
retMarg1 |
|
709 |
retMarg2 " 175 " |
|
710 |
pushClassInstVar |
|
711 |
storeClassInstVar |
|
1140 | 712 |
'send2 #value:value:' |
342 | 713 |
not |
714 |
sendSelf0 " 180 " |
|
715 |
sendSelf1 |
|
716 |
sendSelf2 |
|
717 |
sendSelf3 |
|
718 |
sendSelfDrop0 |
|
719 |
sendSelfDrop1 " 185 " |
|
720 |
sendSelfDrop2 |
|
721 |
sendSelfDrop3 |
|
722 |
isNil |
|
723 |
notNil |
|
724 |
falseJumpAbs " 190 " |
|
725 |
trueJumpAbs |
|
726 |
nilJumpAbs |
|
727 |
notNilJumpAbs |
|
728 |
jumpAbs |
|
729 |
makeBlockAbs " 195 " |
|
730 |
zeroJumpAbs |
|
731 |
notZeroJumpAbs |
|
732 |
eqJumpAbs |
|
733 |
notEqJumpAbs " 199 " |
|
734 |
pushGlobal " 200 " |
|
735 |
pushLLit |
|
736 |
jmpFalseL |
|
737 |
jmpTrueL |
|
1793 | 738 |
vl_op |
342 | 739 |
lsend " 205 " |
740 |
lsuperSend |
|
741 |
lsendSelf |
|
742 |
pushGT0 |
|
743 |
nil |
|
744 |
sendArrayNew " 210 " |
|
655 | 745 |
'send0 #basicNew' |
342 | 746 |
sendGT0 |
655 | 747 |
'send0 #new' |
342 | 748 |
sendBasicNewN |
749 |
sendNewN " 215 " |
|
750 |
sendLogAnd |
|
751 |
sendLogOr |
|
752 |
pushGlobL |
|
753 |
storeGlobL |
|
754 |
nil " 220 " |
|
755 |
nil |
|
756 |
pushLit1 |
|
757 |
pushLit2 |
|
758 |
pushLit3 |
|
759 |
pushLit4 |
|
760 |
pushLit5 |
|
761 |
pushLit6 |
|
762 |
pushLit7 |
|
763 |
pushLit8 |
|
655 | 764 |
'send1 #*' " 230 " |
342 | 765 |
sendSpecial " 231 " |
766 |
pushBlockVar1 |
|
767 |
pushBlockVar2 |
|
768 |
pushBlockVar3 |
|
769 |
storeBlockVar1 |
|
770 |
storeBlockVar2 |
|
771 |
storeBlockVar3 |
|
772 |
refCheck |
|
773 |
pushLocal |
|
774 |
storeLocal " 240 " |
|
775 |
). |
|
0 | 776 |
|
777 |
lnos := #( false " 0 " |
|
342 | 778 |
false |
779 |
false |
|
780 |
false |
|
781 |
false |
|
782 |
false " 5 " |
|
783 |
false |
|
784 |
false |
|
785 |
true |
|
786 |
false |
|
787 |
false " 10 " |
|
788 |
false |
|
789 |
false |
|
790 |
true |
|
791 |
false |
|
792 |
false " 15 " |
|
793 |
false |
|
794 |
false |
|
795 |
false |
|
796 |
true |
|
797 |
true " 20 " |
|
798 |
true |
|
799 |
true |
|
800 |
true |
|
801 |
true |
|
802 |
true " 25 " |
|
803 |
true |
|
804 |
true |
|
805 |
true |
|
806 |
true |
|
807 |
false " 30 " |
|
808 |
false |
|
809 |
false |
|
810 |
false |
|
811 |
false |
|
812 |
false " 35 " |
|
813 |
false |
|
814 |
false |
|
815 |
false |
|
816 |
false |
|
817 |
false " 40 " |
|
818 |
false |
|
819 |
false |
|
820 |
false |
|
821 |
false |
|
822 |
false " 45 " |
|
823 |
false |
|
824 |
false |
|
825 |
false |
|
826 |
false |
|
827 |
false " 50 " |
|
828 |
false |
|
829 |
false |
|
830 |
false |
|
831 |
false |
|
832 |
false " 55 " |
|
833 |
false |
|
834 |
false |
|
835 |
false |
|
836 |
false |
|
837 |
false " 60 " |
|
838 |
false |
|
839 |
false |
|
840 |
false |
|
841 |
false |
|
842 |
false " 65 " |
|
843 |
false |
|
844 |
false |
|
845 |
false |
|
846 |
false |
|
847 |
false " 70 " |
|
848 |
false |
|
849 |
false |
|
850 |
false |
|
851 |
false |
|
852 |
false " 75 " |
|
853 |
false |
|
854 |
false |
|
855 |
false |
|
856 |
false |
|
857 |
false " 80 " |
|
858 |
false |
|
859 |
false |
|
860 |
false |
|
861 |
false |
|
862 |
false " 85 " |
|
863 |
false |
|
864 |
false |
|
865 |
false |
|
866 |
false |
|
867 |
false " 90 " |
|
868 |
false |
|
869 |
false |
|
870 |
false |
|
871 |
false |
|
872 |
false " 95 " |
|
873 |
false |
|
874 |
false |
|
875 |
false |
|
876 |
false |
|
877 |
false " 100 " |
|
878 |
false |
|
879 |
false |
|
880 |
false |
|
881 |
false |
|
882 |
false " 105 " |
|
347
c41b9c9c0e50
oops - sendWIDTH & sendHEIGHT have lineNumber info
Claus Gittinger <cg@exept.de>
parents:
344
diff
changeset
|
883 |
true |
c41b9c9c0e50
oops - sendWIDTH & sendHEIGHT have lineNumber info
Claus Gittinger <cg@exept.de>
parents:
344
diff
changeset
|
884 |
true |
c41b9c9c0e50
oops - sendWIDTH & sendHEIGHT have lineNumber info
Claus Gittinger <cg@exept.de>
parents:
344
diff
changeset
|
885 |
true |
c41b9c9c0e50
oops - sendWIDTH & sendHEIGHT have lineNumber info
Claus Gittinger <cg@exept.de>
parents:
344
diff
changeset
|
886 |
true |
342 | 887 |
false " 110 " |
888 |
false |
|
889 |
false |
|
890 |
false |
|
891 |
false |
|
892 |
false " 115 " |
|
893 |
false |
|
894 |
false |
|
895 |
false |
|
896 |
false |
|
897 |
false " 120 " |
|
898 |
false |
|
899 |
false |
|
900 |
true |
|
901 |
true |
|
902 |
true " 125 " |
|
903 |
true |
|
904 |
false |
|
1148 | 905 |
false "/ 128 pushOuterBlockVar |
342 | 906 |
false |
907 |
true " 130 " |
|
908 |
true |
|
909 |
true |
|
910 |
true |
|
911 |
false |
|
912 |
true " 135 " |
|
913 |
true |
|
914 |
true |
|
915 |
true |
|
916 |
false |
|
917 |
false " 140 " |
|
918 |
false |
|
919 |
false |
|
920 |
false |
|
921 |
false |
|
922 |
true " 145 " |
|
923 |
true |
|
924 |
true |
|
925 |
true |
|
926 |
true |
|
927 |
true " 150 " |
|
928 |
true |
|
929 |
true |
|
930 |
true |
|
931 |
true |
|
932 |
true " 155 " |
|
933 |
false |
|
934 |
false |
|
935 |
true |
|
936 |
true |
|
937 |
false " 160 " |
|
938 |
false |
|
939 |
false |
|
940 |
false |
|
941 |
false |
|
942 |
false " 165 " |
|
943 |
false |
|
944 |
false |
|
945 |
false |
|
946 |
false |
|
947 |
false " 170 " |
|
948 |
false |
|
949 |
false |
|
950 |
false |
|
951 |
false |
|
952 |
false " 175 " |
|
953 |
false |
|
954 |
false |
|
1140 | 955 |
true |
342 | 956 |
true |
957 |
true " 180 " |
|
958 |
true |
|
959 |
true |
|
960 |
true |
|
961 |
true |
|
962 |
true " 185 " |
|
963 |
true |
|
964 |
true |
|
965 |
false |
|
966 |
false |
|
967 |
false " 190 " |
|
968 |
false |
|
969 |
false |
|
970 |
false |
|
971 |
false |
|
972 |
false " 195 " |
|
973 |
false |
|
974 |
false |
|
975 |
false |
|
976 |
false " 199 " |
|
977 |
false " 200 " |
|
978 |
false |
|
979 |
false |
|
980 |
false |
|
981 |
false |
|
982 |
true " 205 " |
|
983 |
true |
|
1258 | 984 |
true |
342 | 985 |
true |
986 |
false |
|
987 |
false " 210 " " arrayNew " |
|
988 |
true " basicNew " |
|
989 |
true " > 0 " |
|
990 |
true " new " |
|
991 |
true " basicNew: " |
|
992 |
true " 215 " " new: " |
|
993 |
true |
|
994 |
true |
|
995 |
false |
|
996 |
false |
|
997 |
false " 220 " |
|
998 |
false |
|
999 |
false |
|
1000 |
false |
|
1001 |
false |
|
1002 |
false " 225 " |
|
1003 |
false |
|
1004 |
false |
|
1005 |
false |
|
1006 |
false " 229 " |
|
1007 |
true " 230 " |
|
1008 |
true " 231 " |
|
1009 |
false |
|
1010 |
false |
|
1011 |
false |
|
1012 |
false |
|
1013 |
false |
|
1014 |
false |
|
1015 |
false |
|
1016 |
false |
|
1017 |
false " 240 " |
|
1018 |
). |
|
0 | 1019 |
|
1020 |
extras := #(nil " 0 " |
|
342 | 1021 |
nil |
1022 |
nil |
|
1023 |
nil |
|
1024 |
nil |
|
1025 |
nil " 5 " |
|
1026 |
nil |
|
1027 |
nil |
|
1028 |
nil |
|
1029 |
nil |
|
1030 |
nil " 10 " |
|
1031 |
nil |
|
1032 |
nil |
|
1033 |
sendArgs |
|
1034 |
literal |
|
1035 |
nil " 15 " |
|
1036 |
number |
|
1037 |
number16 |
|
1038 |
nil |
|
1039 |
sendArgs |
|
1040 |
superSendArgs " 20 " |
|
1041 |
literal |
|
1042 |
literal |
|
1043 |
literal |
|
1044 |
literal |
|
1045 |
sendArgs " 25 " |
|
1046 |
literal |
|
1047 |
literal |
|
1048 |
literal |
|
1049 |
literal |
|
1050 |
index " 30 " |
|
1051 |
index |
|
1052 |
index |
|
1053 |
index |
|
1054 |
instvarIndex |
|
356
bb3beb18de1f
6empty slots in GLOBL/CLASSVAR bytecodes removed
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1055 |
literal " 35 " |
bb3beb18de1f
6empty slots in GLOBL/CLASSVAR bytecodes removed
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1056 |
literal |
342 | 1057 |
index |
1058 |
index |
|
1059 |
instvarIndex |
|
356
bb3beb18de1f
6empty slots in GLOBL/CLASSVAR bytecodes removed
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1060 |
literal " 40 " |
bb3beb18de1f
6empty slots in GLOBL/CLASSVAR bytecodes removed
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1061 |
literal |
573 | 1062 |
levelIndex |
342 | 1063 |
index |
1064 |
index |
|
1065 |
nil " 45 " |
|
1066 |
nil |
|
1067 |
nil |
|
1068 |
nil |
|
1069 |
nil |
|
1070 |
offset " 50 " |
|
1071 |
offset |
|
1072 |
offset |
|
1073 |
offset |
|
1074 |
offset |
|
1075 |
offsetLevel " 55 " |
|
1076 |
offset |
|
1077 |
offset |
|
1078 |
offset |
|
1079 |
offset |
|
1080 |
longOffset " 60 " |
|
1081 |
longOffset |
|
1082 |
longOffset |
|
1083 |
longOffset |
|
1084 |
longOffset |
|
1085 |
longOffsetLevel " 65 " |
|
1086 |
longOffset |
|
1087 |
longOffset |
|
1088 |
longOffset |
|
1089 |
longOffset |
|
1090 |
veryLongOffset " 70 " |
|
1091 |
veryLongOffset |
|
1092 |
veryLongOffset |
|
1093 |
veryLongOffset |
|
1094 |
veryLongOffset |
|
1095 |
veryLongOffsetLevel " 75 " |
|
1096 |
veryLongOffset |
|
1097 |
veryLongOffset |
|
1098 |
veryLongOffset |
|
1099 |
veryLongOffset |
|
1100 |
nil " 80 " |
|
1101 |
nil |
|
1102 |
nil |
|
1103 |
nil |
|
1104 |
nil |
|
1105 |
nil " 85 " |
|
1106 |
nil |
|
1107 |
nil |
|
1108 |
nil |
|
1109 |
nil |
|
1110 |
nil " 90 " |
|
1111 |
nil |
|
1112 |
nil |
|
1113 |
nil |
|
1114 |
nil |
|
1115 |
nil " 95 " |
|
1116 |
nil |
|
1117 |
nil |
|
1118 |
nil |
|
1119 |
nil |
|
1120 |
nil " 100 " |
|
1121 |
nil |
|
1122 |
nil |
|
1123 |
nil |
|
1124 |
nil |
|
1125 |
nil " 105 " |
|
1126 |
nil |
|
1127 |
nil |
|
1128 |
nil |
|
1129 |
nil |
|
1130 |
nil " 110 " |
|
1131 |
nil |
|
1132 |
nil |
|
1133 |
nil |
|
1134 |
nil |
|
1135 |
nil " 115 " |
|
1136 |
nil |
|
1137 |
nil |
|
1138 |
nil |
|
1139 |
nil |
|
1140 |
nil " 120 " |
|
1141 |
nil |
|
1142 |
nil |
|
1143 |
nil |
|
1144 |
nil |
|
1145 |
index " 125 " |
|
1146 |
index |
|
1147 |
number |
|
1148 | 1148 |
levelIndex "/ 128 pushOuterBlockVar |
573 | 1149 |
levelIndex |
342 | 1150 |
nil " 130 " |
1151 |
nil |
|
1152 |
nil |
|
1153 |
nil |
|
1154 |
nil |
|
1155 |
nil " 135 " |
|
1156 |
nil |
|
1157 |
nil |
|
1158 |
nil |
|
1159 |
nil |
|
1160 |
nil " 140 " |
|
1161 |
nil |
|
1162 |
nil |
|
1163 |
nil |
|
1164 |
nil |
|
1165 |
nil " 145 " |
|
1166 |
nil |
|
1167 |
nil |
|
1168 |
nil |
|
1169 |
nil |
|
1170 |
nil " 150 " |
|
1171 |
nil |
|
1172 |
nil |
|
1173 |
nil |
|
1174 |
nil |
|
1175 |
nil " 155 " |
|
1176 |
nil |
|
1177 |
nil |
|
1178 |
nil |
|
1179 |
nil |
|
1180 |
nil " 160 " |
|
1181 |
nil |
|
1182 |
nil |
|
1183 |
nil |
|
1184 |
nil |
|
1185 |
nil " 165 " |
|
1186 |
nil |
|
1187 |
nil |
|
1188 |
nil |
|
1189 |
nil |
|
1190 |
nil " 170 " |
|
1191 |
nil |
|
1192 |
nil |
|
1193 |
nil |
|
1194 |
nil |
|
1195 |
nil " 175 " |
|
1196 |
index |
|
1197 |
index |
|
1198 |
nil |
|
1199 |
nil |
|
1200 |
literal " 180 " |
|
1201 |
literal |
|
1202 |
literal |
|
1203 |
literal |
|
1204 |
literal |
|
1205 |
literal " 185 " |
|
1206 |
literal |
|
1207 |
literal |
|
1208 |
nil |
|
1209 |
nil |
|
1210 |
absOffset " 190 " |
|
1211 |
absOffset |
|
1212 |
absOffset |
|
1213 |
absOffset |
|
1214 |
absOffset |
|
573 | 1215 |
absOffsetLevel " 195 " |
342 | 1216 |
absOffset |
1217 |
absOffset |
|
1218 |
absOffset |
|
1219 |
absOffset " 199 " |
|
1220 |
specialGlobal " 200 " |
|
1221 |
literal16 |
|
1222 |
nil |
|
1223 |
nil |
|
1793 | 1224 |
extraOp |
342 | 1225 |
lsendArgs " 205 " |
1226 |
lsuperSendArgs |
|
1258 | 1227 |
lsendArgs |
342 | 1228 |
nil |
1229 |
nil |
|
1230 |
nil " 210 " |
|
1231 |
nil |
|
1232 |
nil |
|
1233 |
nil |
|
1234 |
nil |
|
1235 |
nil " 215 " |
|
1236 |
nil |
|
1237 |
nil |
|
356
bb3beb18de1f
6empty slots in GLOBL/CLASSVAR bytecodes removed
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1238 |
literal16 |
bb3beb18de1f
6empty slots in GLOBL/CLASSVAR bytecodes removed
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1239 |
literal16 |
342 | 1240 |
nil " 220 " |
1241 |
nil |
|
1242 |
lit1 |
|
1243 |
lit2 |
|
1244 |
lit3 |
|
1245 |
lit4 " 225 " |
|
1246 |
lit5 |
|
1247 |
lit6 |
|
1248 |
lit7 |
|
1249 |
lit8 |
|
1250 |
nil " 230 " |
|
1251 |
specialSend " 231 " |
|
1252 |
nil |
|
1253 |
nil |
|
1254 |
nil |
|
1255 |
nil |
|
1256 |
nil |
|
1257 |
nil |
|
1258 |
nil |
|
1259 |
index |
|
1260 |
index " 240 " |
|
1261 |
). |
|
0 | 1262 |
|
401 | 1263 |
sym := syms at:(aByte + 1). |
1264 |
sym isNil ifTrue:[ |
|
1265 |
extra := nil. |
|
1266 |
hasLineNo := nil. |
|
1267 |
] ifFalse:[ |
|
1268 |
extra := extras at:(aByte + 1). |
|
1269 |
hasLineNo := lnos at:(aByte + 1). |
|
1270 |
]. |
|
0 | 1271 |
^ syms at:(aByte + 1) |
164 | 1272 |
|
655 | 1273 |
"Modified: / 2.9.1995 / 00:12:11 / claus" |
1274 |
"Modified: / 5.3.1998 / 04:35:28 / cg" |
|
0 | 1275 |
! ! |
217 | 1276 |
|
378 | 1277 |
!Decompiler class methodsFor:'documentation'! |
217 | 1278 |
|
1279 |
version |
|
2431 | 1280 |
^ '$Header: /cvs/stx/stx/libcomp/Decompiler.st,v 1.45 2010-10-22 10:37:27 cg Exp $' |
2423 | 1281 |
! |
1282 |
||
1283 |
version_CVS |
|
2431 | 1284 |
^ '$Header: /cvs/stx/stx/libcomp/Decompiler.st,v 1.45 2010-10-22 10:37:27 cg Exp $' |
217 | 1285 |
! ! |