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