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