author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Tue, 29 May 2018 22:27:59 +0100 | |
branch | jv |
changeset 4275 | e06f4b087e47 |
parent 4259 | c707f9aa7015 |
child 4723 | 524785227024 |
permissions | -rw-r--r-- |
14 | 1 |
" |
2 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
4275 | 3 |
COPYRIGHT (c) 2018 Jan Vrany |
53 | 4 |
All Rights Reserved |
14 | 5 |
|
6 |
This software is furnished under a license and may be used |
|
7 |
only in accordance with the terms of that license and with the |
|
8 |
inclusion of the above copyright notice. This software may not |
|
9 |
be provided or otherwise made available to, or used by, any |
|
10 |
other person. No title to or ownership of the software is |
|
11 |
hereby transferred. |
|
12 |
" |
|
1076
b393dc61463e
added #isClassVariable and #isInstanceVariable
Claus Gittinger <cg@exept.de>
parents:
1035
diff
changeset
|
13 |
"{ Package: 'stx:libcomp' }" |
b393dc61463e
added #isClassVariable and #isInstanceVariable
Claus Gittinger <cg@exept.de>
parents:
1035
diff
changeset
|
14 |
|
3562 | 15 |
"{ NameSpace: Smalltalk }" |
16 |
||
14 | 17 |
PrimaryNode subclass:#VariableNode |
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
18 |
instanceVariableNames:'name token index block' |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
19 |
classVariableNames:'' |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
20 |
poolDictionaries:'' |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
21 |
category:'System-Compiler-Support' |
14 | 22 |
! |
23 |
||
360 | 24 |
!VariableNode class methodsFor:'documentation'! |
20 | 25 |
|
26 |
copyright |
|
27 |
" |
|
28 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
4275 | 29 |
COPYRIGHT (c) 2018 Jan Vrany |
53 | 30 |
All Rights Reserved |
20 | 31 |
|
32 |
This software is furnished under a license and may be used |
|
33 |
only in accordance with the terms of that license and with the |
|
34 |
inclusion of the above copyright notice. This software may not |
|
35 |
be provided or otherwise made available to, or used by, any |
|
36 |
other person. No title to or ownership of the software is |
|
37 |
hereby transferred. |
|
38 |
" |
|
39 |
! |
|
40 |
||
41 |
documentation |
|
42 |
" |
|
43 |
node for parse-trees, representing variables |
|
261 | 44 |
This is a helper class for the compiler. |
263 | 45 |
|
46 |
[author:] |
|
47 |
Claus Gittinger |
|
20 | 48 |
" |
49 |
! ! |
|
14 | 50 |
|
360 | 51 |
!VariableNode class methodsFor:'instance creation'! |
14 | 52 |
|
1932 | 53 |
blockArgumentNamed:n |
54 |
^ (self basicNew) type:#BlockArg name:n asSymbol |
|
55 |
||
56 |
"Created: / 22-10-2006 / 11:59:10 / cg" |
|
57 |
! |
|
58 |
||
3301 | 59 |
globalNamed:n |
60 |
"because this is called even for invalid (partial) names, |
|
61 |
and we do not want to create zillions of unused symbols, |
|
62 |
no asSymbol is done here. So the name kept is actually a string. |
|
63 |
A symbol will be created when code is actually created for it" |
|
64 |
||
65 |
^ (self basicNew) type:#GlobalVariable name:n "asSymbol" |
|
66 |
||
67 |
"Modified (comment): / 29-08-2013 / 01:10:02 / cg" |
|
1310
feb30ab0c221
better variabletype queries.
Claus Gittinger <cg@exept.de>
parents:
1296
diff
changeset
|
68 |
! |
feb30ab0c221
better variabletype queries.
Claus Gittinger <cg@exept.de>
parents:
1296
diff
changeset
|
69 |
|
1784
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
70 |
methodArgumentNamed:n |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
71 |
^ (self basicNew) type:#MethodArg name:n asSymbol |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
72 |
|
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
73 |
"Created: / 06-08-2006 / 01:12:55 / cg" |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
74 |
! |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
75 |
|
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
76 |
methodLocalNamed:n |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
77 |
^ (self basicNew) type:#MethodVariable name:n asSymbol |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
78 |
|
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
79 |
"Created: / 06-08-2006 / 13:43:41 / cg" |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
80 |
! |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
81 |
|
98 | 82 |
type:t class:class name:n |
83 |
^ (self basicNew) type:t class:class name:n |
|
84 |
! |
|
85 |
||
642
de97c93c4f49
renamed con to aContext - stc has problems with it.
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
86 |
type:t context:aContext |
de97c93c4f49
renamed con to aContext - stc has problems with it.
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
87 |
^ (self basicNew) type:t context:aContext |
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
88 |
|
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
89 |
"Created: / 17.1.1998 / 04:00:35 / cg" |
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
90 |
! |
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
91 |
|
872
7cf38a8125e6
support for workspace variables.
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
92 |
type:t holder:holder name:n |
7cf38a8125e6
support for workspace variables.
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
93 |
^ (self basicNew) type:t holder:holder name:n |
7cf38a8125e6
support for workspace variables.
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
94 |
! |
7cf38a8125e6
support for workspace variables.
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
95 |
|
140 | 96 |
type:t name:n |
97 |
^ (self basicNew) type:t name:n |
|
98 |
! |
|
99 |
||
642
de97c93c4f49
renamed con to aContext - stc has problems with it.
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
100 |
type:t name:n context:aContext index:i |
de97c93c4f49
renamed con to aContext - stc has problems with it.
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
101 |
^ (self basicNew) type:t name:n context:aContext index:i |
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
102 |
|
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
103 |
"Created: / 17.1.1998 / 02:40:32 / cg" |
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
104 |
! |
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
105 |
|
140 | 106 |
type:t name:n index:i selfClass:s |
107 |
^ (self basicNew) type:t name:n index:i selfClass:s |
|
108 |
! |
|
109 |
||
110 |
type:t name:n index:i selfValue:s |
|
111 |
^ (self basicNew) type:t name:n index:i selfValue:s |
|
14 | 112 |
! |
113 |
||
114 |
type:t name:n token:tok index:i |
|
115 |
^ (self basicNew) type:t name:n token:tok index:i |
|
116 |
! |
|
117 |
||
574
993d1182782b
fixed inlining of blocks where subBlocks
Claus Gittinger <cg@exept.de>
parents:
566
diff
changeset
|
118 |
type:t name:n token:tok index:i block:b from:codeBlock |
993d1182782b
fixed inlining of blocks where subBlocks
Claus Gittinger <cg@exept.de>
parents:
566
diff
changeset
|
119 |
^ (self basicNew) type:t name:n token:tok index:i block:b from:codeBlock |
14 | 120 |
|
574
993d1182782b
fixed inlining of blocks where subBlocks
Claus Gittinger <cg@exept.de>
parents:
566
diff
changeset
|
121 |
"Modified: 2.7.1997 / 10:55:48 / cg" |
14 | 122 |
! ! |
123 |
||
124 |
!VariableNode methodsFor:'accessing'! |
|
125 |
||
577 | 126 |
block |
127 |
^ block |
|
128 |
||
129 |
"Created: 2.7.1997 / 18:53:38 / cg" |
|
130 |
! |
|
131 |
||
2507 | 132 |
block:something |
133 |
block := something. |
|
134 |
! |
|
135 |
||
140 | 136 |
index |
137 |
^ index |
|
14 | 138 |
! |
139 |
||
2757
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
140 |
index:anIntegerIndex |
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
141 |
"/ self assert:(anIntegerIndex isNil or:[anIntegerIndex ~~ 0]). |
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
142 |
index := anIntegerIndex. |
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
143 |
|
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
144 |
"Modified: / 15-11-2011 / 19:10:08 / cg" |
2507 | 145 |
! |
146 |
||
140 | 147 |
name |
3510 | 148 |
type == #ThisContext ifTrue:[ ^ 'thisContext' ]. |
140 | 149 |
^ name |
3510 | 150 |
|
151 |
"Modified: / 23-09-2014 / 14:08:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
14 | 152 |
! |
153 |
||
2507 | 154 |
name:something |
155 |
name := something. |
|
156 |
||
157 |
"Modified: / 28-06-2011 / 22:14:40 / cg" |
|
158 |
! |
|
159 |
||
2677
113a73795590
Fixes in start/endPosition for Variable node
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2599
diff
changeset
|
160 |
startPosition:start endPosition: end |
113a73795590
Fixes in start/endPosition for Variable node
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2599
diff
changeset
|
161 |
|
113a73795590
Fixes in start/endPosition for Variable node
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2599
diff
changeset
|
162 |
"/self assert: (end - start + 1) = name size. |
113a73795590
Fixes in start/endPosition for Variable node
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2599
diff
changeset
|
163 |
|
113a73795590
Fixes in start/endPosition for Variable node
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2599
diff
changeset
|
164 |
^super startPosition:start endPosition: end |
113a73795590
Fixes in start/endPosition for Variable node
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2599
diff
changeset
|
165 |
|
113a73795590
Fixes in start/endPosition for Variable node
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2599
diff
changeset
|
166 |
"Created: / 25-08-2011 / 11:46:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
113a73795590
Fixes in start/endPosition for Variable node
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2599
diff
changeset
|
167 |
! |
113a73795590
Fixes in start/endPosition for Variable node
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2599
diff
changeset
|
168 |
|
875 | 169 |
token |
170 |
^ token |
|
171 |
||
172 |
"Created: 2.7.1997 / 18:53:38 / cg" |
|
173 |
! |
|
174 |
||
2507 | 175 |
token:something |
176 |
token := something. |
|
177 |
! |
|
178 |
||
869 | 179 |
type |
180 |
^ type |
|
181 |
! |
|
182 |
||
140 | 183 |
type:t class:class name:n |
2116 | 184 |
"/ type == #PoolVariable ifTrue:[self breakPoint:#cg]. |
14 | 185 |
type := t. |
140 | 186 |
name := n. |
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
187 |
value := class |
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
188 |
|
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
189 |
"Modified: / 17.1.1998 / 04:03:55 / cg" |
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
190 |
! |
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
191 |
|
642
de97c93c4f49
renamed con to aContext - stc has problems with it.
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
192 |
type:t context:aContext |
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
193 |
type := t. |
642
de97c93c4f49
renamed con to aContext - stc has problems with it.
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
194 |
value := aContext. |
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
195 |
|
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
196 |
"Modified: / 17.1.1998 / 04:01:55 / cg" |
14 | 197 |
! |
198 |
||
872
7cf38a8125e6
support for workspace variables.
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
199 |
type:t holder:holder name:n |
7cf38a8125e6
support for workspace variables.
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
200 |
type := t. |
875 | 201 |
token := holder. |
872
7cf38a8125e6
support for workspace variables.
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
202 |
name := n |
7cf38a8125e6
support for workspace variables.
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
203 |
! |
7cf38a8125e6
support for workspace variables.
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
204 |
|
140 | 205 |
type:t name:n |
98 | 206 |
type := t. |
207 |
value := nil. |
|
14 | 208 |
name := n |
209 |
! |
|
210 |
||
2757
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
211 |
type:t name:n context:aContext index:anIntegerIndex |
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
212 |
type := t. |
2757
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
213 |
"/ self assert:(anIntegerIndex isNil or:[anIntegerIndex ~~ 0]). |
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
214 |
index := anIntegerIndex. |
642
de97c93c4f49
renamed con to aContext - stc has problems with it.
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
215 |
value := aContext. |
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
216 |
name := n |
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
217 |
|
2757
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
218 |
"Created: / 17-01-1998 / 02:40:55 / cg" |
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
219 |
"Modified: / 15-11-2011 / 19:10:18 / cg" |
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
220 |
! |
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
221 |
|
2757
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
222 |
type:t name:n index:anIntegerIndex selfClass:s |
14 | 223 |
type := t. |
2757
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
224 |
"/ self assert:(anIntegerIndex isNil or:[anIntegerIndex ~~ 0]). |
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
225 |
index := anIntegerIndex. |
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
226 |
value := s. |
14 | 227 |
name := n |
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
228 |
|
2757
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
229 |
"Modified: / 15-11-2011 / 19:10:21 / cg" |
14 | 230 |
! |
231 |
||
2757
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
232 |
type:t name:n index:anIntegerIndex selfValue:s |
140 | 233 |
type := t. |
2757
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
234 |
"/ self assert:(anIntegerIndex isNil or:[anIntegerIndex ~~ 0]). |
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
235 |
index := anIntegerIndex. |
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
236 |
value := s. |
140 | 237 |
name := n |
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
238 |
|
2757
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
239 |
"Modified: / 15-11-2011 / 19:10:24 / cg" |
140 | 240 |
! |
241 |
||
2757
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
242 |
type:t name:n token:tok index:anIntegerIndex |
14 | 243 |
type := t. |
2757
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
244 |
"/ self assert:(anIntegerIndex isNil or:[anIntegerIndex ~~ 0]). |
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
245 |
index := anIntegerIndex. |
14 | 246 |
token := tok. |
247 |
name := n |
|
2757
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
248 |
|
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
249 |
"Modified: / 15-11-2011 / 19:10:30 / cg" |
14 | 250 |
! |
251 |
||
2757
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
252 |
type:t name:n token:tok index:anIntegerIndex block:variableBlock from:codeBlock |
14 | 253 |
type := t. |
2757
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
254 |
"/ self assert:(anIntegerIndex isNil or:[anIntegerIndex ~~ 0]). |
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
255 |
index := anIntegerIndex. |
574
993d1182782b
fixed inlining of blocks where subBlocks
Claus Gittinger <cg@exept.de>
parents:
566
diff
changeset
|
256 |
block := variableBlock. |
14 | 257 |
token := tok. |
535 | 258 |
name := n. |
259 |
(type == #BlockArg) ifTrue:[ |
|
574
993d1182782b
fixed inlining of blocks where subBlocks
Claus Gittinger <cg@exept.de>
parents:
566
diff
changeset
|
260 |
variableBlock blockArgAccessed:true. |
535 | 261 |
]. |
262 |
||
574
993d1182782b
fixed inlining of blocks where subBlocks
Claus Gittinger <cg@exept.de>
parents:
566
diff
changeset
|
263 |
codeBlock ~~ variableBlock ifTrue:[ |
993d1182782b
fixed inlining of blocks where subBlocks
Claus Gittinger <cg@exept.de>
parents:
566
diff
changeset
|
264 |
codeBlock rememberOuterBlockVarAccess:self |
993d1182782b
fixed inlining of blocks where subBlocks
Claus Gittinger <cg@exept.de>
parents:
566
diff
changeset
|
265 |
] |
140 | 266 |
|
2757
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
267 |
"Created: / 02-07-1997 / 10:54:50 / cg" |
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
268 |
"Modified: / 15-11-2011 / 19:10:35 / cg" |
14 | 269 |
! |
270 |
||
2757
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
271 |
type:t token:tok index:anIntegerIndex block:b |
140 | 272 |
type := t. |
2757
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
273 |
"/ self assert:(anIntegerIndex isNil or:[anIntegerIndex ~~ 0]). |
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
274 |
index := anIntegerIndex. |
140 | 275 |
block := b. |
535 | 276 |
token := tok. |
277 |
||
278 |
(type == #BlockArg) ifTrue:[ |
|
279 |
b blockArgAccessed:true. |
|
280 |
]. |
|
281 |
||
2757
a86f78669293
comment/format in: #type:name:token:index:block:from:
Claus Gittinger <cg@exept.de>
parents:
2755
diff
changeset
|
282 |
"Modified: / 15-11-2011 / 19:10:04 / cg" |
14 | 283 |
! ! |
284 |
||
285 |
!VariableNode methodsFor:'code generation'! |
|
286 |
||
104 | 287 |
codeForSideEffectOn:aStream inBlock:b for:aCompiler |
14 | 288 |
"no code at all" |
2066 | 289 |
|
3458 | 290 |
aCompiler |
291 |
warning:'Useless variable reference' |
|
292 |
position:startPosition to:endPosition. |
|
293 |
||
14 | 294 |
^ self |
295 |
! |
|
296 |
||
843
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
297 |
codeForSimpleReturnOn:aStream inBlock:b lineNumber:lineNrOrNil for:aCompiler |
1784
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
298 |
|code idx| |
843
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
299 |
|
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
300 |
lineNrOrNil notNil ifTrue:[ |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
301 |
self codeLineNumber:lineNrOrNil on:aStream for:aCompiler |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
302 |
]. |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
303 |
|
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
304 |
(type == #InstanceVariable) ifTrue:[ |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
305 |
(index <= 8) ifTrue:[ |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
306 |
code := #( retInstVar1 |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
307 |
retInstVar2 |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
308 |
retInstVar3 |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
309 |
retInstVar4 |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
310 |
retInstVar5 |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
311 |
retInstVar6 |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
312 |
retInstVar7 |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
313 |
retInstVar8) at:index. |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
314 |
|
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
315 |
aStream nextPut:code. |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
316 |
^ self |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
317 |
]. |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
318 |
]. |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
319 |
|
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
320 |
(type == #MethodVariable) ifTrue:[ |
1784
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
321 |
idx := index. |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
322 |
idx isNil ifTrue:[ idx := self indexIn: aCompiler ]. |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
323 |
(idx <= 6) ifTrue:[ |
843
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
324 |
code := #( retMethodVar1 |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
325 |
retMethodVar2 |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
326 |
retMethodVar3 |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
327 |
retMethodVar4 |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
328 |
retMethodVar5 |
1784
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
329 |
retMethodVar6) at:idx. |
843
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
330 |
|
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
331 |
aStream nextPut:code. |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
332 |
^ self |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
333 |
]. |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
334 |
]. |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
335 |
|
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
336 |
(type == #MethodArg) ifTrue:[ |
1784
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
337 |
idx := index. |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
338 |
idx isNil ifTrue:[ idx := self indexIn: aCompiler ]. |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
339 |
(idx <= 2) ifTrue:[ |
843
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
340 |
code := #(retMethodArg1 |
1784
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
341 |
retMethodArg2) at:idx. |
843
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
342 |
|
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
343 |
aStream nextPut:code. |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
344 |
^ self |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
345 |
] |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
346 |
]. |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
347 |
|
4213 | 348 |
"/ anything else must be pushed, then top returned |
843
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
349 |
|
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
350 |
self codeOn:aStream inBlock:b for:aCompiler. |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
351 |
aStream nextPut:#retTop |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
352 |
|
1784
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
353 |
"Modified: / 06-08-2006 / 22:59:28 / cg" |
4213 | 354 |
"Modified (comment): / 25-01-2018 / 19:26:46 / mawalch" |
843
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
355 |
! |
522c116f86d9
boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents:
789
diff
changeset
|
356 |
|
559 | 357 |
codeLoadOn:aStream type:type index:index inBlock:codeBlock for:aCompiler |
358 |
|theCode b deltaLevel litIndex specialGlobalIndex |
|
872
7cf38a8125e6
support for workspace variables.
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
359 |
bvIdx bvTyp blocksCode selLitIdx | |
14 | 360 |
|
361 |
(type == #MethodArg) ifTrue:[ |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
362 |
(index <= 4) ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
363 |
aStream nextPut:(#(pushMethodArg1 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
364 |
pushMethodArg2 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
365 |
pushMethodArg3 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
366 |
pushMethodArg4) at:index). |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
367 |
^ self |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
368 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
369 |
aStream nextPut:#pushMethodArg; nextPut:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
370 |
^ self |
14 | 371 |
]. |
554 | 372 |
|
14 | 373 |
(type == #MethodVariable) ifTrue:[ |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
374 |
(index <= 6) ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
375 |
aStream nextPut:(#(pushMethodVar1 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
376 |
pushMethodVar2 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
377 |
pushMethodVar3 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
378 |
pushMethodVar4 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
379 |
pushMethodVar5 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
380 |
pushMethodVar6) at:index). |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
381 |
^ self |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
382 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
383 |
aStream nextPut:#pushMethodVar; nextPut:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
384 |
^ self |
14 | 385 |
]. |
554 | 386 |
|
14 | 387 |
(type == #InstanceVariable) ifTrue:[ |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
388 |
(index <= 10) ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
389 |
theCode := #(pushInstVar1 pushInstVar2 pushInstVar3 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
390 |
pushInstVar4 pushInstVar5 pushInstVar6 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
391 |
pushInstVar7 pushInstVar8 pushInstVar9 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
392 |
pushInstVar10) at:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
393 |
aStream nextPut:theCode. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
394 |
^ self |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
395 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
396 |
aStream nextPut:#pushInstVar; nextPut:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
397 |
^ self |
14 | 398 |
]. |
554 | 399 |
|
400 |
((type == #BlockArg) |
|
401 |
or:[type == #BlockVariable]) ifTrue:[ |
|
559 | 402 |
"/ compiling for codeBlock; accessing variable in block. |
403 |
||
404 |
bvIdx := index. |
|
405 |
bvTyp := type. |
|
406 |
||
407 |
"/ find the context where that variable is contained physically |
|
408 |
blocksCode := block. |
|
409 |
[blocksCode notNil and:[blocksCode isInlineBlock]] whileTrue:[ |
|
410 |
blocksCode := blocksCode home |
|
411 |
]. |
|
412 |
||
413 |
"/ find deltaLevel from code-context to the containing block |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
414 |
b := codeBlock. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
415 |
deltaLevel := 0. |
559 | 416 |
[b notNil and:[b ~~ blocksCode]] whileTrue:[ |
554 | 417 |
b isInlineBlock ifFalse:[ |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
418 |
deltaLevel := deltaLevel + 1 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
419 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
420 |
b := b home |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
421 |
]. |
535 | 422 |
|
559 | 423 |
b isNil ifTrue:[ |
424 |
codeBlock isNil ifTrue:[ |
|
425 |
"/ a var of a block which is inlined in the method. |
|
426 |
"/ Generate a pushMVAR |
|
427 |
||
428 |
bvIdx := block indexOfFirstTemp + index - 1. |
|
429 |
type == #BlockVariable ifTrue:[ |
|
430 |
bvIdx := bvIdx + block numArgs |
|
431 |
]. |
|
432 |
^ self |
|
433 |
codeLoadOn:aStream |
|
434 |
type:#MethodVariable |
|
435 |
index:bvIdx |
|
436 |
inBlock:codeBlock |
|
437 |
for:aCompiler |
|
438 |
]. |
|
439 |
||
440 |
"/ a var of a block which is inlined in the outer block. |
|
441 |
"/ Generate a pushBVAR |
|
442 |
||
443 |
bvIdx := block indexOfFirstTemp + index - 1. |
|
444 |
type == #BlockVariable ifTrue:[ |
|
445 |
bvIdx := bvIdx + block numArgs |
|
446 |
]. |
|
447 |
bvTyp := #BlockVariable. |
|
448 |
] ifFalse:[ |
|
449 |
block isInlineBlock ifTrue:[ |
|
450 |
"/ a var of a block which is inlined in another block. |
|
451 |
"/ Generate a pushBVAR / pushOuterBVAR |
|
452 |
bvIdx := block indexOfFirstTemp + index - 1. |
|
453 |
type == #BlockVariable ifTrue:[ |
|
454 |
bvIdx := bvIdx + block numArgs |
|
455 |
]. |
|
456 |
bvTyp := #BlockVariable. |
|
457 |
] |
|
554 | 458 |
]. |
459 |
||
559 | 460 |
(bvTyp == #BlockVariable) ifTrue:[ |
554 | 461 |
(deltaLevel == 0) ifTrue:[ |
559 | 462 |
bvIdx <= 3 ifTrue:[ |
463 |
aStream nextPut:(#(pushBlockVar1 pushBlockVar2 pushBlockVar3) at:bvIdx). |
|
554 | 464 |
^ self |
465 |
]. |
|
466 |
aStream nextPut:#pushBlockVar. |
|
467 |
] ifFalse:[ |
|
468 |
aStream nextPut:#pushOuterBlockVar; nextPut:deltaLevel. |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
469 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
470 |
] ifFalse:[ |
554 | 471 |
(deltaLevel == 0) ifTrue:[ |
559 | 472 |
(bvIdx <= 4) ifTrue:[ |
473 |
aStream nextPut:(#(pushBlockArg1 pushBlockArg2 pushBlockArg3 |
|
474 |
pushBlockArg4) at:bvIdx). |
|
554 | 475 |
^ self |
476 |
]. |
|
477 |
aStream nextPut:#pushBlockArg. |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
478 |
] ifFalse:[ |
554 | 479 |
(deltaLevel == 1) ifTrue:[ |
480 |
aStream nextPut:#pushOuter1BlockArg |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
481 |
] ifFalse:[ |
554 | 482 |
(deltaLevel == 2) ifTrue:[ |
483 |
aStream nextPut:#pushOuter2BlockArg |
|
484 |
] ifFalse:[ |
|
485 |
aStream nextPut:#pushOuterBlockArg; nextPut:deltaLevel |
|
486 |
] |
|
487 |
]. |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
488 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
489 |
]. |
559 | 490 |
aStream nextPut:bvIdx. |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
491 |
^ self |
14 | 492 |
]. |
554 | 493 |
|
14 | 494 |
(type == #GlobalVariable) ifTrue:[ |
4124 | 495 |
"for browsing, we put it into the literal-array; even if it's a specal global" |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
496 |
litIndex := aCompiler addLiteral:name asSymbol. |
531 | 497 |
specialGlobalIndex := aCompiler specialGlobalCodeFor:name. |
498 |
specialGlobalIndex notNil ifTrue:[ |
|
499 |
aStream nextPut:#pushSpecialGlobal; nextPut:specialGlobalIndex. |
|
243
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
500 |
^ self |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
501 |
]. |
1808
29b197bc6939
some code savers for common code-emit;
Claus Gittinger <cg@exept.de>
parents:
1784
diff
changeset
|
502 |
self emitPushGlobalWithLiteralIndex:litIndex on:aStream for:aCompiler. |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
503 |
^ self |
14 | 504 |
]. |
554 | 505 |
|
1553 | 506 |
((type == #ClassVariable) or:[ type == #PoolVariable ]) ifTrue:[ |
1314
782d4cc1d588
slight code beautification: use classVarAt: / classVarAt:put:
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
507 |
litIndex := aCompiler addLiteral:(value globalKeyForClassVar:name). |
1808
29b197bc6939
some code savers for common code-emit;
Claus Gittinger <cg@exept.de>
parents:
1784
diff
changeset
|
508 |
litIndex <= 255 ifTrue:[ |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
509 |
aStream nextPut:#pushClassVarS; nextPut:litIndex |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
510 |
] ifFalse:[ |
1808
29b197bc6939
some code savers for common code-emit;
Claus Gittinger <cg@exept.de>
parents:
1784
diff
changeset
|
511 |
litIndex <= 16rFFFF ifTrue:[ |
29b197bc6939
some code savers for common code-emit;
Claus Gittinger <cg@exept.de>
parents:
1784
diff
changeset
|
512 |
aStream nextPut:#pushClassVarL; nextPut:litIndex; nextPut:0 |
29b197bc6939
some code savers for common code-emit;
Claus Gittinger <cg@exept.de>
parents:
1784
diff
changeset
|
513 |
] ifFalse:[ |
29b197bc6939
some code savers for common code-emit;
Claus Gittinger <cg@exept.de>
parents:
1784
diff
changeset
|
514 |
aStream nextPut:#pushClassVarVL; nextPut:0; nextPut:litIndex; nextPut:0; nextPut:0; nextPut:0 |
29b197bc6939
some code savers for common code-emit;
Claus Gittinger <cg@exept.de>
parents:
1784
diff
changeset
|
515 |
]. |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
516 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
517 |
^ self |
14 | 518 |
]. |
554 | 519 |
|
360 | 520 |
(type == #PrivateClass) ifTrue:[ |
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
521 |
litIndex := aCompiler addLiteral:(value name , '::' , name) asSymbol. |
1808
29b197bc6939
some code savers for common code-emit;
Claus Gittinger <cg@exept.de>
parents:
1784
diff
changeset
|
522 |
self emitPushGlobalWithLiteralIndex:litIndex on:aStream for:aCompiler. |
360 | 523 |
^ self |
524 |
]. |
|
14 | 525 |
|
526 |
(type == #ClassInstanceVariable) ifTrue:[ |
|
1808
29b197bc6939
some code savers for common code-emit;
Claus Gittinger <cg@exept.de>
parents:
1784
diff
changeset
|
527 |
"theoretically, this allows for an instance method to access a classInstVar; |
29b197bc6939
some code savers for common code-emit;
Claus Gittinger <cg@exept.de>
parents:
1784
diff
changeset
|
528 |
However, the parser blocks this and we never arrive here." |
29b197bc6939
some code savers for common code-emit;
Claus Gittinger <cg@exept.de>
parents:
1784
diff
changeset
|
529 |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
530 |
aStream nextPut:#pushClassInstVar; nextPut:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
531 |
^ self |
14 | 532 |
]. |
554 | 533 |
|
14 | 534 |
(type == #ThisContext) ifTrue:[ |
872
7cf38a8125e6
support for workspace variables.
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
535 |
aStream nextPut:#pushThisContext. |
7cf38a8125e6
support for workspace variables.
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
536 |
^ self |
7cf38a8125e6
support for workspace variables.
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
537 |
]. |
7cf38a8125e6
support for workspace variables.
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
538 |
|
1296 | 539 |
(type == #WorkspaceVariable |
540 |
or:[type == #DoItTemporary]) ifTrue:[ |
|
872
7cf38a8125e6
support for workspace variables.
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
541 |
"/ this is done by keeping the valueHolder in the literalArray, |
7cf38a8125e6
support for workspace variables.
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
542 |
"/ and coding a #value message here. |
7cf38a8125e6
support for workspace variables.
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
543 |
|
875 | 544 |
litIndex := aCompiler addLiteral:token. |
1808
29b197bc6939
some code savers for common code-emit;
Claus Gittinger <cg@exept.de>
parents:
1784
diff
changeset
|
545 |
self emitPushLiteralIndex:litIndex on:aStream for:aCompiler. |
872
7cf38a8125e6
support for workspace variables.
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
546 |
|
7cf38a8125e6
support for workspace variables.
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
547 |
selLitIdx := aCompiler addLiteral:#value. |
3166
6d6abf8f4439
Do not generate #lineno16 byte codes if still on the same line
Stefan Vogel <sv@exept.de>
parents:
3148
diff
changeset
|
548 |
self emitSendLiteralIndex:selLitIdx numArgs:0 line:("lineNr ?" 1) on:aStream for:aCompiler. |
872
7cf38a8125e6
support for workspace variables.
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
549 |
^ self |
14 | 550 |
]. |
3725 | 551 |
(type == #ThreadLocal) ifTrue:[ |
552 |
litIndex := aCompiler addLiteral:#Processor. |
|
553 |
self emitPushGlobalWithLiteralIndex:litIndex on:aStream for:aCompiler. |
|
554 |
selLitIdx := aCompiler addLiteral:#activeProcess. |
|
555 |
self emitSendLiteralIndex:selLitIdx numArgs:0 line:("lineNr ?" 1) on:aStream for:aCompiler. |
|
556 |
litIndex := aCompiler addLiteral:name asSymbol. |
|
557 |
self emitPushLiteralIndex:litIndex on:aStream for:aCompiler. |
|
558 |
selLitIdx := aCompiler addLiteral:#environmentAt:. |
|
559 |
self emitSendLiteralIndex:selLitIdx numArgs:1 line:("lineNr ?" 1) on:aStream for:aCompiler. |
|
560 |
^ self |
|
561 |
]. |
|
14 | 562 |
|
563 |
"not reached" |
|
1462 | 564 |
self error:'bad type'. |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
565 |
|
4124 | 566 |
"Created: / 25-06-1997 / 16:14:17 / cg" |
567 |
"Modified: / 17-01-1998 / 04:04:17 / cg" |
|
568 |
"Modified (format): / 13-02-2017 / 20:34:16 / cg" |
|
559 | 569 |
! |
570 |
||
571 |
codeOn:aStream inBlock:codeBlock for:aCompiler |
|
1784
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
572 |
|idx| |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
573 |
|
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
574 |
idx := (index isNil) |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
575 |
ifTrue:[ self indexIn: aCompiler ] |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
576 |
ifFalse:[ index ]. |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
577 |
|
559 | 578 |
self |
1784
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
579 |
codeLoadOn:aStream type:type index:idx inBlock:codeBlock for:aCompiler |
559 | 580 |
|
1784
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
581 |
"Modified: / 06-08-2006 / 16:04:54 / cg" |
14 | 582 |
! |
583 |
||
104 | 584 |
codeStoreOn:aStream inBlock:codeBlock valueNeeded:valueNeeded for:aCompiler |
1784
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
585 |
|idx| |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
586 |
|
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
587 |
idx := (index isNil) |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
588 |
ifTrue:[ self indexIn: aCompiler ] |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
589 |
ifFalse:[ index ]. |
1821 | 590 |
idx == 0 ifTrue:[ |
591 |
self error |
|
592 |
]. |
|
559 | 593 |
self |
1784
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
594 |
codeStoreOn:aStream type:type index:idx |
559 | 595 |
inBlock:codeBlock valueNeeded:valueNeeded for:aCompiler |
596 |
||
1821 | 597 |
"Modified: / 12-08-2006 / 15:54:52 / cg" |
559 | 598 |
! |
599 |
||
600 |
codeStoreOn:aStream type:type index:index inBlock:codeBlock valueNeeded:valueNeeded for:aCompiler |
|
1296 | 601 |
|theCode b deltaLevel litIndex bvIdx blocksCode selLitIdx| |
14 | 602 |
|
1296 | 603 |
"/ value to be stored is on TOP of stack. |
14 | 604 |
valueNeeded ifTrue:[ |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
605 |
aStream nextPut:#dup |
14 | 606 |
]. |
554 | 607 |
|
14 | 608 |
(type == #MethodVariable) ifTrue:[ |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
609 |
(index <= 6) ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
610 |
theCode := #(storeMethodVar1 storeMethodVar2 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
611 |
storeMethodVar3 storeMethodVar4 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
612 |
storeMethodVar5 storeMethodVar6) at:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
613 |
aStream nextPut:theCode. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
614 |
^ self |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
615 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
616 |
aStream nextPut:#storeMethodVar; nextPut:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
617 |
^ self |
14 | 618 |
]. |
554 | 619 |
|
14 | 620 |
(type == #InstanceVariable) ifTrue:[ |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
621 |
(index <= 10) ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
622 |
theCode := #(storeInstVar1 storeInstVar2 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
623 |
storeInstVar3 storeInstVar4 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
624 |
storeInstVar5 storeInstVar6 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
625 |
storeInstVar7 storeInstVar8 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
626 |
storeInstVar9 storeInstVar10) at:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
627 |
aStream nextPut:theCode. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
628 |
^ self |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
629 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
630 |
aStream nextPut:#storeInstVar; nextPut:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
631 |
^ self |
14 | 632 |
]. |
554 | 633 |
|
2754
81d1bb6dd8d6
changed: #codeStoreOn:type:index:inBlock:valueNeeded:for:
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
634 |
((type == #BlockVariable) |
4257
9777fd81cae8
Issue #205: fixed compilation of assignment into inlined block argument
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3851
diff
changeset
|
635 |
"/ Normally one cannot assign to a block argument in smalltalk. |
9777fd81cae8
Issue #205: fixed compilation of assignment into inlined block argument
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3851
diff
changeset
|
636 |
"/ However, this is supported in Smalltalk/X if ParserFlags allowAssignmentToBlockArgument: |
9777fd81cae8
Issue #205: fixed compilation of assignment into inlined block argument
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3851
diff
changeset
|
637 |
"/ is set to true or when compiling other languages (JavaScript in particular). |
2754
81d1bb6dd8d6
changed: #codeStoreOn:type:index:inBlock:valueNeeded:for:
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
638 |
or:[(type == #BlockArg)]) ifTrue:[ |
559 | 639 |
bvIdx := index. |
640 |
||
641 |
"/ find the context where that variable is contained physically |
|
642 |
blocksCode := block. |
|
643 |
[blocksCode notNil and:[blocksCode isInlineBlock]] whileTrue:[ |
|
644 |
blocksCode := blocksCode home |
|
645 |
]. |
|
646 |
||
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
647 |
"find deltaLevel to block, where variable was defined" |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
648 |
b := codeBlock. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
649 |
deltaLevel := 0. |
559 | 650 |
[b notNil and:[b ~~ blocksCode]] whileTrue:[ |
554 | 651 |
b isInlineBlock ifFalse:[ |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
652 |
deltaLevel := deltaLevel + 1 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
653 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
654 |
b := b home |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
655 |
]. |
14 | 656 |
|
559 | 657 |
b isNil ifTrue:[ |
658 |
codeBlock isNil ifTrue:[ |
|
659 |
"/ a block which is inlined in the method. |
|
2754
81d1bb6dd8d6
changed: #codeStoreOn:type:index:inBlock:valueNeeded:for:
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
660 |
"/ Generate a storeMVAR |
559 | 661 |
|
662 |
bvIdx := block indexOfFirstTemp + index - 1. |
|
4257
9777fd81cae8
Issue #205: fixed compilation of assignment into inlined block argument
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3851
diff
changeset
|
663 |
type == #BlockVariable ifTrue:[ |
9777fd81cae8
Issue #205: fixed compilation of assignment into inlined block argument
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3851
diff
changeset
|
664 |
bvIdx := bvIdx + block numArgs. |
9777fd81cae8
Issue #205: fixed compilation of assignment into inlined block argument
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3851
diff
changeset
|
665 |
]. |
559 | 666 |
^ self |
667 |
codeStoreOn:aStream |
|
668 |
type:#MethodVariable index:bvIdx |
|
669 |
inBlock:codeBlock |
|
670 |
valueNeeded:false "/ already dupped if value is needed |
|
671 |
for:aCompiler |
|
672 |
]. |
|
673 |
"/ a var of a block which is inlined in the outer block. |
|
674 |
"/ Generate a pushBVAR |
|
675 |
||
676 |
bvIdx := block indexOfFirstTemp + index - 1. |
|
4257
9777fd81cae8
Issue #205: fixed compilation of assignment into inlined block argument
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3851
diff
changeset
|
677 |
type == #BlockVariable ifTrue:[ |
9777fd81cae8
Issue #205: fixed compilation of assignment into inlined block argument
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3851
diff
changeset
|
678 |
bvIdx := bvIdx + block numArgs. |
9777fd81cae8
Issue #205: fixed compilation of assignment into inlined block argument
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3851
diff
changeset
|
679 |
]. |
559 | 680 |
] ifFalse:[ |
681 |
block isInlineBlock ifTrue:[ |
|
682 |
"/ a var of a block which is inlined in another block. |
|
683 |
"/ Generate a pushBVAR / pushOuterBVAR |
|
684 |
bvIdx := block indexOfFirstTemp + index - 1. |
|
4257
9777fd81cae8
Issue #205: fixed compilation of assignment into inlined block argument
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3851
diff
changeset
|
685 |
type == #BlockVariable ifTrue:[ |
9777fd81cae8
Issue #205: fixed compilation of assignment into inlined block argument
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3851
diff
changeset
|
686 |
bvIdx := bvIdx + block numArgs. |
9777fd81cae8
Issue #205: fixed compilation of assignment into inlined block argument
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3851
diff
changeset
|
687 |
]. |
559 | 688 |
] |
689 |
]. |
|
690 |
||
2754
81d1bb6dd8d6
changed: #codeStoreOn:type:index:inBlock:valueNeeded:for:
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
691 |
(type == #BlockArg) ifTrue:[ |
81d1bb6dd8d6
changed: #codeStoreOn:type:index:inBlock:valueNeeded:for:
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
692 |
(deltaLevel == 0) ifTrue:[ |
81d1bb6dd8d6
changed: #codeStoreOn:type:index:inBlock:valueNeeded:for:
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
693 |
aStream nextPut:#storeBlockLocal |
81d1bb6dd8d6
changed: #codeStoreOn:type:index:inBlock:valueNeeded:for:
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
694 |
] ifFalse:[ |
81d1bb6dd8d6
changed: #codeStoreOn:type:index:inBlock:valueNeeded:for:
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
695 |
aStream nextPut:#storeOuterBlockLocal; nextPut:deltaLevel |
81d1bb6dd8d6
changed: #codeStoreOn:type:index:inBlock:valueNeeded:for:
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
696 |
]. |
2755
a59c6adef58f
changed: #codeStoreOn:type:index:inBlock:valueNeeded:for:
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
697 |
aStream nextPut:bvIdx-1. |
2754
81d1bb6dd8d6
changed: #codeStoreOn:type:index:inBlock:valueNeeded:for:
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
698 |
^ self |
81d1bb6dd8d6
changed: #codeStoreOn:type:index:inBlock:valueNeeded:for:
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
699 |
]. |
81d1bb6dd8d6
changed: #codeStoreOn:type:index:inBlock:valueNeeded:for:
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
700 |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
701 |
(deltaLevel == 0) ifTrue:[ |
559 | 702 |
bvIdx <= 3 ifTrue:[ |
703 |
aStream nextPut:(#(storeBlockVar1 storeBlockVar2 storeBlockVar3) at:bvIdx). |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
704 |
^ self |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
705 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
706 |
aStream nextPut:#storeBlockVar |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
707 |
] ifFalse:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
708 |
aStream nextPut:#storeOuterBlockVar; nextPut:deltaLevel |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
709 |
]. |
559 | 710 |
aStream nextPut:bvIdx. |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
711 |
^ self |
14 | 712 |
]. |
554 | 713 |
|
117 | 714 |
(type == #GlobalVariable) ifTrue:[ |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
715 |
litIndex := aCompiler addLiteral:name asSymbol. |
1808
29b197bc6939
some code savers for common code-emit;
Claus Gittinger <cg@exept.de>
parents:
1784
diff
changeset
|
716 |
self emitStoreGlobalWithLiteralIndex:litIndex on:aStream for:aCompiler. |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
717 |
^ self |
117 | 718 |
]. |
554 | 719 |
|
1553 | 720 |
((type == #ClassVariable) or:[type == #PoolVariable]) ifTrue:[ |
3441 | 721 |
value isNil ifTrue:[ |
722 |
"/ class not set in node - use the compiler's class. |
|
723 |
"/ this happens, when a JavaScript class definition is read, |
|
724 |
"/ where the class has not yet been created when the classVars are specified. |
|
725 |
litIndex := aCompiler addLiteral:(aCompiler targetClass globalKeyForClassVar:name). |
|
726 |
] ifFalse:[ |
|
727 |
litIndex := aCompiler addLiteral:(value globalKeyForClassVar:name). |
|
728 |
]. |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
729 |
litIndex < 256 ifTrue:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
730 |
aStream nextPut:#storeClassVarS; nextPut:litIndex |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
731 |
] ifFalse:[ |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
732 |
aStream nextPut:#storeClassVarL; nextPut:litIndex; nextPut:0 |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
733 |
]. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
734 |
^ self |
14 | 735 |
]. |
554 | 736 |
|
14 | 737 |
(type == #ClassInstanceVariable) ifTrue:[ |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
738 |
aStream nextPut:#storeClassInstVar; nextPut:index. |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
739 |
^ self |
14 | 740 |
]. |
554 | 741 |
|
1296 | 742 |
(type == #WorkspaceVariable |
743 |
or:[type == #DoItTemporary]) ifTrue:[ |
|
744 |
"/ this is done by keeping the valueHolder in the literalArray, |
|
745 |
"/ and coding a #value: message here. |
|
746 |
||
747 |
litIndex := aCompiler addLiteral:token. |
|
1808
29b197bc6939
some code savers for common code-emit;
Claus Gittinger <cg@exept.de>
parents:
1784
diff
changeset
|
748 |
self emitPushLiteralIndex:litIndex on:aStream for:aCompiler. |
1296 | 749 |
|
750 |
"/ need to exchange top 2 items (sigh - there is no exch instruction) |
|
751 |
"/ now, we have: |
|
752 |
"/ TOS: holder |
|
753 |
"/ NOS: value |
|
754 |
"/ |
|
755 |
"/ for the send, I need them as: |
|
756 |
"/ TOS: value |
|
757 |
"/ NOS: holder |
|
758 |
aStream nextPut:#over. |
|
759 |
"/ now, we have: |
|
760 |
"/ TOS: value |
|
761 |
"/ NOS: holder |
|
762 |
"/ value |
|
763 |
selLitIdx := aCompiler addLiteral:#'value:'. |
|
3166
6d6abf8f4439
Do not generate #lineno16 byte codes if still on the same line
Stefan Vogel <sv@exept.de>
parents:
3148
diff
changeset
|
764 |
self emitSendLiteralIndex:selLitIdx numArgs:1 line:("lineNr ?" 1) on:aStream for:aCompiler. |
1296 | 765 |
"/ now, we have: |
766 |
"/ TOS: retVal from value: |
|
767 |
"/ NOS: value |
|
768 |
aStream nextPut:#drop. |
|
769 |
aStream nextPut:#drop. |
|
770 |
^ self |
|
771 |
]. |
|
772 |
||
3725 | 773 |
(type == #ThreadLocal) ifTrue:[ |
774 |
aStream nextPut:#dup. |
|
775 |
litIndex := aCompiler addLiteral:#Processor. |
|
776 |
self emitPushGlobalWithLiteralIndex:litIndex on:aStream for:aCompiler. |
|
777 |
selLitIdx := aCompiler addLiteral:#activeProcess. |
|
778 |
self emitSendLiteralIndex:selLitIdx numArgs:0 line:("lineNr ?" 1) on:aStream for:aCompiler. |
|
779 |
"/ now, we have: |
|
780 |
"/ TOS: process |
|
781 |
"/ NOS: value |
|
782 |
"/ value |
|
783 |
aStream nextPut:#swap. |
|
784 |
"/ now, we have: |
|
785 |
"/ TOS: value |
|
786 |
"/ NOS: process |
|
787 |
"/ value |
|
788 |
litIndex := aCompiler addLiteral:name asSymbol. |
|
789 |
self emitPushLiteralIndex:litIndex on:aStream for:aCompiler. |
|
790 |
"/ now, we have: |
|
791 |
"/ TOS: key |
|
792 |
"/ NOS: value |
|
793 |
"/ process |
|
794 |
"/ value |
|
795 |
aStream nextPut:#swap. |
|
796 |
"/ now, we have: |
|
797 |
"/ TOS: value |
|
798 |
"/ NOS: key |
|
799 |
"/ process |
|
800 |
"/ value |
|
801 |
selLitIdx := aCompiler addLiteral:#environmentAt:put:. |
|
802 |
self emitSendLiteralIndex:selLitIdx numArgs:1 line:("lineNr ?" 1) on:aStream for:aCompiler. |
|
803 |
aStream nextPut:#drop. |
|
804 |
"/ leave value on top |
|
805 |
^ self |
|
806 |
]. |
|
807 |
||
2754
81d1bb6dd8d6
changed: #codeStoreOn:type:index:inBlock:valueNeeded:for:
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
808 |
"/ the following cannot be encountered with Smalltalk code; |
81d1bb6dd8d6
changed: #codeStoreOn:type:index:inBlock:valueNeeded:for:
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
809 |
"/ however, the VM supports it for other languages (JavaScript, in particular) |
1821 | 810 |
(type == #MethodArg) ifTrue:[ |
2754
81d1bb6dd8d6
changed: #codeStoreOn:type:index:inBlock:valueNeeded:for:
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
811 |
aStream nextPut:#storeMethodLocal; nextPut:index-1. |
1821 | 812 |
^ self |
813 |
]. |
|
814 |
||
106 | 815 |
"not reached" |
941 | 816 |
self error:'bad assignment' |
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
817 |
|
1784
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
818 |
"Created: / 25-06-1997 / 16:14:40 / cg" |
2755
a59c6adef58f
changed: #codeStoreOn:type:index:inBlock:valueNeeded:for:
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
819 |
"Modified: / 25-10-2011 / 23:41:59 / cg" |
4257
9777fd81cae8
Issue #205: fixed compilation of assignment into inlined block argument
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3851
diff
changeset
|
820 |
"Modified: / 18-04-2018 / 23:34:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9777fd81cae8
Issue #205: fixed compilation of assignment into inlined block argument
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3851
diff
changeset
|
821 |
"Modified (comment): / 20-04-2018 / 06:21:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
14 | 822 |
! ! |
823 |
||
1035 | 824 |
!VariableNode methodsFor:'enumerating'! |
539
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
535
diff
changeset
|
825 |
|
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
535
diff
changeset
|
826 |
nodeDo:anEnumerator |
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
535
diff
changeset
|
827 |
"helper for parse tree walking" |
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
535
diff
changeset
|
828 |
|
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
535
diff
changeset
|
829 |
^ anEnumerator doVariable:self name:name |
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
535
diff
changeset
|
830 |
|
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
535
diff
changeset
|
831 |
"Created: 19.6.1997 / 16:41:35 / cg" |
3316 | 832 |
! |
833 |
||
834 |
variableNodesDo:aBlock |
|
835 |
"helper for parse tree walking" |
|
836 |
||
837 |
aBlock value:self |
|
539
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
535
diff
changeset
|
838 |
! ! |
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
535
diff
changeset
|
839 |
|
1035 | 840 |
!VariableNode methodsFor:'evaluation'! |
140 | 841 |
|
1384 | 842 |
evaluateIn:anEnvironment |
980 | 843 |
|nameSym| |
844 |
||
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
845 |
(type == #ContextVariable) ifTrue:[ |
1137 | 846 |
"/ value method isWrapped ifTrue:[^ nil]. |
1178
f8065fd945a8
care for wrapped methods context
Claus Gittinger <cg@exept.de>
parents:
1137
diff
changeset
|
847 |
index > value size ifTrue:[ |
f8065fd945a8
care for wrapped methods context
Claus Gittinger <cg@exept.de>
parents:
1137
diff
changeset
|
848 |
"/ this can happen ,if a wrapped method is not yet entered |
f8065fd945a8
care for wrapped methods context
Claus Gittinger <cg@exept.de>
parents:
1137
diff
changeset
|
849 |
^ nil |
f8065fd945a8
care for wrapped methods context
Claus Gittinger <cg@exept.de>
parents:
1137
diff
changeset
|
850 |
]. |
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
851 |
^ value at:index |
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
852 |
]. |
140 | 853 |
(type == #MethodVariable |
1384 | 854 |
or:[type == #MethodArg |
140 | 855 |
or:[type == #BlockArg |
1384 | 856 |
or:[type == #BlockVariable]]]) ifTrue:[ |
420 | 857 |
^ token variableValue |
140 | 858 |
]. |
859 |
(type == #InstanceVariable) ifTrue:[ |
|
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
860 |
^ value instVarAt:index |
140 | 861 |
]. |
1088 | 862 |
(type == #JavaVariable) ifTrue:[ |
863 |
nameSym := name asSymbolIfInterned. |
|
864 |
nameSym notNil ifTrue:[ |
|
865 |
^ JAVA at:name |
|
866 |
]. |
|
2420
914eb1c66bda
Raise UndefinedVariableError - not raising is caused class method patches for non-existing
Stefan Vogel <sv@exept.de>
parents:
2126
diff
changeset
|
867 |
"/ ^ nil. |
914eb1c66bda
Raise UndefinedVariableError - not raising is caused class method patches for non-existing
Stefan Vogel <sv@exept.de>
parents:
2126
diff
changeset
|
868 |
^ Parser undefinedVariableError raiseRequestWith:name errorString:('undefined: ',name). |
1088 | 869 |
]. |
140 | 870 |
(type == #GlobalVariable) ifTrue:[ |
980 | 871 |
nameSym := name asSymbolIfInterned. |
872 |
nameSym notNil ifTrue:[ |
|
873 |
(Smalltalk includesKey:nameSym) ifTrue:[ |
|
3303 | 874 |
^ Smalltalk at:nameSym |
980 | 875 |
] |
420 | 876 |
]. |
2420
914eb1c66bda
Raise UndefinedVariableError - not raising is caused class method patches for non-existing
Stefan Vogel <sv@exept.de>
parents:
2126
diff
changeset
|
877 |
"/ ^ nil. |
914eb1c66bda
Raise UndefinedVariableError - not raising is caused class method patches for non-existing
Stefan Vogel <sv@exept.de>
parents:
2126
diff
changeset
|
878 |
^ Parser undefinedVariableError raiseRequestWith:name errorString:('undefined: ',name). |
140 | 879 |
]. |
880 |
(type == #ClassVariable) ifTrue:[ |
|
1314
782d4cc1d588
slight code beautification: use classVarAt: / classVarAt:put:
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
881 |
^ value classVarAt:name asSymbol |
140 | 882 |
]. |
883 |
(type == #ClassInstanceVariable) ifTrue:[ |
|
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
884 |
^ value instVarAt:index |
140 | 885 |
]. |
886 |
(type == #ThisContext) ifTrue:[ |
|
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
887 |
value notNil ifTrue:[ |
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
888 |
^ value |
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
889 |
]. |
420 | 890 |
^ thisContext |
891 |
]. |
|
892 |
(type == #PrivateClass) ifTrue:[ |
|
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
893 |
^ value privateClassesAt:name asSymbol |
140 | 894 |
]. |
1918 | 895 |
(type == #PoolVariable) ifTrue:[ |
896 |
^ value classVarAt:name asSymbol |
|
897 |
]. |
|
719 | 898 |
|
899 |
"/ synthetic; for evaluation only |
|
1179 | 900 |
(type == #EvaluationContextLocal |
901 |
or:[type == #EvaluationContextVar |
|
902 |
or:[type == #EvaluationContextArg]]) ifTrue:[ |
|
3389 | 903 |
(token isKindOf:Variable) ifFalse:[^ token ]. |
719 | 904 |
^ token variableValue |
905 |
]. |
|
1179 | 906 |
|
1092 | 907 |
"/ synthetic; for evaluation only |
1606 | 908 |
((type == #WorkspaceVariable) or:[type == #DoItTemporary]) ifTrue:[ |
1092 | 909 |
^ token value |
910 |
]. |
|
3725 | 911 |
"/ synthetic; for evaluation only |
912 |
(type == #ThreadLocal) ifTrue:[ |
|
913 |
^ Processor activeProcess environmentAt:name asSymbol |
|
914 |
]. |
|
719 | 915 |
|
140 | 916 |
"not reached" |
1320 | 917 |
self error:'internal error - bad variable type:' , type mayProceed:true. |
140 | 918 |
^ value |
420 | 919 |
|
1918 | 920 |
"Modified: / 11-09-2006 / 14:22:38 / User" |
3303 | 921 |
"Modified: / 29-08-2013 / 01:19:53 / cg" |
140 | 922 |
! |
923 |
||
924 |
store:aValue |
|
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
925 |
(type == #ContextVariable) ifTrue:[ |
1137 | 926 |
"/ value method isWrapped ifTrue:[ |
927 |
"/ self warn:'The method has not yet been entered (in breakpoint stub)\Please perform a singleStep first' withCRs. |
|
928 |
"/ ^ aValue |
|
929 |
"/ ]. |
|
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
930 |
value at:index put:aValue. ^ aValue |
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
931 |
]. |
140 | 932 |
(type == #MethodVariable |
933 |
or:[type == #BlockVariable]) ifTrue:[ |
|
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
934 |
token value:aValue. ^ aValue |
140 | 935 |
]. |
936 |
(type == #InstanceVariable) ifTrue:[ |
|
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
937 |
^ value instVarAt:index put:aValue |
140 | 938 |
]. |
939 |
(type == #GlobalVariable) ifTrue:[ |
|
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
940 |
^ Smalltalk at:name put:aValue |
140 | 941 |
]. |
942 |
(type == #ClassVariable) ifTrue:[ |
|
1314
782d4cc1d588
slight code beautification: use classVarAt: / classVarAt:put:
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
943 |
^ value classVarAt:name asSymbol put:aValue |
140 | 944 |
]. |
945 |
(type == #ClassInstanceVariable) ifTrue:[ |
|
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
946 |
^ value instVarAt:index put:aValue |
140 | 947 |
]. |
719 | 948 |
|
949 |
"/ synthetic; for evaluation only |
|
950 |
(type == #EvaluationContextLocal) ifTrue:[ |
|
875 | 951 |
token value:aValue. ^ aValue |
952 |
]. |
|
2764 | 953 |
((type == #WorkspaceVariable) or:[type == #DoItTemporary]) ifTrue:[ |
875 | 954 |
token value:aValue. ^ aValue |
719 | 955 |
]. |
3725 | 956 |
(type == #ThreadLocal) ifTrue:[ |
957 |
^ Processor activeProcess environmentAt:name asSymbol put:aValue. ^ aValue |
|
958 |
]. |
|
719 | 959 |
|
140 | 960 |
"not reached" |
1320 | 961 |
self error:'bad variable node type' mayProceed:true. |
140 | 962 |
^ aValue |
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
963 |
|
2764 | 964 |
"Modified: / 05-12-2011 / 18:43:56 / cg" |
140 | 965 |
! ! |
966 |
||
3574 | 967 |
|
1080 | 968 |
!VariableNode methodsFor:'printing & storing'! |
14 | 969 |
|
2898
bb61af1f77a1
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
2864
diff
changeset
|
970 |
displayOn:aGCOrStream |
bb61af1f77a1
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
2864
diff
changeset
|
971 |
"Compatibility |
bb61af1f77a1
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
2864
diff
changeset
|
972 |
append a printed desription on some stream (Dolphin, Squeak) |
bb61af1f77a1
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
2864
diff
changeset
|
973 |
OR: |
bb61af1f77a1
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
2864
diff
changeset
|
974 |
display the receiver in a graphicsContext at 0@0 (ST80). |
bb61af1f77a1
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
2864
diff
changeset
|
975 |
This method allows for any object to be displayed in some view |
bb61af1f77a1
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
2864
diff
changeset
|
976 |
(although the fallBack is to display its printString ...)" |
612 | 977 |
|
2898
bb61af1f77a1
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
2864
diff
changeset
|
978 |
"/ what a kludge - Dolphin and Squeak mean: printOn: a stream; |
4133 | 979 |
"/ old ST80 means: draw-yourself on a GC. |
2898
bb61af1f77a1
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
2864
diff
changeset
|
980 |
aGCOrStream isStream ifFalse:[ |
bb61af1f77a1
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
2864
diff
changeset
|
981 |
^ super displayOn:aGCOrStream. |
bb61af1f77a1
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
2864
diff
changeset
|
982 |
]. |
612 | 983 |
|
2898
bb61af1f77a1
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
2864
diff
changeset
|
984 |
aGCOrStream |
bb61af1f77a1
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
2864
diff
changeset
|
985 |
nextPutAll:self class name; |
bb61af1f77a1
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
2864
diff
changeset
|
986 |
nextPut:$(. |
bb61af1f77a1
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
2864
diff
changeset
|
987 |
self printOn:aGCOrStream. |
bb61af1f77a1
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
2864
diff
changeset
|
988 |
aGCOrStream nextPut:$) |
4133 | 989 |
|
990 |
"Modified (comment): / 22-02-2017 / 16:49:57 / cg" |
|
14 | 991 |
! |
992 |
||
993 |
printOn:aStream indent:i |
|
98 | 994 |
|
641
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
995 |
"/ actually only a debug-check |
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
996 |
( |
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
997 |
type == #ContextVariable |
e18daf10662c
added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents:
612
diff
changeset
|
998 |
or:[type == #MethodArg |
98 | 999 |
or:[type == #MethodVariable |
1000 |
or:[type == #InstanceVariable |
|
1001 |
or:[type == #BlockArg |
|
1002 |
or:[type == #GlobalVariable |
|
1088 | 1003 |
or:[type == #JavaVariable |
98 | 1004 |
or:[type == #ClassVariable |
2066 | 1005 |
or:[type == #PoolVariable |
98 | 1006 |
or:[type == #BlockVariable |
465 | 1007 |
or:[type == #PrivateClass |
872
7cf38a8125e6
support for workspace variables.
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
1008 |
or:[type == #WorkspaceVariable |
1101 | 1009 |
or:[type == #EvaluationContextArg |
720 | 1010 |
or:[type == #EvaluationContextLocal |
2066 | 1011 |
or:[type == #ClassInstanceVariable]]]]]]]]]]]]]]) ifTrue:[ |
465 | 1012 |
aStream nextPutAll:name. ^ self |
14 | 1013 |
]. |
1014 |
(type == #ThisContext) ifTrue:[ |
|
465 | 1015 |
aStream nextPutAll:'thisContext'. ^ self |
14 | 1016 |
]. |
1017 |
"not reached" |
|
1320 | 1018 |
self error:'bad variable node type' mayProceed:true. |
465 | 1019 |
|
720 | 1020 |
"Modified: / 17.5.1998 / 00:17:12 / cg" |
14 | 1021 |
! ! |
140 | 1022 |
|
1023 |
!VariableNode methodsFor:'queries'! |
|
1024 |
||
243
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
1025 |
canReuseAsArg:anotherNode |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
1026 |
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
|
1027 |
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
|
1028 |
|
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
1029 |
(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
|
1030 |
|
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
1031 |
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
|
1032 |
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
|
1033 |
]. |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
1034 |
(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
|
1035 |
(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
|
1036 |
(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
|
1037 |
|
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
1038 |
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
|
1039 |
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
|
1040 |
]. |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
1041 |
(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
|
1042 |
(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
|
1043 |
]. |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
1044 |
^ false |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
1045 |
|
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
1046 |
"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
|
1047 |
"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
|
1048 |
! |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
1049 |
|
1784
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
1050 |
indexIn: aCompiler |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
1051 |
(type == #MethodVariable) ifTrue:[ |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
1052 |
^ aCompiler methodVars indexOf:name. |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
1053 |
]. |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
1054 |
(type == #MethodArg) ifTrue:[ |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
1055 |
^ aCompiler methodArgs indexOf:name. |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
1056 |
]. |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
1057 |
^ index |
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
1058 |
|
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
1059 |
"Created: / 06-08-2006 / 16:03:56 / cg" |
3622 | 1060 |
! ! |
1061 |
||
1062 |
!VariableNode methodsFor:'testing'! |
|
1784
4380f89e1a91
allow for lazy index of locals and arguments.
Claus Gittinger <cg@exept.de>
parents:
1606
diff
changeset
|
1063 |
|
566 | 1064 |
isArgument |
1065 |
"return true, if this is a node for an argument (block or method)" |
|
1066 |
||
1067 |
^ (type == #MethodArg) or:[type == #BlockArg] |
|
1068 |
||
1069 |
"Created: 27.6.1997 / 13:07:05 / cg" |
|
1070 |
"Modified: 27.6.1997 / 13:07:19 / cg" |
|
1071 |
! |
|
1072 |
||
3473 | 1073 |
isBlockArg |
1074 |
^ type == #BlockArg |
|
1075 |
! |
|
1076 |
||
3472 | 1077 |
isBlockVariable |
1078 |
^ type == #BlockVariable |
|
1079 |
! |
|
1080 |
||
1076
b393dc61463e
added #isClassVariable and #isInstanceVariable
Claus Gittinger <cg@exept.de>
parents:
1035
diff
changeset
|
1081 |
isClassVariable |
b393dc61463e
added #isClassVariable and #isInstanceVariable
Claus Gittinger <cg@exept.de>
parents:
1035
diff
changeset
|
1082 |
^ type == #ClassVariable |
b393dc61463e
added #isClassVariable and #isInstanceVariable
Claus Gittinger <cg@exept.de>
parents:
1035
diff
changeset
|
1083 |
! |
b393dc61463e
added #isClassVariable and #isInstanceVariable
Claus Gittinger <cg@exept.de>
parents:
1035
diff
changeset
|
1084 |
|
140 | 1085 |
isGlobal |
2957 | 1086 |
"return true, if this is a node for an existing!! global variable" |
789 | 1087 |
|
1088 |
^ (type == #GlobalVariable) |
|
1089 |
and:[name isSymbol |
|
1090 |
and:[Smalltalk includesKey:name]] |
|
1091 |
||
1092 |
"Modified: / 19.10.1998 / 19:43:04 / cg" |
|
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
1093 |
! |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
1094 |
|
1997 | 1095 |
isGlobalNamed:nameWanted |
1996 | 1096 |
"return true, if this is a node for a particular global variable" |
1097 |
||
1098 |
^ (type == #GlobalVariable) |
|
1099 |
and:[name = nameWanted |
|
1100 |
and:[name isSymbol |
|
1101 |
and:[Smalltalk includesKey:name]]] |
|
1102 |
||
1997 | 1103 |
"Created: / 05-03-2007 / 13:35:07 / cg" |
1996 | 1104 |
! |
1105 |
||
1310
feb30ab0c221
better variabletype queries.
Claus Gittinger <cg@exept.de>
parents:
1296
diff
changeset
|
1106 |
isGlobalVariable |
2957 | 1107 |
"return true, if this is a node for global variable" |
1108 |
||
1310
feb30ab0c221
better variabletype queries.
Claus Gittinger <cg@exept.de>
parents:
1296
diff
changeset
|
1109 |
^ type == #GlobalVariable |
feb30ab0c221
better variabletype queries.
Claus Gittinger <cg@exept.de>
parents:
1296
diff
changeset
|
1110 |
! |
feb30ab0c221
better variabletype queries.
Claus Gittinger <cg@exept.de>
parents:
1296
diff
changeset
|
1111 |
|
3622 | 1112 |
isInstance |
1113 |
<resource: #obsolete> |
|
1114 |
||
1115 |
self obsoleteMethodWarning. |
|
1116 |
^ self isInstanceVariable |
|
1117 |
! |
|
1118 |
||
1076
b393dc61463e
added #isClassVariable and #isInstanceVariable
Claus Gittinger <cg@exept.de>
parents:
1035
diff
changeset
|
1119 |
isInstanceVariable |
b393dc61463e
added #isClassVariable and #isInstanceVariable
Claus Gittinger <cg@exept.de>
parents:
1035
diff
changeset
|
1120 |
^ type == #InstanceVariable |
b393dc61463e
added #isClassVariable and #isInstanceVariable
Claus Gittinger <cg@exept.de>
parents:
1035
diff
changeset
|
1121 |
! |
b393dc61463e
added #isClassVariable and #isInstanceVariable
Claus Gittinger <cg@exept.de>
parents:
1035
diff
changeset
|
1122 |
|
3851 | 1123 |
isInstanceVariableNamed:aString |
1124 |
^ (type == #InstanceVariable) and:[ name = aString ] |
|
1125 |
! |
|
1126 |
||
2864 | 1127 |
isJAVA |
1128 |
"Return true, if receiver is global variable node JAVA. |
|
1129 |
Used to highlight Java class references." |
|
1130 |
||
1131 |
^ (type == #GlobalVariable) and:[name = 'JAVA'] |
|
1132 |
||
1133 |
"Created: / 19-04-2012 / 09:38:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1134 |
! |
|
1135 |
||
3622 | 1136 |
isJavaPackageReference |
1137 |
"Return true, given node is JAVA package reference in form: |
|
1138 |
JAVA package1 package2 |
|
1139 |
" |
|
1140 |
||
1141 |
^self isJAVA |
|
1142 |
||
1143 |
"Created: / 19-04-2012 / 09:53:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1144 |
! |
|
1145 |
||
218
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
1146 |
isLocal |
748b4c509a51
use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents:
199
diff
changeset
|
1147 |
"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
|
1148 |
|
3476 | 1149 |
^ self isLocalVariable |
243
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
1150 |
! |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
1151 |
|
3475 | 1152 |
isLocalVariable |
1153 |
"return true, if this is a node for a local (block or method) variable" |
|
1154 |
||
3476 | 1155 |
^ (type == #MethodVariable) or:[type == #BlockVariable] |
3475 | 1156 |
! |
1157 |
||
1310
feb30ab0c221
better variabletype queries.
Claus Gittinger <cg@exept.de>
parents:
1296
diff
changeset
|
1158 |
isMethodArg |
feb30ab0c221
better variabletype queries.
Claus Gittinger <cg@exept.de>
parents:
1296
diff
changeset
|
1159 |
^ type == #MethodArg |
feb30ab0c221
better variabletype queries.
Claus Gittinger <cg@exept.de>
parents:
1296
diff
changeset
|
1160 |
! |
feb30ab0c221
better variabletype queries.
Claus Gittinger <cg@exept.de>
parents:
1296
diff
changeset
|
1161 |
|
feb30ab0c221
better variabletype queries.
Claus Gittinger <cg@exept.de>
parents:
1296
diff
changeset
|
1162 |
isMethodVariable |
feb30ab0c221
better variabletype queries.
Claus Gittinger <cg@exept.de>
parents:
1296
diff
changeset
|
1163 |
^ type == #MethodVariable |
feb30ab0c221
better variabletype queries.
Claus Gittinger <cg@exept.de>
parents:
1296
diff
changeset
|
1164 |
! |
feb30ab0c221
better variabletype queries.
Claus Gittinger <cg@exept.de>
parents:
1296
diff
changeset
|
1165 |
|
2957 | 1166 |
isPoolVariable |
1167 |
^ type == #PoolVariable |
|
1168 |
! |
|
1169 |
||
965 | 1170 |
isUndeclared |
3408 | 1171 |
|sym| |
1172 |
||
965 | 1173 |
type == #PrivateClass ifTrue:[ |
3408 | 1174 |
sym := (value name , '::' , name) asSymbolIfInterned. |
1175 |
^ sym isNil or:[(Smalltalk includesKey:sym) not]. |
|
965 | 1176 |
]. |
1177 |
type == #GlobalVariable ifTrue:[ |
|
3408 | 1178 |
sym := name asSymbolIfInterned. |
1179 |
^ sym isNil or:[(Smalltalk includesKey:sym) not] |
|
965 | 1180 |
]. |
1181 |
^ false |
|
3318
b944b8684bbf
Fix in VariableNode>>#isUndeclared
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3316
diff
changeset
|
1182 |
|
b944b8684bbf
Fix in VariableNode>>#isUndeclared
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3316
diff
changeset
|
1183 |
"Modified: / 05-09-2013 / 02:35:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
965 | 1184 |
! |
1185 |
||
243
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
1186 |
isVariable |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
1187 |
"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
|
1188 |
|
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
1189 |
^ true |
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
1190 |
|
cdc1424ddaac
use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
1191 |
"Created: 14.4.1996 / 00:46:32 / cg" |
140 | 1192 |
! ! |
1193 |
||
2599 | 1194 |
!VariableNode methodsFor:'visiting'! |
1195 |
||
1196 |
acceptVisitor:aVisitor |
|
1197 |
"Double dispatch back to the visitor, passing my type encoded in |
|
1198 |
the selector (visitor pattern)" |
|
1199 |
||
1200 |
"stub code automatically generated - please change if required" |
|
1201 |
||
1202 |
^ aVisitor visitVariableNode:self |
|
1203 |
! ! |
|
1204 |
||
360 | 1205 |
!VariableNode class methodsFor:'documentation'! |
148 | 1206 |
|
1207 |
version |
|
3725 | 1208 |
^ '$Header$' |
2507 | 1209 |
! |
1210 |
||
1211 |
version_CVS |
|
3725 | 1212 |
^ '$Header$' |
4257
9777fd81cae8
Issue #205: fixed compilation of assignment into inlined block argument
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3851
diff
changeset
|
1213 |
! |
9777fd81cae8
Issue #205: fixed compilation of assignment into inlined block argument
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3851
diff
changeset
|
1214 |
|
9777fd81cae8
Issue #205: fixed compilation of assignment into inlined block argument
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3851
diff
changeset
|
1215 |
version_HG |
9777fd81cae8
Issue #205: fixed compilation of assignment into inlined block argument
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3851
diff
changeset
|
1216 |
|
9777fd81cae8
Issue #205: fixed compilation of assignment into inlined block argument
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3851
diff
changeset
|
1217 |
^ '$Changeset: <not expanded> $' |
148 | 1218 |
! ! |
3148 | 1219 |