resin 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/amber/css/amber-normalize.css +468 -0
- data/amber/css/amber-normalize.less +501 -0
- data/amber/css/amber.css +9 -6
- data/amber/js/IDE.deploy.js +443 -440
- data/amber/js/IDE.js +704 -701
- data/amber/js/Kernel-Collections.deploy.js +399 -363
- data/amber/js/Kernel-Collections.js +466 -415
- data/amber/js/Kernel-Objects.deploy.js +55 -10
- data/amber/js/Kernel-Objects.js +80 -15
- data/amber/js/Kernel-Tests.deploy.js +216 -166
- data/amber/js/Kernel-Tests.js +266 -196
- data/amber/js/amber.js +7 -2
- data/amber/js/init.js +2 -1
- data/amber/st/IDE.st +362 -360
- data/amber/st/Kernel-Collections.st +85 -62
- data/amber/st/Kernel-Objects.st +29 -2
- data/amber/st/Kernel-Tests.st +63 -38
- metadata +20 -18
@@ -1,11 +1,128 @@
|
|
1
1
|
smalltalk.addPackage('Kernel-Collections', {});
|
2
|
+
smalltalk.addClass('Association', smalltalk.Object, ['key', 'value'], 'Kernel-Collections');
|
3
|
+
smalltalk.addMethod(
|
4
|
+
unescape('__eq'),
|
5
|
+
smalltalk.method({
|
6
|
+
selector: unescape('%3D'),
|
7
|
+
category: 'comparing',
|
8
|
+
fn: function (anAssociation) {
|
9
|
+
var self=this;
|
10
|
+
return smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(anAssociation, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_key", []), "__eq", [smalltalk.send(anAssociation, "_key", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(self, "_value", []), "__eq", [smalltalk.send(anAssociation, "_value", [])]);})]);})]);
|
11
|
+
return self;},
|
12
|
+
args: ["anAssociation"],
|
13
|
+
source: unescape('%3D%20anAssociation%0A%09%5Eself%20class%20%3D%20anAssociation%20class%20and%3A%20%5B%0A%09%20%20%20%20self%20key%20%3D%20anAssociation%20key%20and%3A%20%5B%0A%09%09self%20value%20%3D%20anAssociation%20value%5D%5D'),
|
14
|
+
messageSends: ["and:", unescape("%3D"), "class", "key", "value"],
|
15
|
+
referencedClasses: []
|
16
|
+
}),
|
17
|
+
smalltalk.Association);
|
18
|
+
|
19
|
+
smalltalk.addMethod(
|
20
|
+
unescape('_key_'),
|
21
|
+
smalltalk.method({
|
22
|
+
selector: unescape('key%3A'),
|
23
|
+
category: 'accessing',
|
24
|
+
fn: function (aKey) {
|
25
|
+
var self=this;
|
26
|
+
(self['@key']=aKey);
|
27
|
+
return self;},
|
28
|
+
args: ["aKey"],
|
29
|
+
source: unescape('key%3A%20aKey%0A%09key%20%3A%3D%20aKey'),
|
30
|
+
messageSends: [],
|
31
|
+
referencedClasses: []
|
32
|
+
}),
|
33
|
+
smalltalk.Association);
|
34
|
+
|
35
|
+
smalltalk.addMethod(
|
36
|
+
unescape('_key'),
|
37
|
+
smalltalk.method({
|
38
|
+
selector: unescape('key'),
|
39
|
+
category: 'accessing',
|
40
|
+
fn: function () {
|
41
|
+
var self=this;
|
42
|
+
return self['@key'];
|
43
|
+
return self;},
|
44
|
+
args: [],
|
45
|
+
source: unescape('key%0A%09%5Ekey'),
|
46
|
+
messageSends: [],
|
47
|
+
referencedClasses: []
|
48
|
+
}),
|
49
|
+
smalltalk.Association);
|
50
|
+
|
51
|
+
smalltalk.addMethod(
|
52
|
+
unescape('_value_'),
|
53
|
+
smalltalk.method({
|
54
|
+
selector: unescape('value%3A'),
|
55
|
+
category: 'accessing',
|
56
|
+
fn: function (aValue) {
|
57
|
+
var self=this;
|
58
|
+
(self['@value']=aValue);
|
59
|
+
return self;},
|
60
|
+
args: ["aValue"],
|
61
|
+
source: unescape('value%3A%20aValue%0A%09value%20%3A%3D%20aValue'),
|
62
|
+
messageSends: [],
|
63
|
+
referencedClasses: []
|
64
|
+
}),
|
65
|
+
smalltalk.Association);
|
66
|
+
|
67
|
+
smalltalk.addMethod(
|
68
|
+
unescape('_value'),
|
69
|
+
smalltalk.method({
|
70
|
+
selector: unescape('value'),
|
71
|
+
category: 'accessing',
|
72
|
+
fn: function () {
|
73
|
+
var self=this;
|
74
|
+
return self['@value'];
|
75
|
+
return self;},
|
76
|
+
args: [],
|
77
|
+
source: unescape('value%0A%09%5Evalue'),
|
78
|
+
messageSends: [],
|
79
|
+
referencedClasses: []
|
80
|
+
}),
|
81
|
+
smalltalk.Association);
|
82
|
+
|
83
|
+
smalltalk.addMethod(
|
84
|
+
unescape('_storeOn_'),
|
85
|
+
smalltalk.method({
|
86
|
+
selector: unescape('storeOn%3A'),
|
87
|
+
category: 'comparing',
|
88
|
+
fn: function (aStream) {
|
89
|
+
var self=this;
|
90
|
+
smalltalk.send(self['@key'], "_storeOn_", [aStream]);
|
91
|
+
smalltalk.send(aStream, "_nextPutAll_", [unescape("-%3E")]);
|
92
|
+
smalltalk.send(self['@value'], "_storeOn_", [aStream]);
|
93
|
+
return self;},
|
94
|
+
args: ["aStream"],
|
95
|
+
source: unescape('storeOn%3A%20aStream%0A%09%22Store%20in%20the%20format%20%28key-%3Evalue%29%22%0A%0A%09%22aStream%20nextPutAll%3A%20%27%28%27.%22%0A%09key%20storeOn%3A%20aStream.%0A%09aStream%20nextPutAll%3A%20%27-%3E%27.%0A%09value%20storeOn%3A%20aStream.%0A%09%22aStream%20nextPutAll%3A%20%27%29%27%22'),
|
96
|
+
messageSends: ["storeOn:", "nextPutAll:"],
|
97
|
+
referencedClasses: []
|
98
|
+
}),
|
99
|
+
smalltalk.Association);
|
100
|
+
|
101
|
+
|
102
|
+
smalltalk.addMethod(
|
103
|
+
unescape('_key_value_'),
|
104
|
+
smalltalk.method({
|
105
|
+
selector: unescape('key%3Avalue%3A'),
|
106
|
+
category: 'instance creation',
|
107
|
+
fn: function (aKey, aValue) {
|
108
|
+
var self=this;
|
109
|
+
return (function($rec){smalltalk.send($rec, "_key_", [aKey]);smalltalk.send($rec, "_value_", [aValue]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
|
110
|
+
return self;},
|
111
|
+
args: ["aKey", "aValue"],
|
112
|
+
source: unescape('key%3A%20aKey%20value%3A%20aValue%0A%09%20%20%20%20%5Eself%20new%0A%09%09key%3A%20aKey%3B%0A%09%09value%3A%20aValue%3B%0A%09%09yourself'),
|
113
|
+
messageSends: ["key:", "value:", "yourself", "new"],
|
114
|
+
referencedClasses: []
|
115
|
+
}),
|
116
|
+
smalltalk.Association.klass);
|
117
|
+
|
118
|
+
|
2
119
|
smalltalk.addClass('Stream', smalltalk.Object, ['collection', 'position', 'streamSize'], 'Kernel-Collections');
|
3
120
|
smalltalk.addMethod(
|
4
121
|
unescape('_collection'),
|
5
122
|
smalltalk.method({
|
6
123
|
selector: unescape('collection'),
|
7
124
|
category: 'accessing',
|
8
|
-
fn: function (){
|
125
|
+
fn: function () {
|
9
126
|
var self=this;
|
10
127
|
return self['@collection'];
|
11
128
|
return self;},
|
@@ -21,7 +138,7 @@ unescape('_setCollection_'),
|
|
21
138
|
smalltalk.method({
|
22
139
|
selector: unescape('setCollection%3A'),
|
23
140
|
category: 'accessing',
|
24
|
-
fn: function (aCollection){
|
141
|
+
fn: function (aCollection) {
|
25
142
|
var self=this;
|
26
143
|
(self['@collection']=aCollection);
|
27
144
|
return self;},
|
@@ -37,7 +154,7 @@ unescape('_position'),
|
|
37
154
|
smalltalk.method({
|
38
155
|
selector: unescape('position'),
|
39
156
|
category: 'accessing',
|
40
|
-
fn: function (){
|
157
|
+
fn: function () {
|
41
158
|
var self=this;
|
42
159
|
return (($receiver = self['@position']) == nil || $receiver == undefined) ? (function(){return (self['@position']=(0));})() : $receiver;
|
43
160
|
return self;},
|
@@ -53,7 +170,7 @@ unescape('_position_'),
|
|
53
170
|
smalltalk.method({
|
54
171
|
selector: unescape('position%3A'),
|
55
172
|
category: 'accessing',
|
56
|
-
fn: function (anInteger){
|
173
|
+
fn: function (anInteger) {
|
57
174
|
var self=this;
|
58
175
|
(self['@position']=anInteger);
|
59
176
|
return self;},
|
@@ -69,7 +186,7 @@ unescape('_streamSize'),
|
|
69
186
|
smalltalk.method({
|
70
187
|
selector: unescape('streamSize'),
|
71
188
|
category: 'accessing',
|
72
|
-
fn: function (){
|
189
|
+
fn: function () {
|
73
190
|
var self=this;
|
74
191
|
return self['@streamSize'];
|
75
192
|
return self;},
|
@@ -85,7 +202,7 @@ unescape('_setStreamSize_'),
|
|
85
202
|
smalltalk.method({
|
86
203
|
selector: unescape('setStreamSize%3A'),
|
87
204
|
category: 'accessing',
|
88
|
-
fn: function (anInteger){
|
205
|
+
fn: function (anInteger) {
|
89
206
|
var self=this;
|
90
207
|
(self['@streamSize']=anInteger);
|
91
208
|
return self;},
|
@@ -101,7 +218,7 @@ unescape('_contents'),
|
|
101
218
|
smalltalk.method({
|
102
219
|
selector: unescape('contents'),
|
103
220
|
category: 'accessing',
|
104
|
-
fn: function (){
|
221
|
+
fn: function () {
|
105
222
|
var self=this;
|
106
223
|
return smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [(1), smalltalk.send(self, "_streamSize", [])]);
|
107
224
|
return self;},
|
@@ -117,7 +234,7 @@ unescape('_size'),
|
|
117
234
|
smalltalk.method({
|
118
235
|
selector: unescape('size'),
|
119
236
|
category: 'accessing',
|
120
|
-
fn: function (){
|
237
|
+
fn: function () {
|
121
238
|
var self=this;
|
122
239
|
return smalltalk.send(self, "_streamSize", []);
|
123
240
|
return self;},
|
@@ -133,7 +250,7 @@ unescape('_reset'),
|
|
133
250
|
smalltalk.method({
|
134
251
|
selector: unescape('reset'),
|
135
252
|
category: 'actions',
|
136
|
-
fn: function (){
|
253
|
+
fn: function () {
|
137
254
|
var self=this;
|
138
255
|
smalltalk.send(self, "_position_", [(0)]);
|
139
256
|
return self;},
|
@@ -149,7 +266,7 @@ unescape('_close'),
|
|
149
266
|
smalltalk.method({
|
150
267
|
selector: unescape('close'),
|
151
268
|
category: 'actions',
|
152
|
-
fn: function (){
|
269
|
+
fn: function () {
|
153
270
|
var self=this;
|
154
271
|
|
155
272
|
return self;},
|
@@ -165,7 +282,7 @@ unescape('_flush'),
|
|
165
282
|
smalltalk.method({
|
166
283
|
selector: unescape('flush'),
|
167
284
|
category: 'actions',
|
168
|
-
fn: function (){
|
285
|
+
fn: function () {
|
169
286
|
var self=this;
|
170
287
|
|
171
288
|
return self;},
|
@@ -181,7 +298,7 @@ unescape('_resetContents'),
|
|
181
298
|
smalltalk.method({
|
182
299
|
selector: unescape('resetContents'),
|
183
300
|
category: 'actions',
|
184
|
-
fn: function (){
|
301
|
+
fn: function () {
|
185
302
|
var self=this;
|
186
303
|
smalltalk.send(self, "_reset", []);
|
187
304
|
smalltalk.send(self, "_setStreamSize_", [(0)]);
|
@@ -198,7 +315,7 @@ unescape('_do_'),
|
|
198
315
|
smalltalk.method({
|
199
316
|
selector: unescape('do%3A'),
|
200
317
|
category: 'enumerating',
|
201
|
-
fn: function (aBlock){
|
318
|
+
fn: function (aBlock) {
|
202
319
|
var self=this;
|
203
320
|
(function(){while(!(function(){return smalltalk.send(self, "_atEnd", []);})()) {(function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_next", [])]);})()}})();
|
204
321
|
return self;},
|
@@ -214,7 +331,7 @@ unescape('_setToEnd'),
|
|
214
331
|
smalltalk.method({
|
215
332
|
selector: unescape('setToEnd'),
|
216
333
|
category: 'positioning',
|
217
|
-
fn: function (){
|
334
|
+
fn: function () {
|
218
335
|
var self=this;
|
219
336
|
smalltalk.send(self, "_position_", [smalltalk.send(self, "_size", [])]);
|
220
337
|
return self;},
|
@@ -230,7 +347,7 @@ unescape('_skip_'),
|
|
230
347
|
smalltalk.method({
|
231
348
|
selector: unescape('skip%3A'),
|
232
349
|
category: 'positioning',
|
233
|
-
fn: function (anInteger){
|
350
|
+
fn: function (anInteger) {
|
234
351
|
var self=this;
|
235
352
|
smalltalk.send(self, "_position_", [smalltalk.send(((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +anInteger : smalltalk.send($receiver, "__plus", [anInteger])), "_min_max_", [smalltalk.send(self, "_size", []), (0)])]);
|
236
353
|
return self;},
|
@@ -246,7 +363,7 @@ unescape('_next'),
|
|
246
363
|
smalltalk.method({
|
247
364
|
selector: unescape('next'),
|
248
365
|
category: 'reading',
|
249
|
-
fn: function (){
|
366
|
+
fn: function () {
|
250
367
|
var self=this;
|
251
368
|
return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return nil;})() : (function(){smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);return smalltalk.send(self['@collection'], "_at_", [smalltalk.send(self, "_position", [])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return nil;}), (function(){smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);return smalltalk.send(self['@collection'], "_at_", [smalltalk.send(self, "_position", [])]);})]));
|
252
369
|
return self;},
|
@@ -262,7 +379,7 @@ unescape('_next_'),
|
|
262
379
|
smalltalk.method({
|
263
380
|
selector: unescape('next%3A'),
|
264
381
|
category: 'reading',
|
265
|
-
fn: function (anInteger){
|
382
|
+
fn: function (anInteger) {
|
266
383
|
var self=this;
|
267
384
|
var tempCollection=nil;
|
268
385
|
(tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_class", []), "_new", []));
|
@@ -281,7 +398,7 @@ unescape('_nextPut_'),
|
|
281
398
|
smalltalk.method({
|
282
399
|
selector: unescape('nextPut%3A'),
|
283
400
|
category: 'writing',
|
284
|
-
fn: function (anObject){
|
401
|
+
fn: function (anObject) {
|
285
402
|
var self=this;
|
286
403
|
smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);
|
287
404
|
smalltalk.send(smalltalk.send(self, "_collection", []), "_at_put_", [smalltalk.send(self, "_position", []), anObject]);
|
@@ -299,7 +416,7 @@ unescape('_nextPutAll_'),
|
|
299
416
|
smalltalk.method({
|
300
417
|
selector: unescape('nextPutAll%3A'),
|
301
418
|
category: 'writing',
|
302
|
-
fn: function (aCollection){
|
419
|
+
fn: function (aCollection) {
|
303
420
|
var self=this;
|
304
421
|
smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_nextPut_", [each]);})]);
|
305
422
|
return self;},
|
@@ -315,7 +432,7 @@ unescape('_peek'),
|
|
315
432
|
smalltalk.method({
|
316
433
|
selector: unescape('peek'),
|
317
434
|
category: 'reading',
|
318
|
-
fn: function (){
|
435
|
+
fn: function () {
|
319
436
|
var self=this;
|
320
437
|
return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_collection", []), "_at_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(self, "_collection", []), "_at_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);})]));
|
321
438
|
return self;},
|
@@ -331,7 +448,7 @@ unescape('_atEnd'),
|
|
331
448
|
smalltalk.method({
|
332
449
|
selector: unescape('atEnd'),
|
333
450
|
category: 'testing',
|
334
|
-
fn: function (){
|
451
|
+
fn: function () {
|
335
452
|
var self=this;
|
336
453
|
return smalltalk.send(smalltalk.send(self, "_position", []), "__eq", [smalltalk.send(self, "_size", [])]);
|
337
454
|
return self;},
|
@@ -347,7 +464,7 @@ unescape('_atStart'),
|
|
347
464
|
smalltalk.method({
|
348
465
|
selector: unescape('atStart'),
|
349
466
|
category: 'testing',
|
350
|
-
fn: function (){
|
467
|
+
fn: function () {
|
351
468
|
var self=this;
|
352
469
|
return smalltalk.send(smalltalk.send(self, "_position", []), "__eq", [(0)]);
|
353
470
|
return self;},
|
@@ -363,7 +480,7 @@ unescape('_isEmpty'),
|
|
363
480
|
smalltalk.method({
|
364
481
|
selector: unescape('isEmpty'),
|
365
482
|
category: 'testing',
|
366
|
-
fn: function (){
|
483
|
+
fn: function () {
|
367
484
|
var self=this;
|
368
485
|
return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [(0)]);
|
369
486
|
return self;},
|
@@ -380,7 +497,7 @@ unescape('_on_'),
|
|
380
497
|
smalltalk.method({
|
381
498
|
selector: unescape('on%3A'),
|
382
499
|
category: 'instance creation',
|
383
|
-
fn: function (aCollection){
|
500
|
+
fn: function (aCollection) {
|
384
501
|
var self=this;
|
385
502
|
return (function($rec){smalltalk.send($rec, "_setCollection_", [aCollection]);smalltalk.send($rec, "_setStreamSize_", [smalltalk.send(aCollection, "_size", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
|
386
503
|
return self;},
|
@@ -392,130 +509,13 @@ referencedClasses: []
|
|
392
509
|
smalltalk.Stream.klass);
|
393
510
|
|
394
511
|
|
395
|
-
smalltalk.addClass('Association', smalltalk.Object, ['key', 'value'], 'Kernel-Collections');
|
396
|
-
smalltalk.addMethod(
|
397
|
-
unescape('__eq'),
|
398
|
-
smalltalk.method({
|
399
|
-
selector: unescape('%3D'),
|
400
|
-
category: 'comparing',
|
401
|
-
fn: function (anAssociation){
|
402
|
-
var self=this;
|
403
|
-
return smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(anAssociation, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_key", []), "__eq", [smalltalk.send(anAssociation, "_key", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(self, "_value", []), "__eq", [smalltalk.send(anAssociation, "_value", [])]);})]);})]);
|
404
|
-
return self;},
|
405
|
-
args: ["anAssociation"],
|
406
|
-
source: unescape('%3D%20anAssociation%0A%09%5Eself%20class%20%3D%20anAssociation%20class%20and%3A%20%5B%0A%09%20%20%20%20self%20key%20%3D%20anAssociation%20key%20and%3A%20%5B%0A%09%09self%20value%20%3D%20anAssociation%20value%5D%5D'),
|
407
|
-
messageSends: ["and:", unescape("%3D"), "class", "key", "value"],
|
408
|
-
referencedClasses: []
|
409
|
-
}),
|
410
|
-
smalltalk.Association);
|
411
|
-
|
412
|
-
smalltalk.addMethod(
|
413
|
-
unescape('_key_'),
|
414
|
-
smalltalk.method({
|
415
|
-
selector: unescape('key%3A'),
|
416
|
-
category: 'accessing',
|
417
|
-
fn: function (aKey){
|
418
|
-
var self=this;
|
419
|
-
(self['@key']=aKey);
|
420
|
-
return self;},
|
421
|
-
args: ["aKey"],
|
422
|
-
source: unescape('key%3A%20aKey%0A%09key%20%3A%3D%20aKey'),
|
423
|
-
messageSends: [],
|
424
|
-
referencedClasses: []
|
425
|
-
}),
|
426
|
-
smalltalk.Association);
|
427
|
-
|
428
|
-
smalltalk.addMethod(
|
429
|
-
unescape('_key'),
|
430
|
-
smalltalk.method({
|
431
|
-
selector: unescape('key'),
|
432
|
-
category: 'accessing',
|
433
|
-
fn: function (){
|
434
|
-
var self=this;
|
435
|
-
return self['@key'];
|
436
|
-
return self;},
|
437
|
-
args: [],
|
438
|
-
source: unescape('key%0A%09%5Ekey'),
|
439
|
-
messageSends: [],
|
440
|
-
referencedClasses: []
|
441
|
-
}),
|
442
|
-
smalltalk.Association);
|
443
|
-
|
444
|
-
smalltalk.addMethod(
|
445
|
-
unescape('_value_'),
|
446
|
-
smalltalk.method({
|
447
|
-
selector: unescape('value%3A'),
|
448
|
-
category: 'accessing',
|
449
|
-
fn: function (aValue){
|
450
|
-
var self=this;
|
451
|
-
(self['@value']=aValue);
|
452
|
-
return self;},
|
453
|
-
args: ["aValue"],
|
454
|
-
source: unescape('value%3A%20aValue%0A%09value%20%3A%3D%20aValue'),
|
455
|
-
messageSends: [],
|
456
|
-
referencedClasses: []
|
457
|
-
}),
|
458
|
-
smalltalk.Association);
|
459
|
-
|
460
|
-
smalltalk.addMethod(
|
461
|
-
unescape('_value'),
|
462
|
-
smalltalk.method({
|
463
|
-
selector: unescape('value'),
|
464
|
-
category: 'accessing',
|
465
|
-
fn: function (){
|
466
|
-
var self=this;
|
467
|
-
return self['@value'];
|
468
|
-
return self;},
|
469
|
-
args: [],
|
470
|
-
source: unescape('value%0A%09%5Evalue'),
|
471
|
-
messageSends: [],
|
472
|
-
referencedClasses: []
|
473
|
-
}),
|
474
|
-
smalltalk.Association);
|
475
|
-
|
476
|
-
smalltalk.addMethod(
|
477
|
-
unescape('_storeOn_'),
|
478
|
-
smalltalk.method({
|
479
|
-
selector: unescape('storeOn%3A'),
|
480
|
-
category: 'comparing',
|
481
|
-
fn: function (aStream){
|
482
|
-
var self=this;
|
483
|
-
smalltalk.send(self['@key'], "_storeOn_", [aStream]);
|
484
|
-
smalltalk.send(aStream, "_nextPutAll_", [unescape("-%3E")]);
|
485
|
-
smalltalk.send(self['@value'], "_storeOn_", [aStream]);
|
486
|
-
return self;},
|
487
|
-
args: ["aStream"],
|
488
|
-
source: unescape('storeOn%3A%20aStream%0A%09%22Store%20in%20the%20format%20%28key-%3Evalue%29%22%0A%0A%09%22aStream%20nextPutAll%3A%20%27%28%27.%22%0A%09key%20storeOn%3A%20aStream.%0A%09aStream%20nextPutAll%3A%20%27-%3E%27.%0A%09value%20storeOn%3A%20aStream.%0A%09%22aStream%20nextPutAll%3A%20%27%29%27%22'),
|
489
|
-
messageSends: ["storeOn:", "nextPutAll:"],
|
490
|
-
referencedClasses: []
|
491
|
-
}),
|
492
|
-
smalltalk.Association);
|
493
|
-
|
494
|
-
|
495
|
-
smalltalk.addMethod(
|
496
|
-
unescape('_key_value_'),
|
497
|
-
smalltalk.method({
|
498
|
-
selector: unescape('key%3Avalue%3A'),
|
499
|
-
category: 'instance creation',
|
500
|
-
fn: function (aKey, aValue){
|
501
|
-
var self=this;
|
502
|
-
return (function($rec){smalltalk.send($rec, "_key_", [aKey]);smalltalk.send($rec, "_value_", [aValue]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
|
503
|
-
return self;},
|
504
|
-
args: ["aKey", "aValue"],
|
505
|
-
source: unescape('key%3A%20aKey%20value%3A%20aValue%0A%09%20%20%20%20%5Eself%20new%0A%09%09key%3A%20aKey%3B%0A%09%09value%3A%20aValue%3B%0A%09%09yourself'),
|
506
|
-
messageSends: ["key:", "value:", "yourself", "new"],
|
507
|
-
referencedClasses: []
|
508
|
-
}),
|
509
|
-
smalltalk.Association.klass);
|
510
|
-
|
511
|
-
|
512
512
|
smalltalk.addClass('RegularExpression', smalltalk.Object, [], 'Kernel-Collections');
|
513
513
|
smalltalk.addMethod(
|
514
514
|
unescape('_compile_'),
|
515
515
|
smalltalk.method({
|
516
516
|
selector: unescape('compile%3A'),
|
517
517
|
category: 'evaluating',
|
518
|
-
fn: function (aString){
|
518
|
+
fn: function (aString) {
|
519
519
|
var self=this;
|
520
520
|
return self.compile(aString);
|
521
521
|
return self;},
|
@@ -531,7 +531,7 @@ unescape('_exec_'),
|
|
531
531
|
smalltalk.method({
|
532
532
|
selector: unescape('exec%3A'),
|
533
533
|
category: 'evaluating',
|
534
|
-
fn: function (aString){
|
534
|
+
fn: function (aString) {
|
535
535
|
var self=this;
|
536
536
|
return self.exec(aString) || nil;
|
537
537
|
return self;},
|
@@ -547,7 +547,7 @@ unescape('_test_'),
|
|
547
547
|
smalltalk.method({
|
548
548
|
selector: unescape('test%3A'),
|
549
549
|
category: 'evaluating',
|
550
|
-
fn: function (aString){
|
550
|
+
fn: function (aString) {
|
551
551
|
var self=this;
|
552
552
|
return self.test(aString);
|
553
553
|
return self;},
|
@@ -564,7 +564,7 @@ unescape('_fromString_flag_'),
|
|
564
564
|
smalltalk.method({
|
565
565
|
selector: unescape('fromString%3Aflag%3A'),
|
566
566
|
category: 'instance creation',
|
567
|
-
fn: function (aString, anotherString){
|
567
|
+
fn: function (aString, anotherString) {
|
568
568
|
var self=this;
|
569
569
|
return new RegExp(aString, anotherString);
|
570
570
|
return self;},
|
@@ -580,7 +580,7 @@ unescape('_fromString_'),
|
|
580
580
|
smalltalk.method({
|
581
581
|
selector: unescape('fromString%3A'),
|
582
582
|
category: 'instance creation',
|
583
|
-
fn: function (aString){
|
583
|
+
fn: function (aString) {
|
584
584
|
var self=this;
|
585
585
|
return smalltalk.send(self, "_fromString_flag_", [aString, ""]);
|
586
586
|
return self;},
|
@@ -598,7 +598,7 @@ unescape('_size'),
|
|
598
598
|
smalltalk.method({
|
599
599
|
selector: unescape('size'),
|
600
600
|
category: 'accessing',
|
601
|
-
fn: function (){
|
601
|
+
fn: function () {
|
602
602
|
var self=this;
|
603
603
|
smalltalk.send(self, "_subclassResponsibility", []);
|
604
604
|
return self;},
|
@@ -614,7 +614,7 @@ unescape('_readStream'),
|
|
614
614
|
smalltalk.method({
|
615
615
|
selector: unescape('readStream'),
|
616
616
|
category: 'accessing',
|
617
|
-
fn: function (){
|
617
|
+
fn: function () {
|
618
618
|
var self=this;
|
619
619
|
return smalltalk.send(self, "_stream", []);
|
620
620
|
return self;},
|
@@ -630,7 +630,7 @@ unescape('_writeStream'),
|
|
630
630
|
smalltalk.method({
|
631
631
|
selector: unescape('writeStream'),
|
632
632
|
category: 'accessing',
|
633
|
-
fn: function (){
|
633
|
+
fn: function () {
|
634
634
|
var self=this;
|
635
635
|
return smalltalk.send(self, "_stream", []);
|
636
636
|
return self;},
|
@@ -646,7 +646,7 @@ unescape('_stream'),
|
|
646
646
|
smalltalk.method({
|
647
647
|
selector: unescape('stream'),
|
648
648
|
category: 'accessing',
|
649
|
-
fn: function (){
|
649
|
+
fn: function () {
|
650
650
|
var self=this;
|
651
651
|
return smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [self]);
|
652
652
|
return self;},
|
@@ -662,7 +662,7 @@ unescape('_streamClass'),
|
|
662
662
|
smalltalk.method({
|
663
663
|
selector: unescape('streamClass'),
|
664
664
|
category: 'accessing',
|
665
|
-
fn: function (){
|
665
|
+
fn: function () {
|
666
666
|
var self=this;
|
667
667
|
return smalltalk.send(smalltalk.send(self, "_class", []), "_streamClass", []);
|
668
668
|
return self;},
|
@@ -678,7 +678,7 @@ unescape('_add_'),
|
|
678
678
|
smalltalk.method({
|
679
679
|
selector: unescape('add%3A'),
|
680
680
|
category: 'adding/removing',
|
681
|
-
fn: function (anObject){
|
681
|
+
fn: function (anObject) {
|
682
682
|
var self=this;
|
683
683
|
smalltalk.send(self, "_subclassResponsibility", []);
|
684
684
|
return self;},
|
@@ -694,7 +694,7 @@ unescape('_addAll_'),
|
|
694
694
|
smalltalk.method({
|
695
695
|
selector: unescape('addAll%3A'),
|
696
696
|
category: 'adding/removing',
|
697
|
-
fn: function (aCollection){
|
697
|
+
fn: function (aCollection) {
|
698
698
|
var self=this;
|
699
699
|
smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_add_", [each]);})]);
|
700
700
|
return aCollection;
|
@@ -711,7 +711,7 @@ unescape('__comma'),
|
|
711
711
|
smalltalk.method({
|
712
712
|
selector: unescape('%2C'),
|
713
713
|
category: 'copying',
|
714
|
-
fn: function (aCollection){
|
714
|
+
fn: function (aCollection) {
|
715
715
|
var self=this;
|
716
716
|
return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
|
717
717
|
return self;},
|
@@ -727,7 +727,7 @@ unescape('_copyWith_'),
|
|
727
727
|
smalltalk.method({
|
728
728
|
selector: unescape('copyWith%3A'),
|
729
729
|
category: 'copying',
|
730
|
-
fn: function (anObject){
|
730
|
+
fn: function (anObject) {
|
731
731
|
var self=this;
|
732
732
|
return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
|
733
733
|
return self;},
|
@@ -743,7 +743,7 @@ unescape('_copyWithAll_'),
|
|
743
743
|
smalltalk.method({
|
744
744
|
selector: unescape('copyWithAll%3A'),
|
745
745
|
category: 'copying',
|
746
|
-
fn: function (aCollection){
|
746
|
+
fn: function (aCollection) {
|
747
747
|
var self=this;
|
748
748
|
return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
|
749
749
|
return self;},
|
@@ -759,7 +759,7 @@ unescape('_asArray'),
|
|
759
759
|
smalltalk.method({
|
760
760
|
selector: unescape('asArray'),
|
761
761
|
category: 'converting',
|
762
|
-
fn: function (){
|
762
|
+
fn: function () {
|
763
763
|
var self=this;
|
764
764
|
return smalltalk.send((smalltalk.Array || Array), "_withAll_", [self]);
|
765
765
|
return self;},
|
@@ -775,7 +775,7 @@ unescape('_do_'),
|
|
775
775
|
smalltalk.method({
|
776
776
|
selector: unescape('do%3A'),
|
777
777
|
category: 'enumerating',
|
778
|
-
fn: function (aBlock){
|
778
|
+
fn: function (aBlock) {
|
779
779
|
var self=this;
|
780
780
|
for(var i=0;i<self.length;i++){aBlock(self[i]);};
|
781
781
|
return self;},
|
@@ -791,7 +791,7 @@ unescape('_collect_'),
|
|
791
791
|
smalltalk.method({
|
792
792
|
selector: unescape('collect%3A'),
|
793
793
|
category: 'enumerating',
|
794
|
-
fn: function (aBlock){
|
794
|
+
fn: function (aBlock) {
|
795
795
|
var self=this;
|
796
796
|
var newCollection=nil;
|
797
797
|
(newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
|
@@ -810,7 +810,7 @@ unescape('_detect_'),
|
|
810
810
|
smalltalk.method({
|
811
811
|
selector: unescape('detect%3A'),
|
812
812
|
category: 'enumerating',
|
813
|
-
fn: function (aBlock){
|
813
|
+
fn: function (aBlock) {
|
814
814
|
var self=this;
|
815
815
|
return smalltalk.send(self, "_detect_ifNone_", [aBlock, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
|
816
816
|
return self;},
|
@@ -826,7 +826,7 @@ unescape('_detect_ifNone_'),
|
|
826
826
|
smalltalk.method({
|
827
827
|
selector: unescape('detect%3AifNone%3A'),
|
828
828
|
category: 'enumerating',
|
829
|
-
fn: function (aBlock, anotherBlock){
|
829
|
+
fn: function (aBlock, anotherBlock) {
|
830
830
|
var self=this;
|
831
831
|
|
832
832
|
for(var i = 0; i < self.length; i++)
|
@@ -847,7 +847,7 @@ unescape('_do_separatedBy_'),
|
|
847
847
|
smalltalk.method({
|
848
848
|
selector: unescape('do%3AseparatedBy%3A'),
|
849
849
|
category: 'enumerating',
|
850
|
-
fn: function (aBlock, anotherBlock){
|
850
|
+
fn: function (aBlock, anotherBlock) {
|
851
851
|
var self=this;
|
852
852
|
var first=nil;
|
853
853
|
(first=true);
|
@@ -865,7 +865,7 @@ unescape('_inject_into_'),
|
|
865
865
|
smalltalk.method({
|
866
866
|
selector: unescape('inject%3Ainto%3A'),
|
867
867
|
category: 'enumerating',
|
868
|
-
fn: function (anObject, aBlock){
|
868
|
+
fn: function (anObject, aBlock) {
|
869
869
|
var self=this;
|
870
870
|
var result=nil;
|
871
871
|
(result=anObject);
|
@@ -884,7 +884,7 @@ unescape('_reject_'),
|
|
884
884
|
smalltalk.method({
|
885
885
|
selector: unescape('reject%3A'),
|
886
886
|
category: 'enumerating',
|
887
|
-
fn: function (aBlock){
|
887
|
+
fn: function (aBlock) {
|
888
888
|
var self=this;
|
889
889
|
return smalltalk.send(self, "_select_", [(function(each){return smalltalk.send(smalltalk.send(aBlock, "_value_", [each]), "__eq", [false]);})]);
|
890
890
|
return self;},
|
@@ -900,7 +900,7 @@ unescape('_select_'),
|
|
900
900
|
smalltalk.method({
|
901
901
|
selector: unescape('select%3A'),
|
902
902
|
category: 'enumerating',
|
903
|
-
fn: function (aBlock){
|
903
|
+
fn: function (aBlock) {
|
904
904
|
var self=this;
|
905
905
|
var stream=nil;
|
906
906
|
(stream=smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_new", []), "_writeStream", []));
|
@@ -919,7 +919,7 @@ unescape('_errorNotFound'),
|
|
919
919
|
smalltalk.method({
|
920
920
|
selector: unescape('errorNotFound'),
|
921
921
|
category: 'error handling',
|
922
|
-
fn: function (){
|
922
|
+
fn: function () {
|
923
923
|
var self=this;
|
924
924
|
smalltalk.send(self, "_error_", ["Object is not in the collection"]);
|
925
925
|
return self;},
|
@@ -935,7 +935,7 @@ unescape('_includes_'),
|
|
935
935
|
smalltalk.method({
|
936
936
|
selector: unescape('includes%3A'),
|
937
937
|
category: 'testing',
|
938
|
-
fn: function (anObject){
|
938
|
+
fn: function (anObject) {
|
939
939
|
var self=this;
|
940
940
|
|
941
941
|
var i = self.length;
|
@@ -957,7 +957,7 @@ unescape('_notEmpty'),
|
|
957
957
|
smalltalk.method({
|
958
958
|
selector: unescape('notEmpty'),
|
959
959
|
category: 'testing',
|
960
|
-
fn: function (){
|
960
|
+
fn: function () {
|
961
961
|
var self=this;
|
962
962
|
return smalltalk.send(smalltalk.send(self, "_isEmpty", []), "_not", []);
|
963
963
|
return self;},
|
@@ -973,7 +973,7 @@ unescape('_isEmpty'),
|
|
973
973
|
smalltalk.method({
|
974
974
|
selector: unescape('isEmpty'),
|
975
975
|
category: 'testing',
|
976
|
-
fn: function (){
|
976
|
+
fn: function () {
|
977
977
|
var self=this;
|
978
978
|
return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [(0)]);
|
979
979
|
return self;},
|
@@ -989,7 +989,7 @@ unescape('_remove_'),
|
|
989
989
|
smalltalk.method({
|
990
990
|
selector: unescape('remove%3A'),
|
991
991
|
category: 'adding/removing',
|
992
|
-
fn: function (anObject){
|
992
|
+
fn: function (anObject) {
|
993
993
|
var self=this;
|
994
994
|
return smalltalk.send(self, "_remove_ifAbsent_", [anObject, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
|
995
995
|
return self;},
|
@@ -1005,7 +1005,7 @@ unescape('_asSet'),
|
|
1005
1005
|
smalltalk.method({
|
1006
1006
|
selector: unescape('asSet'),
|
1007
1007
|
category: 'converting',
|
1008
|
-
fn: function (){
|
1008
|
+
fn: function () {
|
1009
1009
|
var self=this;
|
1010
1010
|
return smalltalk.send((smalltalk.Set || Set), "_withAll_", [self]);
|
1011
1011
|
return self;},
|
@@ -1021,7 +1021,7 @@ unescape('_ifNotEmpty_'),
|
|
1021
1021
|
smalltalk.method({
|
1022
1022
|
selector: unescape('ifNotEmpty%3A'),
|
1023
1023
|
category: 'testing',
|
1024
|
-
fn: function (aBlock){
|
1024
|
+
fn: function (aBlock) {
|
1025
1025
|
var self=this;
|
1026
1026
|
smalltalk.send(smalltalk.send(self, "_notEmpty", []), "_ifTrue_", [aBlock]);
|
1027
1027
|
return self;},
|
@@ -1039,11 +1039,11 @@ selector: unescape('ifEmpty%3A'),
|
|
1039
1039
|
category: 'testing',
|
1040
1040
|
fn: function (aBlock){
|
1041
1041
|
var self=this;
|
1042
|
-
smalltalk.send(smalltalk.send(
|
1042
|
+
return ((($receiver = smalltalk.send(self, "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(aBlock, "_value", []);})() : (function(){return self;})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(aBlock, "_value", []);}), (function(){return self;})]));
|
1043
1043
|
return self;},
|
1044
1044
|
args: ["aBlock"],
|
1045
|
-
source: unescape('ifEmpty%3A%20aBlock%0A%
|
1046
|
-
messageSends: ["ifTrue:", "isEmpty"],
|
1045
|
+
source: unescape('ifEmpty%3A%20aBlock%0A%09%22Evaluate%20the%20given%20block%20with%20the%20receiver%20as%20argument%2C%20answering%20its%20value%20if%20the%20receiver%20is%20empty%2C%20otherwise%20answer%20the%20receiver.%20Note%20that%20the%20fact%20that%20this%20method%20returns%20its%20argument%20in%20case%20the%20receiver%20is%20not%20empty%20allows%20one%20to%20write%20expressions%20like%20the%20following%20ones%3A%20self%20classifyMethodAs%3A%20%0A%09%09%28myProtocol%20ifEmpty%3A%20%5B%27As%20yet%20unclassified%27%5D%29%22%0A%09%5E%20self%20isEmpty%20%0A%09%09ifTrue%3A%20%5B%20aBlock%20value%20%5D%0A%09%09ifFalse%3A%20%5B%20self%20%5D'),
|
1046
|
+
messageSends: ["ifTrue:ifFalse:", "isEmpty", "value"],
|
1047
1047
|
referencedClasses: []
|
1048
1048
|
}),
|
1049
1049
|
smalltalk.Collection);
|
@@ -1053,7 +1053,7 @@ unescape('_copyWithoutAll_'),
|
|
1053
1053
|
smalltalk.method({
|
1054
1054
|
selector: unescape('copyWithoutAll%3A'),
|
1055
1055
|
category: 'copying',
|
1056
|
-
fn: function (aCollection){
|
1056
|
+
fn: function (aCollection) {
|
1057
1057
|
var self=this;
|
1058
1058
|
return smalltalk.send(self, "_reject_", [(function(each){return smalltalk.send(aCollection, "_includes_", [each]);})]);
|
1059
1059
|
return self;},
|
@@ -1069,7 +1069,7 @@ unescape('_remove_ifAbsent_'),
|
|
1069
1069
|
smalltalk.method({
|
1070
1070
|
selector: unescape('remove%3AifAbsent%3A'),
|
1071
1071
|
category: 'adding/removing',
|
1072
|
-
fn: function (anObject, aBlock){
|
1072
|
+
fn: function (anObject, aBlock) {
|
1073
1073
|
var self=this;
|
1074
1074
|
smalltalk.send(self, "_subclassResponsibility", []);
|
1075
1075
|
return self;},
|
@@ -1081,33 +1081,33 @@ referencedClasses: []
|
|
1081
1081
|
smalltalk.Collection);
|
1082
1082
|
|
1083
1083
|
smalltalk.addMethod(
|
1084
|
-
unescape('
|
1084
|
+
unescape('_asOrderedCollection'),
|
1085
1085
|
smalltalk.method({
|
1086
|
-
selector: unescape('
|
1086
|
+
selector: unescape('asOrderedCollection'),
|
1087
1087
|
category: 'converting',
|
1088
|
-
fn: function (){
|
1088
|
+
fn: function () {
|
1089
1089
|
var self=this;
|
1090
|
-
return smalltalk.send(
|
1090
|
+
return smalltalk.send(self, "_asArray", []);
|
1091
1091
|
return self;},
|
1092
1092
|
args: [],
|
1093
|
-
source: unescape('
|
1094
|
-
messageSends: ["
|
1095
|
-
referencedClasses: [
|
1093
|
+
source: unescape('asOrderedCollection%0A%09%5Eself%20asArray'),
|
1094
|
+
messageSends: ["asArray"],
|
1095
|
+
referencedClasses: []
|
1096
1096
|
}),
|
1097
1097
|
smalltalk.Collection);
|
1098
1098
|
|
1099
1099
|
smalltalk.addMethod(
|
1100
|
-
unescape('
|
1100
|
+
unescape('_asJSON'),
|
1101
1101
|
smalltalk.method({
|
1102
|
-
selector: unescape('
|
1102
|
+
selector: unescape('asJSON'),
|
1103
1103
|
category: 'converting',
|
1104
1104
|
fn: function (){
|
1105
1105
|
var self=this;
|
1106
|
-
return smalltalk.send(self, "_asArray", []);
|
1106
|
+
return smalltalk.send(smalltalk.send(self, "_asArray", []), "_collect_", [(function(each){return smalltalk.send(each, "_asJSON", []);})]);
|
1107
1107
|
return self;},
|
1108
1108
|
args: [],
|
1109
|
-
source: unescape('
|
1110
|
-
messageSends: ["asArray"],
|
1109
|
+
source: unescape('asJSON%0A%09%5Eself%20asArray%20collect%3A%20%5B%3Aeach%20%7C%20each%20asJSON%5D'),
|
1110
|
+
messageSends: ["collect:", "asArray", "asJSON"],
|
1111
1111
|
referencedClasses: []
|
1112
1112
|
}),
|
1113
1113
|
smalltalk.Collection);
|
@@ -1118,7 +1118,7 @@ unescape('_streamClass'),
|
|
1118
1118
|
smalltalk.method({
|
1119
1119
|
selector: unescape('streamClass'),
|
1120
1120
|
category: 'accessing',
|
1121
|
-
fn: function (){
|
1121
|
+
fn: function () {
|
1122
1122
|
var self=this;
|
1123
1123
|
return (smalltalk.Stream || Stream);
|
1124
1124
|
return self;},
|
@@ -1134,7 +1134,7 @@ unescape('_with_'),
|
|
1134
1134
|
smalltalk.method({
|
1135
1135
|
selector: unescape('with%3A'),
|
1136
1136
|
category: 'instance creation',
|
1137
|
-
fn: function (anObject){
|
1137
|
+
fn: function (anObject) {
|
1138
1138
|
var self=this;
|
1139
1139
|
return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
|
1140
1140
|
return self;},
|
@@ -1150,7 +1150,7 @@ unescape('_with_with_'),
|
|
1150
1150
|
smalltalk.method({
|
1151
1151
|
selector: unescape('with%3Awith%3A'),
|
1152
1152
|
category: 'instance creation',
|
1153
|
-
fn: function (anObject, anotherObject){
|
1153
|
+
fn: function (anObject, anotherObject) {
|
1154
1154
|
var self=this;
|
1155
1155
|
return (function($rec){smalltalk.send($rec, "_add_", [anObject]);smalltalk.send($rec, "_add_", [anotherObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
|
1156
1156
|
return self;},
|
@@ -1166,7 +1166,7 @@ unescape('_with_with_with_'),
|
|
1166
1166
|
smalltalk.method({
|
1167
1167
|
selector: unescape('with%3Awith%3Awith%3A'),
|
1168
1168
|
category: 'instance creation',
|
1169
|
-
fn: function (firstObject, secondObject, thirdObject){
|
1169
|
+
fn: function (firstObject, secondObject, thirdObject) {
|
1170
1170
|
var self=this;
|
1171
1171
|
return (function($rec){smalltalk.send($rec, "_add_", [firstObject]);smalltalk.send($rec, "_add_", [secondObject]);smalltalk.send($rec, "_add_", [thirdObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
|
1172
1172
|
return self;},
|
@@ -1182,7 +1182,7 @@ unescape('_withAll_'),
|
|
1182
1182
|
smalltalk.method({
|
1183
1183
|
selector: unescape('withAll%3A'),
|
1184
1184
|
category: 'instance creation',
|
1185
|
-
fn: function (aCollection){
|
1185
|
+
fn: function (aCollection) {
|
1186
1186
|
var self=this;
|
1187
1187
|
return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
|
1188
1188
|
return self;},
|
@@ -1198,7 +1198,7 @@ unescape('_new_'),
|
|
1198
1198
|
smalltalk.method({
|
1199
1199
|
selector: unescape('new%3A'),
|
1200
1200
|
category: 'instance creation',
|
1201
|
-
fn: function (anInteger){
|
1201
|
+
fn: function (anInteger) {
|
1202
1202
|
var self=this;
|
1203
1203
|
return smalltalk.send(self, "_new", []);
|
1204
1204
|
return self;},
|
@@ -1216,7 +1216,7 @@ unescape('_at_'),
|
|
1216
1216
|
smalltalk.method({
|
1217
1217
|
selector: unescape('at%3A'),
|
1218
1218
|
category: 'accessing',
|
1219
|
-
fn: function (anIndex){
|
1219
|
+
fn: function (anIndex) {
|
1220
1220
|
var self=this;
|
1221
1221
|
return smalltalk.send(self, "_at_ifAbsent_", [anIndex, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
|
1222
1222
|
return self;},
|
@@ -1232,7 +1232,7 @@ unescape('_at_ifAbsent_'),
|
|
1232
1232
|
smalltalk.method({
|
1233
1233
|
selector: unescape('at%3AifAbsent%3A'),
|
1234
1234
|
category: 'accessing',
|
1235
|
-
fn: function (anIndex, aBlock){
|
1235
|
+
fn: function (anIndex, aBlock) {
|
1236
1236
|
var self=this;
|
1237
1237
|
smalltalk.send(self, "_subclassResponsibility", []);
|
1238
1238
|
return self;},
|
@@ -1248,7 +1248,7 @@ unescape('_at_put_'),
|
|
1248
1248
|
smalltalk.method({
|
1249
1249
|
selector: unescape('at%3Aput%3A'),
|
1250
1250
|
category: 'accessing',
|
1251
|
-
fn: function (anIndex, anObject){
|
1251
|
+
fn: function (anIndex, anObject) {
|
1252
1252
|
var self=this;
|
1253
1253
|
smalltalk.send(self, "_subclassResponsibility", []);
|
1254
1254
|
return self;},
|
@@ -1264,7 +1264,7 @@ unescape('_copyFrom_to_'),
|
|
1264
1264
|
smalltalk.method({
|
1265
1265
|
selector: unescape('copyFrom%3Ato%3A'),
|
1266
1266
|
category: 'copying',
|
1267
|
-
fn: function (anIndex, anotherIndex){
|
1267
|
+
fn: function (anIndex, anotherIndex) {
|
1268
1268
|
var self=this;
|
1269
1269
|
var range=nil;
|
1270
1270
|
var newCollection=nil;
|
@@ -1285,7 +1285,7 @@ unescape('_first'),
|
|
1285
1285
|
smalltalk.method({
|
1286
1286
|
selector: unescape('first'),
|
1287
1287
|
category: 'accessing',
|
1288
|
-
fn: function (){
|
1288
|
+
fn: function () {
|
1289
1289
|
var self=this;
|
1290
1290
|
return smalltalk.send(self, "_at_", [(1)]);
|
1291
1291
|
return self;},
|
@@ -1301,7 +1301,7 @@ unescape('_fourth'),
|
|
1301
1301
|
smalltalk.method({
|
1302
1302
|
selector: unescape('fourth'),
|
1303
1303
|
category: 'accessing',
|
1304
|
-
fn: function (){
|
1304
|
+
fn: function () {
|
1305
1305
|
var self=this;
|
1306
1306
|
return smalltalk.send(self, "_at_", [(4)]);
|
1307
1307
|
return self;},
|
@@ -1317,7 +1317,7 @@ unescape('_last'),
|
|
1317
1317
|
smalltalk.method({
|
1318
1318
|
selector: unescape('last'),
|
1319
1319
|
category: 'accessing',
|
1320
|
-
fn: function (){
|
1320
|
+
fn: function () {
|
1321
1321
|
var self=this;
|
1322
1322
|
return smalltalk.send(self, "_at_", [smalltalk.send(self, "_size", [])]);
|
1323
1323
|
return self;},
|
@@ -1333,7 +1333,7 @@ unescape('_second'),
|
|
1333
1333
|
smalltalk.method({
|
1334
1334
|
selector: unescape('second'),
|
1335
1335
|
category: 'accessing',
|
1336
|
-
fn: function (){
|
1336
|
+
fn: function () {
|
1337
1337
|
var self=this;
|
1338
1338
|
return smalltalk.send(self, "_at_", [(2)]);
|
1339
1339
|
return self;},
|
@@ -1349,7 +1349,7 @@ unescape('_third'),
|
|
1349
1349
|
smalltalk.method({
|
1350
1350
|
selector: unescape('third'),
|
1351
1351
|
category: 'accessing',
|
1352
|
-
fn: function (){
|
1352
|
+
fn: function () {
|
1353
1353
|
var self=this;
|
1354
1354
|
return smalltalk.send(self, "_at_", [(3)]);
|
1355
1355
|
return self;},
|
@@ -1365,7 +1365,7 @@ unescape('_removeLast'),
|
|
1365
1365
|
smalltalk.method({
|
1366
1366
|
selector: unescape('removeLast'),
|
1367
1367
|
category: 'adding',
|
1368
|
-
fn: function (){
|
1368
|
+
fn: function () {
|
1369
1369
|
var self=this;
|
1370
1370
|
smalltalk.send(self, "_remove_", [smalltalk.send(self, "_last", [])]);
|
1371
1371
|
return self;},
|
@@ -1381,7 +1381,7 @@ unescape('_addLast_'),
|
|
1381
1381
|
smalltalk.method({
|
1382
1382
|
selector: unescape('addLast%3A'),
|
1383
1383
|
category: 'adding',
|
1384
|
-
fn: function (anObject){
|
1384
|
+
fn: function (anObject) {
|
1385
1385
|
var self=this;
|
1386
1386
|
smalltalk.send(self, "_add_", [anObject]);
|
1387
1387
|
return self;},
|
@@ -1397,7 +1397,7 @@ unescape('_withIndexDo_'),
|
|
1397
1397
|
smalltalk.method({
|
1398
1398
|
selector: unescape('withIndexDo%3A'),
|
1399
1399
|
category: 'enumerating',
|
1400
|
-
fn: function (aBlock){
|
1400
|
+
fn: function (aBlock) {
|
1401
1401
|
var self=this;
|
1402
1402
|
for(var i=0;i<self.length;i++){aBlock(self[i], i+1);};
|
1403
1403
|
return self;},
|
@@ -1413,7 +1413,7 @@ unescape('_allButFirst'),
|
|
1413
1413
|
smalltalk.method({
|
1414
1414
|
selector: unescape('allButFirst'),
|
1415
1415
|
category: 'accessing',
|
1416
|
-
fn: function (){
|
1416
|
+
fn: function () {
|
1417
1417
|
var self=this;
|
1418
1418
|
return smalltalk.send(self, "_copyFrom_to_", [(2), smalltalk.send(self, "_size", [])]);
|
1419
1419
|
return self;},
|
@@ -1429,7 +1429,7 @@ unescape('_allButLast'),
|
|
1429
1429
|
smalltalk.method({
|
1430
1430
|
selector: unescape('allButLast'),
|
1431
1431
|
category: 'accessing',
|
1432
|
-
fn: function (){
|
1432
|
+
fn: function () {
|
1433
1433
|
var self=this;
|
1434
1434
|
return smalltalk.send(self, "_copyFrom_to_", [(1), ((($receiver = smalltalk.send(self, "_size", [])).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]))]);
|
1435
1435
|
return self;},
|
@@ -1445,7 +1445,7 @@ unescape('_indexOf_'),
|
|
1445
1445
|
smalltalk.method({
|
1446
1446
|
selector: unescape('indexOf%3A'),
|
1447
1447
|
category: 'accessing',
|
1448
|
-
fn: function (anObject){
|
1448
|
+
fn: function (anObject) {
|
1449
1449
|
var self=this;
|
1450
1450
|
return smalltalk.send(self, "_indexOf_ifAbsent_", [anObject, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
|
1451
1451
|
return self;},
|
@@ -1461,7 +1461,7 @@ unescape('_indexOf_ifAbsent_'),
|
|
1461
1461
|
smalltalk.method({
|
1462
1462
|
selector: unescape('indexOf%3AifAbsent%3A'),
|
1463
1463
|
category: 'accessing',
|
1464
|
-
fn: function (anObject, aBlock){
|
1464
|
+
fn: function (anObject, aBlock) {
|
1465
1465
|
var self=this;
|
1466
1466
|
|
1467
1467
|
for(var i=0;i<self.length;i++){
|
@@ -1482,7 +1482,7 @@ unescape('_indexOf_startingAt_ifAbsent_'),
|
|
1482
1482
|
smalltalk.method({
|
1483
1483
|
selector: unescape('indexOf%3AstartingAt%3AifAbsent%3A'),
|
1484
1484
|
category: 'accessing',
|
1485
|
-
fn: function (anObject, start, aBlock){
|
1485
|
+
fn: function (anObject, start, aBlock) {
|
1486
1486
|
var self=this;
|
1487
1487
|
|
1488
1488
|
for(var i=start-1;i<self.length;i++){
|
@@ -1503,7 +1503,7 @@ unescape('_indexOf_startingAt_'),
|
|
1503
1503
|
smalltalk.method({
|
1504
1504
|
selector: unescape('indexOf%3AstartingAt%3A'),
|
1505
1505
|
category: 'accessing',
|
1506
|
-
fn: function (anObject, start){
|
1506
|
+
fn: function (anObject, start) {
|
1507
1507
|
var self=this;
|
1508
1508
|
return smalltalk.send(self, "_indexOf_startingAt_ifAbsent_", [anObject, start, (function(){return (0);})]);
|
1509
1509
|
return self;},
|
@@ -1519,7 +1519,7 @@ unescape('_reversed'),
|
|
1519
1519
|
smalltalk.method({
|
1520
1520
|
selector: unescape('reversed'),
|
1521
1521
|
category: 'converting',
|
1522
|
-
fn: function (){
|
1522
|
+
fn: function () {
|
1523
1523
|
var self=this;
|
1524
1524
|
smalltalk.send(self, "_subclassResponsibility", []);
|
1525
1525
|
return self;},
|
@@ -1535,7 +1535,7 @@ unescape('_atRandom'),
|
|
1535
1535
|
smalltalk.method({
|
1536
1536
|
selector: unescape('atRandom'),
|
1537
1537
|
category: 'accessing',
|
1538
|
-
fn: function (){
|
1538
|
+
fn: function () {
|
1539
1539
|
var self=this;
|
1540
1540
|
return smalltalk.send(self, "_at_", [smalltalk.send(smalltalk.send(self, "_size", []), "_atRandom", [])]);
|
1541
1541
|
return self;},
|
@@ -1551,7 +1551,7 @@ unescape('__eq'),
|
|
1551
1551
|
smalltalk.method({
|
1552
1552
|
selector: unescape('%3D'),
|
1553
1553
|
category: 'comparing',
|
1554
|
-
fn: function (aCollection){
|
1554
|
+
fn: function (aCollection) {
|
1555
1555
|
var self=this;
|
1556
1556
|
try{((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aCollection, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [smalltalk.send(aCollection, "_size", [])]);})])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
|
1557
1557
|
smalltalk.send(self, "_withIndexDo_", [(function(each, i){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_at_", [i]), "__eq", [each])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));})]);
|
@@ -1570,7 +1570,7 @@ unescape('_shallowCopy'),
|
|
1570
1570
|
smalltalk.method({
|
1571
1571
|
selector: unescape('shallowCopy'),
|
1572
1572
|
category: 'copying',
|
1573
|
-
fn: function (){
|
1573
|
+
fn: function () {
|
1574
1574
|
var self=this;
|
1575
1575
|
var newCollection=nil;
|
1576
1576
|
(newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new_", [smalltalk.send(self, "_size", [])]));
|
@@ -1589,7 +1589,7 @@ unescape('_deepCopy'),
|
|
1589
1589
|
smalltalk.method({
|
1590
1590
|
selector: unescape('deepCopy'),
|
1591
1591
|
category: 'copying',
|
1592
|
-
fn: function (){
|
1592
|
+
fn: function () {
|
1593
1593
|
var self=this;
|
1594
1594
|
var newCollection=nil;
|
1595
1595
|
(newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new_", [smalltalk.send(self, "_size", [])]));
|
@@ -1608,7 +1608,7 @@ unescape('_printString'),
|
|
1608
1608
|
smalltalk.method({
|
1609
1609
|
selector: unescape('printString'),
|
1610
1610
|
category: 'printing',
|
1611
|
-
fn: function (){
|
1611
|
+
fn: function () {
|
1612
1612
|
var self=this;
|
1613
1613
|
var str=nil;
|
1614
1614
|
(str=smalltalk.send("", "_writeStream", []));
|
@@ -1624,6 +1624,22 @@ referencedClasses: []
|
|
1624
1624
|
}),
|
1625
1625
|
smalltalk.SequenceableCollection);
|
1626
1626
|
|
1627
|
+
smalltalk.addMethod(
|
1628
|
+
unescape('_first_'),
|
1629
|
+
smalltalk.method({
|
1630
|
+
selector: unescape('first%3A'),
|
1631
|
+
category: 'accessing',
|
1632
|
+
fn: function (n){
|
1633
|
+
var self=this;
|
1634
|
+
return smalltalk.send(self, "_copyFrom_to_", [(1), n]);
|
1635
|
+
return self;},
|
1636
|
+
args: ["n"],
|
1637
|
+
source: unescape('first%3A%20n%0A%09%22Answer%20the%20first%20n%20elements%20of%20the%20receiver.%0A%09Raise%20an%20error%20if%20there%20are%20not%20enough%20elements.%22%0A%0A%09%5E%20self%20copyFrom%3A%201%20to%3A%20n'),
|
1638
|
+
messageSends: ["copyFrom:to:"],
|
1639
|
+
referencedClasses: []
|
1640
|
+
}),
|
1641
|
+
smalltalk.SequenceableCollection);
|
1642
|
+
|
1627
1643
|
|
1628
1644
|
|
1629
1645
|
smalltalk.addClass('CharacterArray', smalltalk.SequenceableCollection, [], 'Kernel-Collections');
|
@@ -1632,7 +1648,7 @@ unescape('_at_put_'),
|
|
1632
1648
|
smalltalk.method({
|
1633
1649
|
selector: unescape('at%3Aput%3A'),
|
1634
1650
|
category: 'accessing',
|
1635
|
-
fn: function (anIndex, anObject){
|
1651
|
+
fn: function (anIndex, anObject) {
|
1636
1652
|
var self=this;
|
1637
1653
|
smalltalk.send(self, "_errorReadOnly", []);
|
1638
1654
|
return self;},
|
@@ -1648,7 +1664,7 @@ unescape('_add_'),
|
|
1648
1664
|
smalltalk.method({
|
1649
1665
|
selector: unescape('add%3A'),
|
1650
1666
|
category: 'adding',
|
1651
|
-
fn: function (anObject){
|
1667
|
+
fn: function (anObject) {
|
1652
1668
|
var self=this;
|
1653
1669
|
smalltalk.send(self, "_errorReadOnly", []);
|
1654
1670
|
return self;},
|
@@ -1664,7 +1680,7 @@ unescape('__comma'),
|
|
1664
1680
|
smalltalk.method({
|
1665
1681
|
selector: unescape('%2C'),
|
1666
1682
|
category: 'copying',
|
1667
|
-
fn: function (aString){
|
1683
|
+
fn: function (aString) {
|
1668
1684
|
var self=this;
|
1669
1685
|
return smalltalk.send(smalltalk.send(self, "_asString", []), "__comma", [smalltalk.send(aString, "_asString", [])]);
|
1670
1686
|
return self;},
|
@@ -1680,7 +1696,7 @@ unescape('_asString'),
|
|
1680
1696
|
smalltalk.method({
|
1681
1697
|
selector: unescape('asString'),
|
1682
1698
|
category: 'converting',
|
1683
|
-
fn: function (){
|
1699
|
+
fn: function () {
|
1684
1700
|
var self=this;
|
1685
1701
|
return smalltalk.send(self, "_subclassResponsibility", []);
|
1686
1702
|
return self;},
|
@@ -1696,7 +1712,7 @@ unescape('_asNumber'),
|
|
1696
1712
|
smalltalk.method({
|
1697
1713
|
selector: unescape('asNumber'),
|
1698
1714
|
category: 'converting',
|
1699
|
-
fn: function (){
|
1715
|
+
fn: function () {
|
1700
1716
|
var self=this;
|
1701
1717
|
return smalltalk.send(smalltalk.send(self, "_asString", []), "_asNumber", []);
|
1702
1718
|
return self;},
|
@@ -1712,7 +1728,7 @@ unescape('_errorReadOnly'),
|
|
1712
1728
|
smalltalk.method({
|
1713
1729
|
selector: unescape('errorReadOnly'),
|
1714
1730
|
category: 'error handling',
|
1715
|
-
fn: function (){
|
1731
|
+
fn: function () {
|
1716
1732
|
var self=this;
|
1717
1733
|
smalltalk.send(self, "_error_", [unescape("Object%20is%20read-only")]);
|
1718
1734
|
return self;},
|
@@ -1728,7 +1744,7 @@ unescape('_printString'),
|
|
1728
1744
|
smalltalk.method({
|
1729
1745
|
selector: unescape('printString'),
|
1730
1746
|
category: 'printing',
|
1731
|
-
fn: function (){
|
1747
|
+
fn: function () {
|
1732
1748
|
var self=this;
|
1733
1749
|
return smalltalk.send(smalltalk.send(self, "_asString", []), "_printString", []);
|
1734
1750
|
return self;},
|
@@ -1744,7 +1760,7 @@ unescape('_remove_'),
|
|
1744
1760
|
smalltalk.method({
|
1745
1761
|
selector: unescape('remove%3A'),
|
1746
1762
|
category: 'adding',
|
1747
|
-
fn: function (anObject){
|
1763
|
+
fn: function (anObject) {
|
1748
1764
|
var self=this;
|
1749
1765
|
smalltalk.send(self, "_errorReadOnly", []);
|
1750
1766
|
return self;},
|
@@ -1760,7 +1776,7 @@ unescape('_asUppercase'),
|
|
1760
1776
|
smalltalk.method({
|
1761
1777
|
selector: unescape('asUppercase'),
|
1762
1778
|
category: 'converting',
|
1763
|
-
fn: function (){
|
1779
|
+
fn: function () {
|
1764
1780
|
var self=this;
|
1765
1781
|
return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [smalltalk.send(smalltalk.send(self, "_asString", []), "_asUppercase", [])]);
|
1766
1782
|
return self;},
|
@@ -1776,7 +1792,7 @@ unescape('_asSymbol'),
|
|
1776
1792
|
smalltalk.method({
|
1777
1793
|
selector: unescape('asSymbol'),
|
1778
1794
|
category: 'converting',
|
1779
|
-
fn: function (){
|
1795
|
+
fn: function () {
|
1780
1796
|
var self=this;
|
1781
1797
|
return smalltalk.send(self, "_subclassResponsibility", []);
|
1782
1798
|
return self;},
|
@@ -1792,7 +1808,7 @@ unescape('_asLowercase'),
|
|
1792
1808
|
smalltalk.method({
|
1793
1809
|
selector: unescape('asLowercase'),
|
1794
1810
|
category: 'converting',
|
1795
|
-
fn: function (){
|
1811
|
+
fn: function () {
|
1796
1812
|
var self=this;
|
1797
1813
|
return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [smalltalk.send(smalltalk.send(self, "_asString", []), "_asLowercase", [])]);
|
1798
1814
|
return self;},
|
@@ -1809,7 +1825,7 @@ unescape('_fromString_'),
|
|
1809
1825
|
smalltalk.method({
|
1810
1826
|
selector: unescape('fromString%3A'),
|
1811
1827
|
category: 'instance creation',
|
1812
|
-
fn: function (aString){
|
1828
|
+
fn: function (aString) {
|
1813
1829
|
var self=this;
|
1814
1830
|
smalltalk.send(self, "_subclassResponsibility", []);
|
1815
1831
|
return self;},
|
@@ -1827,7 +1843,7 @@ unescape('__eq'),
|
|
1827
1843
|
smalltalk.method({
|
1828
1844
|
selector: unescape('%3D'),
|
1829
1845
|
category: 'comparing',
|
1830
|
-
fn: function (aString){
|
1846
|
+
fn: function (aString) {
|
1831
1847
|
var self=this;
|
1832
1848
|
try{((($receiver = smalltalk.send(smalltalk.send(aString, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
|
1833
1849
|
return String(self) === String(aString);
|
@@ -1845,7 +1861,7 @@ unescape('_size'),
|
|
1845
1861
|
smalltalk.method({
|
1846
1862
|
selector: unescape('size'),
|
1847
1863
|
category: 'accessing',
|
1848
|
-
fn: function (){
|
1864
|
+
fn: function () {
|
1849
1865
|
var self=this;
|
1850
1866
|
return self.length;
|
1851
1867
|
return self;},
|
@@ -1861,7 +1877,7 @@ unescape('_at_ifAbsent_'),
|
|
1861
1877
|
smalltalk.method({
|
1862
1878
|
selector: unescape('at%3AifAbsent%3A'),
|
1863
1879
|
category: 'accessing',
|
1864
|
-
fn: function (anIndex, aBlock){
|
1880
|
+
fn: function (anIndex, aBlock) {
|
1865
1881
|
var self=this;
|
1866
1882
|
return self[anIndex - 1] || aBlock();
|
1867
1883
|
return self;},
|
@@ -1877,7 +1893,7 @@ unescape('_escaped'),
|
|
1877
1893
|
smalltalk.method({
|
1878
1894
|
selector: unescape('escaped'),
|
1879
1895
|
category: 'accessing',
|
1880
|
-
fn: function (){
|
1896
|
+
fn: function () {
|
1881
1897
|
var self=this;
|
1882
1898
|
return escape(self);
|
1883
1899
|
return self;},
|
@@ -1893,7 +1909,7 @@ unescape('_unescaped'),
|
|
1893
1909
|
smalltalk.method({
|
1894
1910
|
selector: unescape('unescaped'),
|
1895
1911
|
category: 'accessing',
|
1896
|
-
fn: function (){
|
1912
|
+
fn: function () {
|
1897
1913
|
var self=this;
|
1898
1914
|
return unescape(self);
|
1899
1915
|
return self;},
|
@@ -1909,7 +1925,7 @@ unescape('__comma'),
|
|
1909
1925
|
smalltalk.method({
|
1910
1926
|
selector: unescape('%2C'),
|
1911
1927
|
category: 'copying',
|
1912
|
-
fn: function (aString){
|
1928
|
+
fn: function (aString) {
|
1913
1929
|
var self=this;
|
1914
1930
|
return self + aString;
|
1915
1931
|
return self;},
|
@@ -1925,7 +1941,7 @@ unescape('_copyFrom_to_'),
|
|
1925
1941
|
smalltalk.method({
|
1926
1942
|
selector: unescape('copyFrom%3Ato%3A'),
|
1927
1943
|
category: 'copying',
|
1928
|
-
fn: function (anIndex, anotherIndex){
|
1944
|
+
fn: function (anIndex, anotherIndex) {
|
1929
1945
|
var self=this;
|
1930
1946
|
return self.substring(anIndex - 1, anotherIndex);
|
1931
1947
|
return self;},
|
@@ -1941,7 +1957,7 @@ unescape('_shallowCopy'),
|
|
1941
1957
|
smalltalk.method({
|
1942
1958
|
selector: unescape('shallowCopy'),
|
1943
1959
|
category: 'copying',
|
1944
|
-
fn: function (){
|
1960
|
+
fn: function () {
|
1945
1961
|
var self=this;
|
1946
1962
|
return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [self]);
|
1947
1963
|
return self;},
|
@@ -1957,7 +1973,7 @@ unescape('_deepCopy'),
|
|
1957
1973
|
smalltalk.method({
|
1958
1974
|
selector: unescape('deepCopy'),
|
1959
1975
|
category: 'copying',
|
1960
|
-
fn: function (){
|
1976
|
+
fn: function () {
|
1961
1977
|
var self=this;
|
1962
1978
|
return smalltalk.send(self, "_shallowCopy", []);
|
1963
1979
|
return self;},
|
@@ -1973,7 +1989,7 @@ unescape('_asSelector'),
|
|
1973
1989
|
smalltalk.method({
|
1974
1990
|
selector: unescape('asSelector'),
|
1975
1991
|
category: 'converting',
|
1976
|
-
fn: function (){
|
1992
|
+
fn: function () {
|
1977
1993
|
var self=this;
|
1978
1994
|
var selector=nil;
|
1979
1995
|
(selector=smalltalk.send("_", "__comma", [self]));
|
@@ -2001,7 +2017,7 @@ unescape('_asJavascript'),
|
|
2001
2017
|
smalltalk.method({
|
2002
2018
|
selector: unescape('asJavascript'),
|
2003
2019
|
category: 'converting',
|
2004
|
-
fn: function (){
|
2020
|
+
fn: function () {
|
2005
2021
|
var self=this;
|
2006
2022
|
|
2007
2023
|
if(self.search(/^[a-zA-Z0-9_:.$ ]*$/) == -1)
|
@@ -2022,7 +2038,7 @@ unescape('_replace_with_'),
|
|
2022
2038
|
smalltalk.method({
|
2023
2039
|
selector: unescape('replace%3Awith%3A'),
|
2024
2040
|
category: 'regular expressions',
|
2025
|
-
fn: function (aString, anotherString){
|
2041
|
+
fn: function (aString, anotherString) {
|
2026
2042
|
var self=this;
|
2027
2043
|
return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [aString, "g"]), anotherString]);
|
2028
2044
|
return self;},
|
@@ -2038,7 +2054,7 @@ unescape('_replaceRegexp_with_'),
|
|
2038
2054
|
smalltalk.method({
|
2039
2055
|
selector: unescape('replaceRegexp%3Awith%3A'),
|
2040
2056
|
category: 'regular expressions',
|
2041
|
-
fn: function (aRegexp, aString){
|
2057
|
+
fn: function (aRegexp, aString) {
|
2042
2058
|
var self=this;
|
2043
2059
|
return self.replace(aRegexp, aString);
|
2044
2060
|
return self;},
|
@@ -2054,7 +2070,7 @@ unescape('_tokenize_'),
|
|
2054
2070
|
smalltalk.method({
|
2055
2071
|
selector: unescape('tokenize%3A'),
|
2056
2072
|
category: 'converting',
|
2057
|
-
fn: function (aString){
|
2073
|
+
fn: function (aString) {
|
2058
2074
|
var self=this;
|
2059
2075
|
return self.split(aString);
|
2060
2076
|
return self;},
|
@@ -2070,7 +2086,7 @@ unescape('_match_'),
|
|
2070
2086
|
smalltalk.method({
|
2071
2087
|
selector: unescape('match%3A'),
|
2072
2088
|
category: 'regular expressions',
|
2073
|
-
fn: function (aRegexp){
|
2089
|
+
fn: function (aRegexp) {
|
2074
2090
|
var self=this;
|
2075
2091
|
return self.search(aRegexp) != -1;
|
2076
2092
|
return self;},
|
@@ -2086,7 +2102,7 @@ unescape('_asString'),
|
|
2086
2102
|
smalltalk.method({
|
2087
2103
|
selector: unescape('asString'),
|
2088
2104
|
category: 'converting',
|
2089
|
-
fn: function (){
|
2105
|
+
fn: function () {
|
2090
2106
|
var self=this;
|
2091
2107
|
return self;
|
2092
2108
|
return self;},
|
@@ -2102,7 +2118,7 @@ unescape('_asNumber'),
|
|
2102
2118
|
smalltalk.method({
|
2103
2119
|
selector: unescape('asNumber'),
|
2104
2120
|
category: 'converting',
|
2105
|
-
fn: function (){
|
2121
|
+
fn: function () {
|
2106
2122
|
var self=this;
|
2107
2123
|
return Number(self);
|
2108
2124
|
return self;},
|
@@ -2118,7 +2134,7 @@ unescape('_printString'),
|
|
2118
2134
|
smalltalk.method({
|
2119
2135
|
selector: unescape('printString'),
|
2120
2136
|
category: 'printing',
|
2121
|
-
fn: function (){
|
2137
|
+
fn: function () {
|
2122
2138
|
var self=this;
|
2123
2139
|
return smalltalk.send(smalltalk.send(unescape("%27"), "__comma", [self]), "__comma", [unescape("%27")]);
|
2124
2140
|
return self;},
|
@@ -2134,7 +2150,7 @@ unescape('_printNl'),
|
|
2134
2150
|
smalltalk.method({
|
2135
2151
|
selector: unescape('printNl'),
|
2136
2152
|
category: 'printing',
|
2137
|
-
fn: function (){
|
2153
|
+
fn: function () {
|
2138
2154
|
var self=this;
|
2139
2155
|
console.log(self);
|
2140
2156
|
return self;},
|
@@ -2150,7 +2166,7 @@ unescape('_isString'),
|
|
2150
2166
|
smalltalk.method({
|
2151
2167
|
selector: unescape('isString'),
|
2152
2168
|
category: 'testing',
|
2153
|
-
fn: function (){
|
2169
|
+
fn: function () {
|
2154
2170
|
var self=this;
|
2155
2171
|
return true;
|
2156
2172
|
return self;},
|
@@ -2166,7 +2182,7 @@ unescape('__gt'),
|
|
2166
2182
|
smalltalk.method({
|
2167
2183
|
selector: unescape('%3E'),
|
2168
2184
|
category: 'comparing',
|
2169
|
-
fn: function (aString){
|
2185
|
+
fn: function (aString) {
|
2170
2186
|
var self=this;
|
2171
2187
|
return String(self) > aString._asString();
|
2172
2188
|
return self;},
|
@@ -2182,7 +2198,7 @@ unescape('__lt'),
|
|
2182
2198
|
smalltalk.method({
|
2183
2199
|
selector: unescape('%3C'),
|
2184
2200
|
category: 'comparing',
|
2185
|
-
fn: function (aString){
|
2201
|
+
fn: function (aString) {
|
2186
2202
|
var self=this;
|
2187
2203
|
return String(self) < aString._asString();
|
2188
2204
|
return self;},
|
@@ -2198,7 +2214,7 @@ unescape('__gt_eq'),
|
|
2198
2214
|
smalltalk.method({
|
2199
2215
|
selector: unescape('%3E%3D'),
|
2200
2216
|
category: 'comparing',
|
2201
|
-
fn: function (aString){
|
2217
|
+
fn: function (aString) {
|
2202
2218
|
var self=this;
|
2203
2219
|
return String(self) >= aString._asString();
|
2204
2220
|
return self;},
|
@@ -2214,7 +2230,7 @@ unescape('__lt_eq'),
|
|
2214
2230
|
smalltalk.method({
|
2215
2231
|
selector: unescape('%3C%3D'),
|
2216
2232
|
category: 'comparing',
|
2217
|
-
fn: function (aString){
|
2233
|
+
fn: function (aString) {
|
2218
2234
|
var self=this;
|
2219
2235
|
return String(self) <= aString._asString();
|
2220
2236
|
return self;},
|
@@ -2230,7 +2246,7 @@ unescape('_trimLeft_'),
|
|
2230
2246
|
smalltalk.method({
|
2231
2247
|
selector: unescape('trimLeft%3A'),
|
2232
2248
|
category: 'regular expressions',
|
2233
|
-
fn: function (separators){
|
2249
|
+
fn: function (separators) {
|
2234
2250
|
var self=this;
|
2235
2251
|
return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [smalltalk.send(smalltalk.send(unescape("%5E%5B"), "__comma", [separators]), "__comma", [unescape("%5D+")]), "g"]), ""]);
|
2236
2252
|
return self;},
|
@@ -2246,7 +2262,7 @@ unescape('_trimRight_'),
|
|
2246
2262
|
smalltalk.method({
|
2247
2263
|
selector: unescape('trimRight%3A'),
|
2248
2264
|
category: 'regular expressions',
|
2249
|
-
fn: function (separators){
|
2265
|
+
fn: function (separators) {
|
2250
2266
|
var self=this;
|
2251
2267
|
return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [smalltalk.send(smalltalk.send(unescape("%5B"), "__comma", [separators]), "__comma", [unescape("%5D+%24")]), "g"]), ""]);
|
2252
2268
|
return self;},
|
@@ -2262,7 +2278,7 @@ unescape('_trimLeft'),
|
|
2262
2278
|
smalltalk.method({
|
2263
2279
|
selector: unescape('trimLeft'),
|
2264
2280
|
category: 'regular expressions',
|
2265
|
-
fn: function (){
|
2281
|
+
fn: function () {
|
2266
2282
|
var self=this;
|
2267
2283
|
return smalltalk.send(self, "_trimLeft_", [unescape("%5Cs")]);
|
2268
2284
|
return self;},
|
@@ -2278,7 +2294,7 @@ unescape('_trimRight'),
|
|
2278
2294
|
smalltalk.method({
|
2279
2295
|
selector: unescape('trimRight'),
|
2280
2296
|
category: 'regular expressions',
|
2281
|
-
fn: function (){
|
2297
|
+
fn: function () {
|
2282
2298
|
var self=this;
|
2283
2299
|
return smalltalk.send(self, "_trimRight_", [unescape("%5Cs")]);
|
2284
2300
|
return self;},
|
@@ -2294,7 +2310,7 @@ unescape('_trimBoth'),
|
|
2294
2310
|
smalltalk.method({
|
2295
2311
|
selector: unescape('trimBoth'),
|
2296
2312
|
category: 'regular expressions',
|
2297
|
-
fn: function (){
|
2313
|
+
fn: function () {
|
2298
2314
|
var self=this;
|
2299
2315
|
return smalltalk.send(self, "_trimBoth_", [unescape("%5Cs")]);
|
2300
2316
|
return self;},
|
@@ -2310,7 +2326,7 @@ unescape('_trimBoth_'),
|
|
2310
2326
|
smalltalk.method({
|
2311
2327
|
selector: unescape('trimBoth%3A'),
|
2312
2328
|
category: 'regular expressions',
|
2313
|
-
fn: function (separators){
|
2329
|
+
fn: function (separators) {
|
2314
2330
|
var self=this;
|
2315
2331
|
return smalltalk.send(smalltalk.send(self, "_trimLeft_", [separators]), "_trimRight_", [separators]);
|
2316
2332
|
return self;},
|
@@ -2326,7 +2342,7 @@ unescape('_asLowercase'),
|
|
2326
2342
|
smalltalk.method({
|
2327
2343
|
selector: unescape('asLowercase'),
|
2328
2344
|
category: 'converting',
|
2329
|
-
fn: function (){
|
2345
|
+
fn: function () {
|
2330
2346
|
var self=this;
|
2331
2347
|
return self.toLowerCase();
|
2332
2348
|
return self;},
|
@@ -2342,7 +2358,7 @@ unescape('_asUppercase'),
|
|
2342
2358
|
smalltalk.method({
|
2343
2359
|
selector: unescape('asUppercase'),
|
2344
2360
|
category: 'converting',
|
2345
|
-
fn: function (){
|
2361
|
+
fn: function () {
|
2346
2362
|
var self=this;
|
2347
2363
|
return self.toUpperCase();
|
2348
2364
|
return self;},
|
@@ -2358,7 +2374,7 @@ unescape('_join_'),
|
|
2358
2374
|
smalltalk.method({
|
2359
2375
|
selector: unescape('join%3A'),
|
2360
2376
|
category: 'split join',
|
2361
|
-
fn: function (aCollection){
|
2377
|
+
fn: function (aCollection) {
|
2362
2378
|
var self=this;
|
2363
2379
|
return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){return smalltalk.send(aCollection, "_do_separatedBy_", [(function(each){return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(each, "_asString", [])]);}), (function(){return smalltalk.send(stream, "_nextPutAll_", [self]);})]);})]);
|
2364
2380
|
return self;},
|
@@ -2374,7 +2390,7 @@ unescape('_includesSubString_'),
|
|
2374
2390
|
smalltalk.method({
|
2375
2391
|
selector: unescape('includesSubString%3A'),
|
2376
2392
|
category: 'testing',
|
2377
|
-
fn: function (subString){
|
2393
|
+
fn: function (subString) {
|
2378
2394
|
var self=this;
|
2379
2395
|
return self.indexOf(subString) != -1 ;
|
2380
2396
|
return self;},
|
@@ -2390,7 +2406,7 @@ unescape('_asciiValue'),
|
|
2390
2406
|
smalltalk.method({
|
2391
2407
|
selector: unescape('asciiValue'),
|
2392
2408
|
category: 'accessing',
|
2393
|
-
fn: function (){
|
2409
|
+
fn: function () {
|
2394
2410
|
var self=this;
|
2395
2411
|
return self.charCodeAt(0);;
|
2396
2412
|
return self;},
|
@@ -2406,7 +2422,7 @@ unescape('_lineIndicesDo_'),
|
|
2406
2422
|
smalltalk.method({
|
2407
2423
|
selector: unescape('lineIndicesDo%3A'),
|
2408
2424
|
category: 'split join',
|
2409
|
-
fn: function (aBlock){
|
2425
|
+
fn: function (aBlock) {
|
2410
2426
|
var self=this;
|
2411
2427
|
try{var cr=nil;
|
2412
2428
|
var lf=nil;
|
@@ -2435,7 +2451,7 @@ unescape('_linesDo_'),
|
|
2435
2451
|
smalltalk.method({
|
2436
2452
|
selector: unescape('linesDo%3A'),
|
2437
2453
|
category: 'split join',
|
2438
|
-
fn: function (aBlock){
|
2454
|
+
fn: function (aBlock) {
|
2439
2455
|
var self=this;
|
2440
2456
|
smalltalk.send(self, "_lineIndicesDo_", [(function(start, endWithoutDelimiters, end){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])]);})]);
|
2441
2457
|
return self;},
|
@@ -2451,7 +2467,7 @@ unescape('_lines'),
|
|
2451
2467
|
smalltalk.method({
|
2452
2468
|
selector: unescape('lines'),
|
2453
2469
|
category: 'split join',
|
2454
|
-
fn: function (){
|
2470
|
+
fn: function () {
|
2455
2471
|
var self=this;
|
2456
2472
|
var lines=nil;
|
2457
2473
|
(lines=smalltalk.send((smalltalk.Array || Array), "_new", []));
|
@@ -2470,7 +2486,7 @@ unescape('_lineNumber_'),
|
|
2470
2486
|
smalltalk.method({
|
2471
2487
|
selector: unescape('lineNumber%3A'),
|
2472
2488
|
category: 'split join',
|
2473
|
-
fn: function (anIndex){
|
2489
|
+
fn: function (anIndex) {
|
2474
2490
|
var self=this;
|
2475
2491
|
try{var lineCount=nil;
|
2476
2492
|
(lineCount=(0));
|
@@ -2490,7 +2506,7 @@ unescape('_reversed'),
|
|
2490
2506
|
smalltalk.method({
|
2491
2507
|
selector: unescape('reversed'),
|
2492
2508
|
category: 'converting',
|
2493
|
-
fn: function (){
|
2509
|
+
fn: function () {
|
2494
2510
|
var self=this;
|
2495
2511
|
return self.split("").reverse().join("");
|
2496
2512
|
return self;},
|
@@ -2506,7 +2522,7 @@ unescape('_asJavaScriptSelector'),
|
|
2506
2522
|
smalltalk.method({
|
2507
2523
|
selector: unescape('asJavaScriptSelector'),
|
2508
2524
|
category: 'converting',
|
2509
|
-
fn: function (){
|
2525
|
+
fn: function () {
|
2510
2526
|
var self=this;
|
2511
2527
|
return smalltalk.send(smalltalk.send(smalltalk.send(self, "_asSelector", []), "_replace_with_", [unescape("%5E_"), ""]), "_replace_with_", [unescape("_.*"), ""]);
|
2512
2528
|
return self;},
|
@@ -2518,34 +2534,34 @@ referencedClasses: []
|
|
2518
2534
|
smalltalk.String);
|
2519
2535
|
|
2520
2536
|
smalltalk.addMethod(
|
2521
|
-
unescape('
|
2537
|
+
unescape('_asSymbol'),
|
2522
2538
|
smalltalk.method({
|
2523
|
-
selector: unescape('
|
2539
|
+
selector: unescape('asSymbol'),
|
2524
2540
|
category: 'converting',
|
2525
|
-
fn: function (){
|
2541
|
+
fn: function () {
|
2526
2542
|
var self=this;
|
2527
|
-
return self;
|
2543
|
+
return smalltalk.send((smalltalk.Symbol || Symbol), "_lookup_", [self]);
|
2528
2544
|
return self;},
|
2529
2545
|
args: [],
|
2530
|
-
source: unescape('
|
2531
|
-
messageSends: [],
|
2532
|
-
referencedClasses: []
|
2546
|
+
source: unescape('asSymbol%0A%09%5ESymbol%20lookup%3A%20self'),
|
2547
|
+
messageSends: ["lookup:"],
|
2548
|
+
referencedClasses: ["Symbol"]
|
2533
2549
|
}),
|
2534
2550
|
smalltalk.String);
|
2535
2551
|
|
2536
2552
|
smalltalk.addMethod(
|
2537
|
-
unescape('
|
2553
|
+
unescape('_asJSON'),
|
2538
2554
|
smalltalk.method({
|
2539
|
-
selector: unescape('
|
2555
|
+
selector: unescape('asJSON'),
|
2540
2556
|
category: 'converting',
|
2541
2557
|
fn: function (){
|
2542
2558
|
var self=this;
|
2543
|
-
return
|
2559
|
+
return self;
|
2544
2560
|
return self;},
|
2545
2561
|
args: [],
|
2546
|
-
source: unescape('
|
2547
|
-
messageSends: [
|
2548
|
-
referencedClasses: [
|
2562
|
+
source: unescape('asJSON%0A%09%5Eself'),
|
2563
|
+
messageSends: [],
|
2564
|
+
referencedClasses: []
|
2549
2565
|
}),
|
2550
2566
|
smalltalk.String);
|
2551
2567
|
|
@@ -2555,7 +2571,7 @@ unescape('_streamClass'),
|
|
2555
2571
|
smalltalk.method({
|
2556
2572
|
selector: unescape('streamClass'),
|
2557
2573
|
category: 'accessing',
|
2558
|
-
fn: function (){
|
2574
|
+
fn: function () {
|
2559
2575
|
var self=this;
|
2560
2576
|
return (smalltalk.StringStream || StringStream);
|
2561
2577
|
return self;},
|
@@ -2571,7 +2587,7 @@ unescape('_fromString_'),
|
|
2571
2587
|
smalltalk.method({
|
2572
2588
|
selector: unescape('fromString%3A'),
|
2573
2589
|
category: 'instance creation',
|
2574
|
-
fn: function (aString){
|
2590
|
+
fn: function (aString) {
|
2575
2591
|
var self=this;
|
2576
2592
|
return new self.fn(aString);
|
2577
2593
|
return self;},
|
@@ -2587,7 +2603,7 @@ unescape('_cr'),
|
|
2587
2603
|
smalltalk.method({
|
2588
2604
|
selector: unescape('cr'),
|
2589
2605
|
category: 'accessing',
|
2590
|
-
fn: function (){
|
2606
|
+
fn: function () {
|
2591
2607
|
var self=this;
|
2592
2608
|
return '\r';
|
2593
2609
|
return self;},
|
@@ -2603,7 +2619,7 @@ unescape('_lf'),
|
|
2603
2619
|
smalltalk.method({
|
2604
2620
|
selector: unescape('lf'),
|
2605
2621
|
category: 'accessing',
|
2606
|
-
fn: function (){
|
2622
|
+
fn: function () {
|
2607
2623
|
var self=this;
|
2608
2624
|
return '\n';
|
2609
2625
|
return self;},
|
@@ -2619,7 +2635,7 @@ unescape('_space'),
|
|
2619
2635
|
smalltalk.method({
|
2620
2636
|
selector: unescape('space'),
|
2621
2637
|
category: 'accessing',
|
2622
|
-
fn: function (){
|
2638
|
+
fn: function () {
|
2623
2639
|
var self=this;
|
2624
2640
|
return ' ';
|
2625
2641
|
return self;},
|
@@ -2635,7 +2651,7 @@ unescape('_tab'),
|
|
2635
2651
|
smalltalk.method({
|
2636
2652
|
selector: unescape('tab'),
|
2637
2653
|
category: 'accessing',
|
2638
|
-
fn: function (){
|
2654
|
+
fn: function () {
|
2639
2655
|
var self=this;
|
2640
2656
|
return '\t';
|
2641
2657
|
return self;},
|
@@ -2651,7 +2667,7 @@ unescape('_crlf'),
|
|
2651
2667
|
smalltalk.method({
|
2652
2668
|
selector: unescape('crlf'),
|
2653
2669
|
category: 'accessing',
|
2654
|
-
fn: function (){
|
2670
|
+
fn: function () {
|
2655
2671
|
var self=this;
|
2656
2672
|
return '\r\n';
|
2657
2673
|
return self;},
|
@@ -2667,7 +2683,7 @@ unescape('_streamContents_'),
|
|
2667
2683
|
smalltalk.method({
|
2668
2684
|
selector: unescape('streamContents%3A'),
|
2669
2685
|
category: 'instance creation',
|
2670
|
-
fn: function (blockWithArg){
|
2686
|
+
fn: function (blockWithArg) {
|
2671
2687
|
var self=this;
|
2672
2688
|
var stream=nil;
|
2673
2689
|
(stream=smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [smalltalk.send((smalltalk.String || String), "_new", [])]));
|
@@ -2686,7 +2702,7 @@ unescape('_value_'),
|
|
2686
2702
|
smalltalk.method({
|
2687
2703
|
selector: unescape('value%3A'),
|
2688
2704
|
category: 'instance creation',
|
2689
|
-
fn: function (aUTFCharCode){
|
2705
|
+
fn: function (aUTFCharCode) {
|
2690
2706
|
var self=this;
|
2691
2707
|
return String.fromCharCode(aUTFCharCode);;
|
2692
2708
|
return self;},
|
@@ -2704,7 +2720,7 @@ unescape('_at_ifAbsent_'),
|
|
2704
2720
|
smalltalk.method({
|
2705
2721
|
selector: unescape('at%3AifAbsent%3A'),
|
2706
2722
|
category: 'accessing',
|
2707
|
-
fn: function (anIndex, aBlock){
|
2723
|
+
fn: function (anIndex, aBlock) {
|
2708
2724
|
var self=this;
|
2709
2725
|
return smalltalk.send(smalltalk.send(self, "_asString", []), "_at_ifAbsent_", [anIndex, aBlock]);
|
2710
2726
|
return self;},
|
@@ -2720,7 +2736,7 @@ unescape('_asString'),
|
|
2720
2736
|
smalltalk.method({
|
2721
2737
|
selector: unescape('asString'),
|
2722
2738
|
category: 'converting',
|
2723
|
-
fn: function (){
|
2739
|
+
fn: function () {
|
2724
2740
|
var self=this;
|
2725
2741
|
return self.value;
|
2726
2742
|
return self;},
|
@@ -2736,7 +2752,7 @@ unescape('_printString'),
|
|
2736
2752
|
smalltalk.method({
|
2737
2753
|
selector: unescape('printString'),
|
2738
2754
|
category: 'printing',
|
2739
|
-
fn: function (){
|
2755
|
+
fn: function () {
|
2740
2756
|
var self=this;
|
2741
2757
|
return smalltalk.send(unescape("%23"), "__comma", [smalltalk.send(self, "_asString", [])]);
|
2742
2758
|
return self;},
|
@@ -2752,7 +2768,7 @@ unescape('_size'),
|
|
2752
2768
|
smalltalk.method({
|
2753
2769
|
selector: unescape('size'),
|
2754
2770
|
category: 'accessing',
|
2755
|
-
fn: function (){
|
2771
|
+
fn: function () {
|
2756
2772
|
var self=this;
|
2757
2773
|
return smalltalk.send(smalltalk.send(self, "_asString", []), "_size", []);
|
2758
2774
|
return self;},
|
@@ -2768,7 +2784,7 @@ unescape('_asSymbol'),
|
|
2768
2784
|
smalltalk.method({
|
2769
2785
|
selector: unescape('asSymbol'),
|
2770
2786
|
category: 'converting',
|
2771
|
-
fn: function (){
|
2787
|
+
fn: function () {
|
2772
2788
|
var self=this;
|
2773
2789
|
return self;
|
2774
2790
|
return self;},
|
@@ -2784,7 +2800,7 @@ unescape('_copyFrom_to_'),
|
|
2784
2800
|
smalltalk.method({
|
2785
2801
|
selector: unescape('copyFrom%3Ato%3A'),
|
2786
2802
|
category: 'copying',
|
2787
|
-
fn: function (anIndex, anotherIndex){
|
2803
|
+
fn: function (anIndex, anotherIndex) {
|
2788
2804
|
var self=this;
|
2789
2805
|
return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [smalltalk.send(smalltalk.send(self, "_asString", []), "_copyFrom_to_", [anIndex, anotherIndex])]);
|
2790
2806
|
return self;},
|
@@ -2800,7 +2816,7 @@ unescape('_deepCopy'),
|
|
2800
2816
|
smalltalk.method({
|
2801
2817
|
selector: unescape('deepCopy'),
|
2802
2818
|
category: 'copying',
|
2803
|
-
fn: function (){
|
2819
|
+
fn: function () {
|
2804
2820
|
var self=this;
|
2805
2821
|
return self;
|
2806
2822
|
return self;},
|
@@ -2816,7 +2832,7 @@ unescape('__lt'),
|
|
2816
2832
|
smalltalk.method({
|
2817
2833
|
selector: unescape('%3C'),
|
2818
2834
|
category: 'comparing',
|
2819
|
-
fn: function (aSymbol){
|
2835
|
+
fn: function (aSymbol) {
|
2820
2836
|
var self=this;
|
2821
2837
|
return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver <smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__lt", [smalltalk.send(aSymbol, "_asString", [])]));
|
2822
2838
|
return self;},
|
@@ -2832,7 +2848,7 @@ unescape('__lt_eq'),
|
|
2832
2848
|
smalltalk.method({
|
2833
2849
|
selector: unescape('%3C%3D'),
|
2834
2850
|
category: 'comparing',
|
2835
|
-
fn: function (aSymbol){
|
2851
|
+
fn: function (aSymbol) {
|
2836
2852
|
var self=this;
|
2837
2853
|
return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver <=smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__lt_eq", [smalltalk.send(aSymbol, "_asString", [])]));
|
2838
2854
|
return self;},
|
@@ -2848,7 +2864,7 @@ unescape('__gt_eq'),
|
|
2848
2864
|
smalltalk.method({
|
2849
2865
|
selector: unescape('%3E%3D'),
|
2850
2866
|
category: 'comparing',
|
2851
|
-
fn: function (aSymbol){
|
2867
|
+
fn: function (aSymbol) {
|
2852
2868
|
var self=this;
|
2853
2869
|
return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver >=smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__gt_eq", [smalltalk.send(aSymbol, "_asString", [])]));
|
2854
2870
|
return self;},
|
@@ -2864,7 +2880,7 @@ unescape('__eq'),
|
|
2864
2880
|
smalltalk.method({
|
2865
2881
|
selector: unescape('%3D'),
|
2866
2882
|
category: 'comparing',
|
2867
|
-
fn: function (aSymbol){
|
2883
|
+
fn: function (aSymbol) {
|
2868
2884
|
var self=this;
|
2869
2885
|
try{((($receiver = smalltalk.send(smalltalk.send(aSymbol, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
|
2870
2886
|
(function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return smalltalk.send(smalltalk.send(self, "_asString", []), "__eq", [smalltalk.send(aSymbol, "_asString", [])])}})})();
|
@@ -2882,7 +2898,7 @@ unescape('_isSymbol'),
|
|
2882
2898
|
smalltalk.method({
|
2883
2899
|
selector: unescape('isSymbol'),
|
2884
2900
|
category: 'printing',
|
2885
|
-
fn: function (){
|
2901
|
+
fn: function () {
|
2886
2902
|
var self=this;
|
2887
2903
|
return true;
|
2888
2904
|
return self;},
|
@@ -2898,7 +2914,7 @@ unescape('_asJavascript'),
|
|
2898
2914
|
smalltalk.method({
|
2899
2915
|
selector: unescape('asJavascript'),
|
2900
2916
|
category: 'converting',
|
2901
|
-
fn: function (){
|
2917
|
+
fn: function () {
|
2902
2918
|
var self=this;
|
2903
2919
|
return smalltalk.send(smalltalk.send(unescape("smalltalk.symbolFor%28%22"), "__comma", [smalltalk.send(self, "_asString", [])]), "__comma", [unescape("%22%29")]);
|
2904
2920
|
return self;},
|
@@ -2914,7 +2930,7 @@ unescape('__gt'),
|
|
2914
2930
|
smalltalk.method({
|
2915
2931
|
selector: unescape('%3E'),
|
2916
2932
|
category: 'comparing',
|
2917
|
-
fn: function (aSymbol){
|
2933
|
+
fn: function (aSymbol) {
|
2918
2934
|
var self=this;
|
2919
2935
|
return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver >smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__gt", [smalltalk.send(aSymbol, "_asString", [])]));
|
2920
2936
|
return self;},
|
@@ -2930,7 +2946,7 @@ unescape('_shallowCopy'),
|
|
2930
2946
|
smalltalk.method({
|
2931
2947
|
selector: unescape('shallowCopy'),
|
2932
2948
|
category: 'copying',
|
2933
|
-
fn: function (){
|
2949
|
+
fn: function () {
|
2934
2950
|
var self=this;
|
2935
2951
|
return self;
|
2936
2952
|
return self;},
|
@@ -2946,7 +2962,7 @@ unescape('_asSelector'),
|
|
2946
2962
|
smalltalk.method({
|
2947
2963
|
selector: unescape('asSelector'),
|
2948
2964
|
category: 'converting',
|
2949
|
-
fn: function (){
|
2965
|
+
fn: function () {
|
2950
2966
|
var self=this;
|
2951
2967
|
return smalltalk.send(smalltalk.send(self, "_asString", []), "_asSelector", []);
|
2952
2968
|
return self;},
|
@@ -2957,13 +2973,29 @@ referencedClasses: []
|
|
2957
2973
|
}),
|
2958
2974
|
smalltalk.Symbol);
|
2959
2975
|
|
2976
|
+
smalltalk.addMethod(
|
2977
|
+
unescape('_asJSON'),
|
2978
|
+
smalltalk.method({
|
2979
|
+
selector: unescape('asJSON'),
|
2980
|
+
category: 'converting',
|
2981
|
+
fn: function (){
|
2982
|
+
var self=this;
|
2983
|
+
return smalltalk.send(smalltalk.send(self, "_asString", []), "_asJSON", []);
|
2984
|
+
return self;},
|
2985
|
+
args: [],
|
2986
|
+
source: unescape('asJSON%0A%09%5Eself%20asString%20asJSON'),
|
2987
|
+
messageSends: ["asJSON", "asString"],
|
2988
|
+
referencedClasses: []
|
2989
|
+
}),
|
2990
|
+
smalltalk.Symbol);
|
2991
|
+
|
2960
2992
|
|
2961
2993
|
smalltalk.addMethod(
|
2962
2994
|
unescape('_lookup_'),
|
2963
2995
|
smalltalk.method({
|
2964
2996
|
selector: unescape('lookup%3A'),
|
2965
2997
|
category: 'instance creation',
|
2966
|
-
fn: function (aString){
|
2998
|
+
fn: function (aString) {
|
2967
2999
|
var self=this;
|
2968
3000
|
return smalltalk.symbolFor(aString);;
|
2969
3001
|
return self;},
|
@@ -2979,7 +3011,7 @@ unescape('_basicNew'),
|
|
2979
3011
|
smalltalk.method({
|
2980
3012
|
selector: unescape('basicNew'),
|
2981
3013
|
category: 'instance creation',
|
2982
|
-
fn: function (){
|
3014
|
+
fn: function () {
|
2983
3015
|
var self=this;
|
2984
3016
|
smalltalk.send(self, "_shouldNotImplement", []);
|
2985
3017
|
return self;},
|
@@ -2995,7 +3027,7 @@ unescape('_fromString_'),
|
|
2995
3027
|
smalltalk.method({
|
2996
3028
|
selector: unescape('fromString%3A'),
|
2997
3029
|
category: 'instance creation',
|
2998
|
-
fn: function (aString){
|
3030
|
+
fn: function (aString) {
|
2999
3031
|
var self=this;
|
3000
3032
|
return smalltalk.send(self, "_lookup_", [aString]);
|
3001
3033
|
return self;},
|
@@ -3013,7 +3045,7 @@ unescape('_size'),
|
|
3013
3045
|
smalltalk.method({
|
3014
3046
|
selector: unescape('size'),
|
3015
3047
|
category: 'accessing',
|
3016
|
-
fn: function (){
|
3048
|
+
fn: function () {
|
3017
3049
|
var self=this;
|
3018
3050
|
return self.length;
|
3019
3051
|
return self;},
|
@@ -3029,7 +3061,7 @@ unescape('_at_put_'),
|
|
3029
3061
|
smalltalk.method({
|
3030
3062
|
selector: unescape('at%3Aput%3A'),
|
3031
3063
|
category: 'accessing',
|
3032
|
-
fn: function (anIndex, anObject){
|
3064
|
+
fn: function (anIndex, anObject) {
|
3033
3065
|
var self=this;
|
3034
3066
|
return self[anIndex - 1] = anObject;
|
3035
3067
|
return self;},
|
@@ -3045,7 +3077,7 @@ unescape('_at_ifAbsent_'),
|
|
3045
3077
|
smalltalk.method({
|
3046
3078
|
selector: unescape('at%3AifAbsent%3A'),
|
3047
3079
|
category: 'accessing',
|
3048
|
-
fn: function (anIndex, aBlock){
|
3080
|
+
fn: function (anIndex, aBlock) {
|
3049
3081
|
var self=this;
|
3050
3082
|
|
3051
3083
|
var value = self[anIndex - 1];
|
@@ -3068,7 +3100,7 @@ unescape('_add_'),
|
|
3068
3100
|
smalltalk.method({
|
3069
3101
|
selector: unescape('add%3A'),
|
3070
3102
|
category: 'adding/removing',
|
3071
|
-
fn: function (anObject){
|
3103
|
+
fn: function (anObject) {
|
3072
3104
|
var self=this;
|
3073
3105
|
self.push(anObject); return anObject;;
|
3074
3106
|
return self;},
|
@@ -3084,7 +3116,7 @@ unescape('_join_'),
|
|
3084
3116
|
smalltalk.method({
|
3085
3117
|
selector: unescape('join%3A'),
|
3086
3118
|
category: 'enumerating',
|
3087
|
-
fn: function (aString){
|
3119
|
+
fn: function (aString) {
|
3088
3120
|
var self=this;
|
3089
3121
|
return self.join(aString);
|
3090
3122
|
return self;},
|
@@ -3100,7 +3132,7 @@ unescape('_asJavascript'),
|
|
3100
3132
|
smalltalk.method({
|
3101
3133
|
selector: unescape('asJavascript'),
|
3102
3134
|
category: 'converting',
|
3103
|
-
fn: function (){
|
3135
|
+
fn: function () {
|
3104
3136
|
var self=this;
|
3105
3137
|
return smalltalk.send(smalltalk.send(unescape("%5B"), "__comma", [smalltalk.send(smalltalk.send(self, "_collect_", [(function(each){return smalltalk.send(each, "_asJavascript", []);})]), "_join_", [unescape("%2C%20")])]), "__comma", [unescape("%5D")]);
|
3106
3138
|
return self;},
|
@@ -3116,7 +3148,7 @@ unescape('_sort'),
|
|
3116
3148
|
smalltalk.method({
|
3117
3149
|
selector: unescape('sort'),
|
3118
3150
|
category: 'enumerating',
|
3119
|
-
fn: function (){
|
3151
|
+
fn: function () {
|
3120
3152
|
var self=this;
|
3121
3153
|
return smalltalk.send(self, "_basicPerform_", ["sort"]);
|
3122
3154
|
return self;},
|
@@ -3132,7 +3164,7 @@ unescape('_sort_'),
|
|
3132
3164
|
smalltalk.method({
|
3133
3165
|
selector: unescape('sort%3A'),
|
3134
3166
|
category: 'enumerating',
|
3135
|
-
fn: function (aBlock){
|
3167
|
+
fn: function (aBlock) {
|
3136
3168
|
var self=this;
|
3137
3169
|
|
3138
3170
|
return self.sort(function(a, b) {
|
@@ -3152,7 +3184,7 @@ unescape('_remove_'),
|
|
3152
3184
|
smalltalk.method({
|
3153
3185
|
selector: unescape('remove%3A'),
|
3154
3186
|
category: 'adding/removing',
|
3155
|
-
fn: function (anObject){
|
3187
|
+
fn: function (anObject) {
|
3156
3188
|
var self=this;
|
3157
3189
|
|
3158
3190
|
for(var i=0;i<self.length;i++) {
|
@@ -3175,7 +3207,7 @@ unescape('_sorted'),
|
|
3175
3207
|
smalltalk.method({
|
3176
3208
|
selector: unescape('sorted'),
|
3177
3209
|
category: 'enumerating',
|
3178
|
-
fn: function (){
|
3210
|
+
fn: function () {
|
3179
3211
|
var self=this;
|
3180
3212
|
return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort", []);
|
3181
3213
|
return self;},
|
@@ -3191,7 +3223,7 @@ unescape('_sorted_'),
|
|
3191
3223
|
smalltalk.method({
|
3192
3224
|
selector: unescape('sorted%3A'),
|
3193
3225
|
category: 'enumerating',
|
3194
|
-
fn: function (aBlock){
|
3226
|
+
fn: function (aBlock) {
|
3195
3227
|
var self=this;
|
3196
3228
|
return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort_", [aBlock]);
|
3197
3229
|
return self;},
|
@@ -3207,7 +3239,7 @@ unescape('_removeFrom_to_'),
|
|
3207
3239
|
smalltalk.method({
|
3208
3240
|
selector: unescape('removeFrom%3Ato%3A'),
|
3209
3241
|
category: 'adding/removing',
|
3210
|
-
fn: function (aNumber, anotherNumber){
|
3242
|
+
fn: function (aNumber, anotherNumber) {
|
3211
3243
|
var self=this;
|
3212
3244
|
self.splice(aNumber - 1,anotherNumber - 1);
|
3213
3245
|
return self;},
|
@@ -3223,7 +3255,7 @@ unescape('_reversed'),
|
|
3223
3255
|
smalltalk.method({
|
3224
3256
|
selector: unescape('reversed'),
|
3225
3257
|
category: 'converting',
|
3226
|
-
fn: function (){
|
3258
|
+
fn: function () {
|
3227
3259
|
var self=this;
|
3228
3260
|
return self._copy().reverse();
|
3229
3261
|
return self;},
|
@@ -3240,7 +3272,7 @@ unescape('_new_'),
|
|
3240
3272
|
smalltalk.method({
|
3241
3273
|
selector: unescape('new%3A'),
|
3242
3274
|
category: 'instance creation',
|
3243
|
-
fn: function (anInteger){
|
3275
|
+
fn: function (anInteger) {
|
3244
3276
|
var self=this;
|
3245
3277
|
return new Array(anInteger);
|
3246
3278
|
return self;},
|
@@ -3256,7 +3288,7 @@ unescape('_with_'),
|
|
3256
3288
|
smalltalk.method({
|
3257
3289
|
selector: unescape('with%3A'),
|
3258
3290
|
category: 'instance creation',
|
3259
|
-
fn: function (anObject){
|
3291
|
+
fn: function (anObject) {
|
3260
3292
|
var self=this;
|
3261
3293
|
return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(1)]));
|
3262
3294
|
return self;},
|
@@ -3272,7 +3304,7 @@ unescape('_with_with_'),
|
|
3272
3304
|
smalltalk.method({
|
3273
3305
|
selector: unescape('with%3Awith%3A'),
|
3274
3306
|
category: 'instance creation',
|
3275
|
-
fn: function (anObject, anObject2){
|
3307
|
+
fn: function (anObject, anObject2) {
|
3276
3308
|
var self=this;
|
3277
3309
|
return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);smalltalk.send($rec, "_at_put_", [(2), anObject2]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(2)]));
|
3278
3310
|
return self;},
|
@@ -3288,7 +3320,7 @@ unescape('_with_with_with_'),
|
|
3288
3320
|
smalltalk.method({
|
3289
3321
|
selector: unescape('with%3Awith%3Awith%3A'),
|
3290
3322
|
category: 'instance creation',
|
3291
|
-
fn: function (anObject, anObject2, anObject3){
|
3323
|
+
fn: function (anObject, anObject2, anObject3) {
|
3292
3324
|
var self=this;
|
3293
3325
|
return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);smalltalk.send($rec, "_at_put_", [(2), anObject2]);smalltalk.send($rec, "_at_put_", [(3), anObject3]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(3)]));
|
3294
3326
|
return self;},
|
@@ -3304,15 +3336,15 @@ unescape('_withAll_'),
|
|
3304
3336
|
smalltalk.method({
|
3305
3337
|
selector: unescape('withAll%3A'),
|
3306
3338
|
category: 'instance creation',
|
3307
|
-
fn: function (aCollection){
|
3339
|
+
fn: function (aCollection) {
|
3308
3340
|
var self=this;
|
3309
3341
|
var instance=nil;
|
3310
3342
|
(instance=smalltalk.send(self, "_new_", [smalltalk.send(aCollection, "_size", [])]));
|
3311
|
-
smalltalk.send(aCollection, "_withIndexDo_", [(function(
|
3343
|
+
smalltalk.send(aCollection, "_withIndexDo_", [(function(each, index){return smalltalk.send(instance, "_at_put_", [index, each]);})]);
|
3312
3344
|
return instance;
|
3313
3345
|
return self;},
|
3314
3346
|
args: ["aCollection"],
|
3315
|
-
source: unescape('withAll%3A%20aCollection%0A%09%7C%20instance%20%7C%0A%09instance%20%3A%3D%20self%20new%3A%20aCollection%20size.%0A%09aCollection%20withIndexDo%3A%20%5B%
|
3347
|
+
source: unescape('withAll%3A%20aCollection%0A%09%7C%20instance%20%7C%0A%09instance%20%3A%3D%20self%20new%3A%20aCollection%20size.%0A%09aCollection%20withIndexDo%3A%20%5B%3Aeach%20%3Aindex%20%20%7C%0A%09%09instance%20at%3A%20index%20put%3A%20each%5D.%0A%09%5Einstance'),
|
3316
3348
|
messageSends: ["new:", "size", "withIndexDo:", "at:put:"],
|
3317
3349
|
referencedClasses: []
|
3318
3350
|
}),
|
@@ -3325,7 +3357,7 @@ unescape('_size'),
|
|
3325
3357
|
smalltalk.method({
|
3326
3358
|
selector: unescape('size'),
|
3327
3359
|
category: 'accessing',
|
3328
|
-
fn: function (){
|
3360
|
+
fn: function () {
|
3329
3361
|
var self=this;
|
3330
3362
|
return self.length;
|
3331
3363
|
return self;},
|
@@ -3341,7 +3373,7 @@ unescape('_at_put_'),
|
|
3341
3373
|
smalltalk.method({
|
3342
3374
|
selector: unescape('at%3Aput%3A'),
|
3343
3375
|
category: 'accessing',
|
3344
|
-
fn: function (anIndex, anObject){
|
3376
|
+
fn: function (anIndex, anObject) {
|
3345
3377
|
var self=this;
|
3346
3378
|
return self[anIndex - 1] = anObject;
|
3347
3379
|
return self;},
|
@@ -3357,7 +3389,7 @@ unescape('_at_ifAbsent_'),
|
|
3357
3389
|
smalltalk.method({
|
3358
3390
|
selector: unescape('at%3AifAbsent%3A'),
|
3359
3391
|
category: 'accessing',
|
3360
|
-
fn: function (anIndex, aBlock){
|
3392
|
+
fn: function (anIndex, aBlock) {
|
3361
3393
|
var self=this;
|
3362
3394
|
|
3363
3395
|
var value = self[anIndex - 1];
|
@@ -3380,7 +3412,7 @@ unescape('_add_'),
|
|
3380
3412
|
smalltalk.method({
|
3381
3413
|
selector: unescape('add%3A'),
|
3382
3414
|
category: 'adding/removing',
|
3383
|
-
fn: function (anObject){
|
3415
|
+
fn: function (anObject) {
|
3384
3416
|
var self=this;
|
3385
3417
|
self.push(anObject); return anObject;;
|
3386
3418
|
return self;},
|
@@ -3396,7 +3428,7 @@ unescape('_join_'),
|
|
3396
3428
|
smalltalk.method({
|
3397
3429
|
selector: unescape('join%3A'),
|
3398
3430
|
category: 'enumerating',
|
3399
|
-
fn: function (aString){
|
3431
|
+
fn: function (aString) {
|
3400
3432
|
var self=this;
|
3401
3433
|
return self.join(aString);
|
3402
3434
|
return self;},
|
@@ -3412,7 +3444,7 @@ unescape('_asJavascript'),
|
|
3412
3444
|
smalltalk.method({
|
3413
3445
|
selector: unescape('asJavascript'),
|
3414
3446
|
category: 'converting',
|
3415
|
-
fn: function (){
|
3447
|
+
fn: function () {
|
3416
3448
|
var self=this;
|
3417
3449
|
return smalltalk.send(smalltalk.send(unescape("%5B"), "__comma", [smalltalk.send(smalltalk.send(self, "_collect_", [(function(each){return smalltalk.send(each, "_asJavascript", []);})]), "_join_", [unescape("%2C%20")])]), "__comma", [unescape("%5D")]);
|
3418
3450
|
return self;},
|
@@ -3428,7 +3460,7 @@ unescape('_sort'),
|
|
3428
3460
|
smalltalk.method({
|
3429
3461
|
selector: unescape('sort'),
|
3430
3462
|
category: 'enumerating',
|
3431
|
-
fn: function (){
|
3463
|
+
fn: function () {
|
3432
3464
|
var self=this;
|
3433
3465
|
return smalltalk.send(self, "_basicPerform_", ["sort"]);
|
3434
3466
|
return self;},
|
@@ -3444,7 +3476,7 @@ unescape('_sort_'),
|
|
3444
3476
|
smalltalk.method({
|
3445
3477
|
selector: unescape('sort%3A'),
|
3446
3478
|
category: 'enumerating',
|
3447
|
-
fn: function (aBlock){
|
3479
|
+
fn: function (aBlock) {
|
3448
3480
|
var self=this;
|
3449
3481
|
|
3450
3482
|
return self.sort(function(a, b) {
|
@@ -3464,7 +3496,7 @@ unescape('_remove_'),
|
|
3464
3496
|
smalltalk.method({
|
3465
3497
|
selector: unescape('remove%3A'),
|
3466
3498
|
category: 'adding/removing',
|
3467
|
-
fn: function (anObject){
|
3499
|
+
fn: function (anObject) {
|
3468
3500
|
var self=this;
|
3469
3501
|
|
3470
3502
|
for(var i=0;i<self.length;i++) {
|
@@ -3487,7 +3519,7 @@ unescape('_sorted'),
|
|
3487
3519
|
smalltalk.method({
|
3488
3520
|
selector: unescape('sorted'),
|
3489
3521
|
category: 'enumerating',
|
3490
|
-
fn: function (){
|
3522
|
+
fn: function () {
|
3491
3523
|
var self=this;
|
3492
3524
|
return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort", []);
|
3493
3525
|
return self;},
|
@@ -3503,7 +3535,7 @@ unescape('_sorted_'),
|
|
3503
3535
|
smalltalk.method({
|
3504
3536
|
selector: unescape('sorted%3A'),
|
3505
3537
|
category: 'enumerating',
|
3506
|
-
fn: function (aBlock){
|
3538
|
+
fn: function (aBlock) {
|
3507
3539
|
var self=this;
|
3508
3540
|
return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort_", [aBlock]);
|
3509
3541
|
return self;},
|
@@ -3519,7 +3551,7 @@ unescape('_removeFrom_to_'),
|
|
3519
3551
|
smalltalk.method({
|
3520
3552
|
selector: unescape('removeFrom%3Ato%3A'),
|
3521
3553
|
category: 'adding/removing',
|
3522
|
-
fn: function (aNumber, anotherNumber){
|
3554
|
+
fn: function (aNumber, anotherNumber) {
|
3523
3555
|
var self=this;
|
3524
3556
|
self.splice(aNumber - 1,anotherNumber - 1);
|
3525
3557
|
return self;},
|
@@ -3535,7 +3567,7 @@ unescape('_reversed'),
|
|
3535
3567
|
smalltalk.method({
|
3536
3568
|
selector: unescape('reversed'),
|
3537
3569
|
category: 'converting',
|
3538
|
-
fn: function (){
|
3570
|
+
fn: function () {
|
3539
3571
|
var self=this;
|
3540
3572
|
return self._copy().reverse();
|
3541
3573
|
return self;},
|
@@ -3552,7 +3584,7 @@ unescape('_new_'),
|
|
3552
3584
|
smalltalk.method({
|
3553
3585
|
selector: unescape('new%3A'),
|
3554
3586
|
category: 'instance creation',
|
3555
|
-
fn: function (anInteger){
|
3587
|
+
fn: function (anInteger) {
|
3556
3588
|
var self=this;
|
3557
3589
|
return new Array(anInteger);
|
3558
3590
|
return self;},
|
@@ -3568,7 +3600,7 @@ unescape('_with_'),
|
|
3568
3600
|
smalltalk.method({
|
3569
3601
|
selector: unescape('with%3A'),
|
3570
3602
|
category: 'instance creation',
|
3571
|
-
fn: function (anObject){
|
3603
|
+
fn: function (anObject) {
|
3572
3604
|
var self=this;
|
3573
3605
|
return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(1)]));
|
3574
3606
|
return self;},
|
@@ -3584,7 +3616,7 @@ unescape('_with_with_'),
|
|
3584
3616
|
smalltalk.method({
|
3585
3617
|
selector: unescape('with%3Awith%3A'),
|
3586
3618
|
category: 'instance creation',
|
3587
|
-
fn: function (anObject, anObject2){
|
3619
|
+
fn: function (anObject, anObject2) {
|
3588
3620
|
var self=this;
|
3589
3621
|
return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);smalltalk.send($rec, "_at_put_", [(2), anObject2]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(2)]));
|
3590
3622
|
return self;},
|
@@ -3600,7 +3632,7 @@ unescape('_with_with_with_'),
|
|
3600
3632
|
smalltalk.method({
|
3601
3633
|
selector: unescape('with%3Awith%3Awith%3A'),
|
3602
3634
|
category: 'instance creation',
|
3603
|
-
fn: function (anObject, anObject2, anObject3){
|
3635
|
+
fn: function (anObject, anObject2, anObject3) {
|
3604
3636
|
var self=this;
|
3605
3637
|
return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);smalltalk.send($rec, "_at_put_", [(2), anObject2]);smalltalk.send($rec, "_at_put_", [(3), anObject3]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(3)]));
|
3606
3638
|
return self;},
|
@@ -3616,15 +3648,15 @@ unescape('_withAll_'),
|
|
3616
3648
|
smalltalk.method({
|
3617
3649
|
selector: unescape('withAll%3A'),
|
3618
3650
|
category: 'instance creation',
|
3619
|
-
fn: function (aCollection){
|
3651
|
+
fn: function (aCollection) {
|
3620
3652
|
var self=this;
|
3621
3653
|
var instance=nil;
|
3622
3654
|
(instance=smalltalk.send(self, "_new_", [smalltalk.send(aCollection, "_size", [])]));
|
3623
|
-
smalltalk.send(aCollection, "_withIndexDo_", [(function(
|
3655
|
+
smalltalk.send(aCollection, "_withIndexDo_", [(function(each, index){return smalltalk.send(instance, "_at_put_", [index, each]);})]);
|
3624
3656
|
return instance;
|
3625
3657
|
return self;},
|
3626
3658
|
args: ["aCollection"],
|
3627
|
-
source: unescape('withAll%3A%20aCollection%0A%09%7C%20instance%20%7C%0A%09instance%20%3A%3D%20self%20new%3A%20aCollection%20size.%0A%09aCollection%20withIndexDo%3A%20%5B%
|
3659
|
+
source: unescape('withAll%3A%20aCollection%0A%09%7C%20instance%20%7C%0A%09instance%20%3A%3D%20self%20new%3A%20aCollection%20size.%0A%09aCollection%20withIndexDo%3A%20%5B%3Aeach%20%3Aindex%20%20%7C%0A%09%09instance%20at%3A%20index%20put%3A%20each%5D.%0A%09%5Einstance'),
|
3628
3660
|
messageSends: ["new:", "size", "withIndexDo:", "at:put:"],
|
3629
3661
|
referencedClasses: []
|
3630
3662
|
}),
|
@@ -3637,7 +3669,7 @@ unescape('_next_'),
|
|
3637
3669
|
smalltalk.method({
|
3638
3670
|
selector: unescape('next%3A'),
|
3639
3671
|
category: 'reading',
|
3640
|
-
fn: function (anInteger){
|
3672
|
+
fn: function (anInteger) {
|
3641
3673
|
var self=this;
|
3642
3674
|
var tempCollection=nil;
|
3643
3675
|
(tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_class", []), "_new", []));
|
@@ -3656,7 +3688,7 @@ unescape('_nextPut_'),
|
|
3656
3688
|
smalltalk.method({
|
3657
3689
|
selector: unescape('nextPut%3A'),
|
3658
3690
|
category: 'writing',
|
3659
|
-
fn: function (aString){
|
3691
|
+
fn: function (aString) {
|
3660
3692
|
var self=this;
|
3661
3693
|
smalltalk.send(self, "_nextPutAll_", [aString]);
|
3662
3694
|
return self;},
|
@@ -3672,7 +3704,7 @@ unescape('_nextPutAll_'),
|
|
3672
3704
|
smalltalk.method({
|
3673
3705
|
selector: unescape('nextPutAll%3A'),
|
3674
3706
|
category: 'writing',
|
3675
|
-
fn: function (aString){
|
3707
|
+
fn: function (aString) {
|
3676
3708
|
var self=this;
|
3677
3709
|
smalltalk.send(self, "_setCollection_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [(1), smalltalk.send(self, "_position", [])]), "__comma", [aString]), "__comma", [smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [((($receiver = ((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))).klass === smalltalk.Number) ? $receiver +smalltalk.send(aString, "_size", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(aString, "_size", [])])), smalltalk.send(smalltalk.send(self, "_collection", []), "_size", [])])])]);
|
3678
3710
|
smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(aString, "_size", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(aString, "_size", [])]))]);
|
@@ -3690,7 +3722,7 @@ unescape('_cr'),
|
|
3690
3722
|
smalltalk.method({
|
3691
3723
|
selector: unescape('cr'),
|
3692
3724
|
category: 'writing',
|
3693
|
-
fn: function (){
|
3725
|
+
fn: function () {
|
3694
3726
|
var self=this;
|
3695
3727
|
return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_cr", [])]);
|
3696
3728
|
return self;},
|
@@ -3706,7 +3738,7 @@ unescape('_crlf'),
|
|
3706
3738
|
smalltalk.method({
|
3707
3739
|
selector: unescape('crlf'),
|
3708
3740
|
category: 'writing',
|
3709
|
-
fn: function (){
|
3741
|
+
fn: function () {
|
3710
3742
|
var self=this;
|
3711
3743
|
return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_crlf", [])]);
|
3712
3744
|
return self;},
|
@@ -3722,7 +3754,7 @@ unescape('_lf'),
|
|
3722
3754
|
smalltalk.method({
|
3723
3755
|
selector: unescape('lf'),
|
3724
3756
|
category: 'writing',
|
3725
|
-
fn: function (){
|
3757
|
+
fn: function () {
|
3726
3758
|
var self=this;
|
3727
3759
|
return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_lf", [])]);
|
3728
3760
|
return self;},
|
@@ -3738,7 +3770,7 @@ unescape('_space'),
|
|
3738
3770
|
smalltalk.method({
|
3739
3771
|
selector: unescape('space'),
|
3740
3772
|
category: 'writing',
|
3741
|
-
fn: function (){
|
3773
|
+
fn: function () {
|
3742
3774
|
var self=this;
|
3743
3775
|
smalltalk.send(self, "_nextPut_", [" "]);
|
3744
3776
|
return self;},
|
@@ -3757,7 +3789,7 @@ unescape('_add_'),
|
|
3757
3789
|
smalltalk.method({
|
3758
3790
|
selector: unescape('add%3A'),
|
3759
3791
|
category: 'adding/removing',
|
3760
|
-
fn: function (anObject){
|
3792
|
+
fn: function (anObject) {
|
3761
3793
|
var self=this;
|
3762
3794
|
|
3763
3795
|
var found;
|
@@ -3782,7 +3814,7 @@ unescape('_remove_'),
|
|
3782
3814
|
smalltalk.method({
|
3783
3815
|
selector: unescape('remove%3A'),
|
3784
3816
|
category: 'adding/removing',
|
3785
|
-
fn: function (anObject){
|
3817
|
+
fn: function (anObject) {
|
3786
3818
|
var self=this;
|
3787
3819
|
smalltalk.send(self['@elements'], "_remove_", [anObject]);
|
3788
3820
|
return self;},
|
@@ -3798,7 +3830,7 @@ unescape('_initialize'),
|
|
3798
3830
|
smalltalk.method({
|
3799
3831
|
selector: unescape('initialize'),
|
3800
3832
|
category: 'initialization',
|
3801
|
-
fn: function (){
|
3833
|
+
fn: function () {
|
3802
3834
|
var self=this;
|
3803
3835
|
smalltalk.send(self, "_initialize", [], smalltalk.Collection);
|
3804
3836
|
(self['@elements']=[]);
|
@@ -3815,7 +3847,7 @@ unescape('_size'),
|
|
3815
3847
|
smalltalk.method({
|
3816
3848
|
selector: unescape('size'),
|
3817
3849
|
category: 'accessing',
|
3818
|
-
fn: function (){
|
3850
|
+
fn: function () {
|
3819
3851
|
var self=this;
|
3820
3852
|
return smalltalk.send(self['@elements'], "_size", []);
|
3821
3853
|
return self;},
|
@@ -3831,7 +3863,7 @@ unescape('_asArray'),
|
|
3831
3863
|
smalltalk.method({
|
3832
3864
|
selector: unescape('asArray'),
|
3833
3865
|
category: 'converting',
|
3834
|
-
fn: function (){
|
3866
|
+
fn: function () {
|
3835
3867
|
var self=this;
|
3836
3868
|
return smalltalk.send(self['@elements'], "_copy", []);
|
3837
3869
|
return self;},
|
@@ -3847,7 +3879,7 @@ unescape('_detect_ifNone_'),
|
|
3847
3879
|
smalltalk.method({
|
3848
3880
|
selector: unescape('detect%3AifNone%3A'),
|
3849
3881
|
category: 'enumerating',
|
3850
|
-
fn: function (aBlock, anotherBlock){
|
3882
|
+
fn: function (aBlock, anotherBlock) {
|
3851
3883
|
var self=this;
|
3852
3884
|
return smalltalk.send(self['@elements'], "_detect_ifNone_", [aBlock, anotherBlock]);
|
3853
3885
|
return self;},
|
@@ -3863,7 +3895,7 @@ unescape('_do_'),
|
|
3863
3895
|
smalltalk.method({
|
3864
3896
|
selector: unescape('do%3A'),
|
3865
3897
|
category: 'enumerating',
|
3866
|
-
fn: function (aBlock){
|
3898
|
+
fn: function (aBlock) {
|
3867
3899
|
var self=this;
|
3868
3900
|
smalltalk.send(self['@elements'], "_do_", [aBlock]);
|
3869
3901
|
return self;},
|
@@ -3879,7 +3911,7 @@ unescape('_includes_'),
|
|
3879
3911
|
smalltalk.method({
|
3880
3912
|
selector: unescape('includes%3A'),
|
3881
3913
|
category: 'testing',
|
3882
|
-
fn: function (anObject){
|
3914
|
+
fn: function (anObject) {
|
3883
3915
|
var self=this;
|
3884
3916
|
return smalltalk.send(self['@elements'], "_includes_", [anObject]);
|
3885
3917
|
return self;},
|
@@ -3895,7 +3927,7 @@ unescape('__eq'),
|
|
3895
3927
|
smalltalk.method({
|
3896
3928
|
selector: unescape('%3D'),
|
3897
3929
|
category: 'comparing',
|
3898
|
-
fn: function (aCollection){
|
3930
|
+
fn: function (aCollection) {
|
3899
3931
|
var self=this;
|
3900
3932
|
return smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aCollection, "_class", [])]), "_and_", [(function(){return smalltalk.send(self['@elements'], "__eq", [smalltalk.send(aCollection, "_asArray", [])]);})]);
|
3901
3933
|
return self;},
|
@@ -3911,7 +3943,7 @@ unescape('_select_'),
|
|
3911
3943
|
smalltalk.method({
|
3912
3944
|
selector: unescape('select%3A'),
|
3913
3945
|
category: 'enumerating',
|
3914
|
-
fn: function (aBlock){
|
3946
|
+
fn: function (aBlock) {
|
3915
3947
|
var self=this;
|
3916
3948
|
var collection=nil;
|
3917
3949
|
(collection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
|
@@ -3934,7 +3966,7 @@ unescape('_size'),
|
|
3934
3966
|
smalltalk.method({
|
3935
3967
|
selector: unescape('size'),
|
3936
3968
|
category: 'accessing',
|
3937
|
-
fn: function (){
|
3969
|
+
fn: function () {
|
3938
3970
|
var self=this;
|
3939
3971
|
return smalltalk.send(smalltalk.send(self, "_keys", []), "_size", []);
|
3940
3972
|
return self;},
|
@@ -3950,7 +3982,7 @@ unescape('_associations'),
|
|
3950
3982
|
smalltalk.method({
|
3951
3983
|
selector: unescape('associations'),
|
3952
3984
|
category: 'accessing',
|
3953
|
-
fn: function (){
|
3985
|
+
fn: function () {
|
3954
3986
|
var self=this;
|
3955
3987
|
var associations=nil;
|
3956
3988
|
(associations=[]);
|
@@ -3969,7 +4001,7 @@ unescape('_keys'),
|
|
3969
4001
|
smalltalk.method({
|
3970
4002
|
selector: unescape('keys'),
|
3971
4003
|
category: 'accessing',
|
3972
|
-
fn: function (){
|
4004
|
+
fn: function () {
|
3973
4005
|
var self=this;
|
3974
4006
|
|
3975
4007
|
var keys = [];
|
@@ -3993,7 +4025,7 @@ unescape('_values'),
|
|
3993
4025
|
smalltalk.method({
|
3994
4026
|
selector: unescape('values'),
|
3995
4027
|
category: 'accessing',
|
3996
|
-
fn: function (){
|
4028
|
+
fn: function () {
|
3997
4029
|
var self=this;
|
3998
4030
|
return smalltalk.send(smalltalk.send(self, "_keys", []), "_collect_", [(function(each){return smalltalk.send(self, "_at_", [each]);})]);
|
3999
4031
|
return self;},
|
@@ -4009,7 +4041,7 @@ unescape('_at_put_'),
|
|
4009
4041
|
smalltalk.method({
|
4010
4042
|
selector: unescape('at%3Aput%3A'),
|
4011
4043
|
category: 'accessing',
|
4012
|
-
fn: function (aKey, aValue){
|
4044
|
+
fn: function (aKey, aValue) {
|
4013
4045
|
var self=this;
|
4014
4046
|
return smalltalk.send(self, "_basicAt_put_", [aKey, aValue]);
|
4015
4047
|
return self;},
|
@@ -4025,7 +4057,7 @@ unescape('_at_ifAbsent_'),
|
|
4025
4057
|
smalltalk.method({
|
4026
4058
|
selector: unescape('at%3AifAbsent%3A'),
|
4027
4059
|
category: 'accessing',
|
4028
|
-
fn: function (aKey, aBlock){
|
4060
|
+
fn: function (aKey, aBlock) {
|
4029
4061
|
var self=this;
|
4030
4062
|
return smalltalk.send(smalltalk.send(self, "_includesKey_", [aKey]), "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_basicAt_", [aKey]);}), aBlock]);
|
4031
4063
|
return self;},
|
@@ -4041,7 +4073,7 @@ unescape('_at_ifAbsentPut_'),
|
|
4041
4073
|
smalltalk.method({
|
4042
4074
|
selector: unescape('at%3AifAbsentPut%3A'),
|
4043
4075
|
category: 'accessing',
|
4044
|
-
fn: function (aKey, aBlock){
|
4076
|
+
fn: function (aKey, aBlock) {
|
4045
4077
|
var self=this;
|
4046
4078
|
return smalltalk.send(self, "_at_ifAbsent_", [aKey, (function(){return smalltalk.send(self, "_at_put_", [aKey, smalltalk.send(aBlock, "_value", [])]);})]);
|
4047
4079
|
return self;},
|
@@ -4057,7 +4089,7 @@ unescape('_at_ifPresent_'),
|
|
4057
4089
|
smalltalk.method({
|
4058
4090
|
selector: unescape('at%3AifPresent%3A'),
|
4059
4091
|
category: 'accessing',
|
4060
|
-
fn: function (aKey, aBlock){
|
4092
|
+
fn: function (aKey, aBlock) {
|
4061
4093
|
var self=this;
|
4062
4094
|
return (($receiver = smalltalk.send(self, "_basicAt_", [aKey])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_at_", [aKey])]);})() : nil;
|
4063
4095
|
return self;},
|
@@ -4073,7 +4105,7 @@ unescape('_at_ifPresent_ifAbsent_'),
|
|
4073
4105
|
smalltalk.method({
|
4074
4106
|
selector: unescape('at%3AifPresent%3AifAbsent%3A'),
|
4075
4107
|
category: 'accessing',
|
4076
|
-
fn: function (aKey, aBlock, anotherBlock){
|
4108
|
+
fn: function (aKey, aBlock, anotherBlock) {
|
4077
4109
|
var self=this;
|
4078
4110
|
return smalltalk.send(smalltalk.send(self, "_basicAt_", [aKey]), "_ifNil_ifNotNil_", [anotherBlock, (function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_at_", [aKey])]);})]);
|
4079
4111
|
return self;},
|
@@ -4089,7 +4121,7 @@ unescape('_at_'),
|
|
4089
4121
|
smalltalk.method({
|
4090
4122
|
selector: unescape('at%3A'),
|
4091
4123
|
category: 'accessing',
|
4092
|
-
fn: function (aKey){
|
4124
|
+
fn: function (aKey) {
|
4093
4125
|
var self=this;
|
4094
4126
|
return smalltalk.send(self, "_at_ifAbsent_", [aKey, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
|
4095
4127
|
return self;},
|
@@ -4105,7 +4137,7 @@ unescape('_add_'),
|
|
4105
4137
|
smalltalk.method({
|
4106
4138
|
selector: unescape('add%3A'),
|
4107
4139
|
category: 'adding/removing',
|
4108
|
-
fn: function (anAssociation){
|
4140
|
+
fn: function (anAssociation) {
|
4109
4141
|
var self=this;
|
4110
4142
|
smalltalk.send(self, "_at_put_", [smalltalk.send(anAssociation, "_key", []), smalltalk.send(anAssociation, "_value", [])]);
|
4111
4143
|
return self;},
|
@@ -4121,7 +4153,7 @@ unescape('_addAll_'),
|
|
4121
4153
|
smalltalk.method({
|
4122
4154
|
selector: unescape('addAll%3A'),
|
4123
4155
|
category: 'adding/removing',
|
4124
|
-
fn: function (aHashedCollection){
|
4156
|
+
fn: function (aHashedCollection) {
|
4125
4157
|
var self=this;
|
4126
4158
|
smalltalk.send(self, "_addAll_", [smalltalk.send(aHashedCollection, "_associations", [])], smalltalk.Collection);
|
4127
4159
|
return aHashedCollection;
|
@@ -4138,7 +4170,7 @@ unescape('_removeKey_'),
|
|
4138
4170
|
smalltalk.method({
|
4139
4171
|
selector: unescape('removeKey%3A'),
|
4140
4172
|
category: 'adding/removing',
|
4141
|
-
fn: function (aKey){
|
4173
|
+
fn: function (aKey) {
|
4142
4174
|
var self=this;
|
4143
4175
|
smalltalk.send(self, "_remove_", [aKey]);
|
4144
4176
|
return self;},
|
@@ -4154,7 +4186,7 @@ unescape('_remove_ifAbsent_'),
|
|
4154
4186
|
smalltalk.method({
|
4155
4187
|
selector: unescape('remove%3AifAbsent%3A'),
|
4156
4188
|
category: 'adding/removing',
|
4157
|
-
fn: function (aKey, aBlock){
|
4189
|
+
fn: function (aKey, aBlock) {
|
4158
4190
|
var self=this;
|
4159
4191
|
return smalltalk.send(self, "_removeKey_ifAbsent_", [aKey, aBlock]);
|
4160
4192
|
return self;},
|
@@ -4170,7 +4202,7 @@ unescape('_removeKey_ifAbsent_'),
|
|
4170
4202
|
smalltalk.method({
|
4171
4203
|
selector: unescape('removeKey%3AifAbsent%3A'),
|
4172
4204
|
category: 'adding/removing',
|
4173
|
-
fn: function (aKey, aBlock){
|
4205
|
+
fn: function (aKey, aBlock) {
|
4174
4206
|
var self=this;
|
4175
4207
|
return ((($receiver = smalltalk.send(self, "_includesKey_", [aKey])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(aBlock, "_value", []);})() : (function(){return smalltalk.send(self, "_basicDelete_", [aKey]);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(aBlock, "_value", []);}), (function(){return smalltalk.send(self, "_basicDelete_", [aKey]);})]));
|
4176
4208
|
return self;},
|
@@ -4186,7 +4218,7 @@ unescape('__eq'),
|
|
4186
4218
|
smalltalk.method({
|
4187
4219
|
selector: unescape('%3D'),
|
4188
4220
|
category: 'comparing',
|
4189
|
-
fn: function (aHashedCollection){
|
4221
|
+
fn: function (aHashedCollection) {
|
4190
4222
|
var self=this;
|
4191
4223
|
try{((($receiver = smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aHashedCollection, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
|
4192
4224
|
((($receiver = smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [smalltalk.send(aHashedCollection, "_size", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
|
@@ -4205,7 +4237,7 @@ unescape('_shallowCopy'),
|
|
4205
4237
|
smalltalk.method({
|
4206
4238
|
selector: unescape('shallowCopy'),
|
4207
4239
|
category: 'copying',
|
4208
|
-
fn: function (){
|
4240
|
+
fn: function () {
|
4209
4241
|
var self=this;
|
4210
4242
|
var copy=nil;
|
4211
4243
|
(copy=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
|
@@ -4224,7 +4256,7 @@ unescape('__comma'),
|
|
4224
4256
|
smalltalk.method({
|
4225
4257
|
selector: unescape('%2C'),
|
4226
4258
|
category: 'copying',
|
4227
|
-
fn: function (aCollection){
|
4259
|
+
fn: function (aCollection) {
|
4228
4260
|
var self=this;
|
4229
4261
|
smalltalk.send(self, "_shouldNotImplement", []);
|
4230
4262
|
return self;},
|
@@ -4240,7 +4272,7 @@ unescape('_copyFrom_to_'),
|
|
4240
4272
|
smalltalk.method({
|
4241
4273
|
selector: unescape('copyFrom%3Ato%3A'),
|
4242
4274
|
category: 'copying',
|
4243
|
-
fn: function (anIndex, anotherIndex){
|
4275
|
+
fn: function (anIndex, anotherIndex) {
|
4244
4276
|
var self=this;
|
4245
4277
|
smalltalk.send(self, "_shouldNotImplement", []);
|
4246
4278
|
return self;},
|
@@ -4256,7 +4288,7 @@ unescape('_deepCopy'),
|
|
4256
4288
|
smalltalk.method({
|
4257
4289
|
selector: unescape('deepCopy'),
|
4258
4290
|
category: 'copying',
|
4259
|
-
fn: function (){
|
4291
|
+
fn: function () {
|
4260
4292
|
var self=this;
|
4261
4293
|
var copy=nil;
|
4262
4294
|
(copy=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
|
@@ -4275,7 +4307,7 @@ unescape('_associationsDo_'),
|
|
4275
4307
|
smalltalk.method({
|
4276
4308
|
selector: unescape('associationsDo%3A'),
|
4277
4309
|
category: 'enumerating',
|
4278
|
-
fn: function (aBlock){
|
4310
|
+
fn: function (aBlock) {
|
4279
4311
|
var self=this;
|
4280
4312
|
smalltalk.send(smalltalk.send(self, "_associations", []), "_do_", [aBlock]);
|
4281
4313
|
return self;},
|
@@ -4291,7 +4323,7 @@ unescape('_keysAndValuesDo_'),
|
|
4291
4323
|
smalltalk.method({
|
4292
4324
|
selector: unescape('keysAndValuesDo%3A'),
|
4293
4325
|
category: 'enumerating',
|
4294
|
-
fn: function (aBlock){
|
4326
|
+
fn: function (aBlock) {
|
4295
4327
|
var self=this;
|
4296
4328
|
smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(aBlock, "_value_value_", [smalltalk.send(each, "_key", []), smalltalk.send(each, "_value", [])]);})]);
|
4297
4329
|
return self;},
|
@@ -4307,7 +4339,7 @@ unescape('_do_'),
|
|
4307
4339
|
smalltalk.method({
|
4308
4340
|
selector: unescape('do%3A'),
|
4309
4341
|
category: 'enumerating',
|
4310
|
-
fn: function (aBlock){
|
4342
|
+
fn: function (aBlock) {
|
4311
4343
|
var self=this;
|
4312
4344
|
smalltalk.send(smalltalk.send(self, "_values", []), "_do_", [aBlock]);
|
4313
4345
|
return self;},
|
@@ -4323,7 +4355,7 @@ unescape('_select_'),
|
|
4323
4355
|
smalltalk.method({
|
4324
4356
|
selector: unescape('select%3A'),
|
4325
4357
|
category: 'enumerating',
|
4326
|
-
fn: function (aBlock){
|
4358
|
+
fn: function (aBlock) {
|
4327
4359
|
var self=this;
|
4328
4360
|
var newDict=nil;
|
4329
4361
|
(newDict=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
|
@@ -4342,7 +4374,7 @@ unescape('_collect_'),
|
|
4342
4374
|
smalltalk.method({
|
4343
4375
|
selector: unescape('collect%3A'),
|
4344
4376
|
category: 'enumerating',
|
4345
|
-
fn: function (aBlock){
|
4377
|
+
fn: function (aBlock) {
|
4346
4378
|
var self=this;
|
4347
4379
|
var newDict=nil;
|
4348
4380
|
(newDict=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
|
@@ -4361,7 +4393,7 @@ unescape('_detect_ifNone_'),
|
|
4361
4393
|
smalltalk.method({
|
4362
4394
|
selector: unescape('detect%3AifNone%3A'),
|
4363
4395
|
category: 'enumerating',
|
4364
|
-
fn: function (aBlock, anotherBlock){
|
4396
|
+
fn: function (aBlock, anotherBlock) {
|
4365
4397
|
var self=this;
|
4366
4398
|
return smalltalk.send(smalltalk.send(self, "_values", []), "_detect_ifNone_", [aBlock, anotherBlock]);
|
4367
4399
|
return self;},
|
@@ -4377,7 +4409,7 @@ unescape('_includes_'),
|
|
4377
4409
|
smalltalk.method({
|
4378
4410
|
selector: unescape('includes%3A'),
|
4379
4411
|
category: 'enumerating',
|
4380
|
-
fn: function (anObject){
|
4412
|
+
fn: function (anObject) {
|
4381
4413
|
var self=this;
|
4382
4414
|
return smalltalk.send(smalltalk.send(self, "_values", []), "_includes_", [anObject]);
|
4383
4415
|
return self;},
|
@@ -4393,7 +4425,7 @@ unescape('_printString'),
|
|
4393
4425
|
smalltalk.method({
|
4394
4426
|
selector: unescape('printString'),
|
4395
4427
|
category: 'printing',
|
4396
|
-
fn: function (){
|
4428
|
+
fn: function () {
|
4397
4429
|
var self=this;
|
4398
4430
|
return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(aStream){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_printString", [], smalltalk.Collection)]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%28")]);})(aStream);smalltalk.send(smalltalk.send(self, "_associations", []), "_do_separatedBy_", [(function(anAssociation){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(anAssociation, "_key", []), "_printString", [])]);smalltalk.send($rec, "_nextPutAll_", [unescape("%20-%3E%20")]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(anAssociation, "_value", []), "_printString", [])]);})(aStream);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [unescape("%20%2C%20")]);})]);return smalltalk.send(aStream, "_nextPutAll_", [unescape("%29")]);})]);
|
4399
4431
|
return self;},
|
@@ -4409,7 +4441,7 @@ unescape('_storeOn_'),
|
|
4409
4441
|
smalltalk.method({
|
4410
4442
|
selector: unescape('storeOn%3A'),
|
4411
4443
|
category: 'printing',
|
4412
|
-
fn: function (aStream){
|
4444
|
+
fn: function (aStream) {
|
4413
4445
|
var self=this;
|
4414
4446
|
smalltalk.send(aStream, "_nextPutAll_", [unescape("%23%7B")]);
|
4415
4447
|
smalltalk.send(smalltalk.send(self, "_associations", []), "_do_separatedBy_", [(function(each){return smalltalk.send(each, "_storeOn_", [aStream]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [". "]);})]);
|
@@ -4427,7 +4459,7 @@ unescape('_includesKey_'),
|
|
4427
4459
|
smalltalk.method({
|
4428
4460
|
selector: unescape('includesKey%3A'),
|
4429
4461
|
category: 'testing',
|
4430
|
-
fn: function (aKey){
|
4462
|
+
fn: function (aKey) {
|
4431
4463
|
var self=this;
|
4432
4464
|
return self.hasOwnProperty(aKey);
|
4433
4465
|
return self;},
|
@@ -4443,7 +4475,7 @@ unescape('_asDictionary'),
|
|
4443
4475
|
smalltalk.method({
|
4444
4476
|
selector: unescape('asDictionary'),
|
4445
4477
|
category: 'converting',
|
4446
|
-
fn: function (){
|
4478
|
+
fn: function () {
|
4447
4479
|
var self=this;
|
4448
4480
|
return smalltalk.send((smalltalk.Dictionary || Dictionary), "_fromPairs_", [smalltalk.send(self, "_associations", [])]);
|
4449
4481
|
return self;},
|
@@ -4454,13 +4486,32 @@ referencedClasses: ["Dictionary"]
|
|
4454
4486
|
}),
|
4455
4487
|
smalltalk.HashedCollection);
|
4456
4488
|
|
4489
|
+
smalltalk.addMethod(
|
4490
|
+
unescape('_asJSON'),
|
4491
|
+
smalltalk.method({
|
4492
|
+
selector: unescape('asJSON'),
|
4493
|
+
category: 'converting',
|
4494
|
+
fn: function (){
|
4495
|
+
var self=this;
|
4496
|
+
var c=nil;
|
4497
|
+
(c=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
|
4498
|
+
smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return smalltalk.send(c, "_at_put_", [key, smalltalk.send(value, "_asJSON", [])]);})]);
|
4499
|
+
return c;
|
4500
|
+
return self;},
|
4501
|
+
args: [],
|
4502
|
+
source: unescape('asJSON%0A%09%7C%20c%20%7C%0A%09c%20%3A%3D%20self%20class%20new.%0A%09self%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%09c%20at%3A%20key%20put%3A%20value%20asJSON%5D.%0A%09%5Ec'),
|
4503
|
+
messageSends: ["new", "class", "keysAndValuesDo:", "at:put:", "asJSON"],
|
4504
|
+
referencedClasses: []
|
4505
|
+
}),
|
4506
|
+
smalltalk.HashedCollection);
|
4507
|
+
|
4457
4508
|
|
4458
4509
|
smalltalk.addMethod(
|
4459
4510
|
unescape('_fromPairs_'),
|
4460
4511
|
smalltalk.method({
|
4461
4512
|
selector: unescape('fromPairs%3A'),
|
4462
4513
|
category: 'instance creation',
|
4463
|
-
fn: function (aCollection){
|
4514
|
+
fn: function (aCollection) {
|
4464
4515
|
var self=this;
|
4465
4516
|
var dict=nil;
|
4466
4517
|
(dict=smalltalk.send(self, "_new", []));
|
@@ -4481,7 +4532,7 @@ unescape('_at_ifAbsent_'),
|
|
4481
4532
|
smalltalk.method({
|
4482
4533
|
selector: unescape('at%3AifAbsent%3A'),
|
4483
4534
|
category: 'accessing',
|
4484
|
-
fn: function (aKey, aBlock){
|
4535
|
+
fn: function (aKey, aBlock) {
|
4485
4536
|
var self=this;
|
4486
4537
|
|
4487
4538
|
var index;
|
@@ -4507,7 +4558,7 @@ unescape('_keys'),
|
|
4507
4558
|
smalltalk.method({
|
4508
4559
|
selector: unescape('keys'),
|
4509
4560
|
category: 'accessing',
|
4510
|
-
fn: function (){
|
4561
|
+
fn: function () {
|
4511
4562
|
var self=this;
|
4512
4563
|
return smalltalk.send(self['@keys'], "_copy", []);
|
4513
4564
|
return self;},
|
@@ -4523,7 +4574,7 @@ unescape('_values'),
|
|
4523
4574
|
smalltalk.method({
|
4524
4575
|
selector: unescape('values'),
|
4525
4576
|
category: 'accessing',
|
4526
|
-
fn: function (){
|
4577
|
+
fn: function () {
|
4527
4578
|
var self=this;
|
4528
4579
|
return smalltalk.send(self['@values'], "_copy", []);
|
4529
4580
|
return self;},
|
@@ -4539,7 +4590,7 @@ unescape('_at_put_'),
|
|
4539
4590
|
smalltalk.method({
|
4540
4591
|
selector: unescape('at%3Aput%3A'),
|
4541
4592
|
category: 'accessing',
|
4542
|
-
fn: function (aKey, aValue){
|
4593
|
+
fn: function (aKey, aValue) {
|
4543
4594
|
var self=this;
|
4544
4595
|
|
4545
4596
|
var index = self['@keys'].indexOf(aKey);
|
@@ -4565,7 +4616,7 @@ unescape('_removeKey_ifAbsent_'),
|
|
4565
4616
|
smalltalk.method({
|
4566
4617
|
selector: unescape('removeKey%3AifAbsent%3A'),
|
4567
4618
|
category: 'adding/removing',
|
4568
|
-
fn: function (aKey, aBlock){
|
4619
|
+
fn: function (aKey, aBlock) {
|
4569
4620
|
var self=this;
|
4570
4621
|
|
4571
4622
|
var index = self['@keys'].indexOf(aKey);
|
@@ -4590,7 +4641,7 @@ unescape('_initialize'),
|
|
4590
4641
|
smalltalk.method({
|
4591
4642
|
selector: unescape('initialize'),
|
4592
4643
|
category: 'initialization',
|
4593
|
-
fn: function (){
|
4644
|
+
fn: function () {
|
4594
4645
|
var self=this;
|
4595
4646
|
smalltalk.send(self, "_initialize", [], smalltalk.HashedCollection);
|
4596
4647
|
(self['@keys']=[]);
|
@@ -4608,7 +4659,7 @@ unescape('_includesKey_'),
|
|
4608
4659
|
smalltalk.method({
|
4609
4660
|
selector: unescape('includesKey%3A'),
|
4610
4661
|
category: 'testing',
|
4611
|
-
fn: function (aKey){
|
4662
|
+
fn: function (aKey) {
|
4612
4663
|
var self=this;
|
4613
4664
|
return smalltalk.send(self['@keys'], "_includes_", [aKey]);
|
4614
4665
|
return self;},
|
@@ -4624,7 +4675,7 @@ unescape('_asHashedCollection'),
|
|
4624
4675
|
smalltalk.method({
|
4625
4676
|
selector: unescape('asHashedCollection'),
|
4626
4677
|
category: 'converting',
|
4627
|
-
fn: function (){
|
4678
|
+
fn: function () {
|
4628
4679
|
var self=this;
|
4629
4680
|
return smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_fromPairs_", [smalltalk.send(self, "_associations", [])]);
|
4630
4681
|
return self;},
|
@@ -4636,17 +4687,17 @@ referencedClasses: ["HashedCollection"]
|
|
4636
4687
|
smalltalk.Dictionary);
|
4637
4688
|
|
4638
4689
|
smalltalk.addMethod(
|
4639
|
-
unescape('
|
4690
|
+
unescape('_asJSON'),
|
4640
4691
|
smalltalk.method({
|
4641
|
-
selector: unescape('
|
4692
|
+
selector: unescape('asJSON'),
|
4642
4693
|
category: 'converting',
|
4643
4694
|
fn: function (){
|
4644
4695
|
var self=this;
|
4645
|
-
return smalltalk.send(smalltalk.send(self, "_asHashedCollection", []), "
|
4696
|
+
return smalltalk.send(smalltalk.send(self, "_asHashedCollection", []), "_asJSON", []);
|
4646
4697
|
return self;},
|
4647
4698
|
args: [],
|
4648
|
-
source: unescape('
|
4649
|
-
messageSends: ["
|
4699
|
+
source: unescape('asJSON%0A%09%5Eself%20asHashedCollection%20asJSON'),
|
4700
|
+
messageSends: ["asJSON", "asHashedCollection"],
|
4650
4701
|
referencedClasses: []
|
4651
4702
|
}),
|
4652
4703
|
smalltalk.Dictionary);
|