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