resin 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +2 -0
- data/amber/bin/nodecompile.js +3 -3
- data/amber/css/amber.css +47 -23
- data/amber/images/off.amber.png +0 -0
- data/amber/images/offHover.amber.png +0 -0
- data/amber/images/sprite.amber.png +0 -0
- data/amber/images/tinylogo.amber.png +0 -0
- data/amber/js/Benchfib.deploy.js +34 -34
- data/amber/js/Benchfib.js +49 -49
- data/amber/js/Canvas.deploy.js +937 -937
- data/amber/js/Canvas.js +1622 -1622
- data/amber/js/Compiler-Tests.deploy.js +97 -0
- data/amber/js/Compiler-Tests.js +137 -0
- data/amber/js/Compiler.deploy.js +1030 -924
- data/amber/js/Compiler.js +1613 -1467
- data/amber/js/Documentation.deploy.js +417 -417
- data/amber/js/Documentation.js +728 -728
- data/amber/js/Examples.deploy.js +24 -13
- data/amber/js/Examples.js +36 -19
- data/amber/js/IDE.deploy.js +1583 -1527
- data/amber/js/IDE.js +2586 -2510
- data/amber/js/Kernel-Announcements.deploy.js +19 -19
- data/amber/js/Kernel-Announcements.js +28 -28
- data/amber/js/Kernel-Classes.deploy.js +332 -229
- data/amber/js/Kernel-Classes.js +532 -384
- data/amber/js/Kernel-Collections.deploy.js +1516 -1712
- data/amber/js/Kernel-Collections.js +2436 -2712
- data/amber/js/Kernel-Exceptions.deploy.js +85 -62
- data/amber/js/Kernel-Exceptions.js +131 -98
- data/amber/js/Kernel-Methods.deploy.js +326 -378
- data/amber/js/Kernel-Methods.js +473 -525
- data/amber/js/Kernel-Objects.deploy.js +1777 -2428
- data/amber/js/Kernel-Objects.js +2599 -3426
- data/amber/js/Kernel-Tests.deploy.js +871 -772
- data/amber/js/Kernel-Tests.js +1207 -1083
- data/amber/js/Kernel-Transcript.deploy.js +57 -57
- data/amber/js/Kernel-Transcript.js +94 -94
- data/amber/js/SUnit.deploy.js +116 -116
- data/amber/js/SUnit.js +211 -211
- data/amber/js/amber.js +10 -11
- data/amber/js/boot.js +132 -156
- data/amber/js/init.js +2 -2
- data/amber/js/parser.js +2095 -3014
- data/amber/js/parser.pegjs +1 -1
- data/amber/st/Benchfib.st +22 -22
- data/amber/st/Canvas.st +471 -471
- data/amber/st/Compiler-Tests.st +471 -0
- data/amber/st/Compiler.st +858 -794
- data/amber/st/Examples.st +22 -5
- data/amber/st/IDE.st +1326 -1291
- data/amber/st/Kernel-Announcements.st +2 -2
- data/amber/st/Kernel-Classes.st +148 -90
- data/amber/st/Kernel-Collections.st +950 -1061
- data/amber/st/Kernel-Exceptions.st +33 -25
- data/amber/st/Kernel-Methods.st +151 -151
- data/amber/st/Kernel-Objects.st +891 -1036
- data/amber/st/Kernel-Tests.st +622 -544
- data/amber/st/Kernel-Transcript.st +38 -38
- data/amber/st/SUnit.st +53 -53
- metadata +27 -20
@@ -1,573 +1,521 @@
|
|
1
1
|
smalltalk.addPackage('Kernel-Methods', {});
|
2
|
-
smalltalk.addClass('
|
2
|
+
smalltalk.addClass('BlockClosure', smalltalk.Object, [], 'Kernel-Methods');
|
3
3
|
smalltalk.addMethod(
|
4
|
-
|
4
|
+
"_applyTo_arguments_",
|
5
5
|
smalltalk.method({
|
6
|
-
selector:
|
7
|
-
fn: function ()
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
}
|
6
|
+
selector: "applyTo:arguments:",
|
7
|
+
fn: function (anObject, aCollection){
|
8
|
+
var self=this;
|
9
|
+
return self.apply(anObject, aCollection);
|
10
|
+
return self;}
|
12
11
|
}),
|
13
|
-
smalltalk.
|
12
|
+
smalltalk.BlockClosure);
|
14
13
|
|
15
14
|
smalltalk.addMethod(
|
16
|
-
|
15
|
+
"_compiledSource",
|
17
16
|
smalltalk.method({
|
18
|
-
selector:
|
19
|
-
fn: function (
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
}
|
17
|
+
selector: "compiledSource",
|
18
|
+
fn: function (){
|
19
|
+
var self=this;
|
20
|
+
return self.toString();
|
21
|
+
return self;}
|
24
22
|
}),
|
25
|
-
smalltalk.
|
23
|
+
smalltalk.BlockClosure);
|
26
24
|
|
27
25
|
smalltalk.addMethod(
|
28
|
-
|
26
|
+
"_ensure_",
|
29
27
|
smalltalk.method({
|
30
|
-
selector:
|
31
|
-
fn: function (
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
}
|
28
|
+
selector: "ensure:",
|
29
|
+
fn: function (aBlock){
|
30
|
+
var self=this;
|
31
|
+
var success=nil;
|
32
|
+
(success=false);
|
33
|
+
return smalltalk.send((function(){smalltalk.send(self, "_value", []);(success=true);return smalltalk.send(aBlock, "_value", []);}), "_on_do_", [(smalltalk.Error || Error), (function(ex){((($receiver = success).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(aBlock, "_value", []);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(aBlock, "_value", []);})]));return smalltalk.send(ex, "_signal", []);})]);
|
34
|
+
return self;}
|
36
35
|
}),
|
37
|
-
smalltalk.
|
36
|
+
smalltalk.BlockClosure);
|
38
37
|
|
39
38
|
smalltalk.addMethod(
|
40
|
-
|
39
|
+
"_new",
|
41
40
|
smalltalk.method({
|
42
|
-
selector:
|
43
|
-
fn: function ()
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
}
|
41
|
+
selector: "new",
|
42
|
+
fn: function (){
|
43
|
+
var self=this;
|
44
|
+
return new self();
|
45
|
+
return self;}
|
48
46
|
}),
|
49
|
-
smalltalk.
|
47
|
+
smalltalk.BlockClosure);
|
50
48
|
|
51
49
|
smalltalk.addMethod(
|
52
|
-
|
50
|
+
"_newValue_",
|
53
51
|
smalltalk.method({
|
54
|
-
selector:
|
55
|
-
fn: function ()
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
}
|
52
|
+
selector: "newValue:",
|
53
|
+
fn: function (anObject){
|
54
|
+
var self=this;
|
55
|
+
return new self(anObject);
|
56
|
+
return self;}
|
60
57
|
}),
|
61
|
-
smalltalk.
|
58
|
+
smalltalk.BlockClosure);
|
62
59
|
|
63
60
|
smalltalk.addMethod(
|
64
|
-
|
61
|
+
"_newValue_value_",
|
65
62
|
smalltalk.method({
|
66
|
-
selector:
|
67
|
-
fn: function (anObject)
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
}
|
63
|
+
selector: "newValue:value:",
|
64
|
+
fn: function (anObject, anObject2){
|
65
|
+
var self=this;
|
66
|
+
return new self(anObject, anObject2);
|
67
|
+
return self;}
|
72
68
|
}),
|
73
|
-
smalltalk.
|
74
|
-
|
69
|
+
smalltalk.BlockClosure);
|
75
70
|
|
76
71
|
smalltalk.addMethod(
|
77
|
-
|
72
|
+
"_newValue_value_value_",
|
78
73
|
smalltalk.method({
|
79
|
-
selector:
|
80
|
-
fn: function (
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
}
|
74
|
+
selector: "newValue:value:value:",
|
75
|
+
fn: function (anObject, anObject2, anObject3){
|
76
|
+
var self=this;
|
77
|
+
return new self(anObject, anObject2);
|
78
|
+
return self;}
|
85
79
|
}),
|
86
|
-
smalltalk.
|
87
|
-
|
80
|
+
smalltalk.BlockClosure);
|
88
81
|
|
89
|
-
smalltalk.addClass('MethodContext', smalltalk.Object, [], 'Kernel-Methods');
|
90
82
|
smalltalk.addMethod(
|
91
|
-
|
83
|
+
"_numArgs",
|
92
84
|
smalltalk.method({
|
93
|
-
selector:
|
94
|
-
fn: function ()
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
}
|
85
|
+
selector: "numArgs",
|
86
|
+
fn: function (){
|
87
|
+
var self=this;
|
88
|
+
return self.length;
|
89
|
+
return self;}
|
99
90
|
}),
|
100
|
-
smalltalk.
|
91
|
+
smalltalk.BlockClosure);
|
101
92
|
|
102
93
|
smalltalk.addMethod(
|
103
|
-
|
94
|
+
"_on_do_",
|
104
95
|
smalltalk.method({
|
105
|
-
selector:
|
106
|
-
fn: function ()
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
}
|
96
|
+
selector: "on:do:",
|
97
|
+
fn: function (anErrorClass, aBlock){
|
98
|
+
var self=this;
|
99
|
+
return smalltalk.send(self, "_try_catch_", [self, (function(error){return ((($receiver = smalltalk.send(error, "_isKindOf_", [anErrorClass])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(aBlock, "_value_", [error]);})() : (function(){return smalltalk.send(error, "_signal", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(aBlock, "_value_", [error]);}), (function(){return smalltalk.send(error, "_signal", []);})]));})]);
|
100
|
+
return self;}
|
111
101
|
}),
|
112
|
-
smalltalk.
|
102
|
+
smalltalk.BlockClosure);
|
113
103
|
|
114
104
|
smalltalk.addMethod(
|
115
|
-
|
105
|
+
"_timeToRun",
|
116
106
|
smalltalk.method({
|
117
|
-
selector:
|
118
|
-
fn: function ()
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
}
|
107
|
+
selector: "timeToRun",
|
108
|
+
fn: function (){
|
109
|
+
var self=this;
|
110
|
+
return smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [self]);
|
111
|
+
return self;}
|
123
112
|
}),
|
124
|
-
smalltalk.
|
113
|
+
smalltalk.BlockClosure);
|
125
114
|
|
126
115
|
smalltalk.addMethod(
|
127
|
-
|
116
|
+
"_value",
|
128
117
|
smalltalk.method({
|
129
|
-
selector:
|
130
|
-
fn: function ()
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
}
|
118
|
+
selector: "value",
|
119
|
+
fn: function (){
|
120
|
+
var self=this;
|
121
|
+
return self();;
|
122
|
+
return self;}
|
135
123
|
}),
|
136
|
-
smalltalk.
|
124
|
+
smalltalk.BlockClosure);
|
137
125
|
|
138
126
|
smalltalk.addMethod(
|
139
|
-
|
127
|
+
"_value_",
|
140
128
|
smalltalk.method({
|
141
|
-
selector:
|
142
|
-
fn: function ()
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
}
|
129
|
+
selector: "value:",
|
130
|
+
fn: function (anArg){
|
131
|
+
var self=this;
|
132
|
+
return self(anArg);;
|
133
|
+
return self;}
|
147
134
|
}),
|
148
|
-
smalltalk.
|
135
|
+
smalltalk.BlockClosure);
|
149
136
|
|
150
137
|
smalltalk.addMethod(
|
151
|
-
|
138
|
+
"_value_value_",
|
152
139
|
smalltalk.method({
|
153
|
-
selector:
|
154
|
-
fn: function ()
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
}
|
140
|
+
selector: "value:value:",
|
141
|
+
fn: function (firstArg, secondArg){
|
142
|
+
var self=this;
|
143
|
+
return self(firstArg, secondArg);;
|
144
|
+
return self;}
|
159
145
|
}),
|
160
|
-
smalltalk.
|
161
|
-
|
162
|
-
|
146
|
+
smalltalk.BlockClosure);
|
163
147
|
|
164
|
-
smalltalk.addClass('BlockClosure', smalltalk.Object, [], 'Kernel-Methods');
|
165
148
|
smalltalk.addMethod(
|
166
|
-
|
149
|
+
"_value_value_value_",
|
167
150
|
smalltalk.method({
|
168
|
-
selector:
|
169
|
-
fn: function ()
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
}
|
151
|
+
selector: "value:value:value:",
|
152
|
+
fn: function (firstArg, secondArg, thirdArg){
|
153
|
+
var self=this;
|
154
|
+
return self(firstArg, secondArg, thirdArg);;
|
155
|
+
return self;}
|
174
156
|
}),
|
175
157
|
smalltalk.BlockClosure);
|
176
158
|
|
177
159
|
smalltalk.addMethod(
|
178
|
-
|
160
|
+
"_valueWithInterval_",
|
179
161
|
smalltalk.method({
|
180
|
-
selector:
|
181
|
-
fn: function (
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
}
|
186
|
-
return self;
|
187
|
-
}
|
162
|
+
selector: "valueWithInterval:",
|
163
|
+
fn: function (aNumber){
|
164
|
+
var self=this;
|
165
|
+
return setInterval(self, aNumber);
|
166
|
+
return self;}
|
188
167
|
}),
|
189
168
|
smalltalk.BlockClosure);
|
190
169
|
|
191
170
|
smalltalk.addMethod(
|
192
|
-
|
171
|
+
"_valueWithPossibleArguments_",
|
193
172
|
smalltalk.method({
|
194
|
-
selector:
|
195
|
-
fn: function (
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
}
|
200
|
-
return self;
|
201
|
-
}
|
173
|
+
selector: "valueWithPossibleArguments:",
|
174
|
+
fn: function (aCollection){
|
175
|
+
var self=this;
|
176
|
+
return self.apply(null, aCollection);;
|
177
|
+
return self;}
|
202
178
|
}),
|
203
179
|
smalltalk.BlockClosure);
|
204
180
|
|
205
181
|
smalltalk.addMethod(
|
206
|
-
|
182
|
+
"_valueWithTimeout_",
|
207
183
|
smalltalk.method({
|
208
|
-
selector:
|
209
|
-
fn: function ()
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
}
|
184
|
+
selector: "valueWithTimeout:",
|
185
|
+
fn: function (aNumber){
|
186
|
+
var self=this;
|
187
|
+
return setTimeout(self, aNumber);
|
188
|
+
return self;}
|
214
189
|
}),
|
215
190
|
smalltalk.BlockClosure);
|
216
191
|
|
217
192
|
smalltalk.addMethod(
|
218
|
-
|
193
|
+
"_whileFalse",
|
219
194
|
smalltalk.method({
|
220
|
-
selector:
|
221
|
-
fn: function (
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
}
|
195
|
+
selector: "whileFalse",
|
196
|
+
fn: function (){
|
197
|
+
var self=this;
|
198
|
+
smalltalk.send(self, "_whileFalse_", [(function(){return nil;})]);
|
199
|
+
return self;}
|
226
200
|
}),
|
227
201
|
smalltalk.BlockClosure);
|
228
202
|
|
229
203
|
smalltalk.addMethod(
|
230
|
-
|
204
|
+
"_whileFalse_",
|
231
205
|
smalltalk.method({
|
232
|
-
selector:
|
233
|
-
fn: function (
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
}
|
206
|
+
selector: "whileFalse:",
|
207
|
+
fn: function (aBlock){
|
208
|
+
var self=this;
|
209
|
+
while(!self()) {aBlock()};
|
210
|
+
return self;}
|
238
211
|
}),
|
239
212
|
smalltalk.BlockClosure);
|
240
213
|
|
241
214
|
smalltalk.addMethod(
|
242
|
-
|
215
|
+
"_whileTrue",
|
243
216
|
smalltalk.method({
|
244
|
-
selector:
|
245
|
-
fn: function (
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
}
|
217
|
+
selector: "whileTrue",
|
218
|
+
fn: function (){
|
219
|
+
var self=this;
|
220
|
+
smalltalk.send(self, "_whileTrue_", [(function(){return nil;})]);
|
221
|
+
return self;}
|
250
222
|
}),
|
251
223
|
smalltalk.BlockClosure);
|
252
224
|
|
253
225
|
smalltalk.addMethod(
|
254
|
-
|
226
|
+
"_whileTrue_",
|
255
227
|
smalltalk.method({
|
256
|
-
selector:
|
257
|
-
fn: function (
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
}
|
228
|
+
selector: "whileTrue:",
|
229
|
+
fn: function (aBlock){
|
230
|
+
var self=this;
|
231
|
+
while(self()) {aBlock()};
|
232
|
+
return self;}
|
262
233
|
}),
|
263
234
|
smalltalk.BlockClosure);
|
264
235
|
|
236
|
+
|
237
|
+
|
238
|
+
smalltalk.addClass('CompiledMethod', smalltalk.Object, [], 'Kernel-Methods');
|
265
239
|
smalltalk.addMethod(
|
266
|
-
|
240
|
+
"_arguments",
|
267
241
|
smalltalk.method({
|
268
|
-
selector:
|
269
|
-
fn: function (
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
}
|
242
|
+
selector: "arguments",
|
243
|
+
fn: function (){
|
244
|
+
var self=this;
|
245
|
+
return self.args || [];
|
246
|
+
return self;}
|
274
247
|
}),
|
275
|
-
smalltalk.
|
248
|
+
smalltalk.CompiledMethod);
|
276
249
|
|
277
250
|
smalltalk.addMethod(
|
278
|
-
|
251
|
+
"_category",
|
279
252
|
smalltalk.method({
|
280
|
-
selector:
|
281
|
-
fn: function (
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
}
|
253
|
+
selector: "category",
|
254
|
+
fn: function (){
|
255
|
+
var self=this;
|
256
|
+
return (($receiver = smalltalk.send(self, "_basicAt_", ["category"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
|
257
|
+
return self;}
|
286
258
|
}),
|
287
|
-
smalltalk.
|
259
|
+
smalltalk.CompiledMethod);
|
288
260
|
|
289
261
|
smalltalk.addMethod(
|
290
|
-
|
262
|
+
"_category_",
|
291
263
|
smalltalk.method({
|
292
|
-
selector:
|
293
|
-
fn: function (
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
}
|
264
|
+
selector: "category:",
|
265
|
+
fn: function (aString){
|
266
|
+
var self=this;
|
267
|
+
smalltalk.send(self, "_basicAt_put_", ["category", aString]);
|
268
|
+
return self;}
|
298
269
|
}),
|
299
|
-
smalltalk.
|
270
|
+
smalltalk.CompiledMethod);
|
300
271
|
|
301
272
|
smalltalk.addMethod(
|
302
|
-
|
273
|
+
"_fn",
|
303
274
|
smalltalk.method({
|
304
|
-
selector:
|
305
|
-
fn: function ()
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
}
|
275
|
+
selector: "fn",
|
276
|
+
fn: function (){
|
277
|
+
var self=this;
|
278
|
+
return smalltalk.send(self, "_basicAt_", ["fn"]);
|
279
|
+
return self;}
|
310
280
|
}),
|
311
|
-
smalltalk.
|
281
|
+
smalltalk.CompiledMethod);
|
312
282
|
|
313
283
|
smalltalk.addMethod(
|
314
|
-
|
284
|
+
"_fn_",
|
315
285
|
smalltalk.method({
|
316
|
-
selector:
|
317
|
-
fn: function ()
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
}
|
286
|
+
selector: "fn:",
|
287
|
+
fn: function (aBlock){
|
288
|
+
var self=this;
|
289
|
+
smalltalk.send(self, "_basicAt_put_", ["fn", aBlock]);
|
290
|
+
return self;}
|
322
291
|
}),
|
323
|
-
smalltalk.
|
292
|
+
smalltalk.CompiledMethod);
|
324
293
|
|
325
294
|
smalltalk.addMethod(
|
326
|
-
|
295
|
+
"_messageSends",
|
327
296
|
smalltalk.method({
|
328
|
-
selector:
|
329
|
-
fn: function ()
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
}
|
297
|
+
selector: "messageSends",
|
298
|
+
fn: function (){
|
299
|
+
var self=this;
|
300
|
+
return smalltalk.send(self, "_basicAt_", ["messageSends"]);
|
301
|
+
return self;}
|
334
302
|
}),
|
335
|
-
smalltalk.
|
303
|
+
smalltalk.CompiledMethod);
|
336
304
|
|
337
305
|
smalltalk.addMethod(
|
338
|
-
|
306
|
+
"_methodClass",
|
339
307
|
smalltalk.method({
|
340
|
-
selector:
|
341
|
-
fn: function (
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
}
|
308
|
+
selector: "methodClass",
|
309
|
+
fn: function (){
|
310
|
+
var self=this;
|
311
|
+
return smalltalk.send(self, "_basicAt_", ["methodClass"]);
|
312
|
+
return self;}
|
346
313
|
}),
|
347
|
-
smalltalk.
|
314
|
+
smalltalk.CompiledMethod);
|
348
315
|
|
349
316
|
smalltalk.addMethod(
|
350
|
-
|
317
|
+
"_referencedClasses",
|
351
318
|
smalltalk.method({
|
352
|
-
selector:
|
353
|
-
fn: function ()
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
}
|
319
|
+
selector: "referencedClasses",
|
320
|
+
fn: function (){
|
321
|
+
var self=this;
|
322
|
+
return smalltalk.send(self, "_basicAt_", ["referencedClasses"]);
|
323
|
+
return self;}
|
358
324
|
}),
|
359
|
-
smalltalk.
|
325
|
+
smalltalk.CompiledMethod);
|
360
326
|
|
361
327
|
smalltalk.addMethod(
|
362
|
-
|
328
|
+
"_selector",
|
363
329
|
smalltalk.method({
|
364
|
-
selector:
|
365
|
-
fn: function ()
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
}
|
330
|
+
selector: "selector",
|
331
|
+
fn: function (){
|
332
|
+
var self=this;
|
333
|
+
return smalltalk.send(self, "_basicAt_", ["selector"]);
|
334
|
+
return self;}
|
370
335
|
}),
|
371
|
-
smalltalk.
|
336
|
+
smalltalk.CompiledMethod);
|
372
337
|
|
373
338
|
smalltalk.addMethod(
|
374
|
-
|
339
|
+
"_selector_",
|
375
340
|
smalltalk.method({
|
376
|
-
selector:
|
377
|
-
fn: function (
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
return smalltalk.send(function () {smalltalk.send(self, "_value", []);success = true;return smalltalk.send(aBlock, "_value", []);}, "_on_do_", [smalltalk.Error || Error, function (ex) {($receiver = success).klass === smalltalk.Boolean ? !$receiver ? function () {return smalltalk.send(aBlock, "_value", []);}() : nil : smalltalk.send($receiver, "_ifFalse_", [function () {return smalltalk.send(aBlock, "_value", []);}]);return smalltalk.send(ex, "_signal", []);}]);
|
382
|
-
return self;
|
383
|
-
}
|
341
|
+
selector: "selector:",
|
342
|
+
fn: function (aString){
|
343
|
+
var self=this;
|
344
|
+
smalltalk.send(self, "_basicAt_put_", ["selector", aString]);
|
345
|
+
return self;}
|
384
346
|
}),
|
385
|
-
smalltalk.
|
347
|
+
smalltalk.CompiledMethod);
|
386
348
|
|
387
349
|
smalltalk.addMethod(
|
388
|
-
|
350
|
+
"_source",
|
389
351
|
smalltalk.method({
|
390
|
-
selector:
|
391
|
-
fn: function (
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
}
|
352
|
+
selector: "source",
|
353
|
+
fn: function (){
|
354
|
+
var self=this;
|
355
|
+
return (($receiver = smalltalk.send(self, "_basicAt_", ["source"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
|
356
|
+
return self;}
|
396
357
|
}),
|
397
|
-
smalltalk.
|
358
|
+
smalltalk.CompiledMethod);
|
398
359
|
|
399
360
|
smalltalk.addMethod(
|
400
|
-
|
361
|
+
"_source_",
|
401
362
|
smalltalk.method({
|
402
|
-
selector:
|
403
|
-
fn: function (
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
}
|
363
|
+
selector: "source:",
|
364
|
+
fn: function (aString){
|
365
|
+
var self=this;
|
366
|
+
smalltalk.send(self, "_basicAt_put_", ["source", aString]);
|
367
|
+
return self;}
|
408
368
|
}),
|
409
|
-
smalltalk.
|
369
|
+
smalltalk.CompiledMethod);
|
370
|
+
|
371
|
+
|
410
372
|
|
373
|
+
smalltalk.addClass('Message', smalltalk.Object, ['selector', 'arguments'], 'Kernel-Methods');
|
411
374
|
smalltalk.addMethod(
|
412
|
-
|
375
|
+
"_arguments",
|
413
376
|
smalltalk.method({
|
414
|
-
selector:
|
415
|
-
fn: function (
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
}
|
377
|
+
selector: "arguments",
|
378
|
+
fn: function (){
|
379
|
+
var self=this;
|
380
|
+
return self['@arguments'];
|
381
|
+
return self;}
|
420
382
|
}),
|
421
|
-
smalltalk.
|
422
|
-
|
423
|
-
|
383
|
+
smalltalk.Message);
|
424
384
|
|
425
|
-
smalltalk.addClass('CompiledMethod', smalltalk.Object, [], 'Kernel-Methods');
|
426
385
|
smalltalk.addMethod(
|
427
|
-
|
386
|
+
"_arguments_",
|
428
387
|
smalltalk.method({
|
429
|
-
selector:
|
430
|
-
fn: function ()
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
return self;
|
435
|
-
}
|
388
|
+
selector: "arguments:",
|
389
|
+
fn: function (anArray){
|
390
|
+
var self=this;
|
391
|
+
(self['@arguments']=anArray);
|
392
|
+
return self;}
|
436
393
|
}),
|
437
|
-
smalltalk.
|
394
|
+
smalltalk.Message);
|
438
395
|
|
439
396
|
smalltalk.addMethod(
|
440
|
-
|
397
|
+
"_printString",
|
441
398
|
smalltalk.method({
|
442
|
-
selector:
|
443
|
-
fn: function (
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
}
|
399
|
+
selector: "printString",
|
400
|
+
fn: function (){
|
401
|
+
var self=this;
|
402
|
+
return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(aStream){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_printString", [], smalltalk.Message.superclass || nil)]);smalltalk.send($rec, "_nextPutAll_", ["("]);smalltalk.send($rec, "_nextPutAll_", [self['@selector']]);return smalltalk.send($rec, "_nextPutAll_", [")"]);})(aStream);})]);
|
403
|
+
return self;}
|
448
404
|
}),
|
449
|
-
smalltalk.
|
405
|
+
smalltalk.Message);
|
450
406
|
|
451
407
|
smalltalk.addMethod(
|
452
|
-
|
408
|
+
"_selector",
|
453
409
|
smalltalk.method({
|
454
|
-
selector:
|
455
|
-
fn: function ()
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
return self;
|
460
|
-
}
|
410
|
+
selector: "selector",
|
411
|
+
fn: function (){
|
412
|
+
var self=this;
|
413
|
+
return self['@selector'];
|
414
|
+
return self;}
|
461
415
|
}),
|
462
|
-
smalltalk.
|
416
|
+
smalltalk.Message);
|
463
417
|
|
464
418
|
smalltalk.addMethod(
|
465
|
-
|
419
|
+
"_selector_",
|
466
420
|
smalltalk.method({
|
467
|
-
selector:
|
468
|
-
fn: function (aString)
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
}
|
421
|
+
selector: "selector:",
|
422
|
+
fn: function (aString){
|
423
|
+
var self=this;
|
424
|
+
(self['@selector']=aString);
|
425
|
+
return self;}
|
473
426
|
}),
|
474
|
-
smalltalk.
|
427
|
+
smalltalk.Message);
|
475
428
|
|
476
429
|
smalltalk.addMethod(
|
477
|
-
|
430
|
+
"_sendTo_",
|
478
431
|
smalltalk.method({
|
479
|
-
selector:
|
480
|
-
fn: function ()
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
}
|
432
|
+
selector: "sendTo:",
|
433
|
+
fn: function (anObject){
|
434
|
+
var self=this;
|
435
|
+
smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_send_to_arguments_", [smalltalk.send(self, "_selector", []), anObject, smalltalk.send(self, "_arguments", [])]);
|
436
|
+
return self;}
|
485
437
|
}),
|
486
|
-
smalltalk.
|
438
|
+
smalltalk.Message);
|
439
|
+
|
487
440
|
|
488
441
|
smalltalk.addMethod(
|
489
|
-
|
442
|
+
"_selector_arguments_",
|
490
443
|
smalltalk.method({
|
491
|
-
selector:
|
492
|
-
fn: function (aString)
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
}
|
444
|
+
selector: "selector:arguments:",
|
445
|
+
fn: function (aString, anArray){
|
446
|
+
var self=this;
|
447
|
+
return (function($rec){smalltalk.send($rec, "_selector_", [aString]);smalltalk.send($rec, "_arguments_", [anArray]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
|
448
|
+
return self;}
|
497
449
|
}),
|
498
|
-
smalltalk.
|
450
|
+
smalltalk.Message.klass);
|
451
|
+
|
499
452
|
|
453
|
+
smalltalk.addClass('MethodContext', smalltalk.Object, [], 'Kernel-Methods');
|
500
454
|
smalltalk.addMethod(
|
501
|
-
|
455
|
+
"_asString",
|
502
456
|
smalltalk.method({
|
503
|
-
selector:
|
504
|
-
fn: function ()
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
}
|
457
|
+
selector: "asString",
|
458
|
+
fn: function (){
|
459
|
+
var self=this;
|
460
|
+
return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_receiver", []), "_class", []), "_printString", []), "__comma", [" >> "]), "__comma", [smalltalk.send(self, "_selector", [])]);
|
461
|
+
return self;}
|
509
462
|
}),
|
510
|
-
smalltalk.
|
463
|
+
smalltalk.MethodContext);
|
511
464
|
|
512
465
|
smalltalk.addMethod(
|
513
|
-
|
466
|
+
"_home",
|
514
467
|
smalltalk.method({
|
515
|
-
selector:
|
516
|
-
fn: function (
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
}
|
468
|
+
selector: "home",
|
469
|
+
fn: function (){
|
470
|
+
var self=this;
|
471
|
+
return self.homeContext;
|
472
|
+
return self;}
|
521
473
|
}),
|
522
|
-
smalltalk.
|
474
|
+
smalltalk.MethodContext);
|
523
475
|
|
524
476
|
smalltalk.addMethod(
|
525
|
-
|
477
|
+
"_printString",
|
526
478
|
smalltalk.method({
|
527
|
-
selector:
|
528
|
-
fn: function ()
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
}
|
479
|
+
selector: "printString",
|
480
|
+
fn: function (){
|
481
|
+
var self=this;
|
482
|
+
return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.MethodContext.superclass || nil), "__comma", ["("]), "__comma", [smalltalk.send(self, "_asString", [])]), "__comma", [")"]);
|
483
|
+
return self;}
|
533
484
|
}),
|
534
|
-
smalltalk.
|
485
|
+
smalltalk.MethodContext);
|
535
486
|
|
536
487
|
smalltalk.addMethod(
|
537
|
-
|
488
|
+
"_receiver",
|
538
489
|
smalltalk.method({
|
539
|
-
selector:
|
540
|
-
fn: function ()
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
}
|
490
|
+
selector: "receiver",
|
491
|
+
fn: function (){
|
492
|
+
var self=this;
|
493
|
+
return self.receiver;
|
494
|
+
return self;}
|
545
495
|
}),
|
546
|
-
smalltalk.
|
496
|
+
smalltalk.MethodContext);
|
547
497
|
|
548
498
|
smalltalk.addMethod(
|
549
|
-
|
499
|
+
"_selector",
|
550
500
|
smalltalk.method({
|
551
|
-
selector:
|
552
|
-
fn: function ()
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
}
|
501
|
+
selector: "selector",
|
502
|
+
fn: function (){
|
503
|
+
var self=this;
|
504
|
+
return smalltalk.convertSelector(self.selector);
|
505
|
+
return self;}
|
557
506
|
}),
|
558
|
-
smalltalk.
|
507
|
+
smalltalk.MethodContext);
|
559
508
|
|
560
509
|
smalltalk.addMethod(
|
561
|
-
|
510
|
+
"_temps",
|
562
511
|
smalltalk.method({
|
563
|
-
selector:
|
564
|
-
fn: function ()
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
}
|
512
|
+
selector: "temps",
|
513
|
+
fn: function (){
|
514
|
+
var self=this;
|
515
|
+
return self.temps;
|
516
|
+
return self;}
|
569
517
|
}),
|
570
|
-
smalltalk.
|
518
|
+
smalltalk.MethodContext);
|
571
519
|
|
572
520
|
|
573
521
|
|