author | Claus Gittinger <cg@exept.de> |
Sat, 20 Oct 2012 21:17:14 +0200 | |
changeset 2951 | 340d0405f582 |
parent 2595 | 1cb0ec5ebec6 |
child 3015 | c62355a28ef2 |
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. |
0bc2a6ecdfad
oops - cannot inline blocks which are assigned or returned.
Claus Gittinger <cg@exept.de>
parents:
843
diff
changeset
|
53 |
e isBlockNode ifTrue:[ |
0bc2a6ecdfad
oops - cannot inline blocks which are assigned or returned.
Claus Gittinger <cg@exept.de>
parents:
843
diff
changeset
|
54 |
e possiblyInlined:false |
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 |
! |
0bc2a6ecdfad
oops - cannot inline blocks which are assigned or returned.
Claus Gittinger <cg@exept.de>
parents:
843
diff
changeset
|
58 |
|
2398
f4fb7f5746dd
care for block vs. method return.
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
59 |
home |
f4fb7f5746dd
care for block vs. method return.
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
60 |
^ myHome |
f4fb7f5746dd
care for block vs. method return.
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
61 |
|
f4fb7f5746dd
care for block vs. method return.
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
62 |
"Created: / 19-05-2010 / 15:46:55 / cg" |
f4fb7f5746dd
care for block vs. method return.
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
63 |
! |
f4fb7f5746dd
care for block vs. method return.
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
64 |
|
0 | 65 |
home:someOne blockHome:aBlockNode |
66 |
myHome := someOne. |
|
67 |
blockHome := aBlockNode |
|
1945
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 |
|
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
70 |
lineNumber:something |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
71 |
"set lineNr" |
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 |
lineNr := something. |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
74 |
|
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
75 |
"Created: / 16-11-2006 / 14:38:51 / cg" |
0 | 76 |
! ! |
77 |
||
2530
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
78 |
!ReturnNode methodsFor:'checks'! |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
79 |
|
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
80 |
plausibilityCheckIn:aParser |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
81 |
"check for return-in-return, as in |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
82 |
^ foo ifTrue:[ ^x] |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
83 |
that is (currently) not compilable by stc (generates bad C-code for it)" |
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:[ |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
91 |
allow ifTrue:[ |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
92 |
^ 'stc will not compile return-in-return' |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
93 |
]. |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
94 |
aParser |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
95 |
parseError:'stc will not compile return-in-return' |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
96 |
position:startPosition to:endPosition |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
97 |
]. |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
98 |
]. |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
99 |
^ nil. |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
100 |
|
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
101 |
"Created: / 05-07-2011 / 17:59:48 / cg" |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
102 |
! ! |
246794569e0c
added: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2398
diff
changeset
|
103 |
|
0 | 104 |
!ReturnNode methodsFor:'code generation'! |
105 |
||
1945
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
106 |
basicCodeOn:aStream inBlock:b for:aCompiler |
1593 | 107 |
b isNil ifTrue:[ |
108 |
self codeLocalReturnOn:aStream inBlock:b for:aCompiler. |
|
109 |
^ self. |
|
29 | 110 |
]. |
111 |
||
1593 | 112 |
"return from homeContext in a block" |
113 |
expression isNil ifTrue:[ |
|
114 |
"/ nil-expression is not possible in smalltalk; |
|
115 |
"/ however, it might be in a subclass (i.e. JavaScript) |
|
116 |
aStream nextPut:#pushNil. |
|
117 |
] ifFalse:[ |
|
118 |
expression codeOn:aStream inBlock:b for:aCompiler. |
|
119 |
]. |
|
374 | 120 |
lineNr notNil ifTrue:[ |
817 | 121 |
self codeLineNumber:lineNr on:aStream for:aCompiler |
0 | 122 |
]. |
380 | 123 |
aStream nextPut:#homeRetTop. |
374 | 124 |
|
1945
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
125 |
"Created: / 16-11-2006 / 14:05:27 / cg" |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
126 |
! |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
127 |
|
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
128 |
codeForSideEffectOn:aStream inBlock:b for:aCompiler |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
129 |
"redefined - drop not needed since notreached" |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
130 |
|
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
131 |
^ self basicCodeOn:aStream inBlock:b for:aCompiler |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
132 |
|
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
133 |
"Modified: / 16-11-2006 / 14:05:32 / 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 |
codeForSimpleReturnOn:aStream inBlock:b lineNumber:lineNrOrNil for:aCompiler |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
137 |
"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
|
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 |
"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
|
142 |
"/ aStream nextPut:#retTop. |
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 |
"Modified: / 16-11-2006 / 14:05:35 / cg" |
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 |
|
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
147 |
codeLocalReturnOn:aStream inBlock:b for:aCompiler |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
148 |
expression isNil ifTrue:[ |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
149 |
aStream nextPut:#retNil. |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
150 |
^ self. |
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 |
expression |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
153 |
codeForSimpleReturnOn:aStream |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
154 |
inBlock:b |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
155 |
lineNumber:lineNr |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
156 |
for:aCompiler. |
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
157 |
! |
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 |
codeOn:aStream inBlock:b for:aCompiler |
1982
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
160 |
"/ aCompiler parserFlags allowPossibleSTCCompilationProblems ifFalse:[ |
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
161 |
"/ aCompiler |
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
162 |
"/ parseError:'stc will not compile return within a return' |
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
163 |
"/ line:lineNr. |
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
164 |
"/ ] ifTrue:[ |
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
165 |
"/ aCompiler parserFlags warnAboutPossibleSTCCompilationProblems ifTrue:[ |
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
166 |
"/ aCompiler |
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
167 |
"/ warning:'stc will not compile return within a return' |
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
168 |
"/ line:lineNr. |
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
169 |
"/ ]. |
2098c5e965ce
changed #codeOn:inBlock:for:
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
170 |
"/ ]. |
1945
5c08a14f6269
warn about stc-uncompilable code
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
171 |
self basicCodeOn:aStream inBlock:b 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 |
"Modified: / 16-11-2006 / 14:34:15 / cg" |
0 | 174 |
! ! |
175 |
||
1035 | 176 |
!ReturnNode methodsFor:'enumerating'! |
539
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
393
diff
changeset
|
177 |
|
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
393
diff
changeset
|
178 |
nodeDo:anEnumerator |
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
393
diff
changeset
|
179 |
"helper for parse tree walking" |
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
393
diff
changeset
|
180 |
|
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
393
diff
changeset
|
181 |
^ anEnumerator doReturn:self value:expression |
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
393
diff
changeset
|
182 |
|
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
393
diff
changeset
|
183 |
"Modified: 19.6.1997 / 16:42:40 / cg" |
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
393
diff
changeset
|
184 |
! ! |
69a1cd05c7d6
added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents:
393
diff
changeset
|
185 |
|
1035 | 186 |
!ReturnNode methodsFor:'evaluation'! |
140 | 187 |
|
1383 | 188 |
evaluateExpressionIn:anEnvironment |
140 | 189 |
|val| |
190 |
||
1594 | 191 |
expression notNil ifTrue:[ |
192 |
val := expression evaluateIn:anEnvironment. |
|
193 |
]. |
|
140 | 194 |
myHome exitWith:val. |
195 |
"when we arrive here, the parser context is already gone |
|
196 |
- try block-return" |
|
197 |
blockHome notNil ifTrue:[blockHome exitWith:val]. |
|
198 |
"well - what else can be done" |
|
199 |
^ val |
|
200 |
! ! |
|
201 |
||
1080 | 202 |
!ReturnNode methodsFor:'printing & storing'! |
0 | 203 |
|
204 |
printOn:aStream indent:i |
|
205 |
aStream nextPutAll:'^ '. |
|
206 |
expression printOn:aStream |
|
207 |
! ! |
|
140 | 208 |
|
209 |
!ReturnNode methodsFor:'queries'! |
|
210 |
||
211 |
isConstant |
|
212 |
^ false |
|
213 |
! |
|
214 |
||
2397
6aea7415db4f
added: #isJavaScriptReturnNode
Claus Gittinger <cg@exept.de>
parents:
2101
diff
changeset
|
215 |
isJavaScriptReturnNode |
6aea7415db4f
added: #isJavaScriptReturnNode
Claus Gittinger <cg@exept.de>
parents:
2101
diff
changeset
|
216 |
^ false |
6aea7415db4f
added: #isJavaScriptReturnNode
Claus Gittinger <cg@exept.de>
parents:
2101
diff
changeset
|
217 |
|
6aea7415db4f
added: #isJavaScriptReturnNode
Claus Gittinger <cg@exept.de>
parents:
2101
diff
changeset
|
218 |
"Created: / 19-05-2010 / 15:14:46 / cg" |
6aea7415db4f
added: #isJavaScriptReturnNode
Claus Gittinger <cg@exept.de>
parents:
2101
diff
changeset
|
219 |
! |
6aea7415db4f
added: #isJavaScriptReturnNode
Claus Gittinger <cg@exept.de>
parents:
2101
diff
changeset
|
220 |
|
140 | 221 |
isReturnNode |
222 |
^ true |
|
2101 | 223 |
! |
224 |
||
225 |
isSimpleConstant |
|
226 |
^ false |
|
227 |
! |
|
228 |
||
229 |
isSimpleExpression |
|
230 |
^ false |
|
231 |
! |
|
232 |
||
233 |
isSimpleVariable |
|
234 |
^ false |
|
140 | 235 |
! ! |
236 |
||
2595 | 237 |
!ReturnNode methodsFor:'visiting'! |
238 |
||
239 |
acceptVisitor:aVisitor |
|
240 |
"Double dispatch back to the visitor, passing my type encoded in |
|
241 |
the selector (visitor pattern)" |
|
242 |
||
243 |
"stub code automatically generated - please change if required" |
|
244 |
||
245 |
^ aVisitor visitReturnNode:self |
|
246 |
! ! |
|
247 |
||
148 | 248 |
!ReturnNode class methodsFor:'documentation'! |
249 |
||
2397
6aea7415db4f
added: #isJavaScriptReturnNode
Claus Gittinger <cg@exept.de>
parents:
2101
diff
changeset
|
250 |
version_CVS |
2595 | 251 |
^ '$Header: /cvs/stx/stx/libcomp/ReturnNode.st,v 1.42 2011-07-25 22:32:54 vrany Exp $' |
148 | 252 |
! ! |