author | HG Automerge |
Thu, 12 Jan 2017 09:44:22 +0000 | |
branch | jv |
changeset 4088 | 529963173d68 |
parent 4057 | af2ccd5e7eca |
child 4155 | 801ff4adeef5 |
permissions | -rw-r--r-- |
0 | 1 |
" |
4 | 2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
104 | 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 |
||
3936 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
0 | 16 |
MessageNode subclass:#UnaryNode |
261 | 17 |
instanceVariableNames:'' |
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'System-Compiler-Support' |
|
0 | 21 |
! |
22 |
||
20 | 23 |
!UnaryNode class methodsFor:'documentation'! |
24 |
||
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
104 | 28 |
All Rights Reserved |
20 | 29 |
|
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! |
|
38 |
||
39 |
documentation |
|
40 |
" |
|
41 |
node for parse-trees, representing unary messages |
|
261 | 42 |
This is a helper class for the compiler. |
263 | 43 |
|
44 |
[author:] |
|
45 |
Claus Gittinger |
|
20 | 46 |
" |
47 |
! ! |
|
0 | 48 |
|
49 |
!UnaryNode class methodsFor:'instance creation'! |
|
50 |
||
51 |
receiver:r selector:s |
|
11 | 52 |
"return a new UnaryNode for sending selector s to receiver r. |
53 |
Fold constants." |
|
54 |
||
991
16411f243a75
compile-time-eval Smalltalk #isSmalltalkXXX messages.
Claus Gittinger <cg@exept.de>
parents:
904
diff
changeset
|
55 |
^ self receiver:r selector:s fold:true |
0 | 56 |
! |
57 |
||
15 | 58 |
receiver:r selector:selectorString fold:folding |
59 |
"return a new UnaryNode for sending selector selectorString to receiver r. |
|
11 | 60 |
If folding is true, fold constant expressions." |
61 |
||
212
ff39051e219f
more constant folding options
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
62 |
|result recVal selector canFold globalName| |
0 | 63 |
|
64 |
" |
|
65 |
The constant folding code can usually not optimize things - this may change |
|
66 |
when some kind of constant declaration is added to smalltalk. |
|
67 |
" |
|
212
ff39051e219f
more constant folding options
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
68 |
|
ff39051e219f
more constant folding options
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
69 |
canFold := false. |
ff39051e219f
more constant folding options
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
70 |
|
993
902eec8d132b
oops - folding argument is not always a symbol.
Claus Gittinger <cg@exept.de>
parents:
991
diff
changeset
|
71 |
(folding notNil and:[folding ~~ false]) ifTrue:[ |
625 | 72 |
selector := selectorString asSymbolIfInterned. |
73 |
selector notNil ifTrue:[ |
|
74 |
"/ |
|
75 |
"/ do constant folding ... |
|
2111 | 76 |
"/ evaluate at compile time: |
77 |
"/ Character tab |
|
78 |
"/ Character cr |
|
3936 | 79 |
"/ ... |
2111 | 80 |
"/ Float pi |
81 |
"/ Float e |
|
3936 | 82 |
"/ ... |
2111 | 83 |
"/ String cr |
84 |
"/ String crlf |
|
3936 | 85 |
"/ ... |
2111 | 86 |
"/ #(...) asFloatArray |
87 |
||
625 | 88 |
r isGlobal ifTrue:[ |
89 |
globalName := r name. |
|
90 |
recVal := r evaluate. |
|
212
ff39051e219f
more constant folding options
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
91 |
|
625 | 92 |
(globalName = 'Character') ifTrue:[ |
2001 | 93 |
( #( tab cr lf return space backspace esc ) includes:selector) |
625 | 94 |
ifTrue:[ |
95 |
canFold := true |
|
96 |
] |
|
97 |
]. |
|
98 |
(globalName = 'Float') ifTrue:[ |
|
2001 | 99 |
( #( pi e NaN unity zero ) includes:selector) |
625 | 100 |
ifTrue:[ |
101 |
(recVal respondsTo:selector) ifTrue:[ |
|
102 |
canFold := true |
|
103 |
] |
|
104 |
] |
|
105 |
]. |
|
2001 | 106 |
(globalName = 'String') ifTrue:[ |
107 |
( #( cr crlf lf ) includes:selector) |
|
108 |
ifTrue:[ |
|
109 |
(recVal respondsTo:selector) ifTrue:[ |
|
110 |
canFold := true |
|
111 |
] |
|
112 |
] |
|
113 |
]. |
|
114 |
||
1144 | 115 |
"/ no, this 'optimization' is not good - |
116 |
"/ if bytecode is transported to another machine. |
|
117 |
"/ However, the JIT compiler compensates for this ;-) |
|
118 |
"/ (globalName = 'Smalltalk') ifTrue:[ |
|
119 |
"/ ( #( isSmalltalkX isVisualWorks isSqueak |
|
3936 | 120 |
"/ isSmalltalkMT isDolphinSmalltalk isVisualAge |
1144 | 121 |
"/ isSmalltalkV) includes:selector) |
122 |
"/ ifTrue:[ |
|
123 |
"/ (recVal respondsTo:selector) ifTrue:[ |
|
124 |
"/ canFold := true |
|
125 |
"/ ] |
|
126 |
"/ ] |
|
127 |
"/ ]. |
|
128 |
||
625 | 129 |
"/ no, this 'optimization' is not good - |
130 |
"/ if bytecode is transported to another machine. |
|
131 |
"/ However, the JIT compiler compensates for this ;-) |
|
132 |
"/ (globalName = 'SmallInteger') ifTrue:[ |
|
133 |
"/ ( #( minVal maxVal ) includes:selector) |
|
134 |
"/ ifTrue:[ |
|
135 |
"/ (recVal respondsTo:selector) ifTrue:[ |
|
136 |
"/ canFold := true |
|
137 |
"/ ] |
|
138 |
"/ ] |
|
139 |
"/ ] |
|
140 |
]. |
|
212
ff39051e219f
more constant folding options
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
141 |
|
625 | 142 |
r isConstant ifTrue:[ |
143 |
"check if we can do it ..." |
|
144 |
recVal := r evaluate. |
|
145 |
||
146 |
" |
|
147 |
we could do much more here - but then, we need a dependency from |
|
148 |
the folded selectors method to the method we generate code for ... |
|
3936 | 149 |
limit optimizations to those that will never change |
625 | 150 |
(or, if you change them, it will crash badly anyway ...) |
151 |
" |
|
152 |
recVal respondsToArithmetic ifTrue:[ |
|
153 |
(#( negated abs asPoint degreesToRadians radiansToDegrees |
|
3936 | 154 |
exp ln log sqrt reciprocal |
625 | 155 |
arcCos arcSin arcTan sin cos tan) includes:selector) |
156 |
ifTrue:[ |
|
157 |
canFold := true |
|
158 |
] |
|
159 |
]. |
|
160 |
recVal isCharacter ifTrue:[ |
|
3936 | 161 |
(#( asciiValue asInteger digitValue asString) includes:selector) |
625 | 162 |
ifTrue:[ |
163 |
canFold := true |
|
164 |
] |
|
165 |
]. |
|
166 |
recVal isString ifTrue:[ |
|
167 |
(selector == #withCRs) ifTrue:[ |
|
993
902eec8d132b
oops - folding argument is not always a symbol.
Claus Gittinger <cg@exept.de>
parents:
991
diff
changeset
|
168 |
canFold := folding isSymbol |
902eec8d132b
oops - folding argument is not always a symbol.
Claus Gittinger <cg@exept.de>
parents:
991
diff
changeset
|
169 |
and:[(folding >= #level2) or:[folding == #full]] |
803 | 170 |
]. |
171 |
(selector == #size) ifTrue:[ |
|
993
902eec8d132b
oops - folding argument is not always a symbol.
Claus Gittinger <cg@exept.de>
parents:
991
diff
changeset
|
172 |
canFold := folding isSymbol |
902eec8d132b
oops - folding argument is not always a symbol.
Claus Gittinger <cg@exept.de>
parents:
991
diff
changeset
|
173 |
and:[(folding >= #level1) or:[folding == #full]] |
1093 | 174 |
]. |
175 |
(selector == #asSymbol) ifTrue:[ |
|
176 |
canFold := folding isSymbol |
|
177 |
and:[(folding >= #level1) or:[folding == #full]] |
|
178 |
]. |
|
625 | 179 |
]. |
180 |
(recVal isMemberOf:Array) ifTrue:[ |
|
181 |
(#(asFloatArray asDoubleArray) includes:selector) ifTrue:[ |
|
993
902eec8d132b
oops - folding argument is not always a symbol.
Claus Gittinger <cg@exept.de>
parents:
991
diff
changeset
|
182 |
canFold := folding isSymbol |
902eec8d132b
oops - folding argument is not always a symbol.
Claus Gittinger <cg@exept.de>
parents:
991
diff
changeset
|
183 |
and:[(folding >= #level2) or:[folding == #full]] |
625 | 184 |
] |
185 |
] |
|
186 |
] |
|
187 |
]. |
|
212
ff39051e219f
more constant folding options
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
188 |
|
ff39051e219f
more constant folding options
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
189 |
canFold ifTrue:[ |
625 | 190 |
(recVal respondsTo:selector) ifTrue:[ |
212
ff39051e219f
more constant folding options
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
191 |
SignalSet anySignal "Number domainErrorSignal" handle:[:ex | |
625 | 192 |
"in case of an error, abort fold and return original" |
193 |
ex return |
|
212
ff39051e219f
more constant folding options
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
194 |
] do:[ |
625 | 195 |
result := recVal perform:selector. |
196 |
^ ConstantNode type:(ConstantNode typeOfConstant:result) value:result |
|
197 |
]. |
|
212
ff39051e219f
more constant folding options
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
198 |
"when we reach here, something went wrong (something like 0.0 log)" |
3936 | 199 |
^ ParseErrorNode errorString:'error occurred while evaluating constant expression' |
625 | 200 |
]. |
212
ff39051e219f
more constant folding options
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
201 |
]. |
0 | 202 |
]. |
212
ff39051e219f
more constant folding options
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
203 |
|
15 | 204 |
^ (self basicNew) receiver:r selector:selectorString args:nil lineno:0 |
625 | 205 |
|
2001 | 206 |
"Modified: / 05-03-2007 / 15:11:26 / cg" |
0 | 207 |
! ! |
208 |
||
3333 | 209 |
!UnaryNode methodsFor:'accessing'! |
210 |
||
211 |
selectorPartPositions |
|
212 |
selectorPartPositions isNil ifTrue:[ |
|
213 |
selectorPartPositions := Array with: (selectorPosition to: selectorPosition + selector size - 1). |
|
214 |
]. |
|
215 |
^ selectorPartPositions |
|
216 |
||
217 |
"Created: / 19-10-2013 / 23:48:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
218 |
! ! |
|
219 |
||
0 | 220 |
!UnaryNode methodsFor:'checks'! |
221 |
||
2094 | 222 |
plausibilityCheckIn:aParser |
0 | 223 |
"check for funny selector - careful to do string compare instead |
4038 | 224 |
of symbol identity compare: I don't want to introduce these as symbols |
0 | 225 |
into the system (would make the '... is nowhere implemented' warning |
3309 | 226 |
go away. |
227 |
TODO: rewite to use lint/lint rules and apply them before accepting" |
|
0 | 228 |
|
1502
de3c4e208b9f
Avoid 'is not a symbol in globalKnown' debug messages from librun
Stefan Vogel <sv@exept.de>
parents:
1500
diff
changeset
|
229 |
|selectorSymbol| |
de3c4e208b9f
Avoid 'is not a symbol in globalKnown' debug messages from librun
Stefan Vogel <sv@exept.de>
parents:
1500
diff
changeset
|
230 |
|
2881
ae13393d1096
- plausibilityCheckIn:aParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2866
diff
changeset
|
231 |
"JV@2012-07-06: Do not check if receiver is Java package, |
ae13393d1096
- plausibilityCheckIn:aParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2866
diff
changeset
|
232 |
otherwise it reports false-positives when working with Java code" |
ae13393d1096
- plausibilityCheckIn:aParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2866
diff
changeset
|
233 |
receiver isJavaPackageReference ifTrue:[ ^ nil ]. |
ae13393d1096
- plausibilityCheckIn:aParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2866
diff
changeset
|
234 |
|
1502
de3c4e208b9f
Avoid 'is not a symbol in globalKnown' debug messages from librun
Stefan Vogel <sv@exept.de>
parents:
1500
diff
changeset
|
235 |
selectorSymbol := selector asSymbolIfInterned. |
de3c4e208b9f
Avoid 'is not a symbol in globalKnown' debug messages from librun
Stefan Vogel <sv@exept.de>
parents:
1500
diff
changeset
|
236 |
selectorSymbol notNil ifTrue:[ |
de3c4e208b9f
Avoid 'is not a symbol in globalKnown' debug messages from librun
Stefan Vogel <sv@exept.de>
parents:
1500
diff
changeset
|
237 |
((selectorSymbol == #self) or:[ |
de3c4e208b9f
Avoid 'is not a symbol in globalKnown' debug messages from librun
Stefan Vogel <sv@exept.de>
parents:
1500
diff
changeset
|
238 |
(selectorSymbol == #super) or:[ |
de3c4e208b9f
Avoid 'is not a symbol in globalKnown' debug messages from librun
Stefan Vogel <sv@exept.de>
parents:
1500
diff
changeset
|
239 |
(selectorSymbol == #thisContext) or:[ |
de3c4e208b9f
Avoid 'is not a symbol in globalKnown' debug messages from librun
Stefan Vogel <sv@exept.de>
parents:
1500
diff
changeset
|
240 |
(selectorSymbol == #nil) or:[ |
de3c4e208b9f
Avoid 'is not a symbol in globalKnown' debug messages from librun
Stefan Vogel <sv@exept.de>
parents:
1500
diff
changeset
|
241 |
(selectorSymbol == #true) or:[ |
2227
5b45a572dc15
changed: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2111
diff
changeset
|
242 |
(selectorSymbol == #false)]]]]]) |
5b45a572dc15
changed: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2111
diff
changeset
|
243 |
ifTrue:[ |
5b45a572dc15
changed: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2111
diff
changeset
|
244 |
(aParser alreadyWarnedUnimplementedSelectors includes:selectorSymbol) ifFalse:[ |
5b45a572dc15
changed: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2111
diff
changeset
|
245 |
aParser alreadyWarnedUnimplementedSelectors add:selectorSymbol. |
5b45a572dc15
changed: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2111
diff
changeset
|
246 |
^ 'funny selector: ',selectorSymbol allBold,'; possible missing ''.'' or keyword-colon.' |
5b45a572dc15
changed: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2111
diff
changeset
|
247 |
]. |
5b45a572dc15
changed: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2111
diff
changeset
|
248 |
]. |
5b45a572dc15
changed: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2111
diff
changeset
|
249 |
|
5b45a572dc15
changed: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2111
diff
changeset
|
250 |
(Smalltalk includesKey:selectorSymbol) ifTrue:[ |
4057 | 251 |
( #( void ) includes:selectorSymbol) ifFalse:[ |
252 |
(aParser alreadyWarnedUnimplementedSelectors includes:selectorSymbol) ifFalse:[ |
|
253 |
aParser alreadyWarnedUnimplementedSelectors add:selectorSymbol. |
|
254 |
^ 'funny selector: ',selectorSymbol allBold,' (known as global); possible missing ''.'' or keyword-colon.' |
|
255 |
]. |
|
2094 | 256 |
]. |
1502
de3c4e208b9f
Avoid 'is not a symbol in globalKnown' debug messages from librun
Stefan Vogel <sv@exept.de>
parents:
1500
diff
changeset
|
257 |
]. |
0 | 258 |
]. |
17 | 259 |
|
904 | 260 |
" |
261 |
more to come |
|
262 |
... |
|
263 |
" |
|
264 |
||
2094 | 265 |
^ super plausibilityCheckIn:aParser |
1777 | 266 |
|
267 |
"Modified: / 16-07-2006 / 16:16:25 / cg" |
|
2881
ae13393d1096
- plausibilityCheckIn:aParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2866
diff
changeset
|
268 |
"Modified: / 06-07-2012 / 10:46:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
0 | 269 |
! ! |
270 |
||
271 |
!UnaryNode methodsFor:'code generation'! |
|
272 |
||
104 | 273 |
codeOn:aStream inBlock:b for:aCompiler |
11 | 274 |
"append bytecode for the receiver to aStream." |
275 |
||
626 | 276 |
|rSel notSelector| |
277 |
||
11 | 278 |
" |
279 |
optimize |
|
626 | 280 |
(a == b) not -> (a ~~ b) |
281 |
(a ~~ b) not -> (a == b) |
|
0 | 282 |
" |
283 |
(selector == #not) ifTrue:[ |
|
626 | 284 |
(receiver class == BinaryNode) ifTrue:[ |
285 |
((rSel := receiver selector) == #==) ifTrue:[ |
|
286 |
notSelector := #~~ |
|
287 |
] ifFalse:[ |
|
288 |
(rSel == #~~) ifTrue:[ |
|
289 |
notSelector := #== |
|
290 |
] |
|
291 |
]. |
|
292 |
notSelector notNil ifTrue:[ |
|
1465
2b2eea66362a
ensure literals of optimized messages are in lit-array
Claus Gittinger <cg@exept.de>
parents:
1387
diff
changeset
|
293 |
aCompiler addLiteral:selector; addLiteral:rSel. |
2b2eea66362a
ensure literals of optimized messages are in lit-array
Claus Gittinger <cg@exept.de>
parents:
1387
diff
changeset
|
294 |
|
1998 | 295 |
(BinaryNode |
296 |
receiver:(receiver receiver) |
|
297 |
selector:notSelector |
|
298 |
arg:(receiver arg)) |
|
299 |
codeOn:aStream |
|
300 |
inBlock:b |
|
301 |
for:aCompiler. |
|
626 | 302 |
^ self |
303 |
] |
|
304 |
] |
|
0 | 305 |
]. |
306 |
||
104 | 307 |
^ super codeOn:aStream inBlock:b for:aCompiler |
626 | 308 |
|
2001 | 309 |
"Modified: / 05-03-2007 / 15:11:35 / cg" |
0 | 310 |
! ! |
311 |
||
1035 | 312 |
!UnaryNode methodsFor:'evaluation'! |
140 | 313 |
|
1384 | 314 |
evaluateIn:anEnvironment |
140 | 315 |
"evaluate the expression represented by the receiver" |
316 |
||
2036
989b8836fc32
do #class inline to avoid #perform:
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
317 |
|r| |
989b8836fc32
do #class inline to avoid #perform:
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
318 |
|
1500
3c4cb012b24b
Lazy conversion of selector strings to symbols.
Stefan Vogel <sv@exept.de>
parents:
1465
diff
changeset
|
319 |
selector := selector asSymbol. |
140 | 320 |
receiver isSuper ifTrue:[ |
1384 | 321 |
^ super evaluateIn:anEnvironment |
140 | 322 |
]. |
2036
989b8836fc32
do #class inline to avoid #perform:
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
323 |
r := receiver evaluateIn:anEnvironment. |
989b8836fc32
do #class inline to avoid #perform:
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
324 |
selector == #class ifTrue:[ |
989b8836fc32
do #class inline to avoid #perform:
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
325 |
^ r class. |
989b8836fc32
do #class inline to avoid #perform:
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
326 |
]. |
989b8836fc32
do #class inline to avoid #perform:
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
327 |
^ r perform:selector |
989b8836fc32
do #class inline to avoid #perform:
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
328 |
|
989b8836fc32
do #class inline to avoid #perform:
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
329 |
"Modified: / 04-06-2007 / 17:46:31 / cg" |
140 | 330 |
! ! |
331 |
||
1080 | 332 |
!UnaryNode methodsFor:'printing & storing'! |
0 | 333 |
|
1589 | 334 |
printOn:aStream indent:i |
11 | 335 |
"prettyprint the expression represented by the receiver" |
1589 | 336 |
|
337 |
receiver printOn:aStream indent:i parenthized:(receiver precedence < self precedence). |
|
0 | 338 |
aStream space. |
339 |
selector printString printOn:aStream. |
|
1589 | 340 |
|
341 |
"Modified: / 20-04-2005 / 14:36:26 / cg" |
|
0 | 342 |
! ! |
140 | 343 |
|
344 |
!UnaryNode methodsFor:'queries'! |
|
345 |
||
2322 | 346 |
precedence |
347 |
^ 100 |
|
348 |
||
349 |
"Created: / 20-04-2005 / 14:10:34 / cg" |
|
350 |
! ! |
|
351 |
||
352 |
!UnaryNode methodsFor:'testing'! |
|
353 |
||
2863 | 354 |
isJavaPackageReference |
355 |
"Return true, given node is JAVA class reference in form: |
|
356 |
JAVA package1 package2 |
|
357 |
" |
|
358 |
||
359 |
^receiver isJavaPackageReference |
|
360 |
and:[selector first isLowercase |
|
2866
21be09ac87b1
changed: #isJavaPackageReference
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2863
diff
changeset
|
361 |
and:[selector isUnarySelector]] |
2863 | 362 |
|
363 |
"Created: / 19-04-2012 / 09:52:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
364 |
! |
|
365 |
||
140 | 366 |
isUnaryMessage |
367 |
"return true, if this node is one for a unary message" |
|
626 | 368 |
|
140 | 369 |
^ true |
626 | 370 |
|
371 |
"Modified: 23.10.1997 / 02:05:18 / cg" |
|
140 | 372 |
! ! |
373 |
||
2597 | 374 |
!UnaryNode methodsFor:'visiting'! |
375 |
||
376 |
acceptVisitor:aVisitor |
|
377 |
"Double dispatch back to the visitor, passing my type encoded in |
|
378 |
the selector (visitor pattern)" |
|
379 |
||
380 |
"stub code automatically generated - please change if required" |
|
381 |
||
382 |
^ aVisitor visitUnaryNode:self |
|
383 |
! ! |
|
384 |
||
148 | 385 |
!UnaryNode class methodsFor:'documentation'! |
386 |
||
387 |
version |
|
3936 | 388 |
^ '$Header$' |
2227
5b45a572dc15
changed: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2111
diff
changeset
|
389 |
! |
5b45a572dc15
changed: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2111
diff
changeset
|
390 |
|
5b45a572dc15
changed: #plausibilityCheckIn:
Claus Gittinger <cg@exept.de>
parents:
2111
diff
changeset
|
391 |
version_CVS |
3936 | 392 |
^ '$Header$' |
148 | 393 |
! ! |
3309 | 394 |