author | Claus Gittinger <cg@exept.de> |
Tue, 12 Nov 1996 13:18:57 +0100 | |
changeset 441 | fa5637faa969 |
parent 420 | ad567fb4e732 |
child 465 | 67e5205a81cc |
permissions | -rw-r--r-- |
14 | 1 |
" |
2 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
53 | 3 |
All Rights Reserved |
14 | 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 |
PrimaryNode subclass:#VariableNode |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
14 |
instanceVariableNames:'name token selfValue selfClass index block' |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
15 |
classVariableNames:'' |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
16 |
poolDictionaries:'' |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
17 |
category:'System-Compiler-Support' |
14 | 18 |
! |
19 |
||
360 | 20 |
!VariableNode class methodsFor:'documentation'! |
20 | 21 |
|
22 |
copyright |
|
23 |
" |
|
24 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
53 | 25 |
All Rights Reserved |
20 | 26 |
|
27 |
This software is furnished under a license and may be used |
|
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
34 |
! |
|
35 |
||
36 |
documentation |
|
37 |
" |
|
38 |
node for parse-trees, representing variables |
|
261 | 39 |
This is a helper class for the compiler. |
263 | 40 |
|
41 |
[author:] |
|
42 |
Claus Gittinger |
|
20 | 43 |
" |
44 |
! ! |
|
14 | 45 |
|
360 | 46 |
!VariableNode class methodsFor:'instance creation'! |
14 | 47 |
|
98 | 48 |
type:t class:class name:n |
49 |
^ (self basicNew) type:t class:class name:n |
|
50 |
! |
|
51 |
||
14 | 52 |
type:t index:i selfValue:s |
53 |
^ (self basicNew) type:t index:i selfValue:s |
|
54 |
! |
|
55 |
||
140 | 56 |
type:t name:n |
57 |
^ (self basicNew) type:t name:n |
|
58 |
! |
|
59 |
||
60 |
type:t name:n index:i selfClass:s |
|
61 |
^ (self basicNew) type:t name:n index:i selfClass:s |
|
62 |
! |
|
63 |
||
64 |
type:t name:n index:i selfValue:s |
|
65 |
^ (self basicNew) type:t name:n index:i selfValue:s |
|
14 | 66 |
! |
67 |
||
68 |
type:t name:n token:tok index:i |
|
69 |
^ (self basicNew) type:t name:n token:tok index:i |
|
70 |
! |
|
71 |
||
140 | 72 |
type:t name:n token:tok index:i block:b |
73 |
^ (self basicNew) type:t name:n token:tok index:i block:b |
|
14 | 74 |
! |
75 |
||
140 | 76 |
type:t name:n value:val |
77 |
^ (self basicNew) type:t name:n value:val |
|
14 | 78 |
! |
79 |
||
140 | 80 |
type:t token:tok |
81 |
^ (self basicNew) type:t token:tok |
|
14 | 82 |
! |
83 |
||
84 |
type:t token:tok index:i |
|
85 |
^ (self basicNew) type:t token:tok index:i |
|
86 |
! |
|
87 |
||
88 |
type:t token:tok index:i block:b |
|
89 |
^ (self basicNew) type:t token:tok index:i block:b |
|
90 |
! ! |
|
91 |
||
92 |
!VariableNode methodsFor:'accessing'! |
|
93 |
||
140 | 94 |
index |
95 |
^ index |
|
14 | 96 |
! |
97 |
||
140 | 98 |
name |
99 |
^ name |
|
14 | 100 |
! |
101 |
||
140 | 102 |
type:t class:class name:n |
14 | 103 |
type := t. |
104 |
value := nil. |
|
140 | 105 |
name := n. |
106 |
selfClass := class |
|
14 | 107 |
! |
108 |
||
109 |
type:t index:i selfValue:s |
|
110 |
type := t. |
|
111 |
value := nil. |
|
112 |
index := i. |
|
113 |
selfValue := s |
|
114 |
! |
|
115 |
||
140 | 116 |
type:t name:n |
98 | 117 |
type := t. |
118 |
value := nil. |
|
14 | 119 |
name := n |
120 |
! |
|
121 |
||
122 |
type:t name:n index:i selfClass:s |
|
123 |
type := t. |
|
124 |
value := nil. |
|
125 |
index := i. |
|
126 |
selfClass := s. |
|
127 |
name := n |
|
128 |
! |
|
129 |
||
140 | 130 |
type:t name:n index:i selfValue:s |
131 |
type := t. |
|
132 |
value := nil. |
|
133 |
index := i. |
|
134 |
selfValue := s. |
|
135 |
name := n |
|
136 |
! |
|
137 |
||
14 | 138 |
type:t name:n token:tok index:i |
139 |
type := t. |
|
140 |
index := i. |
|
141 |
token := tok. |
|
142 |
name := n |
|
143 |
! |
|
144 |
||
145 |
type:t name:n token:tok index:i block:b |
|
146 |
type := t. |
|
147 |
index := i. |
|
148 |
block := b. |
|
149 |
token := tok. |
|
150 |
name := n |
|
151 |
! |
|
152 |
||
140 | 153 |
type:t name:n value:val |
154 |
type := t. |
|
155 |
name := n. |
|
156 |
value := val |
|
157 |
! |
|
158 |
||
159 |
type:t token:tok |
|
160 |
type := t. |
|
161 |
token := tok |
|
14 | 162 |
! |
163 |
||
140 | 164 |
type:t token:tok index:i |
165 |
type := t. |
|
166 |
index := i. |
|
167 |
token := tok |
|
14 | 168 |
! |
169 |
||
140 | 170 |
type:t token:tok index:i block:b |
171 |
type := t. |
|
172 |
index := i. |
|
173 |
block := b. |
|
174 |
token := tok |
|
14 | 175 |
! ! |
176 |
||
177 |
!VariableNode methodsFor:'code generation'! |
|
178 |
||
104 | 179 |
codeForSideEffectOn:aStream inBlock:b for:aCompiler |
14 | 180 |
"no code at all" |
181 |
^ self |
|
182 |
! |
|
183 |
||
104 | 184 |
codeOn:aStream inBlock:codeBlock for:aCompiler |
117 | 185 |
|theCode b deltaLevel litIndex| |
14 | 186 |
|
187 |
(type == #MethodArg) ifTrue:[ |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
188 |
(index <= 4) ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
189 |
aStream nextPut:(#(pushMethodArg1 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
190 |
pushMethodArg2 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
191 |
pushMethodArg3 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
192 |
pushMethodArg4) at:index). |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
193 |
^ self |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
194 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
195 |
aStream nextPut:#pushMethodArg; nextPut:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
196 |
^ self |
14 | 197 |
]. |
198 |
(type == #MethodVariable) ifTrue:[ |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
199 |
(index <= 6) ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
200 |
aStream nextPut:(#(pushMethodVar1 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
201 |
pushMethodVar2 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
202 |
pushMethodVar3 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
203 |
pushMethodVar4 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
204 |
pushMethodVar5 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
205 |
pushMethodVar6) at:index). |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
206 |
^ self |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
207 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
208 |
aStream nextPut:#pushMethodVar; nextPut:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
209 |
^ self |
14 | 210 |
]. |
211 |
(type == #InstanceVariable) ifTrue:[ |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
212 |
(index <= 10) ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
213 |
theCode := #(pushInstVar1 pushInstVar2 pushInstVar3 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
214 |
pushInstVar4 pushInstVar5 pushInstVar6 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
215 |
pushInstVar7 pushInstVar8 pushInstVar9 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
216 |
pushInstVar10) at:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
217 |
aStream nextPut:theCode. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
218 |
^ self |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
219 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
220 |
aStream nextPut:#pushInstVar; nextPut:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
221 |
^ self |
14 | 222 |
]. |
223 |
(type == #BlockArg) ifTrue:[ |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
224 |
"find deltaLevel to block, where argument was defined" |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
225 |
b := codeBlock. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
226 |
deltaLevel := 0. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
227 |
[b notNil and:[b ~~ block]] whileTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
228 |
b inlineBlock ifFalse:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
229 |
deltaLevel := deltaLevel + 1 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
230 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
231 |
b := b home |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
232 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
233 |
(deltaLevel == 0) ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
234 |
(index <= 4) ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
235 |
theCode := #(pushBlockArg1 pushBlockArg2 pushBlockArg3 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
236 |
pushBlockArg4) at:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
237 |
aStream nextPut:theCode. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
238 |
^ self |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
239 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
240 |
aStream nextPut:#pushBlockArg. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
241 |
] ifFalse:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
242 |
(deltaLevel == 1) ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
243 |
aStream nextPut:#pushOuter1BlockArg |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
244 |
] ifFalse:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
245 |
(deltaLevel == 2) ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
246 |
aStream nextPut:#pushOuter2BlockArg |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
247 |
] ifFalse:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
248 |
aStream nextPut:#pushOuterBlockArg; nextPut:deltaLevel |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
249 |
] |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
250 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
251 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
252 |
aStream nextPut:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
253 |
^ self |
14 | 254 |
]. |
255 |
(type == #GlobalVariable) ifTrue:[ |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
256 |
litIndex := aCompiler addLiteral:name asSymbol. |
243
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
257 |
(aCompiler isSpecialGlobalSymbol:name) ifTrue:[ |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
258 |
aStream nextPut:#pushSpecialGlobal; nextPut:(aCompiler specialGlobalCodeFor:name). |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
259 |
^ self |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
260 |
]. |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
261 |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
262 |
litIndex < 256 ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
263 |
aStream nextPut:#pushGlobalS; nextPut:litIndex |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
264 |
] ifFalse:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
265 |
aStream nextPut:#pushGlobalL; nextPut:litIndex; nextPut:0 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
266 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
267 |
^ self |
14 | 268 |
]. |
360 | 269 |
(type == #ClassVariable) ifTrue:[ |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
270 |
litIndex := aCompiler addLiteral:(selfClass name , ':' , name) asSymbol. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
271 |
litIndex < 256 ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
272 |
aStream nextPut:#pushClassVarS; nextPut:litIndex |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
273 |
] ifFalse:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
274 |
aStream nextPut:#pushClassVarL; nextPut:litIndex; nextPut:0 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
275 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
276 |
^ self |
14 | 277 |
]. |
360 | 278 |
(type == #PrivateClass) ifTrue:[ |
279 |
litIndex := aCompiler addLiteral:(selfClass name , '::' , name) asSymbol. |
|
280 |
litIndex < 256 ifTrue:[ |
|
281 |
aStream nextPut:#pushGlobalS; nextPut:litIndex |
|
282 |
] ifFalse:[ |
|
283 |
aStream nextPut:#pushGlobalL; nextPut:litIndex; nextPut:0 |
|
284 |
]. |
|
285 |
^ self |
|
286 |
]. |
|
14 | 287 |
(type == #BlockVariable) ifTrue:[ |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
288 |
"find deltaLevel to block, where variable was defined" |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
289 |
b := codeBlock. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
290 |
deltaLevel := 0. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
291 |
[b notNil and:[b ~~ block]] whileTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
292 |
b inlineBlock ifFalse:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
293 |
deltaLevel := deltaLevel + 1 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
294 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
295 |
b := b home |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
296 |
]. |
14 | 297 |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
298 |
(deltaLevel == 0) ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
299 |
index <= 3 ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
300 |
aStream nextPut:(#(pushBlockVar1 pushBlockVar2 pushBlockVar3) at:index). |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
301 |
^ self |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
302 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
303 |
aStream nextPut:#pushBlockVar. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
304 |
] ifFalse:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
305 |
aStream nextPut:#pushOuterBlockVar; nextPut:deltaLevel. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
306 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
307 |
aStream nextPut:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
308 |
^ self |
14 | 309 |
]. |
310 |
(type == #ClassInstanceVariable) ifTrue:[ |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
311 |
aStream nextPut:#pushClassInstVar; nextPut:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
312 |
^ self |
14 | 313 |
]. |
314 |
(type == #ThisContext) ifTrue:[ |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
315 |
aStream nextPut:#pushThisContext. ^ self |
14 | 316 |
]. |
317 |
||
318 |
"not reached" |
|
319 |
self halt:'bad type'. |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
320 |
|
360 | 321 |
"Modified: 14.10.1996 / 19:43:18 / cg" |
14 | 322 |
! |
323 |
||
104 | 324 |
codeStoreOn:aStream inBlock:codeBlock valueNeeded:valueNeeded for:aCompiler |
117 | 325 |
|theCode b deltaLevel litIndex| |
14 | 326 |
|
327 |
valueNeeded ifTrue:[ |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
328 |
aStream nextPut:#dup |
14 | 329 |
]. |
330 |
(type == #MethodVariable) ifTrue:[ |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
331 |
(index <= 6) ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
332 |
theCode := #(storeMethodVar1 storeMethodVar2 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
333 |
storeMethodVar3 storeMethodVar4 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
334 |
storeMethodVar5 storeMethodVar6) at:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
335 |
aStream nextPut:theCode. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
336 |
^ self |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
337 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
338 |
aStream nextPut:#storeMethodVar; nextPut:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
339 |
^ self |
14 | 340 |
]. |
341 |
(type == #InstanceVariable) ifTrue:[ |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
342 |
(index <= 10) ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
343 |
theCode := #(storeInstVar1 storeInstVar2 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
344 |
storeInstVar3 storeInstVar4 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
345 |
storeInstVar5 storeInstVar6 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
346 |
storeInstVar7 storeInstVar8 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
347 |
storeInstVar9 storeInstVar10) at:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
348 |
aStream nextPut:theCode. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
349 |
^ self |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
350 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
351 |
aStream nextPut:#storeInstVar; nextPut:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
352 |
^ self |
14 | 353 |
]. |
354 |
(type == #BlockVariable) ifTrue:[ |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
355 |
"find deltaLevel to block, where variable was defined" |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
356 |
b := codeBlock. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
357 |
deltaLevel := 0. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
358 |
[b notNil and:[b ~~ block]] whileTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
359 |
b inlineBlock ifFalse:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
360 |
deltaLevel := deltaLevel + 1 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
361 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
362 |
b := b home |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
363 |
]. |
14 | 364 |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
365 |
(deltaLevel == 0) ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
366 |
index <= 3 ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
367 |
aStream nextPut:(#(storeBlockVar1 storeBlockVar2 storeBlockVar3) at:index). |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
368 |
^ self |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
369 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
370 |
aStream nextPut:#storeBlockVar |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
371 |
] ifFalse:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
372 |
aStream nextPut:#storeOuterBlockVar; nextPut:deltaLevel |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
373 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
374 |
aStream nextPut:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
375 |
^ self |
14 | 376 |
]. |
117 | 377 |
(type == #GlobalVariable) ifTrue:[ |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
378 |
litIndex := aCompiler addLiteral:name asSymbol. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
379 |
litIndex < 256 ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
380 |
aStream nextPut:#storeGlobalS; nextPut:litIndex |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
381 |
] ifFalse:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
382 |
aStream nextPut:#storeGlobalL; nextPut:litIndex; nextPut:0 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
383 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
384 |
^ self |
117 | 385 |
]. |
14 | 386 |
(type == #ClassVariable) ifTrue:[ |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
387 |
litIndex := aCompiler addLiteral:(selfClass name , ':' , name) asSymbol. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
388 |
litIndex < 256 ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
389 |
aStream nextPut:#storeClassVarS; nextPut:litIndex |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
390 |
] ifFalse:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
391 |
aStream nextPut:#storeClassVarL; nextPut:litIndex; nextPut:0 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
392 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
393 |
^ self |
14 | 394 |
]. |
395 |
(type == #ClassInstanceVariable) ifTrue:[ |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
396 |
aStream nextPut:#storeClassInstVar; nextPut:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
397 |
^ self |
14 | 398 |
]. |
106 | 399 |
"not reached" |
14 | 400 |
^ self error:'bad assignment' |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
401 |
|
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
402 |
"Modified: 29.2.1996 / 23:54:38 / cg" |
14 | 403 |
! ! |
404 |
||
140 | 405 |
!VariableNode methodsFor:'evaluating'! |
406 |
||
407 |
evaluate |
|
408 |
(type == #MethodVariable |
|
409 |
or:[type == #BlockArg |
|
410 |
or:[type == #BlockVariable]]) ifTrue:[ |
|
420 | 411 |
^ token variableValue |
140 | 412 |
]. |
413 |
(type == #InstanceVariable) ifTrue:[ |
|
420 | 414 |
^ selfValue instVarAt:index |
140 | 415 |
]. |
416 |
(type == #GlobalVariable) ifTrue:[ |
|
420 | 417 |
(Smalltalk includesKey:name) ifTrue:[ |
418 |
^ Smalltalk at:name |
|
419 |
]. |
|
140 | 420 |
" |
420 | 421 |
self error:('global ' , name , ' is undefined'). |
140 | 422 |
" |
423 |
||
420 | 424 |
^ UndefinedVariable name:name. |
425 |
^ nil |
|
140 | 426 |
]. |
427 |
(type == #ClassVariable) ifTrue:[ |
|
420 | 428 |
^ Smalltalk at:(selfClass name , ':' , name) asSymbol |
140 | 429 |
]. |
430 |
(type == #ClassInstanceVariable) ifTrue:[ |
|
420 | 431 |
^ selfClass instVarAt:index |
140 | 432 |
]. |
433 |
(type == #ThisContext) ifTrue:[ |
|
420 | 434 |
^ thisContext |
435 |
]. |
|
436 |
(type == #PrivateClass) ifTrue:[ |
|
437 |
^ selfClass privateClassesAt:name asSymbol |
|
140 | 438 |
]. |
439 |
"not reached" |
|
440 |
self halt:'bad type'. |
|
441 |
^ value |
|
420 | 442 |
|
443 |
"Modified: 6.11.1996 / 17:28:17 / cg" |
|
140 | 444 |
! |
445 |
||
446 |
store:aValue |
|
447 |
(type == #MethodVariable |
|
448 |
or:[type == #BlockVariable]) ifTrue:[ |
|
449 |
token value:aValue. ^ aValue |
|
450 |
]. |
|
451 |
(type == #InstanceVariable) ifTrue:[ |
|
452 |
^ selfValue instVarAt:index put:aValue |
|
453 |
]. |
|
454 |
(type == #GlobalVariable) ifTrue:[ |
|
455 |
^ Smalltalk at:name put:aValue |
|
456 |
]. |
|
457 |
(type == #ClassVariable) ifTrue:[ |
|
458 |
^ Smalltalk at:(selfClass name , ':' , name) asSymbol put:aValue |
|
459 |
]. |
|
460 |
(type == #ClassInstanceVariable) ifTrue:[ |
|
461 |
^ selfClass instVarAt:index put:aValue |
|
462 |
]. |
|
463 |
"not reached" |
|
464 |
self halt:'bad type'. |
|
465 |
^ aValue |
|
466 |
! ! |
|
467 |
||
14 | 468 |
!VariableNode methodsFor:'printing'! |
469 |
||
470 |
displayString |
|
471 |
^ 'InterpreterVariable(' , self printString , ')' |
|
472 |
! |
|
473 |
||
474 |
printOn:aStream indent:i |
|
98 | 475 |
|
476 |
(type == #MethodArg "/ actually only a debug-check |
|
477 |
or:[type == #MethodVariable |
|
478 |
or:[type == #InstanceVariable |
|
479 |
or:[type == #BlockArg |
|
480 |
or:[type == #GlobalVariable |
|
481 |
or:[type == #ClassVariable |
|
482 |
or:[type == #BlockVariable |
|
483 |
or:[type == #ClassInstanceVariable]]]]]]]) ifTrue:[ |
|
53 | 484 |
aStream nextPutAll:name. ^ self |
14 | 485 |
]. |
486 |
(type == #ThisContext) ifTrue:[ |
|
53 | 487 |
aStream nextPutAll:'thisContext'. ^ self |
14 | 488 |
]. |
489 |
"not reached" |
|
490 |
self halt:'bad type'. |
|
491 |
! ! |
|
140 | 492 |
|
493 |
!VariableNode methodsFor:'queries'! |
|
494 |
||
243
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
495 |
canReuseAsArg:anotherNode |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
496 |
anotherNode isVariable ifTrue:[ |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
497 |
anotherNode type ~~ type ifTrue:[^ false]. |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
498 |
|
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
499 |
(type == #ThisContext) ifTrue:[^ true]. |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
500 |
|
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
501 |
index notNil ifTrue:[ |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
502 |
anotherNode index ~~ index ifTrue:[^ false]. |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
503 |
]. |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
504 |
(type == #MethodArg) ifTrue:[^ true]. |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
505 |
(type == #MethodVariable) ifTrue:[^ true]. |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
506 |
(type == #InstanceVariable) ifTrue:[^ true]. |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
507 |
|
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
508 |
name notNil ifTrue:[ |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
509 |
anotherNode name ~~ name ifTrue:[^ false]. |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
510 |
]. |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
511 |
(type == #GlobalVariable) ifTrue:[^ true]. |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
512 |
(type == #ClassVariable) ifTrue:[^ true]. |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
513 |
]. |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
514 |
^ false |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
515 |
|
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
516 |
"Created: 14.4.1996 / 00:46:18 / cg" |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
517 |
"Modified: 14.4.1996 / 00:55:25 / cg" |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
518 |
! |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
519 |
|
140 | 520 |
isGlobal |
521 |
"return true, if this is a node for a global variable" |
|
522 |
||
523 |
^ (type == #GlobalVariable) and:[Smalltalk includesKey:name] |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
524 |
! |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
525 |
|
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
526 |
isLocal |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
527 |
"return true, if this is a node for a local (block or method) variable" |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
528 |
|
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
529 |
^ (type == #MethodVariable) or:[type == #BlockVariable] |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
530 |
|
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
531 |
"Created: 1.3.1996 / 00:03:53 / cg" |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
532 |
"Modified: 1.3.1996 / 00:04:46 / cg" |
243
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
533 |
! |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
534 |
|
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
535 |
isVariable |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
536 |
"return true, if this is a node for a variable" |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
537 |
|
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
538 |
^ true |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
539 |
|
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
540 |
"Created: 14.4.1996 / 00:46:32 / cg" |
140 | 541 |
! ! |
542 |
||
360 | 543 |
!VariableNode class methodsFor:'documentation'! |
148 | 544 |
|
545 |
version |
|
420 | 546 |
^ '$Header: /cvs/stx/stx/libcomp/Attic/VarNode.st,v 1.23 1996-11-07 13:58:57 cg Exp $' |
148 | 547 |
! ! |