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