optimized interpreter using GCC's computed goto
[panda.git] / st / ArrayedCollection.st
blob86d28254bccfa80303fcc179f31be9467947e70b
3 "instance creation"
5 ArrayedCollection classMethod!
6 new
7         ^ self new: 0!
9 ArrayedCollection classMethod!
10 with: anObject
11         ^ (self new: 1)
12         at: 1 put: anObject;
13         yourself!
15 ArrayedCollection classMethod!
16 with: firstObject with: secondObject
17         ^ (self new: 2)
18         at: 1 put: firstObject;
19         at: 2 put: secondObject;
20         yourself!
22 ArrayedCollection classMethod!
23 with: firstObject with: secondObject with: thirdObject
24         ^ (self new: 3)
25         at: 1 put: firstObject;
26         at: 2 put: secondObject;
27         at: 3 put: thirdObject;
28         yourself!
30 ArrayedCollection classMethod!
31 with: firstObject with: secondObject with: thirdObject with: fourthObject
32         ^ (self new: 4)
33         at: 1 put: firstObject;
34         at: 2 put: secondObject;
35         at: 3 put: thirdObject;
36         at: 4 put: fourthObject;
37         yourself!
39 "adding"
41 ArrayedCollection method!
42 add: anObject
43         ^ self shouldNotImplement!