author | Claus Gittinger <cg@exept.de> |
Sun, 03 May 2020 23:44:59 +0200 | |
changeset 4650 | e9b212d470ff |
parent 4595 | 916945a571b6 |
permissions | -rw-r--r-- |
4507 | 1 |
"{ Encoding: utf8 }" |
2 |
||
0 | 3 |
" |
4 | 4 |
COPYRIGHT (c) 1989 by Claus Gittinger |
1982
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
5 |
All Rights Reserved |
0 | 6 |
|
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
1080 | 14 |
"{ Package: 'stx:libcomp' }" |
15 |
||
4507 | 16 |
"{ NameSpace: Smalltalk }" |
17 |
||
0 | 18 |
StatementNode subclass:#ReturnNode |
2101 | 19 |
instanceVariableNames:'myHome blockHome' |
20 |
classVariableNames:'' |
|
21 |
poolDictionaries:'' |
|
22 |
category:'System-Compiler-Support' |
|
0 | 23 |
! |
24 |
||
20 | 25 |
!ReturnNode class methodsFor:'documentation'! |
26 |
||
27 |
copyright |
|
28 |
" |
|
29 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
1982
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
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 return expressions |
|
261 | 44 |
This is a helper class for the compiler. |
263 | 45 |
|
46 |
[author:] |
|
47 |
Claus Gittinger |
|
20 | 48 |
" |
49 |
! ! |
|
0 | 50 |
|
51 |
!ReturnNode methodsFor:'accessing'! |
|
52 |
||
882
0bc2a6ecdfad
oops - cannot inline blocks which are assigned or returned.
Claus Gittinger <cg@exept.de>
parents:
843
diff
changeset
|
53 |
expression:e |
0bc2a6ecdfad
oops - cannot inline blocks which are assigned or returned.
Claus Gittinger <cg@exept.de>
parents:
843
diff
changeset
|
54 |
super expression:e. |
0bc2a6ecdfad
oops - cannot inline blocks which are assigned or returned.
Claus Gittinger <cg@exept.de>
parents:
843
diff
changeset
|
55 |
|
0bc2a6ecdfad
oops - cannot inline blocks which are assigned or returned.
Claus Gittinger <cg@exept.de>
parents:
843
diff
changeset
|
56 |
"/ any block, which is returned cannot be inlined. |
3484 | 57 |
e realNode isBlockNode ifTrue:[ |
58 |
e realNode possiblyInlined:false |
|
882
0bc2a6ecdfad
oops - cannot inline blocks which are assigned or returned.
Claus Gittinger <cg@exept.de>
parents:
843
diff
changeset
|
59 |
] |
0bc2a6ecdfad
oops - cannot inline blocks which are assigned or returned.
Claus Gittinger <cg@exept.de>
parents:
843
diff
changeset
|
60 |
! |
0bc2a6ecdfad
oops - cannot inline blocks which are assigned or returned.
Claus Gittinger <cg@exept.de>
parents:
843
diff
changeset
|
61 |
|
2398
f4fb7f5746dd
care for block vs. method return.
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
62 |
home |
f4fb7f5746dd
care for block vs. method return.
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
63 |
^ myHome |
f4fb7f5746dd
care for block vs. method return.
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
64 |
|
f4fb7f5746dd
care for block vs. method return.
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
65 |
"Created: / 19-05-2010 / 15:46:55 / cg" |
f4fb7f5746dd
care for block vs. method return.
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
66 |
! |
f4fb7f5746dd
care for block vs. method return.
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
67 |
|
0 | 68 |
home:someOne blockHome:aBlockNode |
69 |
myHome := someOne. |
|
70 |
blockHome := aBlockNode |
|
1945
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
71 |
! |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
72 |
|
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
73 |
lineNumber:something |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
74 |
"set lineNr" |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
75 |
|
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
76 |
lineNr := something. |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
77 |
|
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
78 |
"Created: / 16-11-2006 / 14:38:51 / cg" |
0 | 79 |
! ! |
80 |
||
2530
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
81 |
!ReturnNode methodsFor:'checks'! |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
82 |
|
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
83 |
plausibilityCheckIn:aParser |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
84 |
"check for return-in-return, as in |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
85 |
^ foo ifTrue:[ ^x] |
3308 | 86 |
that is (currently) not compilable by stc (generates bad C-code for it). |
87 |
TODO: rewite to use lint/lint rules and apply them before accepting" |
|
2530
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
88 |
|
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
89 |
|allow warn| |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
90 |
|
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
91 |
allow := aParser parserFlags allowPossibleSTCCompilationProblems. |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
92 |
warn := aParser parserFlags warnAboutPossibleSTCCompilationProblems. |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
93 |
(allow not or:[warn]) ifTrue:[ |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
94 |
expression containsReturn ifTrue:[ |
3015 | 95 |
(expression isMessage |
96 |
and:[ #( |
|
97 |
'ifTrue:' 'ifFalse:' |
|
98 |
'ifTrue:ifFalse:' 'ifFalse:ifTrue:' |
|
99 |
'whileTrue:' 'whileFalse:' |
|
100 |
) includes:(expression selector)]) |
|
101 |
ifTrue:[ |
|
102 |
allow ifTrue:[ |
|
103 |
^ 'stc will not compile return-in-return' |
|
104 |
]. |
|
105 |
aParser |
|
106 |
parseError:'stc will not compile return-in-return' |
|
107 |
position:startPosition to:endPosition |
|
108 |
] |
|
2530
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
109 |
]. |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
110 |
]. |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
111 |
^ nil. |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
112 |
|
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
113 |
"Created: / 05-07-2011 / 17:59:48 / cg" |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
114 |
! ! |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
115 |
|
0 | 116 |
!ReturnNode methodsFor:'code generation'! |
117 |
||
1945
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
118 |
basicCodeOn:aStream inBlock:b for:aCompiler |
4595 | 119 |
"/ Transcript showCR:'====> %1 [%2]' with:lineNr with:expression printString. |
120 |
||
1593 | 121 |
b isNil ifTrue:[ |
122 |
self codeLocalReturnOn:aStream inBlock:b for:aCompiler. |
|
123 |
^ self. |
|
29 | 124 |
]. |
125 |
||
1593 | 126 |
"return from homeContext in a block" |
127 |
expression isNil ifTrue:[ |
|
128 |
"/ nil-expression is not possible in smalltalk; |
|
129 |
"/ however, it might be in a subclass (i.e. JavaScript) |
|
4595 | 130 |
"/ TODO: add a pushVoid instruction |
1593 | 131 |
aStream nextPut:#pushNil. |
132 |
] ifFalse:[ |
|
133 |
expression codeOn:aStream inBlock:b for:aCompiler. |
|
134 |
]. |
|
374 | 135 |
lineNr notNil ifTrue:[ |
817 | 136 |
self codeLineNumber:lineNr on:aStream for:aCompiler |
0 | 137 |
]. |
380 | 138 |
aStream nextPut:#homeRetTop. |
374 | 139 |
|
1945
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
140 |
"Created: / 16-11-2006 / 14:05:27 / cg" |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
141 |
! |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
142 |
|
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
143 |
codeForSideEffectOn:aStream inBlock:b for:aCompiler |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
144 |
"redefined - drop not needed since notreached" |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
145 |
|
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
146 |
^ self basicCodeOn:aStream inBlock:b for:aCompiler |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
147 |
|
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
148 |
"Modified: / 16-11-2006 / 14:05:32 / cg" |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
149 |
! |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
150 |
|
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
151 |
codeForSimpleReturnOn:aStream inBlock:b lineNumber:lineNrOrNil for:aCompiler |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
152 |
"generate code to return myself as a simple method return" |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
153 |
|
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
154 |
self basicCodeOn:aStream inBlock:b for:aCompiler. |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
155 |
|
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
156 |
"as a ReturnNode, I did return, so retTop is not needed" |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
157 |
"/ aStream nextPut:#retTop. |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
158 |
|
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
159 |
"Modified: / 16-11-2006 / 14:05:35 / cg" |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
160 |
! |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
161 |
|
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
162 |
codeLocalReturnOn:aStream inBlock:b for:aCompiler |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
163 |
expression isNil ifTrue:[ |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
164 |
aStream nextPut:#retNil. |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
165 |
^ self. |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
166 |
]. |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
167 |
expression |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
168 |
codeForSimpleReturnOn:aStream |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
169 |
inBlock:b |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
170 |
lineNumber:lineNr |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
171 |
for:aCompiler. |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
172 |
! |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
173 |
|
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
174 |
codeOn:aStream inBlock:b for:aCompiler |
1982
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
175 |
"/ aCompiler parserFlags allowPossibleSTCCompilationProblems ifFalse:[ |
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
176 |
"/ aCompiler |
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
177 |
"/ parseError:'stc will not compile return within a return' |
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
178 |
"/ line:lineNr. |
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
179 |
"/ ] ifTrue:[ |
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
180 |
"/ aCompiler parserFlags warnAboutPossibleSTCCompilationProblems ifTrue:[ |
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
181 |
"/ aCompiler |
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
182 |
"/ warning:'stc will not compile return within a return' |
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
183 |
"/ line:lineNr. |
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
184 |
"/ ]. |
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
185 |
"/ ]. |
1945
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
186 |
self basicCodeOn:aStream inBlock:b for:aCompiler |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
187 |
|
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
188 |
"Modified: / 16-11-2006 / 14:34:15 / cg" |
0 | 189 |
! ! |
190 |
||
1035 | 191 |
!ReturnNode methodsFor:'enumerating'! |
539
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
393
diff
changeset
|
192 |
|
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
393
diff
changeset
|
193 |
nodeDo:anEnumerator |
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
393
diff
changeset
|
194 |
"helper for parse tree walking" |
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
393
diff
changeset
|
195 |
|
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
393
diff
changeset
|
196 |
^ anEnumerator doReturn:self value:expression |
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
393
diff
changeset
|
197 |
|
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
393
diff
changeset
|
198 |
"Modified: 19.6.1997 / 16:42:40 / cg" |
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
393
diff
changeset
|
199 |
! ! |
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
393
diff
changeset
|
200 |
|
4507 | 201 |
!ReturnNode methodsFor:'enumeration'! |
202 |
||
203 |
childrenDo:aBlock |
|
204 |
aBlock value:expression. |
|
205 |
||
206 |
||
207 |
! ! |
|
208 |
||
1035 | 209 |
!ReturnNode methodsFor:'evaluation'! |
140 | 210 |
|
1383 | 211 |
evaluateExpressionIn:anEnvironment |
140 | 212 |
|val| |
213 |
||
1594 | 214 |
expression notNil ifTrue:[ |
215 |
val := expression evaluateIn:anEnvironment. |
|
216 |
]. |
|
140 | 217 |
myHome exitWith:val. |
218 |
"when we arrive here, the parser context is already gone |
|
219 |
- try block-return" |
|
220 |
blockHome notNil ifTrue:[blockHome exitWith:val]. |
|
221 |
"well - what else can be done" |
|
222 |
^ val |
|
223 |
! ! |
|
224 |
||
1080 | 225 |
!ReturnNode methodsFor:'printing & storing'! |
0 | 226 |
|
227 |
printOn:aStream indent:i |
|
228 |
aStream nextPutAll:'^ '. |
|
229 |
expression printOn:aStream |
|
230 |
! ! |
|
140 | 231 |
|
232 |
!ReturnNode methodsFor:'queries'! |
|
233 |
||
234 |
isConstant |
|
235 |
^ false |
|
236 |
! |
|
237 |
||
2397
6aea7415db4f
added: #isJavaScriptReturnNode
Claus Gittinger <cg@exept.de>
parents:
2101
diff
changeset
|
238 |
isJavaScriptReturnNode |
6aea7415db4f
added: #isJavaScriptReturnNode
Claus Gittinger <cg@exept.de>
parents:
2101
diff
changeset
|
239 |
^ false |
6aea7415db4f
added: #isJavaScriptReturnNode
Claus Gittinger <cg@exept.de>
parents:
2101
diff
changeset
|
240 |
|
6aea7415db4f
added: #isJavaScriptReturnNode
Claus Gittinger <cg@exept.de>
parents:
2101
diff
changeset
|
241 |
"Created: / 19-05-2010 / 15:14:46 / cg" |
6aea7415db4f
added: #isJavaScriptReturnNode
Claus Gittinger <cg@exept.de>
parents:
2101
diff
changeset
|
242 |
! |
6aea7415db4f
added: #isJavaScriptReturnNode
Claus Gittinger <cg@exept.de>
parents:
2101
diff
changeset
|
243 |
|
140 | 244 |
isReturnNode |
245 |
^ true |
|
2101 | 246 |
! |
247 |
||
248 |
isSimpleConstant |
|
249 |
^ false |
|
250 |
! |
|
251 |
||
252 |
isSimpleExpression |
|
253 |
^ false |
|
254 |
! |
|
255 |
||
256 |
isSimpleVariable |
|
257 |
^ false |
|
140 | 258 |
! ! |
259 |
||
2595 | 260 |
!ReturnNode methodsFor:'visiting'! |
261 |
||
262 |
acceptVisitor:aVisitor |
|
263 |
"Double dispatch back to the visitor, passing my type encoded in |
|
264 |
the selector (visitor pattern)" |
|
265 |
||
266 |
"stub code automatically generated - please change if required" |
|
267 |
||
268 |
^ aVisitor visitReturnNode:self |
|
269 |
! ! |
|
270 |
||
148 | 271 |
!ReturnNode class methodsFor:'documentation'! |
272 |
||
2397
6aea7415db4f
added: #isJavaScriptReturnNode
Claus Gittinger <cg@exept.de>
parents:
2101
diff
changeset
|
273 |
version_CVS |
4507 | 274 |
^ '$Header$' |
148 | 275 |
! ! |
3015 | 276 |