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