69
|
1 |
"{ Package: 'exept:regression' }"
|
61
|
2 |
|
70
|
3 |
"{ NameSpace: RegressionTests }"
|
|
4 |
|
113
|
5 |
TestCase subclass:#CompilerTest
|
61
|
6 |
instanceVariableNames:'value'
|
47
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
181
|
9 |
category:'tests-Regression'
|
47
|
10 |
!
|
|
11 |
|
188
|
12 |
Object subclass:#DummyClass
|
|
13 |
instanceVariableNames:'applicationModel service request'
|
|
14 |
classVariableNames:''
|
|
15 |
poolDictionaries:''
|
|
16 |
privateIn:CompilerTest
|
|
17 |
!
|
|
18 |
|
47
|
19 |
|
88
|
20 |
!CompilerTest class methodsFor:'tests - constants'!
|
|
21 |
|
|
22 |
test_int1024
|
|
23 |
^ 1024
|
|
24 |
|
|
25 |
"
|
|
26 |
self test_int1024
|
|
27 |
"
|
|
28 |
|
|
29 |
!
|
|
30 |
|
|
31 |
test_int1048576
|
|
32 |
^ 1048576
|
|
33 |
!
|
|
34 |
|
|
35 |
test_int128
|
|
36 |
^ 128
|
|
37 |
|
|
38 |
"
|
|
39 |
self test_int128
|
|
40 |
"
|
|
41 |
!
|
|
42 |
|
|
43 |
test_int131072
|
|
44 |
^ 131072
|
|
45 |
!
|
|
46 |
|
|
47 |
test_int16384
|
|
48 |
^ 16384
|
|
49 |
|
|
50 |
"
|
|
51 |
self test_int16384
|
|
52 |
"
|
|
53 |
|
|
54 |
!
|
|
55 |
|
|
56 |
test_int2048
|
|
57 |
^ 2048
|
|
58 |
|
|
59 |
"
|
|
60 |
self test_int2048
|
|
61 |
"
|
|
62 |
|
|
63 |
!
|
|
64 |
|
|
65 |
test_int2097152
|
|
66 |
^ 2097152
|
|
67 |
!
|
|
68 |
|
|
69 |
test_int256
|
|
70 |
^ 256
|
|
71 |
|
|
72 |
"
|
|
73 |
self test_int256
|
|
74 |
"
|
|
75 |
|
|
76 |
!
|
|
77 |
|
|
78 |
test_int262144
|
|
79 |
^ 262144
|
|
80 |
!
|
|
81 |
|
|
82 |
test_int32768
|
|
83 |
^ 32768
|
|
84 |
|
|
85 |
"
|
|
86 |
self test_int32768
|
|
87 |
"
|
|
88 |
|
|
89 |
!
|
|
90 |
|
|
91 |
test_int4096
|
|
92 |
^ 4096
|
|
93 |
|
|
94 |
"
|
|
95 |
self test_int4096
|
|
96 |
"
|
|
97 |
|
|
98 |
!
|
|
99 |
|
|
100 |
test_int512
|
|
101 |
^ 512
|
|
102 |
|
|
103 |
"
|
|
104 |
self test_int512
|
|
105 |
"
|
|
106 |
|
|
107 |
!
|
|
108 |
|
|
109 |
test_int524288
|
|
110 |
^ 524288
|
|
111 |
!
|
|
112 |
|
|
113 |
test_int65536
|
|
114 |
^ 65536
|
|
115 |
|
|
116 |
"
|
|
117 |
self test_int65536
|
|
118 |
"
|
|
119 |
|
|
120 |
!
|
|
121 |
|
|
122 |
test_int8192
|
|
123 |
^ 8192
|
|
124 |
|
|
125 |
"
|
|
126 |
self test_int8192
|
|
127 |
"
|
|
128 |
|
|
129 |
!
|
|
130 |
|
|
131 |
test_intM128
|
|
132 |
^ -128
|
|
133 |
! !
|
|
134 |
|
77
|
135 |
!CompilerTest class methodsFor:'tests argument passing'!
|
|
136 |
|
|
137 |
ret0
|
|
138 |
^ 0
|
|
139 |
|
|
140 |
"
|
|
141 |
self ret0
|
78
|
142 |
Time millisecondsToRun:[ 1000000 timesRepeat:[self ret0] ]
|
77
|
143 |
"
|
|
144 |
!
|
|
145 |
|
|
146 |
ret1
|
|
147 |
^ 1
|
|
148 |
|
|
149 |
"
|
|
150 |
self ret1
|
78
|
151 |
1000000 timesRepeat:[self ret1]
|
|
152 |
Time millisecondsToRun:[ 1000000 timesRepeat:[self ret1] ]
|
|
153 |
"
|
|
154 |
!
|
|
155 |
|
|
156 |
retArg1:arg
|
|
157 |
^ arg
|
|
158 |
|
|
159 |
"
|
|
160 |
self retArg1:1
|
|
161 |
1000000 timesRepeat:[self retArg1:1]
|
|
162 |
Time millisecondsToRun:[ 1000000 timesRepeat:[self retArg1:1] ]
|
|
163 |
"
|
|
164 |
!
|
|
165 |
|
|
166 |
retArg2:arg1 _:arg2
|
|
167 |
^ arg2
|
|
168 |
|
|
169 |
"
|
|
170 |
self retArg2:1 _:2
|
|
171 |
1000000 timesRepeat:[self retArg2:1 _:2]
|
|
172 |
Time millisecondsToRun:[ 1000000 timesRepeat:[self retArg2:1 _:2] ]
|
|
173 |
"
|
|
174 |
!
|
|
175 |
|
|
176 |
retArg3:arg1 _:arg2 _:arg3
|
|
177 |
^ arg3
|
|
178 |
|
|
179 |
"
|
|
180 |
self retArg3:1 _:2 _:3
|
|
181 |
1000000 timesRepeat:[self retArg3:1 _:2 _:3]
|
|
182 |
Time millisecondsToRun:[ 1000000 timesRepeat:[self retArg3:1 _:2 _:3] ]
|
|
183 |
"
|
|
184 |
!
|
|
185 |
|
|
186 |
retArg4:arg1 _:arg2 _:arg3 _:arg4
|
|
187 |
^ arg4
|
|
188 |
|
|
189 |
"
|
|
190 |
self retArg4:1 _:2 _:3 _:4
|
|
191 |
1000000 timesRepeat:[self retArg4:1 _:2 _:3 _:4]
|
|
192 |
Time millisecondsToRun:[ 1000000 timesRepeat:[self retArg4:1 _:2 _:3 _:4] ]
|
|
193 |
"
|
|
194 |
!
|
|
195 |
|
79
|
196 |
retArg5:arg1 _:arg2 _:arg3 _:arg4 _:arg5
|
|
197 |
^ arg5
|
|
198 |
|
|
199 |
"
|
|
200 |
self retArg5:1 _:2 _:3 _:4 _:5
|
|
201 |
1000000 timesRepeat:[self retArg5:1 _:2 _:3 _:4 _:5]
|
|
202 |
Time millisecondsToRun:[ 1000000 timesRepeat:[self retArg5:1 _:2 _:3 _:4 _:5] ]
|
|
203 |
"
|
|
204 |
!
|
|
205 |
|
78
|
206 |
retLiteral1
|
|
207 |
^ 'hello'
|
|
208 |
|
|
209 |
"
|
|
210 |
self retLiteral1
|
|
211 |
1000000 timesRepeat:[self retLiteral1]
|
|
212 |
Time millisecondsToRun:[ 1000000 timesRepeat:[self retLiteral1] ]
|
77
|
213 |
"
|
|
214 |
!
|
|
215 |
|
|
216 |
retM1
|
|
217 |
^ -1
|
|
218 |
|
|
219 |
"
|
|
220 |
self retM1
|
78
|
221 |
1000000 timesRepeat:[self retM1]
|
|
222 |
Time millisecondsToRun:[ 1000000 timesRepeat:[self retM1] ]
|
77
|
223 |
"
|
|
224 |
!
|
|
225 |
|
|
226 |
retSelf
|
|
227 |
^ self
|
|
228 |
|
|
229 |
"
|
|
230 |
self retSelf
|
78
|
231 |
1000000 timesRepeat:[self retSelf]
|
|
232 |
Time millisecondsToRun:[ 1000000 timesRepeat:[self retSelf] ]
|
77
|
233 |
"
|
|
234 |
! !
|
|
235 |
|
61
|
236 |
!CompilerTest methodsFor:'helpers'!
|
|
237 |
|
81
|
238 |
size
|
|
239 |
^ 1
|
|
240 |
!
|
|
241 |
|
61
|
242 |
value:something
|
|
243 |
value := something
|
|
244 |
! !
|
|
245 |
|
48
|
246 |
!CompilerTest methodsFor:'tests - booleans'!
|
|
247 |
|
113
|
248 |
_testAnd:arg1 _:arg2
|
50
|
249 |
^ arg1 & arg2
|
|
250 |
|
|
251 |
"
|
113
|
252 |
self new _testAnd:true _:true.
|
|
253 |
self new _testAnd:true _:false.
|
|
254 |
self new _testAnd:false _:true.
|
|
255 |
self new _testAnd:false _:false.
|
|
256 |
self new _testAnd:false _:nil.
|
|
257 |
self new _testAnd:true _:nil.
|
|
258 |
self new _testAnd:nil _:false.
|
|
259 |
self new _testAnd:nil _:true.
|
|
260 |
self new _testAnd:1234 _:true.
|
|
261 |
self new _testAnd:1234 _:false.
|
|
262 |
self new _testAnd:true _:1234.
|
|
263 |
self new _testAnd:false _:1234.
|
|
264 |
"
|
|
265 |
!
|
|
266 |
|
|
267 |
_testNot1:arg
|
|
268 |
^ arg not
|
|
269 |
|
|
270 |
"
|
|
271 |
self new _testNot1:true.
|
|
272 |
self new _testNot1:false.
|
|
273 |
self new _testNot1:1234.
|
50
|
274 |
"
|
|
275 |
!
|
|
276 |
|
113
|
277 |
_testNot2:arg1 _:arg2
|
|
278 |
^ arg1 not & arg2 not
|
48
|
279 |
|
|
280 |
"
|
113
|
281 |
self new _testNot2:true _:true.
|
|
282 |
self new _testNot2:false _:true.
|
|
283 |
self new _testNot2:true _:false.
|
|
284 |
self new _testNot2:false _:false.
|
|
285 |
|
|
286 |
self new _testNot2:false _:1234.
|
|
287 |
self new _testNot2:true _:1234.
|
|
288 |
self new _testNot2:1234 _:true.
|
|
289 |
self new _testNot2:1234 _:false.
|
|
290 |
self new _testNot2:1234 _:2345.
|
|
291 |
"
|
|
292 |
!
|
|
293 |
|
|
294 |
_testNot3:arg1 _:arg2
|
|
295 |
^ arg1 not | arg2 not
|
|
296 |
|
|
297 |
"
|
|
298 |
self new _testNot3:true _:true.
|
|
299 |
self new _testNot3:false _:true.
|
|
300 |
self new _testNot3:true _:false.
|
|
301 |
self new _testNot3:false _:false.
|
|
302 |
|
|
303 |
self new _testNot3:false _:1234.
|
|
304 |
self new _testNot3:true _:1234.
|
|
305 |
self new _testNot3:1234 _:true.
|
|
306 |
self new _testNot3:1234 _:false.
|
|
307 |
self new _testNot3:1234 _:2345.
|
48
|
308 |
"
|
|
309 |
!
|
|
310 |
|
113
|
311 |
_testOr:arg1 _:arg2
|
|
312 |
^ arg1 | arg2
|
48
|
313 |
|
|
314 |
"
|
113
|
315 |
self new _testOr:true _:true.
|
|
316 |
self new _testOr:true _:false.
|
|
317 |
self new _testOr:false _:true.
|
|
318 |
self new _testOr:false _:false.
|
|
319 |
self new _testOr:false _:nil.
|
|
320 |
self new _testOr:true _:nil.
|
|
321 |
self new _testOr:nil _:false.
|
|
322 |
self new _testOr:nil _:true.
|
|
323 |
self new _testOr:1234 _:true.
|
|
324 |
self new _testOr:1234 _:false.
|
|
325 |
self new _testOr:true _:1234.
|
|
326 |
self new _testOr:false _:1234.
|
|
327 |
"
|
|
328 |
!
|
48
|
329 |
|
113
|
330 |
testAnd
|
|
331 |
self assert:( ( self _testAnd:true _:true ) == true ).
|
|
332 |
self assert:( ( self _testAnd:true _:false ) == false ).
|
|
333 |
self assert:( ( self _testAnd:false _:true ) == false ).
|
|
334 |
self assert:( ( self _testAnd:false _:false ) == false ).
|
|
335 |
|
|
336 |
self assert:( ( self _testAnd:false _:nil ) == false ).
|
|
337 |
self assert:( ( self _testAnd:true _:nil ) == nil ).
|
|
338 |
self assert:( ( self _testAnd:false _:1234 ) == false ).
|
|
339 |
self assert:( ( self _testAnd:true _:1234 ) == 1234 ).
|
|
340 |
self should:[ self _testAnd:nil _:false ] raise:Error.
|
|
341 |
self should:[ self _testAnd:nil _:true ] raise:Error.
|
|
342 |
self should:[ self _testAnd:1234 _:false ] raise:Error.
|
|
343 |
self should:[ self _testAnd:1234 _:true ] raise:Error.
|
|
344 |
|
|
345 |
"
|
|
346 |
self new testAnd
|
48
|
347 |
"
|
50
|
348 |
!
|
|
349 |
|
113
|
350 |
testNot
|
|
351 |
self assert:( ( self _testNot1:true ) == false ).
|
|
352 |
self assert:( ( self _testNot1:false ) == true ).
|
|
353 |
|
|
354 |
self should:[ self _testNot1:nil ] raise:Error.
|
|
355 |
self should:[ self _testNot1:1234 ] raise:Error.
|
|
356 |
|
|
357 |
|
|
358 |
self assert:( ( self _testNot2:true _:true) == false ).
|
|
359 |
self assert:( ( self _testNot2:false _:true) == false ).
|
|
360 |
self assert:( ( self _testNot2:true _:false) == false ).
|
|
361 |
self assert:( ( self _testNot2:false _:false) == true ).
|
|
362 |
|
|
363 |
self should:[ self _testNot2:false _:1234] raise:Error.
|
|
364 |
self should:[ self _testNot2:true _:1234] raise:Error.
|
|
365 |
self should:[ self _testNot2:1234 _:false] raise:Error.
|
|
366 |
self should:[ self _testNot2:1234 _:true] raise:Error.
|
|
367 |
self should:[ self _testNot2:1234 _:1234] raise:Error.
|
|
368 |
self should:[ self _testNot2:nil _:false] raise:Error.
|
|
369 |
self should:[ self _testNot2:nil _:true] raise:Error.
|
|
370 |
self should:[ self _testNot2:nil _:1234] raise:Error.
|
|
371 |
|
|
372 |
self assert:( ( self _testNot3:true _:true) == false ).
|
|
373 |
self assert:( ( self _testNot3:false _:true) == true ).
|
|
374 |
self assert:( ( self _testNot3:true _:false) == true ).
|
|
375 |
self assert:( ( self _testNot3:false _:false) == true ).
|
|
376 |
|
|
377 |
self should:[ self _testNot3:false _:1234] raise:Error.
|
|
378 |
self should:[ self _testNot3:true _:1234] raise:Error.
|
|
379 |
self should:[ self _testNot3:1234 _:false] raise:Error.
|
|
380 |
self should:[ self _testNot3:1234 _:true] raise:Error.
|
|
381 |
self should:[ self _testNot3:1234 _:1234] raise:Error.
|
|
382 |
self should:[ self _testNot3:nil _:false] raise:Error.
|
|
383 |
self should:[ self _testNot3:nil _:true] raise:Error.
|
|
384 |
self should:[ self _testNot3:nil _:1234] raise:Error.
|
50
|
385 |
|
|
386 |
"
|
113
|
387 |
self new testNot
|
|
388 |
"
|
|
389 |
!
|
|
390 |
|
|
391 |
testOr
|
|
392 |
self assert:( ( self _testOr:true _:true ) == true ).
|
|
393 |
self assert:( ( self _testOr:true _:false ) == true ).
|
|
394 |
self assert:( ( self _testOr:false _:true ) == true ).
|
|
395 |
self assert:( ( self _testOr:false _:false ) == false ).
|
|
396 |
|
|
397 |
self assert:( ( self _testOr:false _:nil ) == nil ).
|
|
398 |
self assert:( ( self _testOr:true _:nil ) == true ).
|
|
399 |
self assert:( ( self _testOr:false _:1234 ) == 1234 ).
|
|
400 |
self assert:( ( self _testOr:true _:1234 ) == true ).
|
|
401 |
self should:[ self _testOr:nil _:false ] raise:Error.
|
|
402 |
self should:[ self _testOr:nil _:true ] raise:Error.
|
|
403 |
self should:[ self _testOr:1234 _:false ] raise:Error.
|
|
404 |
self should:[ self _testOr:1234 _:true ] raise:Error.
|
|
405 |
|
|
406 |
"
|
|
407 |
self new testOr
|
50
|
408 |
"
|
48
|
409 |
! !
|
|
410 |
|
62
|
411 |
!CompilerTest methodsFor:'tests - conditions'!
|
|
412 |
|
113
|
413 |
_testIf1:val
|
62
|
414 |
|x|
|
|
415 |
|
65
|
416 |
x := #foo.
|
|
417 |
x := (val == #CursorRight or:[val == #CursorDown]) ifTrue:[1].
|
62
|
418 |
^ x
|
|
419 |
|
|
420 |
"
|
113
|
421 |
self new _testIf1:#CursorRight
|
|
422 |
self new _testIf1:#CursorDown
|
|
423 |
self new _testIf1:#Foo
|
|
424 |
self new _testIf1:#CursorUp
|
|
425 |
self new _testIf1:nil
|
|
426 |
self new _testIf1:1
|
62
|
427 |
"
|
63
|
428 |
!
|
|
429 |
|
113
|
430 |
_testIf2:val
|
63
|
431 |
|x|
|
|
432 |
|
65
|
433 |
x := #foo.
|
|
434 |
x := (val == #CursorRight or:[val == #CursorDown]) ifTrue:1.
|
63
|
435 |
^ x
|
|
436 |
|
|
437 |
"
|
113
|
438 |
self new _testIf2:#CursorRight
|
|
439 |
self new _testIf2:#CursorDown
|
|
440 |
self new _testIf2:#Foo
|
|
441 |
self new _testIf2:#CursorUp
|
|
442 |
self new _testIf2:nil
|
|
443 |
self new _testIf2:1
|
63
|
444 |
"
|
65
|
445 |
!
|
|
446 |
|
113
|
447 |
_testIf3:val
|
65
|
448 |
|x|
|
|
449 |
|
|
450 |
x := #foo.
|
113
|
451 |
x := val isInteger ifTrue:1.
|
65
|
452 |
^ x
|
|
453 |
|
|
454 |
"
|
113
|
455 |
self new _testIf3:#CursorRight
|
|
456 |
self new _testIf3:#CursorDown
|
|
457 |
self new _testIf3:#Foo
|
|
458 |
self new _testIf3:#CursorUp
|
|
459 |
self new _testIf3:nil
|
|
460 |
self new _testIf3:1
|
65
|
461 |
"
|
|
462 |
!
|
|
463 |
|
113
|
464 |
_testIf4:val
|
67
|
465 |
^ val isNil
|
|
466 |
|
|
467 |
"
|
113
|
468 |
self new _testIf4:#CursorRight
|
|
469 |
self new _testIf4:1
|
|
470 |
self new _testIf4:nil
|
67
|
471 |
"
|
|
472 |
!
|
|
473 |
|
113
|
474 |
_testIf4:val1 with:val2
|
|
475 |
^ val1 == nil and:[val2 == nil]
|
66
|
476 |
|
|
477 |
"
|
113
|
478 |
self new _testIf4:#CursorRight with:#CursorDown
|
|
479 |
self new _testIf4:#CursorRight with:nil
|
|
480 |
self new _testIf4:nil with:#CursorDown
|
|
481 |
self new _testIf4:nil with:nil
|
66
|
482 |
"
|
|
483 |
!
|
|
484 |
|
113
|
485 |
_testIf5:val
|
|
486 |
^ val isNil ifTrue:[
|
|
487 |
1
|
|
488 |
]
|
67
|
489 |
|
|
490 |
"
|
113
|
491 |
self new _testIf5:#CursorRight
|
|
492 |
self new _testIf5:1
|
|
493 |
self new _testIf5:nil
|
67
|
494 |
"
|
|
495 |
!
|
|
496 |
|
113
|
497 |
_testIf5:val1 with:val2
|
|
498 |
^ val1 isNil and:[val2 isNil]
|
66
|
499 |
|
|
500 |
"
|
113
|
501 |
self new _testIf5:#CursorRight with:#CursorDown
|
|
502 |
self new _testIf5:#CursorRight with:nil
|
|
503 |
self new _testIf5:nil with:#CursorDown
|
|
504 |
self new _testIf5:nil with:nil
|
66
|
505 |
"
|
|
506 |
!
|
|
507 |
|
113
|
508 |
_testIf6:val
|
67
|
509 |
^ val isNil ifTrue:1
|
|
510 |
|
|
511 |
"
|
113
|
512 |
self new _testIf6:#CursorRight
|
|
513 |
self new _testIf6:1
|
|
514 |
self new _testIf6:nil
|
67
|
515 |
"
|
|
516 |
!
|
|
517 |
|
113
|
518 |
_testIf6b:val
|
68
|
519 |
val isNil ifTrue:1
|
|
520 |
|
|
521 |
"
|
113
|
522 |
self new _testIf6b:#CursorRight
|
|
523 |
self new _testIf6b:1
|
|
524 |
self new _testIf6b:nil
|
68
|
525 |
"
|
|
526 |
!
|
|
527 |
|
113
|
528 |
_testIf6c:val
|
|
529 |
val isNil ifTrue:[
|
|
530 |
1
|
68
|
531 |
|
113
|
532 |
"
|
|
533 |
self new _testIf6c:#CursorRight
|
|
534 |
self new _testIf6c:1
|
|
535 |
self new _testIf6c:nil
|
|
536 |
"
|
|
537 |
]
|
68
|
538 |
!
|
|
539 |
|
113
|
540 |
_testIf6d:val
|
68
|
541 |
^ val isNil ifTrue:val
|
|
542 |
|
|
543 |
"
|
113
|
544 |
self new _testIf6d:#CursorRight
|
|
545 |
self new _testIf6d:1
|
|
546 |
self new _testIf6d:nil
|
68
|
547 |
"
|
|
548 |
!
|
|
549 |
|
113
|
550 |
_testIf6e:val
|
68
|
551 |
^ val isNil ifFalse:val
|
|
552 |
|
|
553 |
"
|
113
|
554 |
self new _testIf6e:['hello']
|
|
555 |
self new _testIf6e:('hello' asValue)
|
|
556 |
self new _testIf6e:#CursorRight
|
|
557 |
self new _testIf6e:1
|
|
558 |
self new _testIf6e:nil
|
68
|
559 |
"
|
|
560 |
!
|
|
561 |
|
113
|
562 |
_testIf7:val
|
67
|
563 |
^ val ? 1
|
|
564 |
|
|
565 |
"
|
113
|
566 |
self new _testIf7:#CursorRight
|
|
567 |
self new _testIf7:1
|
|
568 |
self new _testIf7:nil
|
67
|
569 |
"
|
|
570 |
!
|
|
571 |
|
113
|
572 |
_testIfElse1:val
|
65
|
573 |
|x|
|
|
574 |
|
113
|
575 |
x := (val == #CursorRight or:[val == #CursorDown]) ifTrue:[
|
|
576 |
1
|
|
577 |
] ifFalse:[-1].
|
65
|
578 |
^ x
|
|
579 |
|
|
580 |
"
|
113
|
581 |
self new _testIfElse1:#CursorRight
|
|
582 |
self new _testIfElse1:#CursorDown
|
|
583 |
self new _testIfElse1:#Foo
|
|
584 |
self new _testIfElse1:#CursorUp
|
|
585 |
self new _testIfElse1:nil
|
|
586 |
self new _testIfElse1:1
|
65
|
587 |
"
|
|
588 |
!
|
|
589 |
|
113
|
590 |
_testIfElse2:val
|
65
|
591 |
|x|
|
|
592 |
|
|
593 |
x := (val == #CursorRight or:[val == #CursorDown]) ifTrue:1 ifFalse:-1.
|
|
594 |
^ x
|
|
595 |
|
|
596 |
"
|
113
|
597 |
self new _testIfElse2:#CursorRight
|
|
598 |
self new _testIfElse2:#CursorDown
|
|
599 |
self new _testIfElse2:#Foo
|
|
600 |
self new _testIfElse2:#CursorUp
|
|
601 |
self new _testIfElse2:nil
|
|
602 |
self new _testIfElse2:1
|
65
|
603 |
"
|
|
604 |
!
|
|
605 |
|
113
|
606 |
_testIfElse3:val
|
65
|
607 |
|x|
|
|
608 |
|
|
609 |
x := (val == #CursorRight or:[val isInteger]) ifTrue:1 ifFalse:-1.
|
|
610 |
^ x
|
|
611 |
|
|
612 |
"
|
113
|
613 |
self new _testIfElse3:#CursorRight
|
|
614 |
self new _testIfElse3:#CursorDown
|
|
615 |
self new _testIfElse3:#Foo
|
|
616 |
self new _testIfElse3:#CursorUp
|
|
617 |
self new _testIfElse3:nil
|
|
618 |
self new _testIfElse3:1
|
65
|
619 |
"
|
|
620 |
!
|
|
621 |
|
113
|
622 |
_testIfElse4:val
|
65
|
623 |
|x|
|
|
624 |
|
|
625 |
x := #foo.
|
113
|
626 |
x := val isInteger ifTrue:1 ifFalse:-1.
|
65
|
627 |
^ x
|
|
628 |
|
|
629 |
"
|
113
|
630 |
self new _testIfElse4:#CursorRight
|
|
631 |
self new _testIfElse4:#CursorDown
|
|
632 |
self new _testIfElse4:#Foo
|
|
633 |
self new _testIfElse4:#CursorUp
|
|
634 |
self new _testIfElse4:nil
|
|
635 |
self new _testIfElse4:1
|
65
|
636 |
"
|
68
|
637 |
!
|
|
638 |
|
113
|
639 |
_testIfElse5:val
|
68
|
640 |
|x|
|
|
641 |
|
|
642 |
x := #foo.
|
|
643 |
x := val ifNil:1 ifNotNil:-1.
|
|
644 |
^ x
|
|
645 |
|
|
646 |
"
|
113
|
647 |
self new _testIfElse5:#CursorUp
|
|
648 |
self new _testIfElse5:nil
|
|
649 |
self new _testIfElse5:1
|
68
|
650 |
"
|
|
651 |
!
|
|
652 |
|
113
|
653 |
_testIfElse6:val
|
68
|
654 |
|x|
|
|
655 |
|
|
656 |
x := #foo.
|
|
657 |
x := val ifNil:[1] ifNotNil:[-1].
|
|
658 |
^ x
|
|
659 |
|
|
660 |
"
|
113
|
661 |
self new _testIfElse6:#CursorUp
|
|
662 |
self new _testIfElse6:nil
|
|
663 |
self new _testIfElse6:1
|
68
|
664 |
"
|
|
665 |
!
|
|
666 |
|
113
|
667 |
_testIfElse7:val with:val1 with:val2
|
68
|
668 |
|x|
|
|
669 |
|
|
670 |
x := #foo.
|
|
671 |
x := val ifNil:val1 ifNotNil:val2.
|
|
672 |
^ x
|
|
673 |
|
|
674 |
"
|
113
|
675 |
self new _testIfElse7:#CursorUp with:1 with:2
|
|
676 |
self new _testIfElse7:nil with:1 with:2
|
|
677 |
self new _testIfElse7:1 with:1 with:2
|
|
678 |
"
|
|
679 |
!
|
|
680 |
|
|
681 |
testIf
|
|
682 |
self assert:(self _testIf1:#CursorRight) == 1.
|
|
683 |
self assert:(self _testIf1:#CursorDown) == 1.
|
|
684 |
self assert:(self _testIf1:#Foo) == nil.
|
|
685 |
self assert:(self _testIf1:#CursorUp) == nil.
|
|
686 |
self assert:(self _testIf1:nil) == nil.
|
|
687 |
self assert:(self _testIf1:1) == nil.
|
|
688 |
|
|
689 |
self assert:(self _testIf2:#CursorRight) == 1.
|
|
690 |
self assert:(self _testIf2:#CursorDown) == 1.
|
|
691 |
self assert:(self _testIf2:#Foo) == nil.
|
|
692 |
self assert:(self _testIf2:#CursorUp) == nil.
|
|
693 |
self assert:(self _testIf2:nil) == nil.
|
|
694 |
self assert:(self _testIf2:1) == nil.
|
|
695 |
|
|
696 |
self assert:(self _testIf3:#CursorRight) == nil.
|
|
697 |
self assert:(self _testIf3:#CursorDown) == nil.
|
|
698 |
self assert:(self _testIf3:#Foo) == nil.
|
|
699 |
self assert:(self _testIf3:#CursorUp) == nil.
|
|
700 |
self assert:(self _testIf3:nil) == nil.
|
|
701 |
self assert:(self _testIf3:1) == 1.
|
|
702 |
|
|
703 |
self assert:(self _testIf4:#CursorRight) == false.
|
|
704 |
self assert:(self _testIf4:nil) == true.
|
|
705 |
self assert:(self _testIf4:1) == false.
|
|
706 |
|
|
707 |
self assert:(self _testIf4:#CursorRight with:#CursorDown) == false.
|
|
708 |
self assert:(self _testIf4:#CursorRight with:nil) == false.
|
|
709 |
self assert:(self _testIf4:nil with:#CursorDown) == false.
|
|
710 |
self assert:(self _testIf4:nil with:nil) == true.
|
|
711 |
|
|
712 |
self assert:(self _testIf5:#CursorRight) == nil.
|
|
713 |
self assert:(self _testIf5:nil) == 1.
|
|
714 |
self assert:(self _testIf5:1) == nil.
|
|
715 |
|
|
716 |
self assert:(self _testIf5:#CursorRight with:#CursorDown) == false.
|
|
717 |
self assert:(self _testIf5:#CursorRight with:nil) == false.
|
|
718 |
self assert:(self _testIf5:nil with:#CursorDown) == false.
|
|
719 |
self assert:(self _testIf5:nil with:nil) == true.
|
|
720 |
|
|
721 |
self assert:(self _testIf6:#CursorRight) == nil.
|
|
722 |
self assert:(self _testIf6:nil) == 1.
|
|
723 |
self assert:(self _testIf6:1) == nil.
|
|
724 |
self assert:(self _testIf6d:#CursorRight) == nil.
|
|
725 |
self assert:(self _testIf6d:nil) == nil.
|
|
726 |
self assert:(self _testIf6d:1) == nil.
|
|
727 |
self assert:(self _testIf6e:#CursorRight) == #CursorRight.
|
|
728 |
self assert:(self _testIf6e:nil) == nil.
|
|
729 |
self assert:(self _testIf6e:1) == 1.
|
|
730 |
self assert:(self _testIf7:#CursorRight) == #CursorRight.
|
|
731 |
self assert:(self _testIf7:nil) == 1.
|
|
732 |
self assert:(self _testIf7:1) == 1.
|
|
733 |
|
|
734 |
self assert:(self _testIfElse1:#CursorRight) == 1.
|
|
735 |
self assert:(self _testIfElse1:#CursorDown) == 1.
|
|
736 |
self assert:(self _testIfElse1:#Foo) == -1.
|
|
737 |
self assert:(self _testIfElse1:#CursorUp) == -1.
|
|
738 |
self assert:(self _testIfElse1:nil) == -1.
|
|
739 |
self assert:(self _testIfElse1:1) == -1.
|
|
740 |
|
|
741 |
self assert:(self _testIfElse2:#CursorRight) == 1.
|
|
742 |
self assert:(self _testIfElse2:#CursorDown) == 1.
|
|
743 |
self assert:(self _testIfElse2:#Foo) == -1.
|
|
744 |
self assert:(self _testIfElse2:#CursorUp) == -1.
|
|
745 |
self assert:(self _testIfElse2:nil) == -1.
|
|
746 |
self assert:(self _testIfElse2:1) == -1.
|
|
747 |
|
|
748 |
self assert:(self _testIfElse3:#CursorRight) == 1.
|
|
749 |
self assert:(self _testIfElse3:#CursorDown) == -1.
|
|
750 |
self assert:(self _testIfElse3:#Foo) == -1.
|
|
751 |
self assert:(self _testIfElse3:#CursorUp) == -1.
|
|
752 |
self assert:(self _testIfElse3:nil) == -1.
|
|
753 |
self assert:(self _testIfElse3:1) == 1.
|
|
754 |
|
|
755 |
self assert:(self _testIfElse4:#CursorRight) == -1.
|
|
756 |
self assert:(self _testIfElse4:#CursorDown) == -1.
|
|
757 |
self assert:(self _testIfElse4:#Foo) == -1.
|
|
758 |
self assert:(self _testIfElse4:#CursorUp) == -1.
|
|
759 |
self assert:(self _testIfElse4:nil) == -1.
|
|
760 |
self assert:(self _testIfElse4:1) == 1.
|
|
761 |
|
|
762 |
self assert:(self _testIfElse5:#CursorUp) == -1.
|
|
763 |
self assert:(self _testIfElse5:nil) == 1.
|
|
764 |
self assert:(self _testIfElse5:1) == -1.
|
|
765 |
|
|
766 |
self assert:(self _testIfElse6:#CursorUp) == -1.
|
|
767 |
self assert:(self _testIfElse6:nil) == 1.
|
|
768 |
self assert:(self _testIfElse6:1) == -1.
|
|
769 |
|
|
770 |
self assert:(self _testIfElse7:#CursorUp with:1 with:2) == 2.
|
|
771 |
self assert:(self _testIfElse7:nil with:1 with:2) == 1.
|
|
772 |
self assert:(self _testIfElse7:1 with:1 with:2) == 2.
|
|
773 |
|
|
774 |
"
|
|
775 |
self basicNew testIf
|
68
|
776 |
"
|
62
|
777 |
! !
|
|
778 |
|
47
|
779 |
!CompilerTest methodsFor:'tests - constant folding'!
|
|
780 |
|
113
|
781 |
_testFloat_pi
|
47
|
782 |
^ Float pi
|
|
783 |
!
|
|
784 |
|
113
|
785 |
_testFloat_unity
|
47
|
786 |
^ Float unity
|
|
787 |
!
|
|
788 |
|
113
|
789 |
_testFloat_zero
|
47
|
790 |
^ Float zero
|
|
791 |
!
|
|
792 |
|
113
|
793 |
_testSmalltalk_if_else_isSmalltalkX
|
47
|
794 |
Smalltalk isSmalltalkX ifTrue:[
|
113
|
795 |
^ 'yes'
|
|
796 |
] ifFalse:[^ 'no']
|
47
|
797 |
!
|
|
798 |
|
113
|
799 |
_testSmalltalk_if_else_isVisualWorks
|
47
|
800 |
Smalltalk isVisualWorks ifTrue:[
|
113
|
801 |
^ 'yes'
|
|
802 |
] ifFalse:[^ 'no']
|
47
|
803 |
!
|
|
804 |
|
113
|
805 |
_testSmalltalk_if_isSmalltalkX
|
47
|
806 |
Smalltalk isSmalltalkX ifTrue:[
|
113
|
807 |
^ 'yes'
|
|
808 |
].
|
|
809 |
^ 'no'
|
|
810 |
!
|
|
811 |
|
|
812 |
_testSmalltalk_if_isSqueak
|
|
813 |
Smalltalk isSqueak ifTrue:[
|
|
814 |
^ 'yes'
|
47
|
815 |
].
|
|
816 |
^ 'no'
|
|
817 |
!
|
|
818 |
|
113
|
819 |
_testSmalltalk_if_isVisualWorks
|
47
|
820 |
Smalltalk isVisualWorks ifTrue:[
|
113
|
821 |
^ 'yes'
|
47
|
822 |
].
|
|
823 |
^ 'no'
|
|
824 |
!
|
|
825 |
|
113
|
826 |
_testSmalltalk_isSmalltalkX
|
47
|
827 |
^ Smalltalk isSmalltalkX
|
|
828 |
!
|
|
829 |
|
113
|
830 |
_testSmalltalk_isSqueak
|
47
|
831 |
^ Smalltalk isSqueak
|
|
832 |
!
|
|
833 |
|
113
|
834 |
_testSmalltalk_isVisualAge
|
47
|
835 |
^ Smalltalk isVisualAge
|
|
836 |
!
|
|
837 |
|
113
|
838 |
_testSmalltalk_isVisualWorks
|
47
|
839 |
^ Smalltalk isVisualWorks
|
|
840 |
!
|
|
841 |
|
113
|
842 |
_testUnaryFolding
|
|
843 |
self _testFloat_pi ~= (Float perform:#pi) ifTrue:[
|
|
844 |
self halt
|
|
845 |
].
|
|
846 |
self _testFloat_unity ~= (Float perform:#unity) ifTrue:[
|
|
847 |
self halt
|
|
848 |
].
|
|
849 |
self _testFloat_zero ~= (Float perform:#zero) ifTrue:[
|
|
850 |
self halt
|
|
851 |
].
|
|
852 |
self _testSmalltalk_isSmalltalkX ~= (Smalltalk perform:#isSmalltalkX) ifTrue:[
|
|
853 |
self halt
|
|
854 |
].
|
|
855 |
self _testSmalltalk_isSqueak ~= (Smalltalk perform:#isSqueak) ifTrue:[
|
|
856 |
self halt
|
|
857 |
].
|
|
858 |
self _testSmalltalk_isVisualWorks ~= (Smalltalk perform:#isVisualWorks) ifTrue:[
|
|
859 |
self halt
|
|
860 |
].
|
|
861 |
self _testSmalltalk_isVisualAge ~= (Smalltalk perform:#isVisualAge) ifTrue:[
|
|
862 |
self halt
|
|
863 |
]
|
47
|
864 |
|
|
865 |
"
|
113
|
866 |
self basicNew _testUnaryFolding
|
47
|
867 |
"
|
|
868 |
! !
|
|
869 |
|
87
|
870 |
!CompilerTest methodsFor:'tests - inlined'!
|
|
871 |
|
113
|
872 |
_test_even:arg
|
87
|
873 |
^ arg even
|
|
874 |
|
|
875 |
"
|
113
|
876 |
self new _test_even:nil
|
|
877 |
self new _test_even:123
|
|
878 |
self new _test_even:122
|
|
879 |
self new _test_even:(100 factorial)
|
87
|
880 |
"
|
|
881 |
!
|
|
882 |
|
113
|
883 |
_test_isInteger:arg
|
87
|
884 |
^ arg isInteger
|
|
885 |
|
|
886 |
"
|
113
|
887 |
self new _test_isInteger:nil
|
|
888 |
self new _test_isInteger:123
|
|
889 |
self new _test_isInteger:(100 factorial)
|
87
|
890 |
"
|
|
891 |
!
|
|
892 |
|
113
|
893 |
_test_isNotInteger:arg
|
87
|
894 |
^ arg isInteger not
|
|
895 |
|
|
896 |
"
|
113
|
897 |
self new _test_isNotInteger:nil
|
|
898 |
self new _test_isNotInteger:123
|
|
899 |
self new _test_isNotInteger:(100 factorial)
|
87
|
900 |
"
|
|
901 |
!
|
|
902 |
|
113
|
903 |
_test_max1:arg1 _:arg2
|
87
|
904 |
^ arg1 max:arg2
|
|
905 |
|
|
906 |
"
|
113
|
907 |
self new _test_max1:nil _:nil
|
|
908 |
self new _test_max1:1 _:nil
|
|
909 |
self new _test_max1:nil _:1
|
|
910 |
self new _test_max1:1 _:2
|
|
911 |
self new _test_max1:2 _:1
|
|
912 |
|
|
913 |
self new _test_max1:1.0 _:nil
|
|
914 |
self new _test_max1:nil _:1.0
|
|
915 |
self new _test_max1:1.0 _:2.0
|
|
916 |
self new _test_max1:2.0 _:1.0
|
|
917 |
|
|
918 |
self new _test_max1:1.0 _:2
|
|
919 |
self new _test_max1:2.0 _:1
|
|
920 |
self new _test_max1:1 _:2.0
|
|
921 |
self new _test_max1:2 _:1.0
|
87
|
922 |
"
|
|
923 |
!
|
|
924 |
|
113
|
925 |
_test_max2:arg
|
87
|
926 |
^ 1 max:arg
|
|
927 |
|
|
928 |
"
|
113
|
929 |
self new _test_max2:nil
|
|
930 |
self new _test_max2:0
|
|
931 |
self new _test_max2:1
|
|
932 |
self new _test_max2:2
|
|
933 |
|
|
934 |
self new _test_max2:0.0
|
|
935 |
self new _test_max2:1.0
|
|
936 |
self new _test_max2:2.0
|
87
|
937 |
"
|
|
938 |
!
|
|
939 |
|
113
|
940 |
_test_max3:arg
|
87
|
941 |
|var|
|
|
942 |
|
|
943 |
var := Array new:10.
|
|
944 |
^ 1 max:arg
|
|
945 |
|
|
946 |
"
|
113
|
947 |
self new _test_max3:nil
|
|
948 |
self new _test_max3:0
|
|
949 |
self new _test_max3:1
|
|
950 |
self new _test_max3:2
|
|
951 |
|
|
952 |
self new _test_max3:0.0
|
|
953 |
self new _test_max3:1.0
|
|
954 |
self new _test_max3:2.0
|
87
|
955 |
"
|
|
956 |
!
|
|
957 |
|
113
|
958 |
_test_max4:arg
|
87
|
959 |
|var|
|
|
960 |
|
|
961 |
var := Array new:10.
|
|
962 |
^ arg max:1
|
|
963 |
|
|
964 |
"
|
113
|
965 |
self new _test_max4:nil
|
|
966 |
self new _test_max4:0
|
|
967 |
self new _test_max4:1
|
|
968 |
self new _test_max4:2
|
|
969 |
|
|
970 |
self new _test_max4:0.0
|
|
971 |
self new _test_max4:1.0
|
|
972 |
self new _test_max4:2.0
|
87
|
973 |
"
|
|
974 |
!
|
|
975 |
|
113
|
976 |
_test_min1:arg1 _:arg2
|
87
|
977 |
^ arg1 min:arg2
|
|
978 |
|
|
979 |
"
|
113
|
980 |
self new _test_min1:nil _:nil
|
|
981 |
self new _test_min1:1 _:nil
|
|
982 |
self new _test_min1:nil _:1
|
|
983 |
self new _test_min1:1 _:2
|
|
984 |
self new _test_min1:2 _:1
|
|
985 |
|
|
986 |
self new _test_min1:1.0 _:nil
|
|
987 |
self new _test_min1:nil _:1.0
|
|
988 |
self new _test_min1:1.0 _:2.0
|
|
989 |
self new _test_min1:2.0 _:1.0
|
|
990 |
|
|
991 |
self new _test_min1:1.0 _:2
|
|
992 |
self new _test_min1:2.0 _:1
|
|
993 |
self new _test_min1:1 _:2.0
|
|
994 |
self new _test_min1:2 _:1.0
|
87
|
995 |
"
|
|
996 |
!
|
|
997 |
|
113
|
998 |
_test_min2:arg
|
87
|
999 |
^ 1 min:arg
|
|
1000 |
|
|
1001 |
"
|
113
|
1002 |
self new _test_min2:nil
|
|
1003 |
self new _test_min2:0
|
|
1004 |
self new _test_min2:1
|
|
1005 |
self new _test_min2:2
|
|
1006 |
|
|
1007 |
self new _test_min2:0.0
|
|
1008 |
self new _test_min2:1.0
|
|
1009 |
self new _test_min2:2.0
|
87
|
1010 |
"
|
|
1011 |
!
|
|
1012 |
|
113
|
1013 |
_test_min3:arg
|
87
|
1014 |
|var|
|
|
1015 |
|
|
1016 |
var := Array new:10.
|
|
1017 |
^ 1 min:arg
|
|
1018 |
|
|
1019 |
"
|
113
|
1020 |
self new _test_min3:nil
|
|
1021 |
self new _test_min3:0
|
|
1022 |
self new _test_min3:1
|
|
1023 |
self new _test_min3:2
|
|
1024 |
|
|
1025 |
self new _test_min3:0.0
|
|
1026 |
self new _test_min3:1.0
|
|
1027 |
self new _test_min3:2.0
|
87
|
1028 |
"
|
|
1029 |
!
|
|
1030 |
|
113
|
1031 |
_test_min4:arg
|
87
|
1032 |
|var|
|
|
1033 |
|
|
1034 |
var := Array new:10.
|
|
1035 |
^ arg min:1
|
|
1036 |
|
|
1037 |
"
|
113
|
1038 |
self new _test_min4:nil
|
|
1039 |
self new _test_min4:0
|
|
1040 |
self new _test_min4:1
|
|
1041 |
self new _test_min4:2
|
|
1042 |
|
|
1043 |
self new _test_min4:0.0
|
|
1044 |
self new _test_min4:1.0
|
|
1045 |
self new _test_min4:2.0
|
87
|
1046 |
"
|
|
1047 |
!
|
|
1048 |
|
113
|
1049 |
_test_odd:arg
|
87
|
1050 |
^ arg odd
|
|
1051 |
|
|
1052 |
"
|
113
|
1053 |
self new _test_odd:nil
|
|
1054 |
self new _test_odd:123
|
|
1055 |
self new _test_odd:122
|
|
1056 |
self new _test_odd:(100 factorial)
|
87
|
1057 |
"
|
|
1058 |
!
|
|
1059 |
|
113
|
1060 |
_test_size
|
87
|
1061 |
^ value size
|
|
1062 |
|
|
1063 |
"
|
113
|
1064 |
(self new value:(Array new:2)) _test_size
|
|
1065 |
(self new value:(OrderedCollection new:2)) _test_size
|
|
1066 |
"
|
|
1067 |
! !
|
|
1068 |
|
188
|
1069 |
!CompilerTest methodsFor:'tests - method calls'!
|
|
1070 |
|
189
|
1071 |
addDumpingMethodForSelfIsLostBug
|
|
1072 |
|code mthd|
|
|
1073 |
|
|
1074 |
code :=
|
|
1075 |
'_x
|
190
|
1076 |
"/ ObjectMemory dumpSender.
|
189
|
1077 |
"/ request nextPutAll: ''a''.
|
|
1078 |
ObjectMemory garbageCollect.
|
|
1079 |
ObjectMemory dumpSender.
|
|
1080 |
"/ request nextPutAll: ''b''.
|
|
1081 |
'.
|
|
1082 |
|
|
1083 |
Class withoutUpdatingChangesDo:[
|
|
1084 |
mthd := (Smalltalk at:#Compiler)
|
|
1085 |
compile:code
|
|
1086 |
in:DummyClass
|
|
1087 |
notifying:nil
|
|
1088 |
ifFail:[self error].
|
|
1089 |
].
|
|
1090 |
^ mthd
|
|
1091 |
!
|
|
1092 |
|
|
1093 |
addHaltingMethodForSelfIsLostBug
|
|
1094 |
|code mthd|
|
|
1095 |
|
|
1096 |
code :=
|
|
1097 |
'_x
|
|
1098 |
request nextPutAll: ''a''.
|
|
1099 |
self halt.
|
|
1100 |
ObjectMemory garbageCollect.
|
|
1101 |
self halt.
|
|
1102 |
request nextPutAll: ''b''.
|
|
1103 |
'.
|
|
1104 |
|
|
1105 |
Class withoutUpdatingChangesDo:[
|
|
1106 |
mthd := (Smalltalk at:#Compiler)
|
|
1107 |
compile:code
|
|
1108 |
in:DummyClass
|
|
1109 |
notifying:nil
|
|
1110 |
ifFail:[self error].
|
|
1111 |
].
|
|
1112 |
^ mthd
|
|
1113 |
!
|
|
1114 |
|
188
|
1115 |
addMethodForSelfIsLostBug
|
|
1116 |
|code mthd|
|
|
1117 |
|
|
1118 |
code :=
|
|
1119 |
'_x
|
|
1120 |
request nextPutAll: ''a''.
|
|
1121 |
ObjectMemory garbageCollect.
|
|
1122 |
request nextPutAll: ''b''.
|
|
1123 |
'.
|
|
1124 |
|
|
1125 |
Class withoutUpdatingChangesDo:[
|
|
1126 |
mthd := (Smalltalk at:#Compiler)
|
|
1127 |
compile:code
|
|
1128 |
in:DummyClass
|
|
1129 |
notifying:nil
|
|
1130 |
ifFail:[self error].
|
|
1131 |
].
|
|
1132 |
^ mthd
|
|
1133 |
!
|
|
1134 |
|
|
1135 |
removeMethodForSelfIsLostBug
|
|
1136 |
Class withoutUpdatingChangesDo:[
|
|
1137 |
DummyClass removeSelector:#'_x'.
|
|
1138 |
].
|
|
1139 |
!
|
|
1140 |
|
|
1141 |
test_selfIsLost1
|
|
1142 |
|mthd rcvr retVal str|
|
|
1143 |
|
|
1144 |
str := '' writeStream.
|
|
1145 |
|
|
1146 |
mthd := self addMethodForSelfIsLostBug.
|
|
1147 |
self removeMethodForSelfIsLostBug.
|
|
1148 |
rcvr := DummyClass new.
|
|
1149 |
rcvr request:str.
|
|
1150 |
retVal := mthd valueWithReceiver:rcvr arguments:#().
|
|
1151 |
|
|
1152 |
"
|
|
1153 |
self new test_selfIsLost1
|
|
1154 |
"
|
|
1155 |
!
|
|
1156 |
|
|
1157 |
test_selfIsLost2
|
|
1158 |
|mthd rcvr retVal str|
|
|
1159 |
|
|
1160 |
str := '' writeStream.
|
|
1161 |
|
|
1162 |
mthd := self addMethodForSelfIsLostBug.
|
|
1163 |
rcvr := DummyClass new.
|
|
1164 |
rcvr request:str.
|
|
1165 |
|
|
1166 |
retVal := rcvr perform:#'_x'.
|
|
1167 |
|
|
1168 |
self removeMethodForSelfIsLostBug.
|
|
1169 |
|
|
1170 |
"
|
|
1171 |
self new test_selfIsLost2
|
|
1172 |
"
|
|
1173 |
!
|
|
1174 |
|
|
1175 |
test_selfIsLost3
|
|
1176 |
|mthd rcvr retVal|
|
|
1177 |
|
|
1178 |
mthd := DummyClass compiledMethodAt:#'_y0'.
|
|
1179 |
|
|
1180 |
rcvr := DummyClass new.
|
|
1181 |
|
|
1182 |
retVal := mthd valueWithReceiver:rcvr arguments:#().
|
|
1183 |
self assert:(retVal == rcvr).
|
|
1184 |
|
|
1185 |
"
|
|
1186 |
self new test_selfIsLost3
|
|
1187 |
"
|
|
1188 |
!
|
|
1189 |
|
|
1190 |
test_selfIsLost4
|
|
1191 |
|mthd rcvr retVal|
|
|
1192 |
|
|
1193 |
mthd := DummyClass compiledMethodAt:#'_y1:'.
|
|
1194 |
|
|
1195 |
rcvr := DummyClass new.
|
|
1196 |
|
|
1197 |
retVal := mthd valueWithReceiver:rcvr arguments:(Array with:rcvr).
|
|
1198 |
self assert:(retVal == 1).
|
|
1199 |
|
|
1200 |
"
|
|
1201 |
self new test_selfIsLost4
|
|
1202 |
"
|
189
|
1203 |
!
|
|
1204 |
|
|
1205 |
xtest_selfIsLost5
|
|
1206 |
|mthd rcvr retVal str|
|
|
1207 |
|
|
1208 |
str := '' writeStream.
|
|
1209 |
|
|
1210 |
mthd := self addHaltingMethodForSelfIsLostBug.
|
|
1211 |
self removeMethodForSelfIsLostBug.
|
|
1212 |
rcvr := DummyClass new.
|
|
1213 |
rcvr request:str.
|
|
1214 |
retVal := mthd valueWithReceiver:rcvr arguments:#().
|
|
1215 |
|
|
1216 |
"
|
|
1217 |
self new xtest_selfIsLost5
|
|
1218 |
"
|
|
1219 |
!
|
|
1220 |
|
|
1221 |
xtest_selfIsLost6
|
|
1222 |
|mthd rcvr retVal str|
|
|
1223 |
|
|
1224 |
str := '' writeStream.
|
|
1225 |
|
|
1226 |
mthd := self addDumpingMethodForSelfIsLostBug.
|
|
1227 |
self removeMethodForSelfIsLostBug.
|
|
1228 |
rcvr := DummyClass new.
|
|
1229 |
rcvr request:str.
|
|
1230 |
retVal := mthd valueWithReceiver:rcvr arguments:#().
|
|
1231 |
|
|
1232 |
"
|
|
1233 |
self new xtest_selfIsLost6
|
|
1234 |
"
|
188
|
1235 |
! !
|
|
1236 |
|
113
|
1237 |
!CompilerTest methodsFor:'tests - parsing'!
|
|
1238 |
|
|
1239 |
testParseBadLiteral
|
|
1240 |
self assert:( (self class compile:'foo ^ #( a b ( c d (' ) == #Error ) .
|
|
1241 |
self assert:( (self class compile:'foo ^ #( a b ( c d ()' ) == #Error ).
|
|
1242 |
self assert:( (self class compile:'foo ^ #( a b ( c d ())' ) == #Error ).
|
|
1243 |
self assert:( (self class compile:'foo ^ #( a b ( c d ()))' ) ~~ #Error ).
|
|
1244 |
self class removeSelector:#foo.
|
|
1245 |
|
|
1246 |
"
|
|
1247 |
self new testParseBadLiteral
|
87
|
1248 |
"
|
|
1249 |
! !
|
|
1250 |
|
84
|
1251 |
!CompilerTest methodsFor:'tests - sends'!
|
|
1252 |
|
|
1253 |
m1
|
|
1254 |
^ 123
|
|
1255 |
!
|
|
1256 |
|
85
|
1257 |
m10
|
|
1258 |
^ self m9
|
|
1259 |
|
|
1260 |
"
|
|
1261 |
self new m10
|
|
1262 |
"
|
|
1263 |
!
|
|
1264 |
|
|
1265 |
m11
|
|
1266 |
^ self m10
|
|
1267 |
|
|
1268 |
"
|
|
1269 |
self new m11
|
|
1270 |
"
|
|
1271 |
!
|
|
1272 |
|
|
1273 |
m12
|
|
1274 |
^ self m11
|
|
1275 |
|
|
1276 |
"
|
|
1277 |
self new m12
|
|
1278 |
"
|
|
1279 |
!
|
|
1280 |
|
|
1281 |
m13
|
|
1282 |
^ self m12
|
|
1283 |
|
|
1284 |
"
|
|
1285 |
self new m13
|
|
1286 |
"
|
|
1287 |
!
|
|
1288 |
|
|
1289 |
m14
|
|
1290 |
^ self m13
|
|
1291 |
|
|
1292 |
"
|
|
1293 |
self new m14
|
|
1294 |
"
|
|
1295 |
!
|
|
1296 |
|
|
1297 |
m15
|
|
1298 |
^ self m14
|
|
1299 |
|
|
1300 |
"
|
|
1301 |
self new m15
|
|
1302 |
"
|
|
1303 |
!
|
|
1304 |
|
|
1305 |
m16
|
|
1306 |
^ self m15
|
|
1307 |
|
|
1308 |
"
|
|
1309 |
self new m16
|
|
1310 |
"
|
|
1311 |
!
|
|
1312 |
|
84
|
1313 |
m2
|
|
1314 |
^ self m1
|
|
1315 |
!
|
|
1316 |
|
|
1317 |
m3
|
|
1318 |
^ self m2
|
|
1319 |
!
|
|
1320 |
|
|
1321 |
m4
|
|
1322 |
^ self m3
|
|
1323 |
!
|
|
1324 |
|
|
1325 |
m5
|
|
1326 |
^ self m4
|
|
1327 |
!
|
|
1328 |
|
|
1329 |
m6
|
|
1330 |
^ self m5
|
|
1331 |
!
|
|
1332 |
|
|
1333 |
m7
|
|
1334 |
^ self m6
|
|
1335 |
|
|
1336 |
"
|
|
1337 |
self new m7
|
|
1338 |
"
|
85
|
1339 |
!
|
|
1340 |
|
|
1341 |
m8
|
|
1342 |
^ self m7
|
|
1343 |
|
|
1344 |
"
|
|
1345 |
self new m8
|
|
1346 |
"
|
|
1347 |
!
|
|
1348 |
|
|
1349 |
m9
|
|
1350 |
^ self m8
|
|
1351 |
|
|
1352 |
"
|
|
1353 |
self new m9
|
|
1354 |
"
|
84
|
1355 |
! !
|
|
1356 |
|
81
|
1357 |
!CompilerTest methodsFor:'tests context setup'!
|
|
1358 |
|
113
|
1359 |
_testContextA
|
|
1360 |
ObjectMemory dumpObject:thisContext
|
|
1361 |
|
|
1362 |
"
|
|
1363 |
self new _testContextA
|
|
1364 |
"
|
|
1365 |
!
|
|
1366 |
|
|
1367 |
_testContextB
|
|
1368 |
ObjectMemory dumpObject:thisContext sender
|
|
1369 |
|
|
1370 |
"
|
|
1371 |
self new _testContextB
|
|
1372 |
"
|
|
1373 |
!
|
|
1374 |
|
|
1375 |
_testContextC
|
|
1376 |
thisContext fullPrintAll
|
|
1377 |
|
|
1378 |
"
|
|
1379 |
self new _testContextC
|
|
1380 |
"
|
|
1381 |
!
|
|
1382 |
|
|
1383 |
_testContextD
|
|
1384 |
self _testContextB
|
|
1385 |
|
|
1386 |
"
|
|
1387 |
self new _testContextD
|
|
1388 |
"
|
|
1389 |
!
|
|
1390 |
|
|
1391 |
_testContextE
|
|
1392 |
^ thisContext sender
|
|
1393 |
|
|
1394 |
"
|
|
1395 |
self new _testContextE
|
|
1396 |
"
|
|
1397 |
!
|
|
1398 |
|
|
1399 |
_testContextF
|
|
1400 |
^ self _testContextE
|
|
1401 |
|
|
1402 |
"
|
|
1403 |
self new _testContextF
|
|
1404 |
"
|
|
1405 |
!
|
|
1406 |
|
|
1407 |
_testSend0
|
|
1408 |
^ 9999
|
|
1409 |
!
|
|
1410 |
|
|
1411 |
_testSend0B:arg
|
|
1412 |
^ arg
|
|
1413 |
!
|
|
1414 |
|
|
1415 |
_testSend1
|
|
1416 |
^ self _testSend0
|
|
1417 |
|
|
1418 |
"
|
|
1419 |
self new testSend1
|
|
1420 |
"
|
|
1421 |
!
|
|
1422 |
|
|
1423 |
_testSend1B
|
|
1424 |
^ self _testSend0B:1234
|
|
1425 |
|
|
1426 |
"
|
|
1427 |
self new testSend1B
|
|
1428 |
"
|
|
1429 |
!
|
|
1430 |
|
|
1431 |
_testSend1C:arg
|
|
1432 |
^ self _testSend0B:arg
|
|
1433 |
|
|
1434 |
"
|
|
1435 |
self new testSend1C:9998
|
|
1436 |
"
|
|
1437 |
!
|
|
1438 |
|
|
1439 |
_testSend2
|
|
1440 |
self _testContextB
|
|
1441 |
|
|
1442 |
"
|
|
1443 |
self new testSend2
|
|
1444 |
"
|
|
1445 |
!
|
|
1446 |
|
|
1447 |
_testSend3
|
|
1448 |
self _testContextC
|
|
1449 |
|
|
1450 |
"
|
|
1451 |
self new testSend3
|
|
1452 |
"
|
|
1453 |
!
|
|
1454 |
|
81
|
1455 |
retArgWithFrameA:arg
|
|
1456 |
|a b c|
|
|
1457 |
|
|
1458 |
a := 0.
|
|
1459 |
b := 1.
|
|
1460 |
c := 2.
|
|
1461 |
^ arg
|
|
1462 |
|
|
1463 |
"
|
|
1464 |
self new retArgWithFrameA:999
|
|
1465 |
"
|
|
1466 |
!
|
|
1467 |
|
82
|
1468 |
retArgWithFrameB:arg
|
|
1469 |
|a b c|
|
|
1470 |
|
|
1471 |
a := 0.
|
|
1472 |
b := 1.
|
|
1473 |
c := 2.
|
|
1474 |
self retSelf.
|
|
1475 |
|
|
1476 |
^ arg
|
|
1477 |
|
|
1478 |
"
|
|
1479 |
self new retArgWithFrameB:9999
|
|
1480 |
"
|
|
1481 |
!
|
|
1482 |
|
81
|
1483 |
retLocal
|
|
1484 |
|a|
|
|
1485 |
|
|
1486 |
a := 0.
|
|
1487 |
^ a
|
79
|
1488 |
|
81
|
1489 |
"
|
|
1490 |
self new retLocal
|
|
1491 |
1000000 timesRepeat:[self new retInstVar]
|
|
1492 |
Time millisecondsToRun:[ 1000000 timesRepeat:[self new retInstVar] ]
|
|
1493 |
"
|
|
1494 |
|
|
1495 |
"
|
|
1496 |
|i|
|
|
1497 |
|
|
1498 |
i := self new.
|
|
1499 |
i instVarAt:1 put:12345.
|
|
1500 |
i retInstVar
|
|
1501 |
"
|
|
1502 |
|
|
1503 |
"
|
|
1504 |
|i|
|
|
1505 |
i := self new.
|
|
1506 |
i instVarAt:1 put:12345.
|
|
1507 |
1000000 timesRepeat:[i retInstVar]
|
|
1508 |
"
|
79
|
1509 |
|
|
1510 |
"
|
81
|
1511 |
|i|
|
|
1512 |
i := self new.
|
|
1513 |
i instVarAt:1 put:12345.
|
|
1514 |
Time millisecondsToRun:[ 1000000 timesRepeat:[i retInstVar] ]
|
|
1515 |
"
|
|
1516 |
|
|
1517 |
|
|
1518 |
!
|
|
1519 |
|
|
1520 |
retLocalB
|
|
1521 |
|a b c|
|
|
1522 |
|
|
1523 |
a := 0.
|
|
1524 |
b := 1.
|
|
1525 |
c := 2.
|
|
1526 |
^ a
|
|
1527 |
|
|
1528 |
"
|
|
1529 |
self new retLocalB
|
86
|
1530 |
1000000 timesRepeat:[self new retLocalB]
|
81
|
1531 |
Time millisecondsToRun:[ 1000000 timesRepeat:[self new retInstVar] ]
|
86
|
1532 |
Time millisecondsToRun:[ 1000000 timesRepeat:[self new retLocalB] ]
|
81
|
1533 |
"
|
|
1534 |
|
|
1535 |
"
|
|
1536 |
|i|
|
|
1537 |
|
|
1538 |
i := self new.
|
|
1539 |
i instVarAt:1 put:12345.
|
|
1540 |
i retInstVar
|
|
1541 |
"
|
|
1542 |
|
|
1543 |
"
|
|
1544 |
|i|
|
|
1545 |
i := self new.
|
|
1546 |
i instVarAt:1 put:12345.
|
|
1547 |
1000000 timesRepeat:[i retInstVar]
|
|
1548 |
"
|
|
1549 |
|
|
1550 |
"
|
|
1551 |
|i|
|
|
1552 |
i := self new.
|
|
1553 |
i instVarAt:1 put:12345.
|
|
1554 |
Time millisecondsToRun:[ 1000000 timesRepeat:[i retInstVar] ]
|
|
1555 |
"
|
|
1556 |
|
|
1557 |
|
|
1558 |
!
|
|
1559 |
|
|
1560 |
retLocalC
|
|
1561 |
|a b c|
|
|
1562 |
|
|
1563 |
a := 0.
|
|
1564 |
b := 1.
|
|
1565 |
c := 2.
|
|
1566 |
^ b
|
|
1567 |
|
|
1568 |
"
|
|
1569 |
self new retLocalC
|
79
|
1570 |
1000000 timesRepeat:[self new retInstVar]
|
|
1571 |
Time millisecondsToRun:[ 1000000 timesRepeat:[self new retInstVar] ]
|
|
1572 |
"
|
|
1573 |
|
|
1574 |
"
|
|
1575 |
|i|
|
|
1576 |
|
|
1577 |
i := self new.
|
|
1578 |
i instVarAt:1 put:12345.
|
|
1579 |
i retInstVar
|
|
1580 |
"
|
|
1581 |
|
|
1582 |
"
|
|
1583 |
|i|
|
|
1584 |
i := self new.
|
|
1585 |
i instVarAt:1 put:12345.
|
|
1586 |
1000000 timesRepeat:[i retInstVar]
|
|
1587 |
"
|
|
1588 |
|
|
1589 |
"
|
|
1590 |
|i|
|
|
1591 |
i := self new.
|
|
1592 |
i instVarAt:1 put:12345.
|
|
1593 |
Time millisecondsToRun:[ 1000000 timesRepeat:[i retInstVar] ]
|
|
1594 |
"
|
|
1595 |
|
|
1596 |
|
|
1597 |
!
|
|
1598 |
|
81
|
1599 |
retLocalD
|
|
1600 |
|a b c|
|
|
1601 |
|
|
1602 |
a := 0.
|
|
1603 |
b := 1.
|
|
1604 |
c := 2.
|
|
1605 |
^ c
|
|
1606 |
|
|
1607 |
"
|
|
1608 |
self new retLocalD
|
|
1609 |
1000000 timesRepeat:[self new retInstVar]
|
|
1610 |
Time millisecondsToRun:[ 1000000 timesRepeat:[self new retInstVar] ]
|
|
1611 |
"
|
|
1612 |
|
|
1613 |
"
|
|
1614 |
|i|
|
|
1615 |
|
|
1616 |
i := self new.
|
|
1617 |
i instVarAt:1 put:12345.
|
|
1618 |
i retInstVar
|
|
1619 |
"
|
|
1620 |
|
|
1621 |
"
|
|
1622 |
|i|
|
|
1623 |
i := self new.
|
|
1624 |
i instVarAt:1 put:12345.
|
|
1625 |
1000000 timesRepeat:[i retInstVar]
|
|
1626 |
"
|
|
1627 |
|
|
1628 |
"
|
|
1629 |
|i|
|
|
1630 |
i := self new.
|
|
1631 |
i instVarAt:1 put:12345.
|
|
1632 |
Time millisecondsToRun:[ 1000000 timesRepeat:[i retInstVar] ]
|
|
1633 |
"
|
|
1634 |
|
|
1635 |
|
|
1636 |
!
|
|
1637 |
|
|
1638 |
retLocalE
|
|
1639 |
|a b c|
|
80
|
1640 |
|
|
1641 |
a := 0.
|
81
|
1642 |
b := 1.
|
|
1643 |
c := 2.
|
|
1644 |
^ self
|
|
1645 |
|
|
1646 |
"
|
|
1647 |
self new retLocalE
|
|
1648 |
1000000 timesRepeat:[self new retInstVar]
|
|
1649 |
Time millisecondsToRun:[ 1000000 timesRepeat:[self new retInstVar] ]
|
|
1650 |
"
|
|
1651 |
|
|
1652 |
"
|
|
1653 |
|i|
|
|
1654 |
|
|
1655 |
i := self new.
|
|
1656 |
i instVarAt:1 put:12345.
|
|
1657 |
i retInstVar
|
|
1658 |
"
|
|
1659 |
|
|
1660 |
"
|
|
1661 |
|i|
|
|
1662 |
i := self new.
|
|
1663 |
i instVarAt:1 put:12345.
|
|
1664 |
1000000 timesRepeat:[i retInstVar]
|
|
1665 |
"
|
|
1666 |
|
|
1667 |
"
|
|
1668 |
|i|
|
|
1669 |
i := self new.
|
|
1670 |
i instVarAt:1 put:12345.
|
|
1671 |
Time millisecondsToRun:[ 1000000 timesRepeat:[i retInstVar] ]
|
|
1672 |
"
|
|
1673 |
|
|
1674 |
|
|
1675 |
!
|
|
1676 |
|
82
|
1677 |
retLocalF
|
|
1678 |
|a b c|
|
|
1679 |
|
|
1680 |
a := 0.
|
|
1681 |
b := 1.
|
|
1682 |
c := 2.
|
|
1683 |
self retSelf.
|
|
1684 |
|
|
1685 |
^ a
|
|
1686 |
|
|
1687 |
"
|
|
1688 |
self new retLocalF
|
|
1689 |
"
|
|
1690 |
|
|
1691 |
|
|
1692 |
|
|
1693 |
!
|
|
1694 |
|
|
1695 |
retLocalG
|
|
1696 |
|a b c|
|
|
1697 |
|
|
1698 |
a := 0.
|
|
1699 |
b := 1.
|
|
1700 |
c := 2.
|
|
1701 |
self retSelf.
|
|
1702 |
|
|
1703 |
^ b
|
|
1704 |
|
|
1705 |
"
|
|
1706 |
self new retLocalG
|
|
1707 |
"
|
|
1708 |
|
|
1709 |
|
|
1710 |
|
|
1711 |
!
|
|
1712 |
|
|
1713 |
retLocalH
|
|
1714 |
|a b c|
|
|
1715 |
|
|
1716 |
a := 0.
|
|
1717 |
b := 1.
|
|
1718 |
c := 2.
|
|
1719 |
self retSelf.
|
|
1720 |
|
|
1721 |
^ c
|
|
1722 |
|
|
1723 |
"
|
|
1724 |
self new retLocalH
|
|
1725 |
"
|
|
1726 |
|
|
1727 |
|
|
1728 |
|
|
1729 |
!
|
|
1730 |
|
|
1731 |
retSelf
|
|
1732 |
|
|
1733 |
|
81
|
1734 |
! !
|
|
1735 |
|
|
1736 |
!CompilerTest methodsFor:'tests entry'!
|
|
1737 |
|
|
1738 |
ilcMissCheck
|
|
1739 |
|
|
1740 |
|
|
1741 |
|
|
1742 |
"
|
|
1743 |
(Array with:self new with:nil) do:[:el | el size printCR.].
|
|
1744 |
"
|
|
1745 |
|
|
1746 |
|
|
1747 |
|
|
1748 |
! !
|
|
1749 |
|
|
1750 |
!CompilerTest methodsFor:'tests instvar access'!
|
|
1751 |
|
|
1752 |
retInstVar
|
|
1753 |
^ value
|
|
1754 |
|
|
1755 |
"
|
|
1756 |
self new retInstVar
|
80
|
1757 |
1000000 timesRepeat:[self new retInstVar]
|
|
1758 |
Time millisecondsToRun:[ 1000000 timesRepeat:[self new retInstVar] ]
|
79
|
1759 |
"
|
|
1760 |
|
|
1761 |
"
|
|
1762 |
|i|
|
|
1763 |
|
|
1764 |
i := self new.
|
|
1765 |
i instVarAt:1 put:12345.
|
80
|
1766 |
i retInstVar
|
|
1767 |
"
|
|
1768 |
|
|
1769 |
"
|
|
1770 |
|i|
|
|
1771 |
i := self new.
|
|
1772 |
i instVarAt:1 put:12345.
|
|
1773 |
1000000 timesRepeat:[i retInstVar]
|
|
1774 |
"
|
|
1775 |
|
|
1776 |
"
|
|
1777 |
|i|
|
|
1778 |
i := self new.
|
|
1779 |
i instVarAt:1 put:12345.
|
|
1780 |
Time millisecondsToRun:[ 1000000 timesRepeat:[i retInstVar] ]
|
|
1781 |
"
|
|
1782 |
|
|
1783 |
|
|
1784 |
!
|
|
1785 |
|
|
1786 |
setInstVarA
|
|
1787 |
value := 123
|
|
1788 |
|
|
1789 |
"
|
|
1790 |
self new setInstVarA; instVarAt:1
|
|
1791 |
1000000 timesRepeat:[self new setInstVarA]
|
|
1792 |
Time millisecondsToRun:[ 1000000 timesRepeat:[self new setInstVarA] ]
|
|
1793 |
"
|
|
1794 |
|
|
1795 |
"
|
|
1796 |
|i|
|
|
1797 |
|
|
1798 |
i := self new.
|
|
1799 |
i instVarAt:1 put:12345.
|
|
1800 |
i setInstVarA.
|
79
|
1801 |
i instVarAt:1
|
|
1802 |
"
|
|
1803 |
|
|
1804 |
|
|
1805 |
|
80
|
1806 |
!
|
|
1807 |
|
|
1808 |
setInstVarB
|
|
1809 |
value := 'hello'
|
|
1810 |
|
|
1811 |
"
|
|
1812 |
self new setInstVarB; instVarAt:1
|
|
1813 |
1000000 timesRepeat:[self new setInstVarB]
|
|
1814 |
Time millisecondsToRun:[ 1000000 timesRepeat:[self new setInstVarB] ]
|
|
1815 |
"
|
|
1816 |
|
|
1817 |
"
|
|
1818 |
|i|
|
|
1819 |
|
|
1820 |
i := self new.
|
|
1821 |
i instVarAt:1 put:12345.
|
|
1822 |
i setInstVarB.
|
|
1823 |
i instVarAt:1
|
|
1824 |
"
|
|
1825 |
|
|
1826 |
|
|
1827 |
|
79
|
1828 |
! !
|
|
1829 |
|
188
|
1830 |
!CompilerTest::DummyClass methodsFor:'accessing'!
|
|
1831 |
|
|
1832 |
_y0
|
|
1833 |
ObjectMemory garbageCollect.
|
|
1834 |
^ self.
|
|
1835 |
!
|
|
1836 |
|
|
1837 |
_y1:arg1
|
|
1838 |
ObjectMemory garbageCollect.
|
|
1839 |
^ arg1.
|
|
1840 |
!
|
|
1841 |
|
|
1842 |
request:something
|
|
1843 |
"set the value of the instance variable 'request' (automatically generated)"
|
|
1844 |
|
|
1845 |
request := something.
|
|
1846 |
! !
|
|
1847 |
|
47
|
1848 |
!CompilerTest class methodsFor:'documentation'!
|
|
1849 |
|
|
1850 |
version
|
|
1851 |
^ '$Header$'
|
|
1852 |
! !
|