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