resin 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/amber/images/amber.svg +706 -0
- data/amber/js/Canvas.deploy.js +1311 -400
- data/amber/js/Canvas.js +1750 -424
- data/amber/js/Compiler.deploy.js +615 -615
- data/amber/js/Compiler.js +1367 -1367
- data/amber/js/IDE.deploy.js +1381 -1345
- data/amber/js/IDE.js +1949 -1903
- data/amber/js/Kernel-Announcements.deploy.js +37 -37
- data/amber/js/Kernel-Announcements.js +52 -52
- data/amber/js/Kernel-Collections.deploy.js +961 -950
- data/amber/js/Kernel-Collections.js +2064 -2053
- data/amber/js/Kernel-Methods.deploy.js +323 -260
- data/amber/js/Kernel-Methods.js +395 -327
- data/amber/js/Kernel-Objects.deploy.js +1846 -1104
- data/amber/js/Kernel-Objects.js +2142 -1194
- data/amber/js/boot.js +44 -29
- data/amber/js/parser.js +234 -17
- data/amber/js/parser.pegjs +9 -6
- data/amber/st/Canvas.st +474 -146
- data/amber/st/Compiler.st +418 -417
- data/amber/st/IDE.st +803 -772
- data/amber/st/Kernel-Announcements.st +27 -27
- data/amber/st/Kernel-Collections.st +289 -268
- data/amber/st/Kernel-Methods.st +104 -100
- data/amber/st/Kernel-Objects.st +277 -80
- metadata +18 -17
@@ -4,10 +4,11 @@ smalltalk.addMethod(
|
|
4
4
|
unescape('__eq'),
|
5
5
|
smalltalk.method({
|
6
6
|
selector: unescape('%3D'),
|
7
|
-
fn: function (anObject){
|
8
|
-
var self=this;
|
9
|
-
return smalltalk.send(self, "__eq_eq", [anObject]);
|
10
|
-
return self;
|
7
|
+
fn: function (anObject) {
|
8
|
+
var self = this;
|
9
|
+
return smalltalk.send(self, "__eq_eq", [anObject]);
|
10
|
+
return self;
|
11
|
+
}
|
11
12
|
}),
|
12
13
|
smalltalk.Object);
|
13
14
|
|
@@ -15,10 +16,11 @@ smalltalk.addMethod(
|
|
15
16
|
unescape('_%7E_eq'),
|
16
17
|
smalltalk.method({
|
17
18
|
selector: unescape('%7E%3D'),
|
18
|
-
fn: function (anObject){
|
19
|
-
var self=this;
|
20
|
-
return smalltalk.send(smalltalk.send(self, "__eq", [anObject]), "__eq", [false]);
|
21
|
-
return self;
|
19
|
+
fn: function (anObject) {
|
20
|
+
var self = this;
|
21
|
+
return smalltalk.send(smalltalk.send(self, "__eq", [anObject]), "__eq", [false]);
|
22
|
+
return self;
|
23
|
+
}
|
22
24
|
}),
|
23
25
|
smalltalk.Object);
|
24
26
|
|
@@ -26,10 +28,10 @@ smalltalk.addMethod(
|
|
26
28
|
unescape('_initialize'),
|
27
29
|
smalltalk.method({
|
28
30
|
selector: unescape('initialize'),
|
29
|
-
fn: function (){
|
30
|
-
var self=this;
|
31
|
-
|
32
|
-
|
31
|
+
fn: function () {
|
32
|
+
var self = this;
|
33
|
+
return self;
|
34
|
+
}
|
33
35
|
}),
|
34
36
|
smalltalk.Object);
|
35
37
|
|
@@ -37,10 +39,11 @@ smalltalk.addMethod(
|
|
37
39
|
unescape('_yourself'),
|
38
40
|
smalltalk.method({
|
39
41
|
selector: unescape('yourself'),
|
40
|
-
fn: function (){
|
41
|
-
var self=this;
|
42
|
-
return self;
|
43
|
-
return self;
|
42
|
+
fn: function () {
|
43
|
+
var self = this;
|
44
|
+
return self;
|
45
|
+
return self;
|
46
|
+
}
|
44
47
|
}),
|
45
48
|
smalltalk.Object);
|
46
49
|
|
@@ -48,10 +51,11 @@ smalltalk.addMethod(
|
|
48
51
|
unescape('_class'),
|
49
52
|
smalltalk.method({
|
50
53
|
selector: unescape('class'),
|
51
|
-
fn: function (){
|
52
|
-
var self=this;
|
53
|
-
return self.klass;
|
54
|
-
return self;
|
54
|
+
fn: function () {
|
55
|
+
var self = this;
|
56
|
+
return self.klass;
|
57
|
+
return self;
|
58
|
+
}
|
55
59
|
}),
|
56
60
|
smalltalk.Object);
|
57
61
|
|
@@ -59,10 +63,11 @@ smalltalk.addMethod(
|
|
59
63
|
unescape('_size'),
|
60
64
|
smalltalk.method({
|
61
65
|
selector: unescape('size'),
|
62
|
-
fn: function (){
|
63
|
-
var self=this;
|
64
|
-
smalltalk.send(self, "_error_", ["Object not indexable"]);
|
65
|
-
return self;
|
66
|
+
fn: function () {
|
67
|
+
var self = this;
|
68
|
+
smalltalk.send(self, "_error_", ["Object not indexable"]);
|
69
|
+
return self;
|
70
|
+
}
|
66
71
|
}),
|
67
72
|
smalltalk.Object);
|
68
73
|
|
@@ -70,10 +75,11 @@ smalltalk.addMethod(
|
|
70
75
|
unescape('_copy'),
|
71
76
|
smalltalk.method({
|
72
77
|
selector: unescape('copy'),
|
73
|
-
fn: function (){
|
74
|
-
var self=this;
|
75
|
-
return smalltalk.send(smalltalk.send(self, "_shallowCopy", []), "_postCopy", []);
|
76
|
-
return self;
|
78
|
+
fn: function () {
|
79
|
+
var self = this;
|
80
|
+
return smalltalk.send(smalltalk.send(self, "_shallowCopy", []), "_postCopy", []);
|
81
|
+
return self;
|
82
|
+
}
|
77
83
|
}),
|
78
84
|
smalltalk.Object);
|
79
85
|
|
@@ -81,18 +87,17 @@ smalltalk.addMethod(
|
|
81
87
|
unescape('_shallowCopy'),
|
82
88
|
smalltalk.method({
|
83
89
|
selector: unescape('shallowCopy'),
|
84
|
-
fn: function (){
|
85
|
-
var self=this;
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
return self;}
|
90
|
+
fn: function () {
|
91
|
+
var self = this;
|
92
|
+
var copy = self.klass._new();
|
93
|
+
for (var i in self) {
|
94
|
+
if (/^@.+/.test(i)) {
|
95
|
+
copy[i] = self[i];
|
96
|
+
}
|
97
|
+
}
|
98
|
+
return copy;
|
99
|
+
return self;
|
100
|
+
}
|
96
101
|
}),
|
97
102
|
smalltalk.Object);
|
98
103
|
|
@@ -100,18 +105,17 @@ smalltalk.addMethod(
|
|
100
105
|
unescape('_deepCopy'),
|
101
106
|
smalltalk.method({
|
102
107
|
selector: unescape('deepCopy'),
|
103
|
-
fn: function (){
|
104
|
-
var self=this;
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
return self;}
|
108
|
+
fn: function () {
|
109
|
+
var self = this;
|
110
|
+
var copy = self.klass._new();
|
111
|
+
for (var i in self) {
|
112
|
+
if (/^@.+/.test(i)) {
|
113
|
+
copy[i] = self[i]._deepCopy();
|
114
|
+
}
|
115
|
+
}
|
116
|
+
return copy;
|
117
|
+
return self;
|
118
|
+
}
|
115
119
|
}),
|
116
120
|
smalltalk.Object);
|
117
121
|
|
@@ -119,10 +123,10 @@ smalltalk.addMethod(
|
|
119
123
|
unescape('_postCopy'),
|
120
124
|
smalltalk.method({
|
121
125
|
selector: unescape('postCopy'),
|
122
|
-
fn: function (){
|
123
|
-
var self=this;
|
124
|
-
|
125
|
-
|
126
|
+
fn: function () {
|
127
|
+
var self = this;
|
128
|
+
return self;
|
129
|
+
}
|
126
130
|
}),
|
127
131
|
smalltalk.Object);
|
128
132
|
|
@@ -130,10 +134,11 @@ smalltalk.addMethod(
|
|
130
134
|
unescape('__minus_gt'),
|
131
135
|
smalltalk.method({
|
132
136
|
selector: unescape('-%3E'),
|
133
|
-
fn: function (anObject){
|
134
|
-
var self=this;
|
135
|
-
return smalltalk.send(
|
136
|
-
return self;
|
137
|
+
fn: function (anObject) {
|
138
|
+
var self = this;
|
139
|
+
return smalltalk.send(smalltalk.Association || Association, "_key_value_", [self, anObject]);
|
140
|
+
return self;
|
141
|
+
}
|
137
142
|
}),
|
138
143
|
smalltalk.Object);
|
139
144
|
|
@@ -141,10 +146,11 @@ smalltalk.addMethod(
|
|
141
146
|
unescape('_asString'),
|
142
147
|
smalltalk.method({
|
143
148
|
selector: unescape('asString'),
|
144
|
-
fn: function (){
|
145
|
-
var self=this;
|
146
|
-
return smalltalk.send(self, "_printString", []);
|
147
|
-
return self;
|
149
|
+
fn: function () {
|
150
|
+
var self = this;
|
151
|
+
return smalltalk.send(self, "_printString", []);
|
152
|
+
return self;
|
153
|
+
}
|
148
154
|
}),
|
149
155
|
smalltalk.Object);
|
150
156
|
|
@@ -152,10 +158,11 @@ smalltalk.addMethod(
|
|
152
158
|
unescape('_asJavascript'),
|
153
159
|
smalltalk.method({
|
154
160
|
selector: unescape('asJavascript'),
|
155
|
-
fn: function (){
|
156
|
-
var self=this;
|
157
|
-
return smalltalk.send(self, "_asString", []);
|
158
|
-
return self;
|
161
|
+
fn: function () {
|
162
|
+
var self = this;
|
163
|
+
return smalltalk.send(self, "_asString", []);
|
164
|
+
return self;
|
165
|
+
}
|
159
166
|
}),
|
160
167
|
smalltalk.Object);
|
161
168
|
|
@@ -163,10 +170,11 @@ smalltalk.addMethod(
|
|
163
170
|
unescape('_perform_'),
|
164
171
|
smalltalk.method({
|
165
172
|
selector: unescape('perform%3A'),
|
166
|
-
fn: function (aSymbol){
|
167
|
-
var self=this;
|
168
|
-
return smalltalk.send(self, "_perform_withArguments_", [aSymbol, []]);
|
169
|
-
return self;
|
173
|
+
fn: function (aSymbol) {
|
174
|
+
var self = this;
|
175
|
+
return smalltalk.send(self, "_perform_withArguments_", [aSymbol, []]);
|
176
|
+
return self;
|
177
|
+
}
|
170
178
|
}),
|
171
179
|
smalltalk.Object);
|
172
180
|
|
@@ -174,10 +182,11 @@ smalltalk.addMethod(
|
|
174
182
|
unescape('_perform_withArguments_'),
|
175
183
|
smalltalk.method({
|
176
184
|
selector: unescape('perform%3AwithArguments%3A'),
|
177
|
-
fn: function (aSymbol, aCollection){
|
178
|
-
var self=this;
|
179
|
-
return smalltalk.send(self, "_basicPerform_withArguments_", [smalltalk.send(aSymbol, "_asSelector", []), aCollection]);
|
180
|
-
return self;
|
185
|
+
fn: function (aSymbol, aCollection) {
|
186
|
+
var self = this;
|
187
|
+
return smalltalk.send(self, "_basicPerform_withArguments_", [smalltalk.send(aSymbol, "_asSelector", []), aCollection]);
|
188
|
+
return self;
|
189
|
+
}
|
181
190
|
}),
|
182
191
|
smalltalk.Object);
|
183
192
|
|
@@ -185,12 +194,13 @@ smalltalk.addMethod(
|
|
185
194
|
unescape('_instVarAt_'),
|
186
195
|
smalltalk.method({
|
187
196
|
selector: unescape('instVarAt%3A'),
|
188
|
-
fn: function (aSymbol){
|
189
|
-
var self=this;
|
190
|
-
var varname=nil;
|
191
|
-
|
192
|
-
return self[
|
193
|
-
return self;
|
197
|
+
fn: function (aSymbol) {
|
198
|
+
var self = this;
|
199
|
+
var varname = nil;
|
200
|
+
varname = smalltalk.send(aSymbol, "_asString", []);
|
201
|
+
return self["@" + varname];
|
202
|
+
return self;
|
203
|
+
}
|
194
204
|
}),
|
195
205
|
smalltalk.Object);
|
196
206
|
|
@@ -198,12 +208,13 @@ smalltalk.addMethod(
|
|
198
208
|
unescape('_instVarAt_put_'),
|
199
209
|
smalltalk.method({
|
200
210
|
selector: unescape('instVarAt%3Aput%3A'),
|
201
|
-
fn: function (aSymbol, anObject){
|
202
|
-
var self=this;
|
203
|
-
var varname=nil;
|
204
|
-
|
205
|
-
self[
|
206
|
-
return self;
|
211
|
+
fn: function (aSymbol, anObject) {
|
212
|
+
var self = this;
|
213
|
+
var varname = nil;
|
214
|
+
varname = smalltalk.send(aSymbol, "_asString", []);
|
215
|
+
self["@" + varname] = anObject;
|
216
|
+
return self;
|
217
|
+
}
|
207
218
|
}),
|
208
219
|
smalltalk.Object);
|
209
220
|
|
@@ -211,10 +222,11 @@ smalltalk.addMethod(
|
|
211
222
|
unescape('_basicAt_'),
|
212
223
|
smalltalk.method({
|
213
224
|
selector: unescape('basicAt%3A'),
|
214
|
-
fn: function (aString){
|
215
|
-
var self=this;
|
216
|
-
return self[aString];
|
217
|
-
return self;
|
225
|
+
fn: function (aString) {
|
226
|
+
var self = this;
|
227
|
+
return self[aString];
|
228
|
+
return self;
|
229
|
+
}
|
218
230
|
}),
|
219
231
|
smalltalk.Object);
|
220
232
|
|
@@ -222,10 +234,11 @@ smalltalk.addMethod(
|
|
222
234
|
unescape('_basicAt_put_'),
|
223
235
|
smalltalk.method({
|
224
236
|
selector: unescape('basicAt%3Aput%3A'),
|
225
|
-
fn: function (aString, anObject){
|
226
|
-
var self=this;
|
227
|
-
return self[aString] = anObject;
|
228
|
-
return self;
|
237
|
+
fn: function (aString, anObject) {
|
238
|
+
var self = this;
|
239
|
+
return self[aString] = anObject;
|
240
|
+
return self;
|
241
|
+
}
|
229
242
|
}),
|
230
243
|
smalltalk.Object);
|
231
244
|
|
@@ -233,10 +246,11 @@ smalltalk.addMethod(
|
|
233
246
|
unescape('_error_'),
|
234
247
|
smalltalk.method({
|
235
248
|
selector: unescape('error%3A'),
|
236
|
-
fn: function (aString){
|
237
|
-
var self=this;
|
238
|
-
smalltalk.send(
|
239
|
-
return self;
|
249
|
+
fn: function (aString) {
|
250
|
+
var self = this;
|
251
|
+
smalltalk.send(smalltalk.Error || Error, "_signal_", [aString]);
|
252
|
+
return self;
|
253
|
+
}
|
240
254
|
}),
|
241
255
|
smalltalk.Object);
|
242
256
|
|
@@ -244,10 +258,11 @@ smalltalk.addMethod(
|
|
244
258
|
unescape('_subclassResponsibility'),
|
245
259
|
smalltalk.method({
|
246
260
|
selector: unescape('subclassResponsibility'),
|
247
|
-
fn: function (){
|
248
|
-
var self=this;
|
249
|
-
smalltalk.send(self, "_error_", ["This method is a responsibility of a subclass"]);
|
250
|
-
return self;
|
261
|
+
fn: function () {
|
262
|
+
var self = this;
|
263
|
+
smalltalk.send(self, "_error_", ["This method is a responsibility of a subclass"]);
|
264
|
+
return self;
|
265
|
+
}
|
251
266
|
}),
|
252
267
|
smalltalk.Object);
|
253
268
|
|
@@ -255,10 +270,11 @@ smalltalk.addMethod(
|
|
255
270
|
unescape('_shouldNotImplement'),
|
256
271
|
smalltalk.method({
|
257
272
|
selector: unescape('shouldNotImplement'),
|
258
|
-
fn: function (){
|
259
|
-
var self=this;
|
260
|
-
smalltalk.send(self, "_error_", [smalltalk.send("This method should not be implemented in ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])])]);
|
261
|
-
return self;
|
273
|
+
fn: function () {
|
274
|
+
var self = this;
|
275
|
+
smalltalk.send(self, "_error_", [smalltalk.send("This method should not be implemented in ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])])]);
|
276
|
+
return self;
|
277
|
+
}
|
262
278
|
}),
|
263
279
|
smalltalk.Object);
|
264
280
|
|
@@ -266,11 +282,16 @@ smalltalk.addMethod(
|
|
266
282
|
unescape('_try_catch_'),
|
267
283
|
smalltalk.method({
|
268
284
|
selector: unescape('try%3Acatch%3A'),
|
269
|
-
fn: function (aBlock, anotherBlock){
|
270
|
-
var self=this;
|
271
|
-
try
|
272
|
-
|
273
|
-
|
285
|
+
fn: function (aBlock, anotherBlock) {
|
286
|
+
var self = this;
|
287
|
+
try {
|
288
|
+
result = aBlock();
|
289
|
+
} catch (e) {
|
290
|
+
result = anotherBlock(e);
|
291
|
+
}
|
292
|
+
return result;
|
293
|
+
return self;
|
294
|
+
}
|
274
295
|
}),
|
275
296
|
smalltalk.Object);
|
276
297
|
|
@@ -278,10 +299,11 @@ smalltalk.addMethod(
|
|
278
299
|
unescape('_printString'),
|
279
300
|
smalltalk.method({
|
280
301
|
selector: unescape('printString'),
|
281
|
-
fn: function (){
|
282
|
-
var self=this;
|
283
|
-
return smalltalk.send("a ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])]);
|
284
|
-
return self;
|
302
|
+
fn: function () {
|
303
|
+
var self = this;
|
304
|
+
return smalltalk.send("a ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])]);
|
305
|
+
return self;
|
306
|
+
}
|
285
307
|
}),
|
286
308
|
smalltalk.Object);
|
287
309
|
|
@@ -289,10 +311,11 @@ smalltalk.addMethod(
|
|
289
311
|
unescape('_printNl'),
|
290
312
|
smalltalk.method({
|
291
313
|
selector: unescape('printNl'),
|
292
|
-
fn: function (){
|
293
|
-
var self=this;
|
294
|
-
console.log(self);
|
295
|
-
return self;
|
314
|
+
fn: function () {
|
315
|
+
var self = this;
|
316
|
+
console.log(self);
|
317
|
+
return self;
|
318
|
+
}
|
296
319
|
}),
|
297
320
|
smalltalk.Object);
|
298
321
|
|
@@ -300,10 +323,11 @@ smalltalk.addMethod(
|
|
300
323
|
unescape('_isKindOf_'),
|
301
324
|
smalltalk.method({
|
302
325
|
selector: unescape('isKindOf%3A'),
|
303
|
-
fn: function (aClass){
|
304
|
-
var self=this;
|
305
|
-
return (
|
306
|
-
return self;
|
326
|
+
fn: function (aClass) {
|
327
|
+
var self = this;
|
328
|
+
return ($receiver = smalltalk.send(self, "_isMemberOf_", [aClass])).klass === smalltalk.Boolean ? $receiver ? function () {return true;}() : function () {return smalltalk.send(smalltalk.send(self, "_class", []), "_inheritsFrom_", [aClass]);}() : smalltalk.send($receiver, "_ifTrue_ifFalse_", [function () {return true;}, function () {return smalltalk.send(smalltalk.send(self, "_class", []), "_inheritsFrom_", [aClass]);}]);
|
329
|
+
return self;
|
330
|
+
}
|
307
331
|
}),
|
308
332
|
smalltalk.Object);
|
309
333
|
|
@@ -311,10 +335,11 @@ smalltalk.addMethod(
|
|
311
335
|
unescape('_isMemberOf_'),
|
312
336
|
smalltalk.method({
|
313
337
|
selector: unescape('isMemberOf%3A'),
|
314
|
-
fn: function (aClass){
|
315
|
-
var self=this;
|
316
|
-
return smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [aClass]);
|
317
|
-
return self;
|
338
|
+
fn: function (aClass) {
|
339
|
+
var self = this;
|
340
|
+
return smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [aClass]);
|
341
|
+
return self;
|
342
|
+
}
|
318
343
|
}),
|
319
344
|
smalltalk.Object);
|
320
345
|
|
@@ -322,10 +347,11 @@ smalltalk.addMethod(
|
|
322
347
|
unescape('_ifNil_'),
|
323
348
|
smalltalk.method({
|
324
349
|
selector: unescape('ifNil%3A'),
|
325
|
-
fn: function (aBlock){
|
326
|
-
var self=this;
|
327
|
-
return self;
|
328
|
-
return self;
|
350
|
+
fn: function (aBlock) {
|
351
|
+
var self = this;
|
352
|
+
return self;
|
353
|
+
return self;
|
354
|
+
}
|
329
355
|
}),
|
330
356
|
smalltalk.Object);
|
331
357
|
|
@@ -333,10 +359,11 @@ smalltalk.addMethod(
|
|
333
359
|
unescape('_ifNil_ifNotNil_'),
|
334
360
|
smalltalk.method({
|
335
361
|
selector: unescape('ifNil%3AifNotNil%3A'),
|
336
|
-
fn: function (aBlock, anotherBlock){
|
337
|
-
var self=this;
|
338
|
-
return smalltalk.send(anotherBlock, "_value", []);
|
339
|
-
return self;
|
362
|
+
fn: function (aBlock, anotherBlock) {
|
363
|
+
var self = this;
|
364
|
+
return smalltalk.send(anotherBlock, "_value", []);
|
365
|
+
return self;
|
366
|
+
}
|
340
367
|
}),
|
341
368
|
smalltalk.Object);
|
342
369
|
|
@@ -344,10 +371,11 @@ smalltalk.addMethod(
|
|
344
371
|
unescape('_ifNotNil_'),
|
345
372
|
smalltalk.method({
|
346
373
|
selector: unescape('ifNotNil%3A'),
|
347
|
-
fn: function (aBlock){
|
348
|
-
var self=this;
|
349
|
-
return smalltalk.send(aBlock, "_value", []);
|
350
|
-
return self;
|
374
|
+
fn: function (aBlock) {
|
375
|
+
var self = this;
|
376
|
+
return smalltalk.send(aBlock, "_value", []);
|
377
|
+
return self;
|
378
|
+
}
|
351
379
|
}),
|
352
380
|
smalltalk.Object);
|
353
381
|
|
@@ -355,10 +383,11 @@ smalltalk.addMethod(
|
|
355
383
|
unescape('_ifNotNil_ifNil_'),
|
356
384
|
smalltalk.method({
|
357
385
|
selector: unescape('ifNotNil%3AifNil%3A'),
|
358
|
-
fn: function (aBlock, anotherBlock){
|
359
|
-
var self=this;
|
360
|
-
return smalltalk.send(aBlock, "_value", []);
|
361
|
-
return self;
|
386
|
+
fn: function (aBlock, anotherBlock) {
|
387
|
+
var self = this;
|
388
|
+
return smalltalk.send(aBlock, "_value", []);
|
389
|
+
return self;
|
390
|
+
}
|
362
391
|
}),
|
363
392
|
smalltalk.Object);
|
364
393
|
|
@@ -366,10 +395,11 @@ smalltalk.addMethod(
|
|
366
395
|
unescape('_isNil'),
|
367
396
|
smalltalk.method({
|
368
397
|
selector: unescape('isNil'),
|
369
|
-
fn: function (){
|
370
|
-
var self=this;
|
371
|
-
return false;
|
372
|
-
return self;
|
398
|
+
fn: function () {
|
399
|
+
var self = this;
|
400
|
+
return false;
|
401
|
+
return self;
|
402
|
+
}
|
373
403
|
}),
|
374
404
|
smalltalk.Object);
|
375
405
|
|
@@ -377,10 +407,11 @@ smalltalk.addMethod(
|
|
377
407
|
unescape('_notNil'),
|
378
408
|
smalltalk.method({
|
379
409
|
selector: unescape('notNil'),
|
380
|
-
fn: function (){
|
381
|
-
var self=this;
|
382
|
-
return smalltalk.send(smalltalk.send(self, "_isNil", []), "_not", []);
|
383
|
-
return self;
|
410
|
+
fn: function () {
|
411
|
+
var self = this;
|
412
|
+
return smalltalk.send(smalltalk.send(self, "_isNil", []), "_not", []);
|
413
|
+
return self;
|
414
|
+
}
|
384
415
|
}),
|
385
416
|
smalltalk.Object);
|
386
417
|
|
@@ -388,10 +419,11 @@ smalltalk.addMethod(
|
|
388
419
|
unescape('_isClass'),
|
389
420
|
smalltalk.method({
|
390
421
|
selector: unescape('isClass'),
|
391
|
-
fn: function (){
|
392
|
-
var self=this;
|
393
|
-
return false;
|
394
|
-
return self;
|
422
|
+
fn: function () {
|
423
|
+
var self = this;
|
424
|
+
return false;
|
425
|
+
return self;
|
426
|
+
}
|
395
427
|
}),
|
396
428
|
smalltalk.Object);
|
397
429
|
|
@@ -399,10 +431,11 @@ smalltalk.addMethod(
|
|
399
431
|
unescape('_isMetaclass'),
|
400
432
|
smalltalk.method({
|
401
433
|
selector: unescape('isMetaclass'),
|
402
|
-
fn: function (){
|
403
|
-
var self=this;
|
404
|
-
return false;
|
405
|
-
return self;
|
434
|
+
fn: function () {
|
435
|
+
var self = this;
|
436
|
+
return false;
|
437
|
+
return self;
|
438
|
+
}
|
406
439
|
}),
|
407
440
|
smalltalk.Object);
|
408
441
|
|
@@ -410,10 +443,11 @@ smalltalk.addMethod(
|
|
410
443
|
unescape('_isNumber'),
|
411
444
|
smalltalk.method({
|
412
445
|
selector: unescape('isNumber'),
|
413
|
-
fn: function (){
|
414
|
-
var self=this;
|
415
|
-
return false;
|
416
|
-
return self;
|
446
|
+
fn: function () {
|
447
|
+
var self = this;
|
448
|
+
return false;
|
449
|
+
return self;
|
450
|
+
}
|
417
451
|
}),
|
418
452
|
smalltalk.Object);
|
419
453
|
|
@@ -421,10 +455,11 @@ smalltalk.addMethod(
|
|
421
455
|
unescape('_isString'),
|
422
456
|
smalltalk.method({
|
423
457
|
selector: unescape('isString'),
|
424
|
-
fn: function (){
|
425
|
-
var self=this;
|
426
|
-
return false;
|
427
|
-
return self;
|
458
|
+
fn: function () {
|
459
|
+
var self = this;
|
460
|
+
return false;
|
461
|
+
return self;
|
462
|
+
}
|
428
463
|
}),
|
429
464
|
smalltalk.Object);
|
430
465
|
|
@@ -432,10 +467,11 @@ smalltalk.addMethod(
|
|
432
467
|
unescape('_isParseFailure'),
|
433
468
|
smalltalk.method({
|
434
469
|
selector: unescape('isParseFailure'),
|
435
|
-
fn: function (){
|
436
|
-
var self=this;
|
437
|
-
return false;
|
438
|
-
return self;
|
470
|
+
fn: function () {
|
471
|
+
var self = this;
|
472
|
+
return false;
|
473
|
+
return self;
|
474
|
+
}
|
439
475
|
}),
|
440
476
|
smalltalk.Object);
|
441
477
|
|
@@ -443,10 +479,11 @@ smalltalk.addMethod(
|
|
443
479
|
unescape('_basicPerform_'),
|
444
480
|
smalltalk.method({
|
445
481
|
selector: unescape('basicPerform%3A'),
|
446
|
-
fn: function (aSymbol){
|
447
|
-
var self=this;
|
448
|
-
return smalltalk.send(self, "_basicPerform_withArguments_", [aSymbol, []]);
|
449
|
-
return self;
|
482
|
+
fn: function (aSymbol) {
|
483
|
+
var self = this;
|
484
|
+
return smalltalk.send(self, "_basicPerform_withArguments_", [aSymbol, []]);
|
485
|
+
return self;
|
486
|
+
}
|
450
487
|
}),
|
451
488
|
smalltalk.Object);
|
452
489
|
|
@@ -454,10 +491,11 @@ smalltalk.addMethod(
|
|
454
491
|
unescape('_basicPerform_withArguments_'),
|
455
492
|
smalltalk.method({
|
456
493
|
selector: unescape('basicPerform%3AwithArguments%3A'),
|
457
|
-
fn: function (aSymbol, aCollection){
|
458
|
-
var self=this;
|
459
|
-
return self[aSymbol].apply(self, aCollection)
|
460
|
-
return self;
|
494
|
+
fn: function (aSymbol, aCollection) {
|
495
|
+
var self = this;
|
496
|
+
return self[aSymbol].apply(self, aCollection);
|
497
|
+
return self;
|
498
|
+
}
|
461
499
|
}),
|
462
500
|
smalltalk.Object);
|
463
501
|
|
@@ -465,10 +503,12 @@ smalltalk.addMethod(
|
|
465
503
|
unescape('_basicDelete_'),
|
466
504
|
smalltalk.method({
|
467
505
|
selector: unescape('basicDelete%3A'),
|
468
|
-
fn: function (aString){
|
469
|
-
var self=this;
|
470
|
-
delete self[aString];
|
471
|
-
return
|
506
|
+
fn: function (aString) {
|
507
|
+
var self = this;
|
508
|
+
delete self[aString];
|
509
|
+
return aString;
|
510
|
+
return self;
|
511
|
+
}
|
472
512
|
}),
|
473
513
|
smalltalk.Object);
|
474
514
|
|
@@ -476,10 +516,11 @@ smalltalk.addMethod(
|
|
476
516
|
unescape('_doesNotUnderstand_'),
|
477
517
|
smalltalk.method({
|
478
518
|
selector: unescape('doesNotUnderstand%3A'),
|
479
|
-
fn: function (aMessage){
|
480
|
-
var self=this;
|
481
|
-
(function($rec){smalltalk.send($rec, "_receiver_", [self]);smalltalk.send($rec, "_message_", [aMessage]);return smalltalk.send($rec, "_signal", []);}
|
482
|
-
return self;
|
519
|
+
fn: function (aMessage) {
|
520
|
+
var self = this;
|
521
|
+
(function ($rec) {smalltalk.send($rec, "_receiver_", [self]);smalltalk.send($rec, "_message_", [aMessage]);return smalltalk.send($rec, "_signal", []);}(smalltalk.send(smalltalk.MessageNotUnderstood || MessageNotUnderstood, "_new", [])));
|
522
|
+
return self;
|
523
|
+
}
|
483
524
|
}),
|
484
525
|
smalltalk.Object);
|
485
526
|
|
@@ -487,10 +528,11 @@ smalltalk.addMethod(
|
|
487
528
|
unescape('_asJSON'),
|
488
529
|
smalltalk.method({
|
489
530
|
selector: unescape('asJSON'),
|
490
|
-
fn: function (){
|
491
|
-
var self=this;
|
492
|
-
return smalltalk.send(
|
493
|
-
return self;
|
531
|
+
fn: function () {
|
532
|
+
var self = this;
|
533
|
+
return smalltalk.send(smalltalk.JSON || JSON, "_parse_", [smalltalk.send(self, "_asJSONString", [])]);
|
534
|
+
return self;
|
535
|
+
}
|
494
536
|
}),
|
495
537
|
smalltalk.Object);
|
496
538
|
|
@@ -498,10 +540,11 @@ smalltalk.addMethod(
|
|
498
540
|
unescape('_halt'),
|
499
541
|
smalltalk.method({
|
500
542
|
selector: unescape('halt'),
|
501
|
-
fn: function (){
|
502
|
-
var self=this;
|
503
|
-
smalltalk.send(self, "_error_", ["Halt encountered"]);
|
504
|
-
return self;
|
543
|
+
fn: function () {
|
544
|
+
var self = this;
|
545
|
+
smalltalk.send(self, "_error_", ["Halt encountered"]);
|
546
|
+
return self;
|
547
|
+
}
|
505
548
|
}),
|
506
549
|
smalltalk.Object);
|
507
550
|
|
@@ -509,12 +552,13 @@ smalltalk.addMethod(
|
|
509
552
|
unescape('_log_block_'),
|
510
553
|
smalltalk.method({
|
511
554
|
selector: unescape('log%3Ablock%3A'),
|
512
|
-
fn: function (aString, aBlock){
|
513
|
-
var self=this;
|
514
|
-
var result=nil;
|
515
|
-
smalltalk.send(
|
516
|
-
return result;
|
517
|
-
return self;
|
555
|
+
fn: function (aString, aBlock) {
|
556
|
+
var self = this;
|
557
|
+
var result = nil;
|
558
|
+
smalltalk.send(typeof console == "undefined" ? nil : console, "_log_", [smalltalk.send(smalltalk.send(aString, "__comma", [" time: "]), "__comma", [smalltalk.send(smalltalk.send(smalltalk.Date || Date, "_millisecondsToRun_", [function () {return result = smalltalk.send(aBlock, "_value", []);}]), "_printString", [])])]);
|
559
|
+
return result;
|
560
|
+
return self;
|
561
|
+
}
|
518
562
|
}),
|
519
563
|
smalltalk.Object);
|
520
564
|
|
@@ -522,10 +566,11 @@ smalltalk.addMethod(
|
|
522
566
|
unescape('__eq_eq'),
|
523
567
|
smalltalk.method({
|
524
568
|
selector: unescape('%3D%3D'),
|
525
|
-
fn: function (anObject){
|
526
|
-
var self=this;
|
527
|
-
return smalltalk.send(smalltalk.send(self, "_identityHash", []), "__eq", [smalltalk.send(anObject, "_identityHash", [])]);
|
528
|
-
return self;
|
569
|
+
fn: function (anObject) {
|
570
|
+
var self = this;
|
571
|
+
return smalltalk.send(smalltalk.send(self, "_identityHash", []), "__eq", [smalltalk.send(anObject, "_identityHash", [])]);
|
572
|
+
return self;
|
573
|
+
}
|
529
574
|
}),
|
530
575
|
smalltalk.Object);
|
531
576
|
|
@@ -533,10 +578,11 @@ smalltalk.addMethod(
|
|
533
578
|
unescape('_%7E%7E'),
|
534
579
|
smalltalk.method({
|
535
580
|
selector: unescape('%7E%7E'),
|
536
|
-
fn: function (anObject){
|
537
|
-
var self=this;
|
538
|
-
return smalltalk.send(smalltalk.send(self, "__eq_eq", [anObject]), "__eq", [false]);
|
539
|
-
return self;
|
581
|
+
fn: function (anObject) {
|
582
|
+
var self = this;
|
583
|
+
return smalltalk.send(smalltalk.send(self, "__eq_eq", [anObject]), "__eq", [false]);
|
584
|
+
return self;
|
585
|
+
}
|
540
586
|
}),
|
541
587
|
smalltalk.Object);
|
542
588
|
|
@@ -544,10 +590,11 @@ smalltalk.addMethod(
|
|
544
590
|
unescape('_deprecatedAPI'),
|
545
591
|
smalltalk.method({
|
546
592
|
selector: unescape('deprecatedAPI'),
|
547
|
-
fn: function (){
|
548
|
-
var self=this;
|
549
|
-
smalltalk.send(
|
550
|
-
return self;
|
593
|
+
fn: function () {
|
594
|
+
var self = this;
|
595
|
+
smalltalk.send(typeof console == "undefined" ? nil : console, "_warn_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.getThisContext(), "_home", []), "_asString", []), "__comma", [unescape("%20is%20deprecated%21%20%28in%20")]), "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.getThisContext(), "_home", []), "_home", []), "_asString", [])]), "__comma", [unescape("%29")])]);
|
596
|
+
return self;
|
597
|
+
}
|
551
598
|
}),
|
552
599
|
smalltalk.Object);
|
553
600
|
|
@@ -555,10 +602,11 @@ smalltalk.addMethod(
|
|
555
602
|
unescape('_storeString'),
|
556
603
|
smalltalk.method({
|
557
604
|
selector: unescape('storeString'),
|
558
|
-
fn: function (){
|
559
|
-
var self=this;
|
560
|
-
return smalltalk.send(
|
561
|
-
return self;
|
605
|
+
fn: function () {
|
606
|
+
var self = this;
|
607
|
+
return smalltalk.send(smalltalk.String || String, "_streamContents_", [function (s) {return smalltalk.send(self, "_storeOn_", [s]);}]);
|
608
|
+
return self;
|
609
|
+
}
|
562
610
|
}),
|
563
611
|
smalltalk.Object);
|
564
612
|
|
@@ -566,10 +614,11 @@ smalltalk.addMethod(
|
|
566
614
|
unescape('_storeOn_'),
|
567
615
|
smalltalk.method({
|
568
616
|
selector: unescape('storeOn%3A'),
|
569
|
-
fn: function (aStream){
|
570
|
-
var self=this;
|
571
|
-
smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(self, "_printString", [])]);
|
572
|
-
return self;
|
617
|
+
fn: function (aStream) {
|
618
|
+
var self = this;
|
619
|
+
smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(self, "_printString", [])]);
|
620
|
+
return self;
|
621
|
+
}
|
573
622
|
}),
|
574
623
|
smalltalk.Object);
|
575
624
|
|
@@ -577,10 +626,11 @@ smalltalk.addMethod(
|
|
577
626
|
unescape('_asJSONString'),
|
578
627
|
smalltalk.method({
|
579
628
|
selector: unescape('asJSONString'),
|
580
|
-
fn: function (){
|
581
|
-
var self=this;
|
582
|
-
return smalltalk.send(
|
583
|
-
return self;
|
629
|
+
fn: function () {
|
630
|
+
var self = this;
|
631
|
+
return smalltalk.send(smalltalk.JSON || JSON, "_stringify_", [self]);
|
632
|
+
return self;
|
633
|
+
}
|
584
634
|
}),
|
585
635
|
smalltalk.Object);
|
586
636
|
|
@@ -588,10 +638,11 @@ smalltalk.addMethod(
|
|
588
638
|
unescape('_identityHash'),
|
589
639
|
smalltalk.method({
|
590
640
|
selector: unescape('identityHash'),
|
591
|
-
fn: function (){
|
592
|
-
var self=this;
|
593
|
-
return self.identityHash || (self.identityHash = smalltalk.nextId())
|
594
|
-
return self;
|
641
|
+
fn: function () {
|
642
|
+
var self = this;
|
643
|
+
return self.identityHash || (self.identityHash = smalltalk.nextId());
|
644
|
+
return self;
|
645
|
+
}
|
595
646
|
}),
|
596
647
|
smalltalk.Object);
|
597
648
|
|
@@ -599,10 +650,11 @@ smalltalk.addMethod(
|
|
599
650
|
unescape('_isSymbol'),
|
600
651
|
smalltalk.method({
|
601
652
|
selector: unescape('isSymbol'),
|
602
|
-
fn: function (){
|
603
|
-
var self=this;
|
604
|
-
return false;
|
605
|
-
return self;
|
653
|
+
fn: function () {
|
654
|
+
var self = this;
|
655
|
+
return false;
|
656
|
+
return self;
|
657
|
+
}
|
606
658
|
}),
|
607
659
|
smalltalk.Object);
|
608
660
|
|
@@ -611,10 +663,10 @@ smalltalk.addMethod(
|
|
611
663
|
unescape('_initialize'),
|
612
664
|
smalltalk.method({
|
613
665
|
selector: unescape('initialize'),
|
614
|
-
fn: function (){
|
615
|
-
var self=this;
|
616
|
-
|
617
|
-
|
666
|
+
fn: function () {
|
667
|
+
var self = this;
|
668
|
+
return self;
|
669
|
+
}
|
618
670
|
}),
|
619
671
|
smalltalk.Object.klass);
|
620
672
|
|
@@ -624,10 +676,11 @@ smalltalk.addMethod(
|
|
624
676
|
unescape('_classes'),
|
625
677
|
smalltalk.method({
|
626
678
|
selector: unescape('classes'),
|
627
|
-
fn: function (){
|
628
|
-
var self=this;
|
629
|
-
return self.classes();
|
630
|
-
return self;
|
679
|
+
fn: function () {
|
680
|
+
var self = this;
|
681
|
+
return self.classes();
|
682
|
+
return self;
|
683
|
+
}
|
631
684
|
}),
|
632
685
|
smalltalk.Smalltalk);
|
633
686
|
|
@@ -635,10 +688,11 @@ smalltalk.addMethod(
|
|
635
688
|
unescape('_at_'),
|
636
689
|
smalltalk.method({
|
637
690
|
selector: unescape('at%3A'),
|
638
|
-
fn: function (aString){
|
639
|
-
var self=this;
|
640
|
-
return self[aString];
|
641
|
-
return self;
|
691
|
+
fn: function (aString) {
|
692
|
+
var self = this;
|
693
|
+
return self[aString];
|
694
|
+
return self;
|
695
|
+
}
|
642
696
|
}),
|
643
697
|
smalltalk.Smalltalk);
|
644
698
|
|
@@ -646,13 +700,14 @@ smalltalk.addMethod(
|
|
646
700
|
unescape('_removeClass_'),
|
647
701
|
smalltalk.method({
|
648
702
|
selector: unescape('removeClass%3A'),
|
649
|
-
fn: function (aClass){
|
650
|
-
var self=this;
|
651
|
-
(
|
652
|
-
smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_do_", [
|
653
|
-
smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_methodDictionary", []), "_values", []), "_do_", [
|
654
|
-
smalltalk.send(self, "_basicDelete_", [smalltalk.send(aClass, "_name", [])]);
|
655
|
-
return self;
|
703
|
+
fn: function (aClass) {
|
704
|
+
var self = this;
|
705
|
+
($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean ? $receiver ? function () {return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_asString", []), "__comma", [unescape("%20is%20a%20Metaclass%20and%20cannot%20be%20removed%21")])]);}() : nil : smalltalk.send($receiver, "_ifTrue_", [function () {return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_asString", []), "__comma", [unescape("%20is%20a%20Metaclass%20and%20cannot%20be%20removed%21")])]);}]);
|
706
|
+
smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_do_", [function (each) {return smalltalk.send(aClass, "_removeCompiledMethod_", [each]);}]);
|
707
|
+
smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_methodDictionary", []), "_values", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(aClass, "_class", []), "_removeCompiledMethod_", [each]);}]);
|
708
|
+
smalltalk.send(self, "_basicDelete_", [smalltalk.send(aClass, "_name", [])]);
|
709
|
+
return self;
|
710
|
+
}
|
656
711
|
}),
|
657
712
|
smalltalk.Smalltalk);
|
658
713
|
|
@@ -660,10 +715,11 @@ smalltalk.addMethod(
|
|
660
715
|
unescape('_basicParse_'),
|
661
716
|
smalltalk.method({
|
662
717
|
selector: unescape('basicParse%3A'),
|
663
|
-
fn: function (aString){
|
664
|
-
var self=this;
|
665
|
-
return smalltalk.parser.parse(aString);
|
666
|
-
return self;
|
718
|
+
fn: function (aString) {
|
719
|
+
var self = this;
|
720
|
+
return smalltalk.parser.parse(aString);
|
721
|
+
return self;
|
722
|
+
}
|
667
723
|
}),
|
668
724
|
smalltalk.Smalltalk);
|
669
725
|
|
@@ -671,12 +727,13 @@ smalltalk.addMethod(
|
|
671
727
|
unescape('_parse_'),
|
672
728
|
smalltalk.method({
|
673
729
|
selector: unescape('parse%3A'),
|
674
|
-
fn: function (aString){
|
675
|
-
var self=this;
|
676
|
-
var result=nil;
|
677
|
-
smalltalk.send(self, "_try_catch_", [
|
678
|
-
return result;
|
679
|
-
return self;
|
730
|
+
fn: function (aString) {
|
731
|
+
var self = this;
|
732
|
+
var result = nil;
|
733
|
+
smalltalk.send(self, "_try_catch_", [function () {return result = smalltalk.send(self, "_basicParse_", [aString]);}, function (ex) {return smalltalk.send(smalltalk.send(self, "_parseError_parsing_", [ex, aString]), "_signal", []);}]);
|
734
|
+
return result;
|
735
|
+
return self;
|
736
|
+
}
|
680
737
|
}),
|
681
738
|
smalltalk.Smalltalk);
|
682
739
|
|
@@ -684,24 +741,25 @@ smalltalk.addMethod(
|
|
684
741
|
unescape('_parseError_parsing_'),
|
685
742
|
smalltalk.method({
|
686
743
|
selector: unescape('parseError%3Aparsing%3A'),
|
687
|
-
fn: function (anException, aString){
|
688
|
-
var self=this;
|
689
|
-
var row=nil;
|
690
|
-
var col=nil;
|
691
|
-
var message=nil;
|
692
|
-
var lines=nil;
|
693
|
-
var badLine=nil;
|
694
|
-
var code=nil;
|
695
|
-
row = anException.line;
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
smalltalk.send(lines, "_at_put_", [row, badLine]);
|
702
|
-
|
703
|
-
return smalltalk.send(smalltalk.send(
|
704
|
-
return self;
|
744
|
+
fn: function (anException, aString) {
|
745
|
+
var self = this;
|
746
|
+
var row = nil;
|
747
|
+
var col = nil;
|
748
|
+
var message = nil;
|
749
|
+
var lines = nil;
|
750
|
+
var badLine = nil;
|
751
|
+
var code = nil;
|
752
|
+
row = anException.line;
|
753
|
+
col = anException.column;
|
754
|
+
message = anException.message;
|
755
|
+
lines = smalltalk.send(aString, "_lines", []);
|
756
|
+
badLine = smalltalk.send(lines, "_at_", [row]);
|
757
|
+
badLine = smalltalk.send(smalltalk.send(smalltalk.send(badLine, "_copyFrom_to_", [1, ($receiver = col).klass === smalltalk.Number ? $receiver - 1 : smalltalk.send($receiver, "__minus", [1])]), "__comma", [unescape("%20%3D%3D%3D%3E")]), "__comma", [smalltalk.send(badLine, "_copyFrom_to_", [col, smalltalk.send(badLine, "_size", [])])]);
|
758
|
+
smalltalk.send(lines, "_at_put_", [row, badLine]);
|
759
|
+
code = smalltalk.send(smalltalk.String || String, "_streamContents_", [function (s) {return smalltalk.send(lines, "_withIndexDo_", [function (l, i) {return smalltalk.send(s, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(i, "_asString", []), "__comma", [": "]), "__comma", [l]), "__comma", [smalltalk.send(smalltalk.String || String, "_lf", [])])]);}]);}]);
|
760
|
+
return smalltalk.send(smalltalk.send(smalltalk.Error || Error, "_new", []), "_messageText_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("Parse error on line ", "__comma", [row]), "__comma", [" column "]), "__comma", [col]), "__comma", [" : "]), "__comma", [message]), "__comma", [unescape("%20Below%20is%20code%20with%20line%20numbers%20and%20%3D%3D%3D%3E%20marker%20inserted%3A")]), "__comma", [smalltalk.send(smalltalk.String || String, "_lf", [])]), "__comma", [code])]);
|
761
|
+
return self;
|
762
|
+
}
|
705
763
|
}),
|
706
764
|
smalltalk.Smalltalk);
|
707
765
|
|
@@ -709,10 +767,11 @@ smalltalk.addMethod(
|
|
709
767
|
unescape('_packages'),
|
710
768
|
smalltalk.method({
|
711
769
|
selector: unescape('packages'),
|
712
|
-
fn: function (){
|
713
|
-
var self=this;
|
714
|
-
return self.packages.all();
|
715
|
-
return self;
|
770
|
+
fn: function () {
|
771
|
+
var self = this;
|
772
|
+
return self.packages.all();
|
773
|
+
return self;
|
774
|
+
}
|
716
775
|
}),
|
717
776
|
smalltalk.Smalltalk);
|
718
777
|
|
@@ -720,10 +779,11 @@ smalltalk.addMethod(
|
|
720
779
|
unescape('_packageAt_'),
|
721
780
|
smalltalk.method({
|
722
781
|
selector: unescape('packageAt%3A'),
|
723
|
-
fn: function (packageName){
|
724
|
-
var self=this;
|
725
|
-
return self.packages[packageName];
|
726
|
-
return self;
|
782
|
+
fn: function (packageName) {
|
783
|
+
var self = this;
|
784
|
+
return self.packages[packageName];
|
785
|
+
return self;
|
786
|
+
}
|
727
787
|
}),
|
728
788
|
smalltalk.Smalltalk);
|
729
789
|
|
@@ -731,10 +791,11 @@ smalltalk.addMethod(
|
|
731
791
|
unescape('_packageAt_ifAbsent_'),
|
732
792
|
smalltalk.method({
|
733
793
|
selector: unescape('packageAt%3AifAbsent%3A'),
|
734
|
-
fn: function (packageName, aBlock){
|
735
|
-
var self=this;
|
736
|
-
return smalltalk.send(smalltalk.send(self, "_packageAt_", [packageName]), "_ifNil_", [aBlock]);
|
737
|
-
return self;
|
794
|
+
fn: function (packageName, aBlock) {
|
795
|
+
var self = this;
|
796
|
+
return smalltalk.send(smalltalk.send(self, "_packageAt_", [packageName]), "_ifNil_", [aBlock]);
|
797
|
+
return self;
|
798
|
+
}
|
738
799
|
}),
|
739
800
|
smalltalk.Smalltalk);
|
740
801
|
|
@@ -742,10 +803,11 @@ smalltalk.addMethod(
|
|
742
803
|
unescape('_createPackage_'),
|
743
804
|
smalltalk.method({
|
744
805
|
selector: unescape('createPackage%3A'),
|
745
|
-
fn: function (packageName){
|
746
|
-
var self=this;
|
747
|
-
return smalltalk.addPackage(packageName, nil);
|
748
|
-
return self;
|
806
|
+
fn: function (packageName) {
|
807
|
+
var self = this;
|
808
|
+
return smalltalk.addPackage(packageName, nil);
|
809
|
+
return self;
|
810
|
+
}
|
749
811
|
}),
|
750
812
|
smalltalk.Smalltalk);
|
751
813
|
|
@@ -753,10 +815,11 @@ smalltalk.addMethod(
|
|
753
815
|
unescape('_deletePackage_'),
|
754
816
|
smalltalk.method({
|
755
817
|
selector: unescape('deletePackage%3A'),
|
756
|
-
fn: function (packageName){
|
757
|
-
var self=this;
|
758
|
-
delete smalltalk.packages[packageName];
|
759
|
-
return self;
|
818
|
+
fn: function (packageName) {
|
819
|
+
var self = this;
|
820
|
+
delete smalltalk.packages[packageName];
|
821
|
+
return self;
|
822
|
+
}
|
760
823
|
}),
|
761
824
|
smalltalk.Smalltalk);
|
762
825
|
|
@@ -764,13 +827,14 @@ smalltalk.addMethod(
|
|
764
827
|
unescape('_removePackage_'),
|
765
828
|
smalltalk.method({
|
766
829
|
selector: unescape('removePackage%3A'),
|
767
|
-
fn: function (packageName){
|
768
|
-
var self=this;
|
769
|
-
var pkg=nil;
|
770
|
-
|
771
|
-
smalltalk.send(smalltalk.send(pkg, "_classes", []), "_do_", [
|
772
|
-
smalltalk.send(self, "_deletePackage_", [packageName]);
|
773
|
-
return self;
|
830
|
+
fn: function (packageName) {
|
831
|
+
var self = this;
|
832
|
+
var pkg = nil;
|
833
|
+
pkg = smalltalk.send(self, "_packageAt_ifAbsent_", [packageName, function () {return smalltalk.send(self, "_error_", [smalltalk.send("Missing package: ", "__comma", [packageName])]);}]);
|
834
|
+
smalltalk.send(smalltalk.send(pkg, "_classes", []), "_do_", [function (each) {return smalltalk.send(self, "_removeClass_", [each]);}]);
|
835
|
+
smalltalk.send(self, "_deletePackage_", [packageName]);
|
836
|
+
return self;
|
837
|
+
}
|
774
838
|
}),
|
775
839
|
smalltalk.Smalltalk);
|
776
840
|
|
@@ -778,15 +842,17 @@ smalltalk.addMethod(
|
|
778
842
|
unescape('_renamePackage_to_'),
|
779
843
|
smalltalk.method({
|
780
844
|
selector: unescape('renamePackage%3Ato%3A'),
|
781
|
-
fn: function (packageName, newName){
|
782
|
-
var self=this;
|
783
|
-
var pkg=nil;
|
784
|
-
|
785
|
-
(
|
786
|
-
smalltalk.
|
787
|
-
smalltalk.
|
788
|
-
smalltalk.send(
|
789
|
-
|
845
|
+
fn: function (packageName, newName) {
|
846
|
+
var self = this;
|
847
|
+
var pkg = nil;
|
848
|
+
pkg = smalltalk.send(self, "_packageAt_ifAbsent_", [packageName, function () {return smalltalk.send(self, "_error_", [smalltalk.send("Missing package: ", "__comma", [packageName])]);}]);
|
849
|
+
($receiver = smalltalk.send(self, "_packageAt_", [newName])) != nil &&
|
850
|
+
$receiver != undefined ? function () {return smalltalk.send(self, "_error_", [smalltalk.send("Already exists a package called: ", "__comma", [newName])]);}() : nil;
|
851
|
+
smalltalk.packages[newName] = smalltalk.packages[packageName];
|
852
|
+
smalltalk.send(pkg, "_name_", [newName]);
|
853
|
+
smalltalk.send(self, "_deletePackage_", [packageName]);
|
854
|
+
return self;
|
855
|
+
}
|
790
856
|
}),
|
791
857
|
smalltalk.Smalltalk);
|
792
858
|
|
@@ -794,10 +860,11 @@ smalltalk.addMethod(
|
|
794
860
|
unescape('_reservedWords'),
|
795
861
|
smalltalk.method({
|
796
862
|
selector: unescape('reservedWords'),
|
797
|
-
fn: function (){
|
798
|
-
var self=this;
|
799
|
-
return self.reservedWords;
|
800
|
-
return self;
|
863
|
+
fn: function () {
|
864
|
+
var self = this;
|
865
|
+
return self.reservedWords;
|
866
|
+
return self;
|
867
|
+
}
|
801
868
|
}),
|
802
869
|
smalltalk.Smalltalk);
|
803
870
|
|
@@ -805,13 +872,14 @@ smalltalk.addMethod(
|
|
805
872
|
unescape('_createPackage_properties_'),
|
806
873
|
smalltalk.method({
|
807
874
|
selector: unescape('createPackage%3Aproperties%3A'),
|
808
|
-
fn: function (packageName, aDict){
|
809
|
-
var self=this;
|
810
|
-
var object=nil;
|
811
|
-
object = {}
|
812
|
-
smalltalk.send(aDict, "_keysAndValuesDo_", [
|
813
|
-
return smalltalk.addPackage(packageName, object);
|
814
|
-
return self;
|
875
|
+
fn: function (packageName, aDict) {
|
876
|
+
var self = this;
|
877
|
+
var object = nil;
|
878
|
+
object = {};
|
879
|
+
smalltalk.send(aDict, "_keysAndValuesDo_", [function (key, value) {return object[key] = value;}]);
|
880
|
+
return smalltalk.addPackage(packageName, object);
|
881
|
+
return self;
|
882
|
+
}
|
815
883
|
}),
|
816
884
|
smalltalk.Smalltalk);
|
817
885
|
|
@@ -819,10 +887,25 @@ smalltalk.addMethod(
|
|
819
887
|
unescape('_readJSObject_'),
|
820
888
|
smalltalk.method({
|
821
889
|
selector: unescape('readJSObject%3A'),
|
822
|
-
fn: function (anObject){
|
823
|
-
var self=this;
|
824
|
-
return self.readJSObject(anObject);
|
825
|
-
return self;
|
890
|
+
fn: function (anObject) {
|
891
|
+
var self = this;
|
892
|
+
return self.readJSObject(anObject);
|
893
|
+
return self;
|
894
|
+
}
|
895
|
+
}),
|
896
|
+
smalltalk.Smalltalk);
|
897
|
+
|
898
|
+
smalltalk.addMethod(
|
899
|
+
unescape('_send_to_arguments_'),
|
900
|
+
smalltalk.method({
|
901
|
+
selector: unescape('send%3Ato%3Aarguments%3A'),
|
902
|
+
fn: function (aSelector, anObject, aCollection) {
|
903
|
+
var self = this;
|
904
|
+
var selector = nil;
|
905
|
+
selector = smalltalk.send(smalltalk.send(aSelector, "_asString", []), "_asSelector", []);
|
906
|
+
self.send(anObject, selector, aCollection);
|
907
|
+
return self;
|
908
|
+
}
|
826
909
|
}),
|
827
910
|
smalltalk.Smalltalk);
|
828
911
|
|
@@ -832,10 +915,11 @@ smalltalk.addMethod(
|
|
832
915
|
unescape('_current'),
|
833
916
|
smalltalk.method({
|
834
917
|
selector: unescape('current'),
|
835
|
-
fn: function (){
|
836
|
-
var self=this;
|
837
|
-
return smalltalk;
|
838
|
-
return self;
|
918
|
+
fn: function () {
|
919
|
+
var self = this;
|
920
|
+
return smalltalk;
|
921
|
+
return self;
|
922
|
+
}
|
839
923
|
}),
|
840
924
|
smalltalk.Smalltalk.klass);
|
841
925
|
|
@@ -845,10 +929,11 @@ smalltalk.addMethod(
|
|
845
929
|
unescape('_name'),
|
846
930
|
smalltalk.method({
|
847
931
|
selector: unescape('name'),
|
848
|
-
fn: function (){
|
849
|
-
var self=this;
|
850
|
-
return self.pkgName;
|
851
|
-
return self;
|
932
|
+
fn: function () {
|
933
|
+
var self = this;
|
934
|
+
return self.pkgName;
|
935
|
+
return self;
|
936
|
+
}
|
852
937
|
}),
|
853
938
|
smalltalk.Package);
|
854
939
|
|
@@ -856,10 +941,11 @@ smalltalk.addMethod(
|
|
856
941
|
unescape('_name_'),
|
857
942
|
smalltalk.method({
|
858
943
|
selector: unescape('name%3A'),
|
859
|
-
fn: function (aString){
|
860
|
-
var self=this;
|
861
|
-
self.pkgName = aString;
|
862
|
-
return self;
|
944
|
+
fn: function (aString) {
|
945
|
+
var self = this;
|
946
|
+
self.pkgName = aString;
|
947
|
+
return self;
|
948
|
+
}
|
863
949
|
}),
|
864
950
|
smalltalk.Package);
|
865
951
|
|
@@ -867,10 +953,11 @@ smalltalk.addMethod(
|
|
867
953
|
unescape('_classes'),
|
868
954
|
smalltalk.method({
|
869
955
|
selector: unescape('classes'),
|
870
|
-
fn: function (){
|
871
|
-
var self=this;
|
872
|
-
return smalltalk.send(smalltalk.send(smalltalk.send(
|
873
|
-
return self;
|
956
|
+
fn: function () {
|
957
|
+
var self = this;
|
958
|
+
return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_classes", []), "_select_", [function (c) {return smalltalk.send(smalltalk.send(c, "_package", []), "__eq_eq", [self]);}]);
|
959
|
+
return self;
|
960
|
+
}
|
874
961
|
}),
|
875
962
|
smalltalk.Package);
|
876
963
|
|
@@ -878,10 +965,11 @@ smalltalk.addMethod(
|
|
878
965
|
unescape('_printString'),
|
879
966
|
smalltalk.method({
|
880
967
|
selector: unescape('printString'),
|
881
|
-
fn: function (){
|
882
|
-
var self=this;
|
883
|
-
return smalltalk.send(self, "_name", []);
|
884
|
-
return self;
|
968
|
+
fn: function () {
|
969
|
+
var self = this;
|
970
|
+
return smalltalk.send(self, "_name", []);
|
971
|
+
return self;
|
972
|
+
}
|
885
973
|
}),
|
886
974
|
smalltalk.Package);
|
887
975
|
|
@@ -889,10 +977,11 @@ smalltalk.addMethod(
|
|
889
977
|
unescape('_dependencies'),
|
890
978
|
smalltalk.method({
|
891
979
|
selector: unescape('dependencies'),
|
892
|
-
fn: function (){
|
893
|
-
var self=this;
|
894
|
-
return smalltalk.send(self, "_propertyAt_ifAbsent_", ["dependencies",
|
895
|
-
return self;
|
980
|
+
fn: function () {
|
981
|
+
var self = this;
|
982
|
+
return smalltalk.send(self, "_propertyAt_ifAbsent_", ["dependencies", function () {return [];}]);
|
983
|
+
return self;
|
984
|
+
}
|
896
985
|
}),
|
897
986
|
smalltalk.Package);
|
898
987
|
|
@@ -900,10 +989,11 @@ smalltalk.addMethod(
|
|
900
989
|
unescape('_dependencies_'),
|
901
990
|
smalltalk.method({
|
902
991
|
selector: unescape('dependencies%3A'),
|
903
|
-
fn: function (anArray){
|
904
|
-
var self=this;
|
905
|
-
return smalltalk.send(self, "_propertyAt_put_", ["dependencies", anArray]);
|
906
|
-
return self;
|
992
|
+
fn: function (anArray) {
|
993
|
+
var self = this;
|
994
|
+
return smalltalk.send(self, "_propertyAt_put_", ["dependencies", anArray]);
|
995
|
+
return self;
|
996
|
+
}
|
907
997
|
}),
|
908
998
|
smalltalk.Package);
|
909
999
|
|
@@ -911,10 +1001,11 @@ smalltalk.addMethod(
|
|
911
1001
|
unescape('_properties'),
|
912
1002
|
smalltalk.method({
|
913
1003
|
selector: unescape('properties'),
|
914
|
-
fn: function (){
|
915
|
-
var self=this;
|
916
|
-
return smalltalk.send(smalltalk.send(
|
917
|
-
return self;
|
1004
|
+
fn: function () {
|
1005
|
+
var self = this;
|
1006
|
+
return smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_readJSObject_", [smalltalk.send(self, "_basicAt_", ["properties"])]);
|
1007
|
+
return self;
|
1008
|
+
}
|
918
1009
|
}),
|
919
1010
|
smalltalk.Package);
|
920
1011
|
|
@@ -922,10 +1013,11 @@ smalltalk.addMethod(
|
|
922
1013
|
unescape('_propertiesAsJSON'),
|
923
1014
|
smalltalk.method({
|
924
1015
|
selector: unescape('propertiesAsJSON'),
|
925
|
-
fn: function (){
|
926
|
-
var self=this;
|
927
|
-
return JSON.stringify(self.properties);
|
928
|
-
return self;
|
1016
|
+
fn: function () {
|
1017
|
+
var self = this;
|
1018
|
+
return JSON.stringify(self.properties);
|
1019
|
+
return self;
|
1020
|
+
}
|
929
1021
|
}),
|
930
1022
|
smalltalk.Package);
|
931
1023
|
|
@@ -933,13 +1025,14 @@ smalltalk.addMethod(
|
|
933
1025
|
unescape('_properties_'),
|
934
1026
|
smalltalk.method({
|
935
1027
|
selector: unescape('properties%3A'),
|
936
|
-
fn: function (aDict){
|
937
|
-
var self=this;
|
938
|
-
var object=nil;
|
939
|
-
object = {}
|
940
|
-
smalltalk.send(aDict, "_keysAndValuesDo_", [
|
941
|
-
return self.properties = object;
|
942
|
-
return self;
|
1028
|
+
fn: function (aDict) {
|
1029
|
+
var self = this;
|
1030
|
+
var object = nil;
|
1031
|
+
object = {};
|
1032
|
+
smalltalk.send(aDict, "_keysAndValuesDo_", [function (key, value) {return object[key] = value;}]);
|
1033
|
+
return self.properties = object;
|
1034
|
+
return self;
|
1035
|
+
}
|
943
1036
|
}),
|
944
1037
|
smalltalk.Package);
|
945
1038
|
|
@@ -947,10 +1040,11 @@ smalltalk.addMethod(
|
|
947
1040
|
unescape('_jsProperties'),
|
948
1041
|
smalltalk.method({
|
949
1042
|
selector: unescape('jsProperties'),
|
950
|
-
fn: function (){
|
951
|
-
var self=this;
|
952
|
-
return self.properties;
|
953
|
-
return self;
|
1043
|
+
fn: function () {
|
1044
|
+
var self = this;
|
1045
|
+
return self.properties;
|
1046
|
+
return self;
|
1047
|
+
}
|
954
1048
|
}),
|
955
1049
|
smalltalk.Package);
|
956
1050
|
|
@@ -958,10 +1052,11 @@ smalltalk.addMethod(
|
|
958
1052
|
unescape('_jsProperties_'),
|
959
1053
|
smalltalk.method({
|
960
1054
|
selector: unescape('jsProperties%3A'),
|
961
|
-
fn: function (aJSObject){
|
962
|
-
var self=this;
|
963
|
-
return self.properties = aJSObject;
|
964
|
-
return self;
|
1055
|
+
fn: function (aJSObject) {
|
1056
|
+
var self = this;
|
1057
|
+
return self.properties = aJSObject;
|
1058
|
+
return self;
|
1059
|
+
}
|
965
1060
|
}),
|
966
1061
|
smalltalk.Package);
|
967
1062
|
|
@@ -969,10 +1064,11 @@ smalltalk.addMethod(
|
|
969
1064
|
unescape('_propertyAt_'),
|
970
1065
|
smalltalk.method({
|
971
1066
|
selector: unescape('propertyAt%3A'),
|
972
|
-
fn: function (key){
|
973
|
-
var self=this;
|
974
|
-
return self.properties[key];
|
975
|
-
return self;
|
1067
|
+
fn: function (key) {
|
1068
|
+
var self = this;
|
1069
|
+
return self.properties[key];
|
1070
|
+
return self;
|
1071
|
+
}
|
976
1072
|
}),
|
977
1073
|
smalltalk.Package);
|
978
1074
|
|
@@ -980,10 +1076,11 @@ smalltalk.addMethod(
|
|
980
1076
|
unescape('_propertyAt_put_'),
|
981
1077
|
smalltalk.method({
|
982
1078
|
selector: unescape('propertyAt%3Aput%3A'),
|
983
|
-
fn: function (key, value){
|
984
|
-
var self=this;
|
985
|
-
return self.properties[key] = value;
|
986
|
-
return self;
|
1079
|
+
fn: function (key, value) {
|
1080
|
+
var self = this;
|
1081
|
+
return self.properties[key] = value;
|
1082
|
+
return self;
|
1083
|
+
}
|
987
1084
|
}),
|
988
1085
|
smalltalk.Package);
|
989
1086
|
|
@@ -991,10 +1088,12 @@ smalltalk.addMethod(
|
|
991
1088
|
unescape('_propertyAt_ifAbsent_'),
|
992
1089
|
smalltalk.method({
|
993
1090
|
selector: unescape('propertyAt%3AifAbsent%3A'),
|
994
|
-
fn: function (key, block){
|
995
|
-
var self=this;
|
996
|
-
return (
|
997
|
-
return
|
1091
|
+
fn: function (key, block) {
|
1092
|
+
var self = this;
|
1093
|
+
return ($receiver = smalltalk.send(self, "_propertyAt_", [key])) == nil ||
|
1094
|
+
$receiver == undefined ? function () {return smalltalk.send(block, "_value", []);}() : $receiver;
|
1095
|
+
return self;
|
1096
|
+
}
|
998
1097
|
}),
|
999
1098
|
smalltalk.Package);
|
1000
1099
|
|
@@ -1002,10 +1101,12 @@ smalltalk.addMethod(
|
|
1002
1101
|
unescape('_commitPathJs'),
|
1003
1102
|
smalltalk.method({
|
1004
1103
|
selector: unescape('commitPathJs'),
|
1005
|
-
fn: function (){
|
1006
|
-
var self=this;
|
1007
|
-
return (
|
1008
|
-
return self;}
|
1104
|
+
fn: function () {
|
1105
|
+
var self = this;
|
1106
|
+
return ($receiver = self['@commitPathJs']) == nil ||
|
1107
|
+
$receiver == undefined ? function () {return smalltalk.send(smalltalk.send(self, "_class", []), "_defaultCommitPathJs", []);}() : $receiver;
|
1108
|
+
return self;
|
1109
|
+
}
|
1009
1110
|
}),
|
1010
1111
|
smalltalk.Package);
|
1011
1112
|
|
@@ -1013,10 +1114,11 @@ smalltalk.addMethod(
|
|
1013
1114
|
unescape('_commitPathJs_'),
|
1014
1115
|
smalltalk.method({
|
1015
1116
|
selector: unescape('commitPathJs%3A'),
|
1016
|
-
fn: function (aString){
|
1017
|
-
var self=this;
|
1018
|
-
|
1019
|
-
return self;
|
1117
|
+
fn: function (aString) {
|
1118
|
+
var self = this;
|
1119
|
+
self['@commitPathJs'] = aString;
|
1120
|
+
return self;
|
1121
|
+
}
|
1020
1122
|
}),
|
1021
1123
|
smalltalk.Package);
|
1022
1124
|
|
@@ -1024,10 +1126,12 @@ smalltalk.addMethod(
|
|
1024
1126
|
unescape('_commitPathSt'),
|
1025
1127
|
smalltalk.method({
|
1026
1128
|
selector: unescape('commitPathSt'),
|
1027
|
-
fn: function (){
|
1028
|
-
var self=this;
|
1029
|
-
return (
|
1030
|
-
return self;}
|
1129
|
+
fn: function () {
|
1130
|
+
var self = this;
|
1131
|
+
return ($receiver = self['@commitPathSt']) == nil ||
|
1132
|
+
$receiver == undefined ? function () {return smalltalk.send(smalltalk.send(self, "_class", []), "_defaultCommitPathSt", []);}() : $receiver;
|
1133
|
+
return self;
|
1134
|
+
}
|
1031
1135
|
}),
|
1032
1136
|
smalltalk.Package);
|
1033
1137
|
|
@@ -1035,10 +1139,23 @@ smalltalk.addMethod(
|
|
1035
1139
|
unescape('_commitPathSt_'),
|
1036
1140
|
smalltalk.method({
|
1037
1141
|
selector: unescape('commitPathSt%3A'),
|
1038
|
-
fn: function (aString){
|
1039
|
-
var self=this;
|
1040
|
-
|
1041
|
-
return self;
|
1142
|
+
fn: function (aString) {
|
1143
|
+
var self = this;
|
1144
|
+
self['@commitPathSt'] = aString;
|
1145
|
+
return self;
|
1146
|
+
}
|
1147
|
+
}),
|
1148
|
+
smalltalk.Package);
|
1149
|
+
|
1150
|
+
smalltalk.addMethod(
|
1151
|
+
unescape('_sortedClasses'),
|
1152
|
+
smalltalk.method({
|
1153
|
+
selector: unescape('sortedClasses'),
|
1154
|
+
fn: function () {
|
1155
|
+
var self = this;
|
1156
|
+
return smalltalk.send(smalltalk.send(self, "_classes", []), "_inject_into_", [[], function (acc, each) {return ($receiver = smalltalk.send(acc, "_isEmpty", [])).klass === smalltalk.Boolean ? $receiver ? function () {return function ($rec) {smalltalk.send($rec, "_add_", [each]);return smalltalk.send($rec, "_yourself", []);}(acc);}() : function () {return ($receiver = smalltalk.send(acc, "_includes_", [smalltalk.send(each, "_superclass", [])])).klass === smalltalk.Boolean ? $receiver ? function () {return function ($rec) {smalltalk.send($rec, "_add_", [each]);return smalltalk.send($rec, "_yourself", []);}(acc);}() : function () {return smalltalk.send([each], "__comma", [acc]);}() : smalltalk.send($receiver, "_ifTrue_ifFalse_", [function () {return function ($rec) {smalltalk.send($rec, "_add_", [each]);return smalltalk.send($rec, "_yourself", []);}(acc);}, function () {return smalltalk.send([each], "__comma", [acc]);}]);}() : smalltalk.send($receiver, "_ifTrue_ifFalse_", [function () {return function ($rec) {smalltalk.send($rec, "_add_", [each]);return smalltalk.send($rec, "_yourself", []);}(acc);}, function () {return ($receiver = smalltalk.send(acc, "_includes_", [smalltalk.send(each, "_superclass", [])])).klass === smalltalk.Boolean ? $receiver ? function () {return function ($rec) {smalltalk.send($rec, "_add_", [each]);return smalltalk.send($rec, "_yourself", []);}(acc);}() : function () {return smalltalk.send([each], "__comma", [acc]);}() : smalltalk.send($receiver, "_ifTrue_ifFalse_", [function () {return function ($rec) {smalltalk.send($rec, "_add_", [each]);return smalltalk.send($rec, "_yourself", []);}(acc);}, function () {return smalltalk.send([each], "__comma", [acc]);}]);}]);}]);
|
1157
|
+
return self;
|
1158
|
+
}
|
1042
1159
|
}),
|
1043
1160
|
smalltalk.Package);
|
1044
1161
|
|
@@ -1048,10 +1165,11 @@ smalltalk.addMethod(
|
|
1048
1165
|
unescape('_named_'),
|
1049
1166
|
smalltalk.method({
|
1050
1167
|
selector: unescape('named%3A'),
|
1051
|
-
fn: function (aPackageName){
|
1052
|
-
var self=this;
|
1053
|
-
return smalltalk.send(smalltalk.send(
|
1054
|
-
return self;
|
1168
|
+
fn: function (aPackageName) {
|
1169
|
+
var self = this;
|
1170
|
+
return smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_packageAt_", [aPackageName]);
|
1171
|
+
return self;
|
1172
|
+
}
|
1055
1173
|
}),
|
1056
1174
|
smalltalk.Package.klass);
|
1057
1175
|
|
@@ -1059,10 +1177,11 @@ smalltalk.addMethod(
|
|
1059
1177
|
unescape('_named_ifAbsent_'),
|
1060
1178
|
smalltalk.method({
|
1061
1179
|
selector: unescape('named%3AifAbsent%3A'),
|
1062
|
-
fn: function (aPackageName, aBlock){
|
1063
|
-
var self=this;
|
1064
|
-
return smalltalk.send(smalltalk.send(
|
1065
|
-
return self;
|
1180
|
+
fn: function (aPackageName, aBlock) {
|
1181
|
+
var self = this;
|
1182
|
+
return smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_packageAt_ifAbsent_", [aPackageName, aBlock]);
|
1183
|
+
return self;
|
1184
|
+
}
|
1066
1185
|
}),
|
1067
1186
|
smalltalk.Package.klass);
|
1068
1187
|
|
@@ -1070,10 +1189,12 @@ smalltalk.addMethod(
|
|
1070
1189
|
unescape('_defaultCommitPathJs'),
|
1071
1190
|
smalltalk.method({
|
1072
1191
|
selector: unescape('defaultCommitPathJs'),
|
1073
|
-
fn: function (){
|
1074
|
-
var self=this;
|
1075
|
-
return (
|
1076
|
-
return self;}
|
1192
|
+
fn: function () {
|
1193
|
+
var self = this;
|
1194
|
+
return ($receiver = self['@defaultCommitPathJs']) == nil ||
|
1195
|
+
$receiver == undefined ? function () {return self['@defaultCommitPathJs'] = "js";}() : $receiver;
|
1196
|
+
return self;
|
1197
|
+
}
|
1077
1198
|
}),
|
1078
1199
|
smalltalk.Package.klass);
|
1079
1200
|
|
@@ -1081,10 +1202,11 @@ smalltalk.addMethod(
|
|
1081
1202
|
unescape('_defaultCommitPathJs_'),
|
1082
1203
|
smalltalk.method({
|
1083
1204
|
selector: unescape('defaultCommitPathJs%3A'),
|
1084
|
-
fn: function (aString){
|
1085
|
-
var self=this;
|
1086
|
-
|
1087
|
-
return self;
|
1205
|
+
fn: function (aString) {
|
1206
|
+
var self = this;
|
1207
|
+
self['@defaultCommitPathJs'] = aString;
|
1208
|
+
return self;
|
1209
|
+
}
|
1088
1210
|
}),
|
1089
1211
|
smalltalk.Package.klass);
|
1090
1212
|
|
@@ -1092,10 +1214,12 @@ smalltalk.addMethod(
|
|
1092
1214
|
unescape('_defaultCommitPathSt'),
|
1093
1215
|
smalltalk.method({
|
1094
1216
|
selector: unescape('defaultCommitPathSt'),
|
1095
|
-
fn: function (){
|
1096
|
-
var self=this;
|
1097
|
-
return (
|
1098
|
-
return self;}
|
1217
|
+
fn: function () {
|
1218
|
+
var self = this;
|
1219
|
+
return ($receiver = self['@defaultCommitPathSt']) == nil ||
|
1220
|
+
$receiver == undefined ? function () {return self['@defaultCommitPathSt'] = "st";}() : $receiver;
|
1221
|
+
return self;
|
1222
|
+
}
|
1099
1223
|
}),
|
1100
1224
|
smalltalk.Package.klass);
|
1101
1225
|
|
@@ -1103,10 +1227,11 @@ smalltalk.addMethod(
|
|
1103
1227
|
unescape('_defaultCommitPathSt_'),
|
1104
1228
|
smalltalk.method({
|
1105
1229
|
selector: unescape('defaultCommitPathSt%3A'),
|
1106
|
-
fn: function (aString){
|
1107
|
-
var self=this;
|
1108
|
-
|
1109
|
-
return self;
|
1230
|
+
fn: function (aString) {
|
1231
|
+
var self = this;
|
1232
|
+
self['@defaultCommitPathSt'] = aString;
|
1233
|
+
return self;
|
1234
|
+
}
|
1110
1235
|
}),
|
1111
1236
|
smalltalk.Package.klass);
|
1112
1237
|
|
@@ -1114,11 +1239,12 @@ smalltalk.addMethod(
|
|
1114
1239
|
unescape('_resetCommitPaths'),
|
1115
1240
|
smalltalk.method({
|
1116
1241
|
selector: unescape('resetCommitPaths'),
|
1117
|
-
fn: function (){
|
1118
|
-
var self=this;
|
1119
|
-
|
1120
|
-
|
1121
|
-
return self;
|
1242
|
+
fn: function () {
|
1243
|
+
var self = this;
|
1244
|
+
self['@defaultCommitPathJs'] = nil;
|
1245
|
+
self['@defaultCommitPathSt'] = nil;
|
1246
|
+
return self;
|
1247
|
+
}
|
1122
1248
|
}),
|
1123
1249
|
smalltalk.Package.klass);
|
1124
1250
|
|
@@ -1126,10 +1252,11 @@ smalltalk.addMethod(
|
|
1126
1252
|
unescape('_fetch_prefix_'),
|
1127
1253
|
smalltalk.method({
|
1128
1254
|
selector: unescape('fetch%3Aprefix%3A'),
|
1129
|
-
fn: function (aPackageName, aPrefix){
|
1130
|
-
var self=this;
|
1131
|
-
smalltalk.send(
|
1132
|
-
return self;
|
1255
|
+
fn: function (aPackageName, aPrefix) {
|
1256
|
+
var self = this;
|
1257
|
+
smalltalk.send(typeof jQuery == "undefined" ? nil : jQuery, "_getScript_onSuccess_", [smalltalk.send(smalltalk.send(aPrefix, "__comma", [aPackageName]), "__comma", [".js"]), function () {return smalltalk.send(smalltalk.Package || Package, "_init_", [aPackageName]);}]);
|
1258
|
+
return self;
|
1259
|
+
}
|
1133
1260
|
}),
|
1134
1261
|
smalltalk.Package.klass);
|
1135
1262
|
|
@@ -1137,10 +1264,11 @@ smalltalk.addMethod(
|
|
1137
1264
|
unescape('_fetch_'),
|
1138
1265
|
smalltalk.method({
|
1139
1266
|
selector: unescape('fetch%3A'),
|
1140
|
-
fn: function (aPackageName){
|
1141
|
-
var self=this;
|
1142
|
-
smalltalk.send(self, "_fetch_prefix_", [aPackageName, smalltalk.send(smalltalk.send(self, "_defaultCommitPathJs", []), "__comma", [unescape("/")])]);
|
1143
|
-
return self;
|
1267
|
+
fn: function (aPackageName) {
|
1268
|
+
var self = this;
|
1269
|
+
smalltalk.send(self, "_fetch_prefix_", [aPackageName, smalltalk.send(smalltalk.send(self, "_defaultCommitPathJs", []), "__comma", [unescape("/")])]);
|
1270
|
+
return self;
|
1271
|
+
}
|
1144
1272
|
}),
|
1145
1273
|
smalltalk.Package.klass);
|
1146
1274
|
|
@@ -1148,14 +1276,15 @@ smalltalk.addMethod(
|
|
1148
1276
|
unescape('_commitToLocalStorage_'),
|
1149
1277
|
smalltalk.method({
|
1150
1278
|
selector: unescape('commitToLocalStorage%3A'),
|
1151
|
-
fn: function (aPackageName){
|
1152
|
-
var self=this;
|
1153
|
-
var key=nil;
|
1154
|
-
var sourceCode=nil;
|
1155
|
-
|
1156
|
-
|
1157
|
-
localStorage[key] = escape(sourceCode);
|
1158
|
-
return self;
|
1279
|
+
fn: function (aPackageName) {
|
1280
|
+
var self = this;
|
1281
|
+
var key = nil;
|
1282
|
+
var sourceCode = nil;
|
1283
|
+
key = smalltalk.send("smalltalk.packages.", "__comma", [aPackageName]);
|
1284
|
+
sourceCode = smalltalk.send(smalltalk.send(smalltalk.Exporter || Exporter, "_new", []), "_exportPackage_", [aPackageName]);
|
1285
|
+
localStorage[key] = escape(sourceCode);
|
1286
|
+
return self;
|
1287
|
+
}
|
1159
1288
|
}),
|
1160
1289
|
smalltalk.Package.klass);
|
1161
1290
|
|
@@ -1163,10 +1292,11 @@ smalltalk.addMethod(
|
|
1163
1292
|
unescape('_init_'),
|
1164
1293
|
smalltalk.method({
|
1165
1294
|
selector: unescape('init%3A'),
|
1166
|
-
fn: function (aPackageName){
|
1167
|
-
var self=this;
|
1168
|
-
(function($rec){smalltalk.send($rec, "_do_", [
|
1169
|
-
return self;
|
1295
|
+
fn: function (aPackageName) {
|
1296
|
+
var self = this;
|
1297
|
+
(function ($rec) {smalltalk.send($rec, "_do_", [function (each) {return smalltalk.init(each);}]);return smalltalk.send($rec, "_do_", [function (each) {return smalltalk.send(each, "_initialize", []);}]);}(smalltalk.send(smalltalk.send(typeof smalltalk == "undefined" ? nil : smalltalk, "_classes", []), "_select_", [function (each) {return each.pkg.pkgName == aPackageName;}])));
|
1298
|
+
return self;
|
1299
|
+
}
|
1170
1300
|
}),
|
1171
1301
|
smalltalk.Package.klass);
|
1172
1302
|
|
@@ -1176,12 +1306,19 @@ smalltalk.addMethod(
|
|
1176
1306
|
unescape('__eq'),
|
1177
1307
|
smalltalk.method({
|
1178
1308
|
selector: unescape('%3D'),
|
1179
|
-
fn: function (aNumber){
|
1180
|
-
var self=this;
|
1181
|
-
try
|
1182
|
-
return
|
1183
|
-
return self;
|
1184
|
-
|
1309
|
+
fn: function (aNumber) {
|
1310
|
+
var self = this;
|
1311
|
+
try {
|
1312
|
+
($receiver = smalltalk.send(aNumber, "_isNumber", [])).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;}};}();}]);
|
1313
|
+
return Number(self) == aNumber;
|
1314
|
+
return self;
|
1315
|
+
} catch (e) {
|
1316
|
+
if (e.name === "stReturn" && e.selector === "__eq") {
|
1317
|
+
return e.fn();
|
1318
|
+
}
|
1319
|
+
throw e;
|
1320
|
+
}
|
1321
|
+
}
|
1185
1322
|
}),
|
1186
1323
|
smalltalk.Number);
|
1187
1324
|
|
@@ -1189,10 +1326,11 @@ smalltalk.addMethod(
|
|
1189
1326
|
unescape('__gt'),
|
1190
1327
|
smalltalk.method({
|
1191
1328
|
selector: unescape('%3E'),
|
1192
|
-
fn: function (aNumber){
|
1193
|
-
var self=this;
|
1194
|
-
return self > aNumber;
|
1195
|
-
return self;
|
1329
|
+
fn: function (aNumber) {
|
1330
|
+
var self = this;
|
1331
|
+
return self > aNumber;
|
1332
|
+
return self;
|
1333
|
+
}
|
1196
1334
|
}),
|
1197
1335
|
smalltalk.Number);
|
1198
1336
|
|
@@ -1200,10 +1338,11 @@ smalltalk.addMethod(
|
|
1200
1338
|
unescape('__lt'),
|
1201
1339
|
smalltalk.method({
|
1202
1340
|
selector: unescape('%3C'),
|
1203
|
-
fn: function (aNumber){
|
1204
|
-
var self=this;
|
1205
|
-
return self < aNumber;
|
1206
|
-
return self;
|
1341
|
+
fn: function (aNumber) {
|
1342
|
+
var self = this;
|
1343
|
+
return self < aNumber;
|
1344
|
+
return self;
|
1345
|
+
}
|
1207
1346
|
}),
|
1208
1347
|
smalltalk.Number);
|
1209
1348
|
|
@@ -1211,10 +1350,11 @@ smalltalk.addMethod(
|
|
1211
1350
|
unescape('__gt_eq'),
|
1212
1351
|
smalltalk.method({
|
1213
1352
|
selector: unescape('%3E%3D'),
|
1214
|
-
fn: function (aNumber){
|
1215
|
-
var self=this;
|
1216
|
-
return self >= aNumber;
|
1217
|
-
return self;
|
1353
|
+
fn: function (aNumber) {
|
1354
|
+
var self = this;
|
1355
|
+
return self >= aNumber;
|
1356
|
+
return self;
|
1357
|
+
}
|
1218
1358
|
}),
|
1219
1359
|
smalltalk.Number);
|
1220
1360
|
|
@@ -1222,10 +1362,11 @@ smalltalk.addMethod(
|
|
1222
1362
|
unescape('__lt_eq'),
|
1223
1363
|
smalltalk.method({
|
1224
1364
|
selector: unescape('%3C%3D'),
|
1225
|
-
fn: function (aNumber){
|
1226
|
-
var self=this;
|
1227
|
-
return self <= aNumber;
|
1228
|
-
return self;
|
1365
|
+
fn: function (aNumber) {
|
1366
|
+
var self = this;
|
1367
|
+
return self <= aNumber;
|
1368
|
+
return self;
|
1369
|
+
}
|
1229
1370
|
}),
|
1230
1371
|
smalltalk.Number);
|
1231
1372
|
|
@@ -1233,10 +1374,11 @@ smalltalk.addMethod(
|
|
1233
1374
|
unescape('__plus'),
|
1234
1375
|
smalltalk.method({
|
1235
1376
|
selector: unescape('+'),
|
1236
|
-
fn: function (aNumber){
|
1237
|
-
var self=this;
|
1238
|
-
return self + aNumber;
|
1239
|
-
return self;
|
1377
|
+
fn: function (aNumber) {
|
1378
|
+
var self = this;
|
1379
|
+
return self + aNumber;
|
1380
|
+
return self;
|
1381
|
+
}
|
1240
1382
|
}),
|
1241
1383
|
smalltalk.Number);
|
1242
1384
|
|
@@ -1244,10 +1386,11 @@ smalltalk.addMethod(
|
|
1244
1386
|
unescape('__minus'),
|
1245
1387
|
smalltalk.method({
|
1246
1388
|
selector: unescape('-'),
|
1247
|
-
fn: function (aNumber){
|
1248
|
-
var self=this;
|
1249
|
-
return self - aNumber;
|
1250
|
-
return self;
|
1389
|
+
fn: function (aNumber) {
|
1390
|
+
var self = this;
|
1391
|
+
return self - aNumber;
|
1392
|
+
return self;
|
1393
|
+
}
|
1251
1394
|
}),
|
1252
1395
|
smalltalk.Number);
|
1253
1396
|
|
@@ -1255,10 +1398,11 @@ smalltalk.addMethod(
|
|
1255
1398
|
unescape('__star'),
|
1256
1399
|
smalltalk.method({
|
1257
1400
|
selector: unescape('*'),
|
1258
|
-
fn: function (aNumber){
|
1259
|
-
var self=this;
|
1260
|
-
return self * aNumber;
|
1261
|
-
return self;
|
1401
|
+
fn: function (aNumber) {
|
1402
|
+
var self = this;
|
1403
|
+
return self * aNumber;
|
1404
|
+
return self;
|
1405
|
+
}
|
1262
1406
|
}),
|
1263
1407
|
smalltalk.Number);
|
1264
1408
|
|
@@ -1266,10 +1410,11 @@ smalltalk.addMethod(
|
|
1266
1410
|
unescape('__slash'),
|
1267
1411
|
smalltalk.method({
|
1268
1412
|
selector: unescape('/'),
|
1269
|
-
fn: function (aNumber){
|
1270
|
-
var self=this;
|
1271
|
-
return self / aNumber;
|
1272
|
-
return self;
|
1413
|
+
fn: function (aNumber) {
|
1414
|
+
var self = this;
|
1415
|
+
return self / aNumber;
|
1416
|
+
return self;
|
1417
|
+
}
|
1273
1418
|
}),
|
1274
1419
|
smalltalk.Number);
|
1275
1420
|
|
@@ -1277,10 +1422,11 @@ smalltalk.addMethod(
|
|
1277
1422
|
unescape('_max_'),
|
1278
1423
|
smalltalk.method({
|
1279
1424
|
selector: unescape('max%3A'),
|
1280
|
-
fn: function (aNumber){
|
1281
|
-
var self=this;
|
1282
|
-
return Math.max(self, aNumber)
|
1283
|
-
return self;
|
1425
|
+
fn: function (aNumber) {
|
1426
|
+
var self = this;
|
1427
|
+
return Math.max(self, aNumber);
|
1428
|
+
return self;
|
1429
|
+
}
|
1284
1430
|
}),
|
1285
1431
|
smalltalk.Number);
|
1286
1432
|
|
@@ -1288,10 +1434,11 @@ smalltalk.addMethod(
|
|
1288
1434
|
unescape('_min_'),
|
1289
1435
|
smalltalk.method({
|
1290
1436
|
selector: unescape('min%3A'),
|
1291
|
-
fn: function (aNumber){
|
1292
|
-
var self=this;
|
1293
|
-
return Math.min(self, aNumber)
|
1294
|
-
return self;
|
1437
|
+
fn: function (aNumber) {
|
1438
|
+
var self = this;
|
1439
|
+
return Math.min(self, aNumber);
|
1440
|
+
return self;
|
1441
|
+
}
|
1295
1442
|
}),
|
1296
1443
|
smalltalk.Number);
|
1297
1444
|
|
@@ -1299,10 +1446,11 @@ smalltalk.addMethod(
|
|
1299
1446
|
unescape('_rounded'),
|
1300
1447
|
smalltalk.method({
|
1301
1448
|
selector: unescape('rounded'),
|
1302
|
-
fn: function (){
|
1303
|
-
var self=this;
|
1304
|
-
return Math.round(self)
|
1305
|
-
return self;
|
1449
|
+
fn: function () {
|
1450
|
+
var self = this;
|
1451
|
+
return Math.round(self);
|
1452
|
+
return self;
|
1453
|
+
}
|
1306
1454
|
}),
|
1307
1455
|
smalltalk.Number);
|
1308
1456
|
|
@@ -1310,12 +1458,13 @@ smalltalk.addMethod(
|
|
1310
1458
|
unescape('_truncated'),
|
1311
1459
|
smalltalk.method({
|
1312
1460
|
selector: unescape('truncated'),
|
1313
|
-
fn: function (){
|
1314
|
-
var self=this;
|
1315
|
-
var result=nil;
|
1316
|
-
(
|
1317
|
-
return result;
|
1318
|
-
return self;
|
1461
|
+
fn: function () {
|
1462
|
+
var self = this;
|
1463
|
+
var result = nil;
|
1464
|
+
($receiver = self >= 0).klass === smalltalk.Boolean ? $receiver ? function () {return result = Math.floor(self);}() : function () {return result = Math.floor(self * -1) * -1;}() : smalltalk.send($receiver, "_ifTrue_ifFalse_", [function () {return result = Math.floor(self);}, function () {return result = Math.floor(self * -1) * -1;}]);
|
1465
|
+
return result;
|
1466
|
+
return self;
|
1467
|
+
}
|
1319
1468
|
}),
|
1320
1469
|
smalltalk.Number);
|
1321
1470
|
|
@@ -1323,19 +1472,20 @@ smalltalk.addMethod(
|
|
1323
1472
|
unescape('_to_'),
|
1324
1473
|
smalltalk.method({
|
1325
1474
|
selector: unescape('to%3A'),
|
1326
|
-
fn: function (aNumber){
|
1327
|
-
var self=this;
|
1328
|
-
var array=nil;
|
1329
|
-
var first=nil;
|
1330
|
-
var last=nil;
|
1331
|
-
var count=nil;
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
smalltalk.send((
|
1337
|
-
return array;
|
1338
|
-
return self;
|
1475
|
+
fn: function (aNumber) {
|
1476
|
+
var self = this;
|
1477
|
+
var array = nil;
|
1478
|
+
var first = nil;
|
1479
|
+
var last = nil;
|
1480
|
+
var count = nil;
|
1481
|
+
first = smalltalk.send(self, "_truncated", []);
|
1482
|
+
last = ($receiver = smalltalk.send(aNumber, "_truncated", [])).klass === smalltalk.Number ? $receiver + 1 : smalltalk.send($receiver, "__plus", [1]);
|
1483
|
+
count = 1;
|
1484
|
+
array = smalltalk.send(smalltalk.Array || Array, "_new", []);
|
1485
|
+
smalltalk.send(($receiver = last).klass === smalltalk.Number ? $receiver - first : smalltalk.send($receiver, "__minus", [first]), "_timesRepeat_", [function () {smalltalk.send(array, "_at_put_", [count, first]);count = ($receiver = count).klass === smalltalk.Number ? $receiver + 1 : smalltalk.send($receiver, "__plus", [1]);return first = ($receiver = first).klass === smalltalk.Number ? $receiver + 1 : smalltalk.send($receiver, "__plus", [1]);}]);
|
1486
|
+
return array;
|
1487
|
+
return self;
|
1488
|
+
}
|
1339
1489
|
}),
|
1340
1490
|
smalltalk.Number);
|
1341
1491
|
|
@@ -1343,14 +1493,15 @@ smalltalk.addMethod(
|
|
1343
1493
|
unescape('_timesRepeat_'),
|
1344
1494
|
smalltalk.method({
|
1345
1495
|
selector: unescape('timesRepeat%3A'),
|
1346
|
-
fn: function (aBlock){
|
1347
|
-
var self=this;
|
1348
|
-
var integer=nil;
|
1349
|
-
var count=nil;
|
1350
|
-
|
1351
|
-
|
1352
|
-
(function(){while(!
|
1353
|
-
return self;
|
1496
|
+
fn: function (aBlock) {
|
1497
|
+
var self = this;
|
1498
|
+
var integer = nil;
|
1499
|
+
var count = nil;
|
1500
|
+
integer = smalltalk.send(self, "_truncated", []);
|
1501
|
+
count = 1;
|
1502
|
+
(function () {while (!function () {return ($receiver = count).klass === smalltalk.Number ? $receiver > self : smalltalk.send($receiver, "__gt", [self]);}()) {(function () {smalltalk.send(aBlock, "_value", []);return count = ($receiver = count).klass === smalltalk.Number ? $receiver + 1 : smalltalk.send($receiver, "__plus", [1]);}());}}());
|
1503
|
+
return self;
|
1504
|
+
}
|
1354
1505
|
}),
|
1355
1506
|
smalltalk.Number);
|
1356
1507
|
|
@@ -1358,12 +1509,13 @@ smalltalk.addMethod(
|
|
1358
1509
|
unescape('_to_do_'),
|
1359
1510
|
smalltalk.method({
|
1360
1511
|
selector: unescape('to%3Ado%3A'),
|
1361
|
-
fn: function (stop, aBlock){
|
1362
|
-
var self=this;
|
1363
|
-
var nextValue=nil;
|
1364
|
-
|
1365
|
-
(function(){while(
|
1366
|
-
return self;
|
1512
|
+
fn: function (stop, aBlock) {
|
1513
|
+
var self = this;
|
1514
|
+
var nextValue = nil;
|
1515
|
+
nextValue = self;
|
1516
|
+
(function () {while (function () {return ($receiver = nextValue).klass === smalltalk.Number ? $receiver <= stop : smalltalk.send($receiver, "__lt_eq", [stop]);}()) {(function () {smalltalk.send(aBlock, "_value_", [nextValue]);return nextValue = ($receiver = nextValue).klass === smalltalk.Number ? $receiver + 1 : smalltalk.send($receiver, "__plus", [1]);}());}}());
|
1517
|
+
return self;
|
1518
|
+
}
|
1367
1519
|
}),
|
1368
1520
|
smalltalk.Number);
|
1369
1521
|
|
@@ -1371,10 +1523,11 @@ smalltalk.addMethod(
|
|
1371
1523
|
unescape('_asString'),
|
1372
1524
|
smalltalk.method({
|
1373
1525
|
selector: unescape('asString'),
|
1374
|
-
fn: function (){
|
1375
|
-
var self=this;
|
1376
|
-
return smalltalk.send(self, "_printString", []);
|
1377
|
-
return self;
|
1526
|
+
fn: function () {
|
1527
|
+
var self = this;
|
1528
|
+
return smalltalk.send(self, "_printString", []);
|
1529
|
+
return self;
|
1530
|
+
}
|
1378
1531
|
}),
|
1379
1532
|
smalltalk.Number);
|
1380
1533
|
|
@@ -1382,10 +1535,11 @@ smalltalk.addMethod(
|
|
1382
1535
|
unescape('_asJavascript'),
|
1383
1536
|
smalltalk.method({
|
1384
1537
|
selector: unescape('asJavascript'),
|
1385
|
-
fn: function (){
|
1386
|
-
var self=this;
|
1387
|
-
return smalltalk.send(smalltalk.send(unescape("%28"), "__comma", [smalltalk.send(self, "_printString", [])]), "__comma", [unescape("%29")]);
|
1388
|
-
return self;
|
1538
|
+
fn: function () {
|
1539
|
+
var self = this;
|
1540
|
+
return smalltalk.send(smalltalk.send(unescape("%28"), "__comma", [smalltalk.send(self, "_printString", [])]), "__comma", [unescape("%29")]);
|
1541
|
+
return self;
|
1542
|
+
}
|
1389
1543
|
}),
|
1390
1544
|
smalltalk.Number);
|
1391
1545
|
|
@@ -1393,10 +1547,11 @@ smalltalk.addMethod(
|
|
1393
1547
|
unescape('_printString'),
|
1394
1548
|
smalltalk.method({
|
1395
1549
|
selector: unescape('printString'),
|
1396
|
-
fn: function (){
|
1397
|
-
var self=this;
|
1398
|
-
return String(self);
|
1399
|
-
return self;
|
1550
|
+
fn: function () {
|
1551
|
+
var self = this;
|
1552
|
+
return String(self);
|
1553
|
+
return self;
|
1554
|
+
}
|
1400
1555
|
}),
|
1401
1556
|
smalltalk.Number);
|
1402
1557
|
|
@@ -1404,10 +1559,11 @@ smalltalk.addMethod(
|
|
1404
1559
|
unescape('_isNumber'),
|
1405
1560
|
smalltalk.method({
|
1406
1561
|
selector: unescape('isNumber'),
|
1407
|
-
fn: function (){
|
1408
|
-
var self=this;
|
1409
|
-
return true;
|
1410
|
-
return self;
|
1562
|
+
fn: function () {
|
1563
|
+
var self = this;
|
1564
|
+
return true;
|
1565
|
+
return self;
|
1566
|
+
}
|
1411
1567
|
}),
|
1412
1568
|
smalltalk.Number);
|
1413
1569
|
|
@@ -1415,10 +1571,11 @@ smalltalk.addMethod(
|
|
1415
1571
|
unescape('_atRandom'),
|
1416
1572
|
smalltalk.method({
|
1417
1573
|
selector: unescape('atRandom'),
|
1418
|
-
fn: function (){
|
1419
|
-
var self=this;
|
1420
|
-
return (
|
1421
|
-
return self;
|
1574
|
+
fn: function () {
|
1575
|
+
var self = this;
|
1576
|
+
return ($receiver = smalltalk.send(($receiver = smalltalk.send(smalltalk.send(smalltalk.Random || Random, "_new", []), "_next", [])).klass === smalltalk.Number ? $receiver * self : smalltalk.send($receiver, "__star", [self]), "_truncated", [])).klass === smalltalk.Number ? $receiver + 1 : smalltalk.send($receiver, "__plus", [1]);
|
1577
|
+
return self;
|
1578
|
+
}
|
1422
1579
|
}),
|
1423
1580
|
smalltalk.Number);
|
1424
1581
|
|
@@ -1426,10 +1583,11 @@ smalltalk.addMethod(
|
|
1426
1583
|
unescape('__at'),
|
1427
1584
|
smalltalk.method({
|
1428
1585
|
selector: unescape('@'),
|
1429
|
-
fn: function (aNumber){
|
1430
|
-
var self=this;
|
1431
|
-
return smalltalk.send(
|
1432
|
-
return self;
|
1586
|
+
fn: function (aNumber) {
|
1587
|
+
var self = this;
|
1588
|
+
return smalltalk.send(smalltalk.Point || Point, "_x_y_", [self, aNumber]);
|
1589
|
+
return self;
|
1590
|
+
}
|
1433
1591
|
}),
|
1434
1592
|
smalltalk.Number);
|
1435
1593
|
|
@@ -1437,10 +1595,11 @@ smalltalk.addMethod(
|
|
1437
1595
|
unescape('_asPoint'),
|
1438
1596
|
smalltalk.method({
|
1439
1597
|
selector: unescape('asPoint'),
|
1440
|
-
fn: function (){
|
1441
|
-
var self=this;
|
1442
|
-
return smalltalk.send(
|
1443
|
-
return self;
|
1598
|
+
fn: function () {
|
1599
|
+
var self = this;
|
1600
|
+
return smalltalk.send(smalltalk.Point || Point, "_x_y_", [self, self]);
|
1601
|
+
return self;
|
1602
|
+
}
|
1444
1603
|
}),
|
1445
1604
|
smalltalk.Number);
|
1446
1605
|
|
@@ -1448,10 +1607,11 @@ smalltalk.addMethod(
|
|
1448
1607
|
unescape('_clearInterval'),
|
1449
1608
|
smalltalk.method({
|
1450
1609
|
selector: unescape('clearInterval'),
|
1451
|
-
fn: function (){
|
1452
|
-
var self=this;
|
1453
|
-
clearInterval(Number(self));
|
1454
|
-
return self;
|
1610
|
+
fn: function () {
|
1611
|
+
var self = this;
|
1612
|
+
clearInterval(Number(self));
|
1613
|
+
return self;
|
1614
|
+
}
|
1455
1615
|
}),
|
1456
1616
|
smalltalk.Number);
|
1457
1617
|
|
@@ -1459,10 +1619,11 @@ smalltalk.addMethod(
|
|
1459
1619
|
unescape('_clearTimeout'),
|
1460
1620
|
smalltalk.method({
|
1461
1621
|
selector: unescape('clearTimeout'),
|
1462
|
-
fn: function (){
|
1463
|
-
var self=this;
|
1464
|
-
clearTimeout(Number(self));
|
1465
|
-
return self;
|
1622
|
+
fn: function () {
|
1623
|
+
var self = this;
|
1624
|
+
clearTimeout(Number(self));
|
1625
|
+
return self;
|
1626
|
+
}
|
1466
1627
|
}),
|
1467
1628
|
smalltalk.Number);
|
1468
1629
|
|
@@ -1470,10 +1631,11 @@ smalltalk.addMethod(
|
|
1470
1631
|
unescape('_even'),
|
1471
1632
|
smalltalk.method({
|
1472
1633
|
selector: unescape('even'),
|
1473
|
-
fn: function (){
|
1474
|
-
var self=this;
|
1475
|
-
return smalltalk.send(
|
1476
|
-
return self;
|
1634
|
+
fn: function () {
|
1635
|
+
var self = this;
|
1636
|
+
return smalltalk.send(0, "__eq", [smalltalk.send(self, "_\\\\", [2])]);
|
1637
|
+
return self;
|
1638
|
+
}
|
1477
1639
|
}),
|
1478
1640
|
smalltalk.Number);
|
1479
1641
|
|
@@ -1481,10 +1643,11 @@ smalltalk.addMethod(
|
|
1481
1643
|
unescape('_odd'),
|
1482
1644
|
smalltalk.method({
|
1483
1645
|
selector: unescape('odd'),
|
1484
|
-
fn: function (){
|
1485
|
-
var self=this;
|
1486
|
-
return smalltalk.send(smalltalk.send(self, "_even", []), "_not", []);
|
1487
|
-
return self;
|
1646
|
+
fn: function () {
|
1647
|
+
var self = this;
|
1648
|
+
return smalltalk.send(smalltalk.send(self, "_even", []), "_not", []);
|
1649
|
+
return self;
|
1650
|
+
}
|
1488
1651
|
}),
|
1489
1652
|
smalltalk.Number);
|
1490
1653
|
|
@@ -1492,10 +1655,11 @@ smalltalk.addMethod(
|
|
1492
1655
|
unescape('_negated'),
|
1493
1656
|
smalltalk.method({
|
1494
1657
|
selector: unescape('negated'),
|
1495
|
-
fn: function (){
|
1496
|
-
var self=this;
|
1497
|
-
return
|
1498
|
-
return self;
|
1658
|
+
fn: function () {
|
1659
|
+
var self = this;
|
1660
|
+
return 0 - self;
|
1661
|
+
return self;
|
1662
|
+
}
|
1499
1663
|
}),
|
1500
1664
|
smalltalk.Number);
|
1501
1665
|
|
@@ -1503,21 +1667,11 @@ smalltalk.addMethod(
|
|
1503
1667
|
unescape('_printShowingDecimalPlaces_'),
|
1504
1668
|
smalltalk.method({
|
1505
1669
|
selector: unescape('printShowingDecimalPlaces%3A'),
|
1506
|
-
fn: function (placesDesired){
|
1507
|
-
var self=this;
|
1508
|
-
return self.toFixed(placesDesired);
|
1509
|
-
return self;
|
1510
|
-
}
|
1511
|
-
smalltalk.Number);
|
1512
|
-
|
1513
|
-
smalltalk.addMethod(
|
1514
|
-
unescape('_%5C'),
|
1515
|
-
smalltalk.method({
|
1516
|
-
selector: unescape('%5C'),
|
1517
|
-
fn: function (aNumber){
|
1518
|
-
var self=this;
|
1519
|
-
return self % aNumber;
|
1520
|
-
return self;}
|
1670
|
+
fn: function (placesDesired) {
|
1671
|
+
var self = this;
|
1672
|
+
return self.toFixed(placesDesired);
|
1673
|
+
return self;
|
1674
|
+
}
|
1521
1675
|
}),
|
1522
1676
|
smalltalk.Number);
|
1523
1677
|
|
@@ -1525,18 +1679,19 @@ smalltalk.addMethod(
|
|
1525
1679
|
unescape('_to_by_'),
|
1526
1680
|
smalltalk.method({
|
1527
1681
|
selector: unescape('to%3Aby%3A'),
|
1528
|
-
fn: function (stop, step){
|
1529
|
-
var self=this;
|
1530
|
-
var array=nil;
|
1531
|
-
var value=nil;
|
1532
|
-
var pos=nil;
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
1536
|
-
(
|
1537
|
-
(
|
1538
|
-
return array;
|
1539
|
-
return self;
|
1682
|
+
fn: function (stop, step) {
|
1683
|
+
var self = this;
|
1684
|
+
var array = nil;
|
1685
|
+
var value = nil;
|
1686
|
+
var pos = nil;
|
1687
|
+
value = self;
|
1688
|
+
array = smalltalk.send(smalltalk.Array || Array, "_new", []);
|
1689
|
+
pos = 1;
|
1690
|
+
($receiver = smalltalk.send(step, "__eq", [0])).klass === smalltalk.Boolean ? $receiver ? function () {return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);}() : nil : smalltalk.send($receiver, "_ifTrue_", [function () {return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);}]);
|
1691
|
+
($receiver = ($receiver = step).klass === smalltalk.Number ? $receiver < 0 : smalltalk.send($receiver, "__lt", [0])).klass === smalltalk.Boolean ? $receiver ? function () {return function () {while (function () {return ($receiver = value).klass === smalltalk.Number ? $receiver >= stop : smalltalk.send($receiver, "__gt_eq", [stop]);}()) {(function () {smalltalk.send(array, "_at_put_", [pos, value]);pos = ($receiver = pos).klass === smalltalk.Number ? $receiver + 1 : smalltalk.send($receiver, "__plus", [1]);return value = ($receiver = value).klass === smalltalk.Number ? $receiver + step : smalltalk.send($receiver, "__plus", [step]);}());}}();}() : function () {return function () {while (function () {return ($receiver = value).klass === smalltalk.Number ? $receiver <= stop : smalltalk.send($receiver, "__lt_eq", [stop]);}()) {(function () {smalltalk.send(array, "_at_put_", [pos, value]);pos = ($receiver = pos).klass === smalltalk.Number ? $receiver + 1 : smalltalk.send($receiver, "__plus", [1]);return value = ($receiver = value).klass === smalltalk.Number ? $receiver + step : smalltalk.send($receiver, "__plus", [step]);}());}}();}() : smalltalk.send($receiver, "_ifTrue_ifFalse_", [function () {return function () {while (function () {return ($receiver = value).klass === smalltalk.Number ? $receiver >= stop : smalltalk.send($receiver, "__gt_eq", [stop]);}()) {(function () {smalltalk.send(array, "_at_put_", [pos, value]);pos = ($receiver = pos).klass === smalltalk.Number ? $receiver + 1 : smalltalk.send($receiver, "__plus", [1]);return value = ($receiver = value).klass === smalltalk.Number ? $receiver + step : smalltalk.send($receiver, "__plus", [step]);}());}}();}, function () {return function () {while (function () {return ($receiver = value).klass === smalltalk.Number ? $receiver <= stop : smalltalk.send($receiver, "__lt_eq", [stop]);}()) {(function () {smalltalk.send(array, "_at_put_", [pos, value]);pos = ($receiver = pos).klass === smalltalk.Number ? $receiver + 1 : smalltalk.send($receiver, "__plus", [1]);return value = ($receiver = value).klass === smalltalk.Number ? $receiver + step : smalltalk.send($receiver, "__plus", [step]);}());}}();}]);
|
1692
|
+
return array;
|
1693
|
+
return self;
|
1694
|
+
}
|
1540
1695
|
}),
|
1541
1696
|
smalltalk.Number);
|
1542
1697
|
|
@@ -1544,13 +1699,14 @@ smalltalk.addMethod(
|
|
1544
1699
|
unescape('_to_by_do_'),
|
1545
1700
|
smalltalk.method({
|
1546
1701
|
selector: unescape('to%3Aby%3Ado%3A'),
|
1547
|
-
fn: function (stop, step, aBlock){
|
1548
|
-
var self=this;
|
1549
|
-
var value=nil;
|
1550
|
-
|
1551
|
-
(
|
1552
|
-
(
|
1553
|
-
return self;
|
1702
|
+
fn: function (stop, step, aBlock) {
|
1703
|
+
var self = this;
|
1704
|
+
var value = nil;
|
1705
|
+
value = self;
|
1706
|
+
($receiver = smalltalk.send(step, "__eq", [0])).klass === smalltalk.Boolean ? $receiver ? function () {return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);}() : nil : smalltalk.send($receiver, "_ifTrue_", [function () {return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);}]);
|
1707
|
+
($receiver = ($receiver = step).klass === smalltalk.Number ? $receiver < 0 : smalltalk.send($receiver, "__lt", [0])).klass === smalltalk.Boolean ? $receiver ? function () {return function () {while (function () {return ($receiver = value).klass === smalltalk.Number ? $receiver >= stop : smalltalk.send($receiver, "__gt_eq", [stop]);}()) {(function () {smalltalk.send(aBlock, "_value_", [value]);return value = ($receiver = value).klass === smalltalk.Number ? $receiver + step : smalltalk.send($receiver, "__plus", [step]);}());}}();}() : function () {return function () {while (function () {return ($receiver = value).klass === smalltalk.Number ? $receiver <= stop : smalltalk.send($receiver, "__lt_eq", [stop]);}()) {(function () {smalltalk.send(aBlock, "_value_", [value]);return value = ($receiver = value).klass === smalltalk.Number ? $receiver + step : smalltalk.send($receiver, "__plus", [step]);}());}}();}() : smalltalk.send($receiver, "_ifTrue_ifFalse_", [function () {return function () {while (function () {return ($receiver = value).klass === smalltalk.Number ? $receiver >= stop : smalltalk.send($receiver, "__gt_eq", [stop]);}()) {(function () {smalltalk.send(aBlock, "_value_", [value]);return value = ($receiver = value).klass === smalltalk.Number ? $receiver + step : smalltalk.send($receiver, "__plus", [step]);}());}}();}, function () {return function () {while (function () {return ($receiver = value).klass === smalltalk.Number ? $receiver <= stop : smalltalk.send($receiver, "__lt_eq", [stop]);}()) {(function () {smalltalk.send(aBlock, "_value_", [value]);return value = ($receiver = value).klass === smalltalk.Number ? $receiver + step : smalltalk.send($receiver, "__plus", [step]);}());}}();}]);
|
1708
|
+
return self;
|
1709
|
+
}
|
1554
1710
|
}),
|
1555
1711
|
smalltalk.Number);
|
1556
1712
|
|
@@ -1558,10 +1714,11 @@ smalltalk.addMethod(
|
|
1558
1714
|
unescape('_deepCopy'),
|
1559
1715
|
smalltalk.method({
|
1560
1716
|
selector: unescape('deepCopy'),
|
1561
|
-
fn: function (){
|
1562
|
-
var self=this;
|
1563
|
-
return smalltalk.send(self, "_copy", []);
|
1564
|
-
return self;
|
1717
|
+
fn: function () {
|
1718
|
+
var self = this;
|
1719
|
+
return smalltalk.send(self, "_copy", []);
|
1720
|
+
return self;
|
1721
|
+
}
|
1565
1722
|
}),
|
1566
1723
|
smalltalk.Number);
|
1567
1724
|
|
@@ -1569,10 +1726,11 @@ smalltalk.addMethod(
|
|
1569
1726
|
unescape('_copy'),
|
1570
1727
|
smalltalk.method({
|
1571
1728
|
selector: unescape('copy'),
|
1572
|
-
fn: function (){
|
1573
|
-
var self=this;
|
1574
|
-
return self;
|
1575
|
-
return self;
|
1729
|
+
fn: function () {
|
1730
|
+
var self = this;
|
1731
|
+
return self;
|
1732
|
+
return self;
|
1733
|
+
}
|
1576
1734
|
}),
|
1577
1735
|
smalltalk.Number);
|
1578
1736
|
|
@@ -1580,10 +1738,11 @@ smalltalk.addMethod(
|
|
1580
1738
|
unescape('_%5C%5C'),
|
1581
1739
|
smalltalk.method({
|
1582
1740
|
selector: unescape('%5C%5C'),
|
1583
|
-
fn: function (aNumber){
|
1584
|
-
var self=this;
|
1585
|
-
return self % aNumber;
|
1586
|
-
return self;
|
1741
|
+
fn: function (aNumber) {
|
1742
|
+
var self = this;
|
1743
|
+
return self % aNumber;
|
1744
|
+
return self;
|
1745
|
+
}
|
1587
1746
|
}),
|
1588
1747
|
smalltalk.Number);
|
1589
1748
|
|
@@ -1591,10 +1750,11 @@ smalltalk.addMethod(
|
|
1591
1750
|
unescape('_sqrt'),
|
1592
1751
|
smalltalk.method({
|
1593
1752
|
selector: unescape('sqrt'),
|
1594
|
-
fn: function (){
|
1595
|
-
var self=this;
|
1596
|
-
return Math.sqrt(self);
|
1597
|
-
return self;
|
1753
|
+
fn: function () {
|
1754
|
+
var self = this;
|
1755
|
+
return Math.sqrt(self);
|
1756
|
+
return self;
|
1757
|
+
}
|
1598
1758
|
}),
|
1599
1759
|
smalltalk.Number);
|
1600
1760
|
|
@@ -1602,10 +1762,11 @@ smalltalk.addMethod(
|
|
1602
1762
|
unescape('_squared'),
|
1603
1763
|
smalltalk.method({
|
1604
1764
|
selector: unescape('squared'),
|
1605
|
-
fn: function (){
|
1606
|
-
var self=this;
|
1607
|
-
return self * self;
|
1608
|
-
return self;
|
1765
|
+
fn: function () {
|
1766
|
+
var self = this;
|
1767
|
+
return self * self;
|
1768
|
+
return self;
|
1769
|
+
}
|
1609
1770
|
}),
|
1610
1771
|
smalltalk.Number);
|
1611
1772
|
|
@@ -1613,10 +1774,11 @@ smalltalk.addMethod(
|
|
1613
1774
|
unescape('_identityHash'),
|
1614
1775
|
smalltalk.method({
|
1615
1776
|
selector: unescape('identityHash'),
|
1616
|
-
fn: function (){
|
1617
|
-
var self=this;
|
1618
|
-
return smalltalk.send(smalltalk.send(self, "_asString", []), "__comma", ["n"]);
|
1619
|
-
return self;
|
1777
|
+
fn: function () {
|
1778
|
+
var self = this;
|
1779
|
+
return smalltalk.send(smalltalk.send(self, "_asString", []), "__comma", ["n"]);
|
1780
|
+
return self;
|
1781
|
+
}
|
1620
1782
|
}),
|
1621
1783
|
smalltalk.Number);
|
1622
1784
|
|
@@ -1624,10 +1786,11 @@ smalltalk.addMethod(
|
|
1624
1786
|
unescape('_negative'),
|
1625
1787
|
smalltalk.method({
|
1626
1788
|
selector: unescape('negative'),
|
1627
|
-
fn: function (){
|
1628
|
-
var self=this;
|
1629
|
-
return self <
|
1630
|
-
return self;
|
1789
|
+
fn: function () {
|
1790
|
+
var self = this;
|
1791
|
+
return self < 0;
|
1792
|
+
return self;
|
1793
|
+
}
|
1631
1794
|
}),
|
1632
1795
|
smalltalk.Number);
|
1633
1796
|
|
@@ -1635,10 +1798,11 @@ smalltalk.addMethod(
|
|
1635
1798
|
unescape('_positive'),
|
1636
1799
|
smalltalk.method({
|
1637
1800
|
selector: unescape('positive'),
|
1638
|
-
fn: function (){
|
1639
|
-
var self=this;
|
1640
|
-
return self >=
|
1641
|
-
return self;
|
1801
|
+
fn: function () {
|
1802
|
+
var self = this;
|
1803
|
+
return self >= 0;
|
1804
|
+
return self;
|
1805
|
+
}
|
1642
1806
|
}),
|
1643
1807
|
smalltalk.Number);
|
1644
1808
|
|
@@ -1646,10 +1810,11 @@ smalltalk.addMethod(
|
|
1646
1810
|
unescape('_isZero'),
|
1647
1811
|
smalltalk.method({
|
1648
1812
|
selector: unescape('isZero'),
|
1649
|
-
fn: function (){
|
1650
|
-
var self=this;
|
1651
|
-
return smalltalk.send(self, "__eq", [
|
1652
|
-
return self;
|
1813
|
+
fn: function () {
|
1814
|
+
var self = this;
|
1815
|
+
return smalltalk.send(self, "__eq", [0]);
|
1816
|
+
return self;
|
1817
|
+
}
|
1653
1818
|
}),
|
1654
1819
|
smalltalk.Number);
|
1655
1820
|
|
@@ -1658,10 +1823,11 @@ smalltalk.addMethod(
|
|
1658
1823
|
unescape('_pi'),
|
1659
1824
|
smalltalk.method({
|
1660
1825
|
selector: unescape('pi'),
|
1661
|
-
fn: function (){
|
1662
|
-
var self=this;
|
1663
|
-
return Math.PI;
|
1664
|
-
return self;
|
1826
|
+
fn: function () {
|
1827
|
+
var self = this;
|
1828
|
+
return Math.PI;
|
1829
|
+
return self;
|
1830
|
+
}
|
1665
1831
|
}),
|
1666
1832
|
smalltalk.Number.klass);
|
1667
1833
|
|
@@ -1671,12 +1837,19 @@ smalltalk.addMethod(
|
|
1671
1837
|
unescape('__eq'),
|
1672
1838
|
smalltalk.method({
|
1673
1839
|
selector: unescape('%3D'),
|
1674
|
-
fn: function (aBoolean){
|
1675
|
-
var self=this;
|
1676
|
-
try
|
1677
|
-
|
1678
|
-
return self;
|
1679
|
-
|
1840
|
+
fn: function (aBoolean) {
|
1841
|
+
var self = this;
|
1842
|
+
try {
|
1843
|
+
($receiver = smalltalk.send(smalltalk.send(aBoolean, "_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;}};}();}]);
|
1844
|
+
return Boolean(self == true) == aBoolean;
|
1845
|
+
return self;
|
1846
|
+
} catch (e) {
|
1847
|
+
if (e.name === "stReturn" && e.selector === "__eq") {
|
1848
|
+
return e.fn();
|
1849
|
+
}
|
1850
|
+
throw e;
|
1851
|
+
}
|
1852
|
+
}
|
1680
1853
|
}),
|
1681
1854
|
smalltalk.Boolean);
|
1682
1855
|
|
@@ -1684,10 +1857,11 @@ smalltalk.addMethod(
|
|
1684
1857
|
unescape('_shallowCopy'),
|
1685
1858
|
smalltalk.method({
|
1686
1859
|
selector: unescape('shallowCopy'),
|
1687
|
-
fn: function (){
|
1688
|
-
var self=this;
|
1689
|
-
return self;
|
1690
|
-
return self;
|
1860
|
+
fn: function () {
|
1861
|
+
var self = this;
|
1862
|
+
return self;
|
1863
|
+
return self;
|
1864
|
+
}
|
1691
1865
|
}),
|
1692
1866
|
smalltalk.Boolean);
|
1693
1867
|
|
@@ -1695,10 +1869,11 @@ smalltalk.addMethod(
|
|
1695
1869
|
unescape('_deepCopy'),
|
1696
1870
|
smalltalk.method({
|
1697
1871
|
selector: unescape('deepCopy'),
|
1698
|
-
fn: function (){
|
1699
|
-
var self=this;
|
1700
|
-
return self;
|
1701
|
-
return self;
|
1872
|
+
fn: function () {
|
1873
|
+
var self = this;
|
1874
|
+
return self;
|
1875
|
+
return self;
|
1876
|
+
}
|
1702
1877
|
}),
|
1703
1878
|
smalltalk.Boolean);
|
1704
1879
|
|
@@ -1706,10 +1881,11 @@ smalltalk.addMethod(
|
|
1706
1881
|
unescape('_ifTrue_'),
|
1707
1882
|
smalltalk.method({
|
1708
1883
|
selector: unescape('ifTrue%3A'),
|
1709
|
-
fn: function (aBlock){
|
1710
|
-
var self=this;
|
1711
|
-
return smalltalk.send(self, "_ifTrue_ifFalse_", [aBlock,
|
1712
|
-
return self;
|
1884
|
+
fn: function (aBlock) {
|
1885
|
+
var self = this;
|
1886
|
+
return smalltalk.send(self, "_ifTrue_ifFalse_", [aBlock, function () {return nil;}]);
|
1887
|
+
return self;
|
1888
|
+
}
|
1713
1889
|
}),
|
1714
1890
|
smalltalk.Boolean);
|
1715
1891
|
|
@@ -1717,10 +1893,11 @@ smalltalk.addMethod(
|
|
1717
1893
|
unescape('_ifFalse_'),
|
1718
1894
|
smalltalk.method({
|
1719
1895
|
selector: unescape('ifFalse%3A'),
|
1720
|
-
fn: function (aBlock){
|
1721
|
-
var self=this;
|
1722
|
-
return smalltalk.send(self, "_ifTrue_ifFalse_", [
|
1723
|
-
return self;
|
1896
|
+
fn: function (aBlock) {
|
1897
|
+
var self = this;
|
1898
|
+
return smalltalk.send(self, "_ifTrue_ifFalse_", [function () {return nil;}, aBlock]);
|
1899
|
+
return self;
|
1900
|
+
}
|
1724
1901
|
}),
|
1725
1902
|
smalltalk.Boolean);
|
1726
1903
|
|
@@ -1728,10 +1905,11 @@ smalltalk.addMethod(
|
|
1728
1905
|
unescape('_ifFalse_ifTrue_'),
|
1729
1906
|
smalltalk.method({
|
1730
1907
|
selector: unescape('ifFalse%3AifTrue%3A'),
|
1731
|
-
fn: function (aBlock, anotherBlock){
|
1732
|
-
var self=this;
|
1733
|
-
return smalltalk.send(self, "_ifTrue_ifFalse_", [anotherBlock, aBlock]);
|
1734
|
-
return self;
|
1908
|
+
fn: function (aBlock, anotherBlock) {
|
1909
|
+
var self = this;
|
1910
|
+
return smalltalk.send(self, "_ifTrue_ifFalse_", [anotherBlock, aBlock]);
|
1911
|
+
return self;
|
1912
|
+
}
|
1735
1913
|
}),
|
1736
1914
|
smalltalk.Boolean);
|
1737
1915
|
|
@@ -1739,16 +1917,15 @@ smalltalk.addMethod(
|
|
1739
1917
|
unescape('_ifTrue_ifFalse_'),
|
1740
1918
|
smalltalk.method({
|
1741
1919
|
selector: unescape('ifTrue%3AifFalse%3A'),
|
1742
|
-
fn: function (aBlock, anotherBlock){
|
1743
|
-
var self=this;
|
1744
|
-
|
1745
|
-
|
1746
|
-
|
1747
|
-
|
1748
|
-
|
1749
|
-
|
1750
|
-
|
1751
|
-
return self;}
|
1920
|
+
fn: function (aBlock, anotherBlock) {
|
1921
|
+
var self = this;
|
1922
|
+
if (self == true) {
|
1923
|
+
return aBlock();
|
1924
|
+
} else {
|
1925
|
+
return anotherBlock();
|
1926
|
+
}
|
1927
|
+
return self;
|
1928
|
+
}
|
1752
1929
|
}),
|
1753
1930
|
smalltalk.Boolean);
|
1754
1931
|
|
@@ -1756,10 +1933,11 @@ smalltalk.addMethod(
|
|
1756
1933
|
unescape('_and_'),
|
1757
1934
|
smalltalk.method({
|
1758
1935
|
selector: unescape('and%3A'),
|
1759
|
-
fn: function (aBlock){
|
1760
|
-
var self=this;
|
1761
|
-
return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [aBlock,
|
1762
|
-
return self;
|
1936
|
+
fn: function (aBlock) {
|
1937
|
+
var self = this;
|
1938
|
+
return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [aBlock, function () {return false;}]);
|
1939
|
+
return self;
|
1940
|
+
}
|
1763
1941
|
}),
|
1764
1942
|
smalltalk.Boolean);
|
1765
1943
|
|
@@ -1767,10 +1945,11 @@ smalltalk.addMethod(
|
|
1767
1945
|
unescape('_or_'),
|
1768
1946
|
smalltalk.method({
|
1769
1947
|
selector: unescape('or%3A'),
|
1770
|
-
fn: function (aBlock){
|
1771
|
-
var self=this;
|
1772
|
-
return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [
|
1773
|
-
return self;
|
1948
|
+
fn: function (aBlock) {
|
1949
|
+
var self = this;
|
1950
|
+
return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [function () {return true;}, aBlock]);
|
1951
|
+
return self;
|
1952
|
+
}
|
1774
1953
|
}),
|
1775
1954
|
smalltalk.Boolean);
|
1776
1955
|
|
@@ -1778,10 +1957,11 @@ smalltalk.addMethod(
|
|
1778
1957
|
unescape('_not'),
|
1779
1958
|
smalltalk.method({
|
1780
1959
|
selector: unescape('not'),
|
1781
|
-
fn: function (){
|
1782
|
-
var self=this;
|
1783
|
-
return smalltalk.send(self, "__eq", [false]);
|
1784
|
-
return self;
|
1960
|
+
fn: function () {
|
1961
|
+
var self = this;
|
1962
|
+
return smalltalk.send(self, "__eq", [false]);
|
1963
|
+
return self;
|
1964
|
+
}
|
1785
1965
|
}),
|
1786
1966
|
smalltalk.Boolean);
|
1787
1967
|
|
@@ -1789,10 +1969,11 @@ smalltalk.addMethod(
|
|
1789
1969
|
unescape('_printString'),
|
1790
1970
|
smalltalk.method({
|
1791
1971
|
selector: unescape('printString'),
|
1792
|
-
fn: function (){
|
1793
|
-
var self=this;
|
1794
|
-
return self.toString();
|
1795
|
-
return self;
|
1972
|
+
fn: function () {
|
1973
|
+
var self = this;
|
1974
|
+
return self.toString();
|
1975
|
+
return self;
|
1976
|
+
}
|
1796
1977
|
}),
|
1797
1978
|
smalltalk.Boolean);
|
1798
1979
|
|
@@ -1800,16 +1981,15 @@ smalltalk.addMethod(
|
|
1800
1981
|
unescape('_%26'),
|
1801
1982
|
smalltalk.method({
|
1802
1983
|
selector: unescape('%26'),
|
1803
|
-
fn: function (aBoolean){
|
1804
|
-
var self=this;
|
1805
|
-
|
1806
|
-
|
1807
|
-
|
1808
|
-
|
1809
|
-
|
1810
|
-
|
1811
|
-
|
1812
|
-
return self;}
|
1984
|
+
fn: function (aBoolean) {
|
1985
|
+
var self = this;
|
1986
|
+
if (self == true) {
|
1987
|
+
return aBoolean;
|
1988
|
+
} else {
|
1989
|
+
return false;
|
1990
|
+
}
|
1991
|
+
return self;
|
1992
|
+
}
|
1813
1993
|
}),
|
1814
1994
|
smalltalk.Boolean);
|
1815
1995
|
|
@@ -1817,16 +1997,15 @@ smalltalk.addMethod(
|
|
1817
1997
|
unescape('_%7C'),
|
1818
1998
|
smalltalk.method({
|
1819
1999
|
selector: unescape('%7C'),
|
1820
|
-
fn: function (aBoolean){
|
1821
|
-
var self=this;
|
1822
|
-
|
1823
|
-
|
1824
|
-
|
1825
|
-
|
1826
|
-
|
1827
|
-
|
1828
|
-
|
1829
|
-
return self;}
|
2000
|
+
fn: function (aBoolean) {
|
2001
|
+
var self = this;
|
2002
|
+
if (self == true) {
|
2003
|
+
return true;
|
2004
|
+
} else {
|
2005
|
+
return aBoolean;
|
2006
|
+
}
|
2007
|
+
return self;
|
2008
|
+
}
|
1830
2009
|
}),
|
1831
2010
|
smalltalk.Boolean);
|
1832
2011
|
|
@@ -1837,10 +2016,11 @@ smalltalk.addMethod(
|
|
1837
2016
|
unescape('_year'),
|
1838
2017
|
smalltalk.method({
|
1839
2018
|
selector: unescape('year'),
|
1840
|
-
fn: function (){
|
1841
|
-
var self=this;
|
1842
|
-
return self.getFullYear();
|
1843
|
-
return self;
|
2019
|
+
fn: function () {
|
2020
|
+
var self = this;
|
2021
|
+
return self.getFullYear();
|
2022
|
+
return self;
|
2023
|
+
}
|
1844
2024
|
}),
|
1845
2025
|
smalltalk.Date);
|
1846
2026
|
|
@@ -1848,10 +2028,11 @@ smalltalk.addMethod(
|
|
1848
2028
|
unescape('_month'),
|
1849
2029
|
smalltalk.method({
|
1850
2030
|
selector: unescape('month'),
|
1851
|
-
fn: function (){
|
1852
|
-
var self=this;
|
1853
|
-
return self.getMonth() + 1;
|
1854
|
-
return self;
|
2031
|
+
fn: function () {
|
2032
|
+
var self = this;
|
2033
|
+
return self.getMonth() + 1;
|
2034
|
+
return self;
|
2035
|
+
}
|
1855
2036
|
}),
|
1856
2037
|
smalltalk.Date);
|
1857
2038
|
|
@@ -1859,10 +2040,11 @@ smalltalk.addMethod(
|
|
1859
2040
|
unescape('_month_'),
|
1860
2041
|
smalltalk.method({
|
1861
2042
|
selector: unescape('month%3A'),
|
1862
|
-
fn: function (aNumber){
|
1863
|
-
var self=this;
|
1864
|
-
self.setMonth(aNumber - 1);
|
1865
|
-
return self;
|
2043
|
+
fn: function (aNumber) {
|
2044
|
+
var self = this;
|
2045
|
+
self.setMonth(aNumber - 1);
|
2046
|
+
return self;
|
2047
|
+
}
|
1866
2048
|
}),
|
1867
2049
|
smalltalk.Date);
|
1868
2050
|
|
@@ -1870,10 +2052,11 @@ smalltalk.addMethod(
|
|
1870
2052
|
unescape('_day'),
|
1871
2053
|
smalltalk.method({
|
1872
2054
|
selector: unescape('day'),
|
1873
|
-
fn: function (){
|
1874
|
-
var self=this;
|
1875
|
-
return smalltalk.send(self, "_dayOfWeek", []);
|
1876
|
-
return self;
|
2055
|
+
fn: function () {
|
2056
|
+
var self = this;
|
2057
|
+
return smalltalk.send(self, "_dayOfWeek", []);
|
2058
|
+
return self;
|
2059
|
+
}
|
1877
2060
|
}),
|
1878
2061
|
smalltalk.Date);
|
1879
2062
|
|
@@ -1881,10 +2064,11 @@ smalltalk.addMethod(
|
|
1881
2064
|
unescape('_dayOfWeek'),
|
1882
2065
|
smalltalk.method({
|
1883
2066
|
selector: unescape('dayOfWeek'),
|
1884
|
-
fn: function (){
|
1885
|
-
var self=this;
|
1886
|
-
return self.getDay() + 1;
|
1887
|
-
return self;
|
2067
|
+
fn: function () {
|
2068
|
+
var self = this;
|
2069
|
+
return self.getDay() + 1;
|
2070
|
+
return self;
|
2071
|
+
}
|
1888
2072
|
}),
|
1889
2073
|
smalltalk.Date);
|
1890
2074
|
|
@@ -1892,10 +2076,11 @@ smalltalk.addMethod(
|
|
1892
2076
|
unescape('_dayOfWeek_'),
|
1893
2077
|
smalltalk.method({
|
1894
2078
|
selector: unescape('dayOfWeek%3A'),
|
1895
|
-
fn: function (aNumber){
|
1896
|
-
var self=this;
|
1897
|
-
return self.setDay(aNumber - 1);
|
1898
|
-
return self;
|
2079
|
+
fn: function (aNumber) {
|
2080
|
+
var self = this;
|
2081
|
+
return self.setDay(aNumber - 1);
|
2082
|
+
return self;
|
2083
|
+
}
|
1899
2084
|
}),
|
1900
2085
|
smalltalk.Date);
|
1901
2086
|
|
@@ -1903,10 +2088,11 @@ smalltalk.addMethod(
|
|
1903
2088
|
unescape('_day_'),
|
1904
2089
|
smalltalk.method({
|
1905
2090
|
selector: unescape('day%3A'),
|
1906
|
-
fn: function (aNumber){
|
1907
|
-
var self=this;
|
1908
|
-
smalltalk.send(self, "_day_", [aNumber]);
|
1909
|
-
return self;
|
2091
|
+
fn: function (aNumber) {
|
2092
|
+
var self = this;
|
2093
|
+
smalltalk.send(self, "_day_", [aNumber]);
|
2094
|
+
return self;
|
2095
|
+
}
|
1910
2096
|
}),
|
1911
2097
|
smalltalk.Date);
|
1912
2098
|
|
@@ -1914,10 +2100,11 @@ smalltalk.addMethod(
|
|
1914
2100
|
unescape('_year_'),
|
1915
2101
|
smalltalk.method({
|
1916
2102
|
selector: unescape('year%3A'),
|
1917
|
-
fn: function (aNumber){
|
1918
|
-
var self=this;
|
1919
|
-
self.setFullYear(aNumber);
|
1920
|
-
return self;
|
2103
|
+
fn: function (aNumber) {
|
2104
|
+
var self = this;
|
2105
|
+
self.setFullYear(aNumber);
|
2106
|
+
return self;
|
2107
|
+
}
|
1921
2108
|
}),
|
1922
2109
|
smalltalk.Date);
|
1923
2110
|
|
@@ -1925,10 +2112,11 @@ smalltalk.addMethod(
|
|
1925
2112
|
unescape('_dayOfMonth'),
|
1926
2113
|
smalltalk.method({
|
1927
2114
|
selector: unescape('dayOfMonth'),
|
1928
|
-
fn: function (){
|
1929
|
-
var self=this;
|
1930
|
-
return self.getDate();
|
1931
|
-
return self;
|
2115
|
+
fn: function () {
|
2116
|
+
var self = this;
|
2117
|
+
return self.getDate();
|
2118
|
+
return self;
|
2119
|
+
}
|
1932
2120
|
}),
|
1933
2121
|
smalltalk.Date);
|
1934
2122
|
|
@@ -1936,10 +2124,11 @@ smalltalk.addMethod(
|
|
1936
2124
|
unescape('_dayOfMonth_'),
|
1937
2125
|
smalltalk.method({
|
1938
2126
|
selector: unescape('dayOfMonth%3A'),
|
1939
|
-
fn: function (aNumber){
|
1940
|
-
var self=this;
|
1941
|
-
self.setDate(aNumber);
|
1942
|
-
return self;
|
2127
|
+
fn: function (aNumber) {
|
2128
|
+
var self = this;
|
2129
|
+
self.setDate(aNumber);
|
2130
|
+
return self;
|
2131
|
+
}
|
1943
2132
|
}),
|
1944
2133
|
smalltalk.Date);
|
1945
2134
|
|
@@ -1947,10 +2136,11 @@ smalltalk.addMethod(
|
|
1947
2136
|
unescape('_asString'),
|
1948
2137
|
smalltalk.method({
|
1949
2138
|
selector: unescape('asString'),
|
1950
|
-
fn: function (){
|
1951
|
-
var self=this;
|
1952
|
-
return self.toString();
|
1953
|
-
return self;
|
2139
|
+
fn: function () {
|
2140
|
+
var self = this;
|
2141
|
+
return self.toString();
|
2142
|
+
return self;
|
2143
|
+
}
|
1954
2144
|
}),
|
1955
2145
|
smalltalk.Date);
|
1956
2146
|
|
@@ -1958,10 +2148,11 @@ smalltalk.addMethod(
|
|
1958
2148
|
unescape('_printString'),
|
1959
2149
|
smalltalk.method({
|
1960
2150
|
selector: unescape('printString'),
|
1961
|
-
fn: function (){
|
1962
|
-
var self=this;
|
1963
|
-
return smalltalk.send(self, "_asString", []);
|
1964
|
-
return self;
|
2151
|
+
fn: function () {
|
2152
|
+
var self = this;
|
2153
|
+
return smalltalk.send(self, "_asString", []);
|
2154
|
+
return self;
|
2155
|
+
}
|
1965
2156
|
}),
|
1966
2157
|
smalltalk.Date);
|
1967
2158
|
|
@@ -1969,10 +2160,11 @@ smalltalk.addMethod(
|
|
1969
2160
|
unescape('_asMilliseconds'),
|
1970
2161
|
smalltalk.method({
|
1971
2162
|
selector: unescape('asMilliseconds'),
|
1972
|
-
fn: function (){
|
1973
|
-
var self=this;
|
1974
|
-
return smalltalk.send(self, "_time", []);
|
1975
|
-
return self;
|
2163
|
+
fn: function () {
|
2164
|
+
var self = this;
|
2165
|
+
return smalltalk.send(self, "_time", []);
|
2166
|
+
return self;
|
2167
|
+
}
|
1976
2168
|
}),
|
1977
2169
|
smalltalk.Date);
|
1978
2170
|
|
@@ -1980,10 +2172,11 @@ smalltalk.addMethod(
|
|
1980
2172
|
unescape('_time'),
|
1981
2173
|
smalltalk.method({
|
1982
2174
|
selector: unescape('time'),
|
1983
|
-
fn: function (){
|
1984
|
-
var self=this;
|
1985
|
-
return self.getTime();
|
1986
|
-
return self;
|
2175
|
+
fn: function () {
|
2176
|
+
var self = this;
|
2177
|
+
return self.getTime();
|
2178
|
+
return self;
|
2179
|
+
}
|
1987
2180
|
}),
|
1988
2181
|
smalltalk.Date);
|
1989
2182
|
|
@@ -1991,10 +2184,11 @@ smalltalk.addMethod(
|
|
1991
2184
|
unescape('_time_'),
|
1992
2185
|
smalltalk.method({
|
1993
2186
|
selector: unescape('time%3A'),
|
1994
|
-
fn: function (aNumber){
|
1995
|
-
var self=this;
|
1996
|
-
self.setTime(aNumber);
|
1997
|
-
return self;
|
2187
|
+
fn: function (aNumber) {
|
2188
|
+
var self = this;
|
2189
|
+
self.setTime(aNumber);
|
2190
|
+
return self;
|
2191
|
+
}
|
1998
2192
|
}),
|
1999
2193
|
smalltalk.Date);
|
2000
2194
|
|
@@ -2002,10 +2196,11 @@ smalltalk.addMethod(
|
|
2002
2196
|
unescape('_asDateString'),
|
2003
2197
|
smalltalk.method({
|
2004
2198
|
selector: unescape('asDateString'),
|
2005
|
-
fn: function (){
|
2006
|
-
var self=this;
|
2007
|
-
return self.toDateString();
|
2008
|
-
return self;
|
2199
|
+
fn: function () {
|
2200
|
+
var self = this;
|
2201
|
+
return self.toDateString();
|
2202
|
+
return self;
|
2203
|
+
}
|
2009
2204
|
}),
|
2010
2205
|
smalltalk.Date);
|
2011
2206
|
|
@@ -2013,10 +2208,11 @@ smalltalk.addMethod(
|
|
2013
2208
|
unescape('_asTimeString'),
|
2014
2209
|
smalltalk.method({
|
2015
2210
|
selector: unescape('asTimeString'),
|
2016
|
-
fn: function (){
|
2017
|
-
var self=this;
|
2018
|
-
return self.toTimeString();
|
2019
|
-
return self;
|
2211
|
+
fn: function () {
|
2212
|
+
var self = this;
|
2213
|
+
return self.toTimeString();
|
2214
|
+
return self;
|
2215
|
+
}
|
2020
2216
|
}),
|
2021
2217
|
smalltalk.Date);
|
2022
2218
|
|
@@ -2024,10 +2220,11 @@ smalltalk.addMethod(
|
|
2024
2220
|
unescape('_asLocaleString'),
|
2025
2221
|
smalltalk.method({
|
2026
2222
|
selector: unescape('asLocaleString'),
|
2027
|
-
fn: function (){
|
2028
|
-
var self=this;
|
2029
|
-
return self.toLocaleString();
|
2030
|
-
return self;
|
2223
|
+
fn: function () {
|
2224
|
+
var self = this;
|
2225
|
+
return self.toLocaleString();
|
2226
|
+
return self;
|
2227
|
+
}
|
2031
2228
|
}),
|
2032
2229
|
smalltalk.Date);
|
2033
2230
|
|
@@ -2035,10 +2232,11 @@ smalltalk.addMethod(
|
|
2035
2232
|
unescape('_asNumber'),
|
2036
2233
|
smalltalk.method({
|
2037
2234
|
selector: unescape('asNumber'),
|
2038
|
-
fn: function (){
|
2039
|
-
var self=this;
|
2040
|
-
return smalltalk.send(self, "_asMilliseconds", []);
|
2041
|
-
return self;
|
2235
|
+
fn: function () {
|
2236
|
+
var self = this;
|
2237
|
+
return smalltalk.send(self, "_asMilliseconds", []);
|
2238
|
+
return self;
|
2239
|
+
}
|
2042
2240
|
}),
|
2043
2241
|
smalltalk.Date);
|
2044
2242
|
|
@@ -2046,10 +2244,11 @@ smalltalk.addMethod(
|
|
2046
2244
|
unescape('_hours_'),
|
2047
2245
|
smalltalk.method({
|
2048
2246
|
selector: unescape('hours%3A'),
|
2049
|
-
fn: function (aNumber){
|
2050
|
-
var self=this;
|
2051
|
-
self.setHours(aNumber);
|
2052
|
-
return self;
|
2247
|
+
fn: function (aNumber) {
|
2248
|
+
var self = this;
|
2249
|
+
self.setHours(aNumber);
|
2250
|
+
return self;
|
2251
|
+
}
|
2053
2252
|
}),
|
2054
2253
|
smalltalk.Date);
|
2055
2254
|
|
@@ -2057,10 +2256,11 @@ smalltalk.addMethod(
|
|
2057
2256
|
unescape('_minutes_'),
|
2058
2257
|
smalltalk.method({
|
2059
2258
|
selector: unescape('minutes%3A'),
|
2060
|
-
fn: function (aNumber){
|
2061
|
-
var self=this;
|
2062
|
-
self.setMinutes(aNumber);
|
2063
|
-
return self;
|
2259
|
+
fn: function (aNumber) {
|
2260
|
+
var self = this;
|
2261
|
+
self.setMinutes(aNumber);
|
2262
|
+
return self;
|
2263
|
+
}
|
2064
2264
|
}),
|
2065
2265
|
smalltalk.Date);
|
2066
2266
|
|
@@ -2068,10 +2268,11 @@ smalltalk.addMethod(
|
|
2068
2268
|
unescape('_seconds_'),
|
2069
2269
|
smalltalk.method({
|
2070
2270
|
selector: unescape('seconds%3A'),
|
2071
|
-
fn: function (aNumber){
|
2072
|
-
var self=this;
|
2073
|
-
self.setSeconds(aNumber);
|
2074
|
-
return self;
|
2271
|
+
fn: function (aNumber) {
|
2272
|
+
var self = this;
|
2273
|
+
self.setSeconds(aNumber);
|
2274
|
+
return self;
|
2275
|
+
}
|
2075
2276
|
}),
|
2076
2277
|
smalltalk.Date);
|
2077
2278
|
|
@@ -2079,10 +2280,11 @@ smalltalk.addMethod(
|
|
2079
2280
|
unescape('_milliseconds_'),
|
2080
2281
|
smalltalk.method({
|
2081
2282
|
selector: unescape('milliseconds%3A'),
|
2082
|
-
fn: function (aNumber){
|
2083
|
-
var self=this;
|
2084
|
-
self.setMilliseconds(aNumber);
|
2085
|
-
return self;
|
2283
|
+
fn: function (aNumber) {
|
2284
|
+
var self = this;
|
2285
|
+
self.setMilliseconds(aNumber);
|
2286
|
+
return self;
|
2287
|
+
}
|
2086
2288
|
}),
|
2087
2289
|
smalltalk.Date);
|
2088
2290
|
|
@@ -2090,10 +2292,11 @@ smalltalk.addMethod(
|
|
2090
2292
|
unescape('_hours'),
|
2091
2293
|
smalltalk.method({
|
2092
2294
|
selector: unescape('hours'),
|
2093
|
-
fn: function (){
|
2094
|
-
var self=this;
|
2095
|
-
return self.getHours();
|
2096
|
-
return self;
|
2295
|
+
fn: function () {
|
2296
|
+
var self = this;
|
2297
|
+
return self.getHours();
|
2298
|
+
return self;
|
2299
|
+
}
|
2097
2300
|
}),
|
2098
2301
|
smalltalk.Date);
|
2099
2302
|
|
@@ -2101,10 +2304,11 @@ smalltalk.addMethod(
|
|
2101
2304
|
unescape('_minutes'),
|
2102
2305
|
smalltalk.method({
|
2103
2306
|
selector: unescape('minutes'),
|
2104
|
-
fn: function (){
|
2105
|
-
var self=this;
|
2106
|
-
return self.getMinutes();
|
2107
|
-
return self;
|
2307
|
+
fn: function () {
|
2308
|
+
var self = this;
|
2309
|
+
return self.getMinutes();
|
2310
|
+
return self;
|
2311
|
+
}
|
2108
2312
|
}),
|
2109
2313
|
smalltalk.Date);
|
2110
2314
|
|
@@ -2112,10 +2316,11 @@ smalltalk.addMethod(
|
|
2112
2316
|
unescape('_seconds'),
|
2113
2317
|
smalltalk.method({
|
2114
2318
|
selector: unescape('seconds'),
|
2115
|
-
fn: function (){
|
2116
|
-
var self=this;
|
2117
|
-
return self.getSeconds();
|
2118
|
-
return self;
|
2319
|
+
fn: function () {
|
2320
|
+
var self = this;
|
2321
|
+
return self.getSeconds();
|
2322
|
+
return self;
|
2323
|
+
}
|
2119
2324
|
}),
|
2120
2325
|
smalltalk.Date);
|
2121
2326
|
|
@@ -2123,10 +2328,11 @@ smalltalk.addMethod(
|
|
2123
2328
|
unescape('_milliseconds'),
|
2124
2329
|
smalltalk.method({
|
2125
2330
|
selector: unescape('milliseconds'),
|
2126
|
-
fn: function (){
|
2127
|
-
var self=this;
|
2128
|
-
return self.getMilliseconds();
|
2129
|
-
return self;
|
2331
|
+
fn: function () {
|
2332
|
+
var self = this;
|
2333
|
+
return self.getMilliseconds();
|
2334
|
+
return self;
|
2335
|
+
}
|
2130
2336
|
}),
|
2131
2337
|
smalltalk.Date);
|
2132
2338
|
|
@@ -2134,10 +2340,11 @@ smalltalk.addMethod(
|
|
2134
2340
|
unescape('__lt'),
|
2135
2341
|
smalltalk.method({
|
2136
2342
|
selector: unescape('%3C'),
|
2137
|
-
fn: function (aDate){
|
2138
|
-
var self=this;
|
2139
|
-
return self < aDate;
|
2140
|
-
return self;
|
2343
|
+
fn: function (aDate) {
|
2344
|
+
var self = this;
|
2345
|
+
return self < aDate;
|
2346
|
+
return self;
|
2347
|
+
}
|
2141
2348
|
}),
|
2142
2349
|
smalltalk.Date);
|
2143
2350
|
|
@@ -2145,10 +2352,11 @@ smalltalk.addMethod(
|
|
2145
2352
|
unescape('__gt'),
|
2146
2353
|
smalltalk.method({
|
2147
2354
|
selector: unescape('%3E'),
|
2148
|
-
fn: function (aDate){
|
2149
|
-
var self=this;
|
2150
|
-
return self > aDate;
|
2151
|
-
return self;
|
2355
|
+
fn: function (aDate) {
|
2356
|
+
var self = this;
|
2357
|
+
return self > aDate;
|
2358
|
+
return self;
|
2359
|
+
}
|
2152
2360
|
}),
|
2153
2361
|
smalltalk.Date);
|
2154
2362
|
|
@@ -2156,10 +2364,11 @@ smalltalk.addMethod(
|
|
2156
2364
|
unescape('__lt_eq'),
|
2157
2365
|
smalltalk.method({
|
2158
2366
|
selector: unescape('%3C%3D'),
|
2159
|
-
fn: function (aDate){
|
2160
|
-
var self=this;
|
2161
|
-
return self <= aDate;
|
2162
|
-
return self;
|
2367
|
+
fn: function (aDate) {
|
2368
|
+
var self = this;
|
2369
|
+
return self <= aDate;
|
2370
|
+
return self;
|
2371
|
+
}
|
2163
2372
|
}),
|
2164
2373
|
smalltalk.Date);
|
2165
2374
|
|
@@ -2167,10 +2376,11 @@ smalltalk.addMethod(
|
|
2167
2376
|
unescape('__gt_eq'),
|
2168
2377
|
smalltalk.method({
|
2169
2378
|
selector: unescape('%3E%3D'),
|
2170
|
-
fn: function (aDate){
|
2171
|
-
var self=this;
|
2172
|
-
return self >= aDate;
|
2173
|
-
return self;
|
2379
|
+
fn: function (aDate) {
|
2380
|
+
var self = this;
|
2381
|
+
return self >= aDate;
|
2382
|
+
return self;
|
2383
|
+
}
|
2174
2384
|
}),
|
2175
2385
|
smalltalk.Date);
|
2176
2386
|
|
@@ -2178,10 +2388,11 @@ smalltalk.addMethod(
|
|
2178
2388
|
unescape('__minus'),
|
2179
2389
|
smalltalk.method({
|
2180
2390
|
selector: unescape('-'),
|
2181
|
-
fn: function (aDate){
|
2182
|
-
var self=this;
|
2183
|
-
return self - aDate;
|
2184
|
-
return self;
|
2391
|
+
fn: function (aDate) {
|
2392
|
+
var self = this;
|
2393
|
+
return self - aDate;
|
2394
|
+
return self;
|
2395
|
+
}
|
2185
2396
|
}),
|
2186
2397
|
smalltalk.Date);
|
2187
2398
|
|
@@ -2189,10 +2400,11 @@ smalltalk.addMethod(
|
|
2189
2400
|
unescape('__plus'),
|
2190
2401
|
smalltalk.method({
|
2191
2402
|
selector: unescape('+'),
|
2192
|
-
fn: function (aDate){
|
2193
|
-
var self=this;
|
2194
|
-
return self + aDate;
|
2195
|
-
return self;
|
2403
|
+
fn: function (aDate) {
|
2404
|
+
var self = this;
|
2405
|
+
return self + aDate;
|
2406
|
+
return self;
|
2407
|
+
}
|
2196
2408
|
}),
|
2197
2409
|
smalltalk.Date);
|
2198
2410
|
|
@@ -2201,10 +2413,11 @@ smalltalk.addMethod(
|
|
2201
2413
|
unescape('_new_'),
|
2202
2414
|
smalltalk.method({
|
2203
2415
|
selector: unescape('new%3A'),
|
2204
|
-
fn: function (anObject){
|
2205
|
-
var self=this;
|
2206
|
-
return new Date(anObject);
|
2207
|
-
return self;
|
2416
|
+
fn: function (anObject) {
|
2417
|
+
var self = this;
|
2418
|
+
return new Date(anObject);
|
2419
|
+
return self;
|
2420
|
+
}
|
2208
2421
|
}),
|
2209
2422
|
smalltalk.Date.klass);
|
2210
2423
|
|
@@ -2212,10 +2425,11 @@ smalltalk.addMethod(
|
|
2212
2425
|
unescape('_fromString_'),
|
2213
2426
|
smalltalk.method({
|
2214
2427
|
selector: unescape('fromString%3A'),
|
2215
|
-
fn: function (aString){
|
2216
|
-
var self=this;
|
2217
|
-
return smalltalk.send(self, "_new_", [aString]);
|
2218
|
-
return self;
|
2428
|
+
fn: function (aString) {
|
2429
|
+
var self = this;
|
2430
|
+
return smalltalk.send(self, "_new_", [aString]);
|
2431
|
+
return self;
|
2432
|
+
}
|
2219
2433
|
}),
|
2220
2434
|
smalltalk.Date.klass);
|
2221
2435
|
|
@@ -2223,10 +2437,11 @@ smalltalk.addMethod(
|
|
2223
2437
|
unescape('_fromSeconds_'),
|
2224
2438
|
smalltalk.method({
|
2225
2439
|
selector: unescape('fromSeconds%3A'),
|
2226
|
-
fn: function (aNumber){
|
2227
|
-
var self=this;
|
2228
|
-
return smalltalk.send(self, "_fromMilliseconds_", [(
|
2229
|
-
return self;
|
2440
|
+
fn: function (aNumber) {
|
2441
|
+
var self = this;
|
2442
|
+
return smalltalk.send(self, "_fromMilliseconds_", [($receiver = aNumber).klass === smalltalk.Number ? $receiver * 1000 : smalltalk.send($receiver, "__star", [1000])]);
|
2443
|
+
return self;
|
2444
|
+
}
|
2230
2445
|
}),
|
2231
2446
|
smalltalk.Date.klass);
|
2232
2447
|
|
@@ -2234,10 +2449,11 @@ smalltalk.addMethod(
|
|
2234
2449
|
unescape('_fromMilliseconds_'),
|
2235
2450
|
smalltalk.method({
|
2236
2451
|
selector: unescape('fromMilliseconds%3A'),
|
2237
|
-
fn: function (aNumber){
|
2238
|
-
var self=this;
|
2239
|
-
return smalltalk.send(self, "_new_", [aNumber]);
|
2240
|
-
return self;
|
2452
|
+
fn: function (aNumber) {
|
2453
|
+
var self = this;
|
2454
|
+
return smalltalk.send(self, "_new_", [aNumber]);
|
2455
|
+
return self;
|
2456
|
+
}
|
2241
2457
|
}),
|
2242
2458
|
smalltalk.Date.klass);
|
2243
2459
|
|
@@ -2245,10 +2461,11 @@ smalltalk.addMethod(
|
|
2245
2461
|
unescape('_today'),
|
2246
2462
|
smalltalk.method({
|
2247
2463
|
selector: unescape('today'),
|
2248
|
-
fn: function (){
|
2249
|
-
var self=this;
|
2250
|
-
return smalltalk.send(self, "_new", []);
|
2251
|
-
return self;
|
2464
|
+
fn: function () {
|
2465
|
+
var self = this;
|
2466
|
+
return smalltalk.send(self, "_new", []);
|
2467
|
+
return self;
|
2468
|
+
}
|
2252
2469
|
}),
|
2253
2470
|
smalltalk.Date.klass);
|
2254
2471
|
|
@@ -2256,10 +2473,11 @@ smalltalk.addMethod(
|
|
2256
2473
|
unescape('_now'),
|
2257
2474
|
smalltalk.method({
|
2258
2475
|
selector: unescape('now'),
|
2259
|
-
fn: function (){
|
2260
|
-
var self=this;
|
2261
|
-
return smalltalk.send(self, "_today", []);
|
2262
|
-
return self;
|
2476
|
+
fn: function () {
|
2477
|
+
var self = this;
|
2478
|
+
return smalltalk.send(self, "_today", []);
|
2479
|
+
return self;
|
2480
|
+
}
|
2263
2481
|
}),
|
2264
2482
|
smalltalk.Date.klass);
|
2265
2483
|
|
@@ -2267,13 +2485,14 @@ smalltalk.addMethod(
|
|
2267
2485
|
unescape('_millisecondsToRun_'),
|
2268
2486
|
smalltalk.method({
|
2269
2487
|
selector: unescape('millisecondsToRun%3A'),
|
2270
|
-
fn: function (aBlock){
|
2271
|
-
var self=this;
|
2272
|
-
var t=nil;
|
2273
|
-
|
2274
|
-
smalltalk.send(aBlock, "_value", []);
|
2275
|
-
return (
|
2276
|
-
return self;
|
2488
|
+
fn: function (aBlock) {
|
2489
|
+
var self = this;
|
2490
|
+
var t = nil;
|
2491
|
+
t = smalltalk.send(smalltalk.Date || Date, "_now", []);
|
2492
|
+
smalltalk.send(aBlock, "_value", []);
|
2493
|
+
return ($receiver = smalltalk.send(smalltalk.Date || Date, "_now", [])).klass === smalltalk.Number ? $receiver - t : smalltalk.send($receiver, "__minus", [t]);
|
2494
|
+
return self;
|
2495
|
+
}
|
2277
2496
|
}),
|
2278
2497
|
smalltalk.Date.klass);
|
2279
2498
|
|
@@ -2283,10 +2502,11 @@ smalltalk.addMethod(
|
|
2283
2502
|
unescape('_subclass_instanceVariableNames_'),
|
2284
2503
|
smalltalk.method({
|
2285
2504
|
selector: unescape('subclass%3AinstanceVariableNames%3A'),
|
2286
|
-
fn: function (aString, anotherString){
|
2287
|
-
var self=this;
|
2288
|
-
return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
|
2289
|
-
return self;
|
2505
|
+
fn: function (aString, anotherString) {
|
2506
|
+
var self = this;
|
2507
|
+
return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
|
2508
|
+
return self;
|
2509
|
+
}
|
2290
2510
|
}),
|
2291
2511
|
smalltalk.UndefinedObject);
|
2292
2512
|
|
@@ -2294,11 +2514,12 @@ smalltalk.addMethod(
|
|
2294
2514
|
unescape('_subclass_instanceVariableNames_category_'),
|
2295
2515
|
smalltalk.method({
|
2296
2516
|
selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
|
2297
|
-
fn: function (aString, aString2, aString3){
|
2298
|
-
var self=this;
|
2299
|
-
smalltalk.send(self, "_deprecatedAPI", []);
|
2300
|
-
return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
|
2301
|
-
return self;
|
2517
|
+
fn: function (aString, aString2, aString3) {
|
2518
|
+
var self = this;
|
2519
|
+
smalltalk.send(self, "_deprecatedAPI", []);
|
2520
|
+
return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
|
2521
|
+
return self;
|
2522
|
+
}
|
2302
2523
|
}),
|
2303
2524
|
smalltalk.UndefinedObject);
|
2304
2525
|
|
@@ -2306,10 +2527,11 @@ smalltalk.addMethod(
|
|
2306
2527
|
unescape('_shallowCopy'),
|
2307
2528
|
smalltalk.method({
|
2308
2529
|
selector: unescape('shallowCopy'),
|
2309
|
-
fn: function (){
|
2310
|
-
var self=this;
|
2311
|
-
return self;
|
2312
|
-
return self;
|
2530
|
+
fn: function () {
|
2531
|
+
var self = this;
|
2532
|
+
return self;
|
2533
|
+
return self;
|
2534
|
+
}
|
2313
2535
|
}),
|
2314
2536
|
smalltalk.UndefinedObject);
|
2315
2537
|
|
@@ -2317,10 +2539,11 @@ smalltalk.addMethod(
|
|
2317
2539
|
unescape('_deepCopy'),
|
2318
2540
|
smalltalk.method({
|
2319
2541
|
selector: unescape('deepCopy'),
|
2320
|
-
fn: function (){
|
2321
|
-
var self=this;
|
2322
|
-
return self;
|
2323
|
-
return self;
|
2542
|
+
fn: function () {
|
2543
|
+
var self = this;
|
2544
|
+
return self;
|
2545
|
+
return self;
|
2546
|
+
}
|
2324
2547
|
}),
|
2325
2548
|
smalltalk.UndefinedObject);
|
2326
2549
|
|
@@ -2328,10 +2551,11 @@ smalltalk.addMethod(
|
|
2328
2551
|
unescape('_ifNil_'),
|
2329
2552
|
smalltalk.method({
|
2330
2553
|
selector: unescape('ifNil%3A'),
|
2331
|
-
fn: function (aBlock){
|
2332
|
-
var self=this;
|
2333
|
-
return smalltalk.send(self, "_ifNil_ifNotNil_", [aBlock,
|
2334
|
-
return self;
|
2554
|
+
fn: function (aBlock) {
|
2555
|
+
var self = this;
|
2556
|
+
return smalltalk.send(self, "_ifNil_ifNotNil_", [aBlock, function () {return nil;}]);
|
2557
|
+
return self;
|
2558
|
+
}
|
2335
2559
|
}),
|
2336
2560
|
smalltalk.UndefinedObject);
|
2337
2561
|
|
@@ -2339,10 +2563,11 @@ smalltalk.addMethod(
|
|
2339
2563
|
unescape('_ifNotNil_'),
|
2340
2564
|
smalltalk.method({
|
2341
2565
|
selector: unescape('ifNotNil%3A'),
|
2342
|
-
fn: function (aBlock){
|
2343
|
-
var self=this;
|
2344
|
-
return self;
|
2345
|
-
return self;
|
2566
|
+
fn: function (aBlock) {
|
2567
|
+
var self = this;
|
2568
|
+
return self;
|
2569
|
+
return self;
|
2570
|
+
}
|
2346
2571
|
}),
|
2347
2572
|
smalltalk.UndefinedObject);
|
2348
2573
|
|
@@ -2350,10 +2575,11 @@ smalltalk.addMethod(
|
|
2350
2575
|
unescape('_ifNil_ifNotNil_'),
|
2351
2576
|
smalltalk.method({
|
2352
2577
|
selector: unescape('ifNil%3AifNotNil%3A'),
|
2353
|
-
fn: function (aBlock, anotherBlock){
|
2354
|
-
var self=this;
|
2355
|
-
return smalltalk.send(aBlock, "_value", []);
|
2356
|
-
return self;
|
2578
|
+
fn: function (aBlock, anotherBlock) {
|
2579
|
+
var self = this;
|
2580
|
+
return smalltalk.send(aBlock, "_value", []);
|
2581
|
+
return self;
|
2582
|
+
}
|
2357
2583
|
}),
|
2358
2584
|
smalltalk.UndefinedObject);
|
2359
2585
|
|
@@ -2361,10 +2587,11 @@ smalltalk.addMethod(
|
|
2361
2587
|
unescape('_ifNotNil_ifNil_'),
|
2362
2588
|
smalltalk.method({
|
2363
2589
|
selector: unescape('ifNotNil%3AifNil%3A'),
|
2364
|
-
fn: function (aBlock, anotherBlock){
|
2365
|
-
var self=this;
|
2366
|
-
return smalltalk.send(anotherBlock, "_value", []);
|
2367
|
-
return self;
|
2590
|
+
fn: function (aBlock, anotherBlock) {
|
2591
|
+
var self = this;
|
2592
|
+
return smalltalk.send(anotherBlock, "_value", []);
|
2593
|
+
return self;
|
2594
|
+
}
|
2368
2595
|
}),
|
2369
2596
|
smalltalk.UndefinedObject);
|
2370
2597
|
|
@@ -2372,10 +2599,11 @@ smalltalk.addMethod(
|
|
2372
2599
|
unescape('_isNil'),
|
2373
2600
|
smalltalk.method({
|
2374
2601
|
selector: unescape('isNil'),
|
2375
|
-
fn: function (){
|
2376
|
-
var self=this;
|
2377
|
-
return true;
|
2378
|
-
return self;
|
2602
|
+
fn: function () {
|
2603
|
+
var self = this;
|
2604
|
+
return true;
|
2605
|
+
return self;
|
2606
|
+
}
|
2379
2607
|
}),
|
2380
2608
|
smalltalk.UndefinedObject);
|
2381
2609
|
|
@@ -2383,10 +2611,11 @@ smalltalk.addMethod(
|
|
2383
2611
|
unescape('_notNil'),
|
2384
2612
|
smalltalk.method({
|
2385
2613
|
selector: unescape('notNil'),
|
2386
|
-
fn: function (){
|
2387
|
-
var self=this;
|
2388
|
-
return false;
|
2389
|
-
return self;
|
2614
|
+
fn: function () {
|
2615
|
+
var self = this;
|
2616
|
+
return false;
|
2617
|
+
return self;
|
2618
|
+
}
|
2390
2619
|
}),
|
2391
2620
|
smalltalk.UndefinedObject);
|
2392
2621
|
|
@@ -2394,10 +2623,11 @@ smalltalk.addMethod(
|
|
2394
2623
|
unescape('_printString'),
|
2395
2624
|
smalltalk.method({
|
2396
2625
|
selector: unescape('printString'),
|
2397
|
-
fn: function (){
|
2398
|
-
var self=this;
|
2399
|
-
return "nil";
|
2400
|
-
return self;
|
2626
|
+
fn: function () {
|
2627
|
+
var self = this;
|
2628
|
+
return "nil";
|
2629
|
+
return self;
|
2630
|
+
}
|
2401
2631
|
}),
|
2402
2632
|
smalltalk.UndefinedObject);
|
2403
2633
|
|
@@ -2405,10 +2635,11 @@ smalltalk.addMethod(
|
|
2405
2635
|
unescape('_subclass_instanceVariableNames_package_'),
|
2406
2636
|
smalltalk.method({
|
2407
2637
|
selector: unescape('subclass%3AinstanceVariableNames%3Apackage%3A'),
|
2408
|
-
fn: function (aString, aString2, aString3){
|
2409
|
-
var self=this;
|
2410
|
-
return smalltalk.send(smalltalk.send(
|
2411
|
-
return self;
|
2638
|
+
fn: function (aString, aString2, aString3) {
|
2639
|
+
var self = this;
|
2640
|
+
return smalltalk.send(smalltalk.send(smalltalk.ClassBuilder || ClassBuilder, "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, aString, aString2, aString3]);
|
2641
|
+
return self;
|
2642
|
+
}
|
2412
2643
|
}),
|
2413
2644
|
smalltalk.UndefinedObject);
|
2414
2645
|
|
@@ -2417,172 +2648,499 @@ smalltalk.addMethod(
|
|
2417
2648
|
unescape('_new'),
|
2418
2649
|
smalltalk.method({
|
2419
2650
|
selector: unescape('new'),
|
2420
|
-
fn: function (){
|
2421
|
-
var self=this;
|
2422
|
-
smalltalk.send(self, "_error_", ["You cannot create new instances of UndefinedObject. Use nil"]);
|
2423
|
-
return self;
|
2651
|
+
fn: function () {
|
2652
|
+
var self = this;
|
2653
|
+
smalltalk.send(self, "_error_", ["You cannot create new instances of UndefinedObject. Use nil"]);
|
2654
|
+
return self;
|
2655
|
+
}
|
2424
2656
|
}),
|
2425
2657
|
smalltalk.UndefinedObject.klass);
|
2426
2658
|
|
2427
2659
|
|
2428
|
-
smalltalk.addClass('
|
2660
|
+
smalltalk.addClass('Date', smalltalk.Object, [], 'Kernel-Objects');
|
2429
2661
|
smalltalk.addMethod(
|
2430
|
-
unescape('
|
2662
|
+
unescape('_year'),
|
2431
2663
|
smalltalk.method({
|
2432
|
-
selector: unescape('
|
2433
|
-
fn: function (){
|
2434
|
-
var self=this;
|
2435
|
-
return
|
2436
|
-
return self;
|
2664
|
+
selector: unescape('year'),
|
2665
|
+
fn: function () {
|
2666
|
+
var self = this;
|
2667
|
+
return self.getFullYear();
|
2668
|
+
return self;
|
2669
|
+
}
|
2437
2670
|
}),
|
2438
|
-
smalltalk.
|
2671
|
+
smalltalk.Date);
|
2439
2672
|
|
2440
2673
|
smalltalk.addMethod(
|
2441
|
-
unescape('
|
2674
|
+
unescape('_month'),
|
2442
2675
|
smalltalk.method({
|
2443
|
-
selector: unescape('
|
2444
|
-
fn: function (
|
2445
|
-
var self=this;
|
2446
|
-
return
|
2447
|
-
return self;
|
2676
|
+
selector: unescape('month'),
|
2677
|
+
fn: function () {
|
2678
|
+
var self = this;
|
2679
|
+
return self.getMonth() + 1;
|
2680
|
+
return self;
|
2681
|
+
}
|
2448
2682
|
}),
|
2449
|
-
smalltalk.
|
2683
|
+
smalltalk.Date);
|
2450
2684
|
|
2685
|
+
smalltalk.addMethod(
|
2686
|
+
unescape('_month_'),
|
2687
|
+
smalltalk.method({
|
2688
|
+
selector: unescape('month%3A'),
|
2689
|
+
fn: function (aNumber) {
|
2690
|
+
var self = this;
|
2691
|
+
self.setMonth(aNumber - 1);
|
2692
|
+
return self;
|
2693
|
+
}
|
2694
|
+
}),
|
2695
|
+
smalltalk.Date);
|
2451
2696
|
|
2697
|
+
smalltalk.addMethod(
|
2698
|
+
unescape('_day'),
|
2699
|
+
smalltalk.method({
|
2700
|
+
selector: unescape('day'),
|
2701
|
+
fn: function () {
|
2702
|
+
var self = this;
|
2703
|
+
return smalltalk.send(self, "_dayOfWeek", []);
|
2704
|
+
return self;
|
2705
|
+
}
|
2706
|
+
}),
|
2707
|
+
smalltalk.Date);
|
2452
2708
|
|
2453
|
-
smalltalk.addClass('Point', smalltalk.Object, ['x', 'y'], 'Kernel-Objects');
|
2454
2709
|
smalltalk.addMethod(
|
2455
|
-
unescape('
|
2710
|
+
unescape('_dayOfWeek'),
|
2456
2711
|
smalltalk.method({
|
2457
|
-
selector: unescape('
|
2458
|
-
fn: function (){
|
2459
|
-
var self=this;
|
2460
|
-
return self
|
2461
|
-
return self;
|
2712
|
+
selector: unescape('dayOfWeek'),
|
2713
|
+
fn: function () {
|
2714
|
+
var self = this;
|
2715
|
+
return self.getDay() + 1;
|
2716
|
+
return self;
|
2717
|
+
}
|
2462
2718
|
}),
|
2463
|
-
smalltalk.
|
2719
|
+
smalltalk.Date);
|
2464
2720
|
|
2465
2721
|
smalltalk.addMethod(
|
2466
|
-
unescape('
|
2722
|
+
unescape('_dayOfWeek_'),
|
2467
2723
|
smalltalk.method({
|
2468
|
-
selector: unescape('
|
2469
|
-
fn: function (){
|
2470
|
-
var self=this;
|
2471
|
-
return self
|
2472
|
-
return self;
|
2724
|
+
selector: unescape('dayOfWeek%3A'),
|
2725
|
+
fn: function (aNumber) {
|
2726
|
+
var self = this;
|
2727
|
+
return self.setDay(aNumber - 1);
|
2728
|
+
return self;
|
2729
|
+
}
|
2473
2730
|
}),
|
2474
|
-
smalltalk.
|
2731
|
+
smalltalk.Date);
|
2475
2732
|
|
2476
2733
|
smalltalk.addMethod(
|
2477
|
-
unescape('
|
2734
|
+
unescape('_day_'),
|
2478
2735
|
smalltalk.method({
|
2479
|
-
selector: unescape('
|
2480
|
-
fn: function (aNumber){
|
2481
|
-
var self=this;
|
2482
|
-
(self[
|
2483
|
-
return self;
|
2736
|
+
selector: unescape('day%3A'),
|
2737
|
+
fn: function (aNumber) {
|
2738
|
+
var self = this;
|
2739
|
+
smalltalk.send(self, "_day_", [aNumber]);
|
2740
|
+
return self;
|
2741
|
+
}
|
2484
2742
|
}),
|
2485
|
-
smalltalk.
|
2743
|
+
smalltalk.Date);
|
2486
2744
|
|
2487
2745
|
smalltalk.addMethod(
|
2488
|
-
unescape('
|
2746
|
+
unescape('_year_'),
|
2489
2747
|
smalltalk.method({
|
2490
|
-
selector: unescape('
|
2491
|
-
fn: function (aNumber){
|
2492
|
-
var self=this;
|
2493
|
-
(
|
2494
|
-
return self;
|
2748
|
+
selector: unescape('year%3A'),
|
2749
|
+
fn: function (aNumber) {
|
2750
|
+
var self = this;
|
2751
|
+
self.setFullYear(aNumber);
|
2752
|
+
return self;
|
2753
|
+
}
|
2495
2754
|
}),
|
2496
|
-
smalltalk.
|
2755
|
+
smalltalk.Date);
|
2497
2756
|
|
2498
2757
|
smalltalk.addMethod(
|
2499
|
-
unescape('
|
2758
|
+
unescape('_dayOfMonth'),
|
2500
2759
|
smalltalk.method({
|
2501
|
-
selector: unescape('
|
2502
|
-
fn: function (
|
2503
|
-
var self=this;
|
2504
|
-
return
|
2505
|
-
return self;
|
2760
|
+
selector: unescape('dayOfMonth'),
|
2761
|
+
fn: function () {
|
2762
|
+
var self = this;
|
2763
|
+
return self.getDate();
|
2764
|
+
return self;
|
2765
|
+
}
|
2506
2766
|
}),
|
2507
|
-
smalltalk.
|
2767
|
+
smalltalk.Date);
|
2508
2768
|
|
2509
2769
|
smalltalk.addMethod(
|
2510
|
-
unescape('
|
2770
|
+
unescape('_dayOfMonth_'),
|
2511
2771
|
smalltalk.method({
|
2512
|
-
selector: unescape('
|
2513
|
-
fn: function (
|
2514
|
-
var self=this;
|
2515
|
-
|
2516
|
-
return self;
|
2772
|
+
selector: unescape('dayOfMonth%3A'),
|
2773
|
+
fn: function (aNumber) {
|
2774
|
+
var self = this;
|
2775
|
+
self.setDate(aNumber);
|
2776
|
+
return self;
|
2777
|
+
}
|
2517
2778
|
}),
|
2518
|
-
smalltalk.
|
2779
|
+
smalltalk.Date);
|
2780
|
+
|
2781
|
+
smalltalk.addMethod(
|
2782
|
+
unescape('_asString'),
|
2783
|
+
smalltalk.method({
|
2784
|
+
selector: unescape('asString'),
|
2785
|
+
fn: function () {
|
2786
|
+
var self = this;
|
2787
|
+
return self.toString();
|
2788
|
+
return self;
|
2789
|
+
}
|
2790
|
+
}),
|
2791
|
+
smalltalk.Date);
|
2792
|
+
|
2793
|
+
smalltalk.addMethod(
|
2794
|
+
unescape('_printString'),
|
2795
|
+
smalltalk.method({
|
2796
|
+
selector: unescape('printString'),
|
2797
|
+
fn: function () {
|
2798
|
+
var self = this;
|
2799
|
+
return smalltalk.send(self, "_asString", []);
|
2800
|
+
return self;
|
2801
|
+
}
|
2802
|
+
}),
|
2803
|
+
smalltalk.Date);
|
2804
|
+
|
2805
|
+
smalltalk.addMethod(
|
2806
|
+
unescape('_asMilliseconds'),
|
2807
|
+
smalltalk.method({
|
2808
|
+
selector: unescape('asMilliseconds'),
|
2809
|
+
fn: function () {
|
2810
|
+
var self = this;
|
2811
|
+
return smalltalk.send(self, "_time", []);
|
2812
|
+
return self;
|
2813
|
+
}
|
2814
|
+
}),
|
2815
|
+
smalltalk.Date);
|
2816
|
+
|
2817
|
+
smalltalk.addMethod(
|
2818
|
+
unescape('_time'),
|
2819
|
+
smalltalk.method({
|
2820
|
+
selector: unescape('time'),
|
2821
|
+
fn: function () {
|
2822
|
+
var self = this;
|
2823
|
+
return self.getTime();
|
2824
|
+
return self;
|
2825
|
+
}
|
2826
|
+
}),
|
2827
|
+
smalltalk.Date);
|
2828
|
+
|
2829
|
+
smalltalk.addMethod(
|
2830
|
+
unescape('_time_'),
|
2831
|
+
smalltalk.method({
|
2832
|
+
selector: unescape('time%3A'),
|
2833
|
+
fn: function (aNumber) {
|
2834
|
+
var self = this;
|
2835
|
+
self.setTime(aNumber);
|
2836
|
+
return self;
|
2837
|
+
}
|
2838
|
+
}),
|
2839
|
+
smalltalk.Date);
|
2840
|
+
|
2841
|
+
smalltalk.addMethod(
|
2842
|
+
unescape('_asDateString'),
|
2843
|
+
smalltalk.method({
|
2844
|
+
selector: unescape('asDateString'),
|
2845
|
+
fn: function () {
|
2846
|
+
var self = this;
|
2847
|
+
return self.toDateString();
|
2848
|
+
return self;
|
2849
|
+
}
|
2850
|
+
}),
|
2851
|
+
smalltalk.Date);
|
2852
|
+
|
2853
|
+
smalltalk.addMethod(
|
2854
|
+
unescape('_asTimeString'),
|
2855
|
+
smalltalk.method({
|
2856
|
+
selector: unescape('asTimeString'),
|
2857
|
+
fn: function () {
|
2858
|
+
var self = this;
|
2859
|
+
return self.toTimeString();
|
2860
|
+
return self;
|
2861
|
+
}
|
2862
|
+
}),
|
2863
|
+
smalltalk.Date);
|
2864
|
+
|
2865
|
+
smalltalk.addMethod(
|
2866
|
+
unescape('_asLocaleString'),
|
2867
|
+
smalltalk.method({
|
2868
|
+
selector: unescape('asLocaleString'),
|
2869
|
+
fn: function () {
|
2870
|
+
var self = this;
|
2871
|
+
return self.toLocaleString();
|
2872
|
+
return self;
|
2873
|
+
}
|
2874
|
+
}),
|
2875
|
+
smalltalk.Date);
|
2876
|
+
|
2877
|
+
smalltalk.addMethod(
|
2878
|
+
unescape('_asNumber'),
|
2879
|
+
smalltalk.method({
|
2880
|
+
selector: unescape('asNumber'),
|
2881
|
+
fn: function () {
|
2882
|
+
var self = this;
|
2883
|
+
return smalltalk.send(self, "_asMilliseconds", []);
|
2884
|
+
return self;
|
2885
|
+
}
|
2886
|
+
}),
|
2887
|
+
smalltalk.Date);
|
2888
|
+
|
2889
|
+
smalltalk.addMethod(
|
2890
|
+
unescape('_hours_'),
|
2891
|
+
smalltalk.method({
|
2892
|
+
selector: unescape('hours%3A'),
|
2893
|
+
fn: function (aNumber) {
|
2894
|
+
var self = this;
|
2895
|
+
self.setHours(aNumber);
|
2896
|
+
return self;
|
2897
|
+
}
|
2898
|
+
}),
|
2899
|
+
smalltalk.Date);
|
2900
|
+
|
2901
|
+
smalltalk.addMethod(
|
2902
|
+
unescape('_minutes_'),
|
2903
|
+
smalltalk.method({
|
2904
|
+
selector: unescape('minutes%3A'),
|
2905
|
+
fn: function (aNumber) {
|
2906
|
+
var self = this;
|
2907
|
+
self.setMinutes(aNumber);
|
2908
|
+
return self;
|
2909
|
+
}
|
2910
|
+
}),
|
2911
|
+
smalltalk.Date);
|
2912
|
+
|
2913
|
+
smalltalk.addMethod(
|
2914
|
+
unescape('_seconds_'),
|
2915
|
+
smalltalk.method({
|
2916
|
+
selector: unescape('seconds%3A'),
|
2917
|
+
fn: function (aNumber) {
|
2918
|
+
var self = this;
|
2919
|
+
self.setSeconds(aNumber);
|
2920
|
+
return self;
|
2921
|
+
}
|
2922
|
+
}),
|
2923
|
+
smalltalk.Date);
|
2924
|
+
|
2925
|
+
smalltalk.addMethod(
|
2926
|
+
unescape('_milliseconds_'),
|
2927
|
+
smalltalk.method({
|
2928
|
+
selector: unescape('milliseconds%3A'),
|
2929
|
+
fn: function (aNumber) {
|
2930
|
+
var self = this;
|
2931
|
+
self.setMilliseconds(aNumber);
|
2932
|
+
return self;
|
2933
|
+
}
|
2934
|
+
}),
|
2935
|
+
smalltalk.Date);
|
2936
|
+
|
2937
|
+
smalltalk.addMethod(
|
2938
|
+
unescape('_hours'),
|
2939
|
+
smalltalk.method({
|
2940
|
+
selector: unescape('hours'),
|
2941
|
+
fn: function () {
|
2942
|
+
var self = this;
|
2943
|
+
return self.getHours();
|
2944
|
+
return self;
|
2945
|
+
}
|
2946
|
+
}),
|
2947
|
+
smalltalk.Date);
|
2948
|
+
|
2949
|
+
smalltalk.addMethod(
|
2950
|
+
unescape('_minutes'),
|
2951
|
+
smalltalk.method({
|
2952
|
+
selector: unescape('minutes'),
|
2953
|
+
fn: function () {
|
2954
|
+
var self = this;
|
2955
|
+
return self.getMinutes();
|
2956
|
+
return self;
|
2957
|
+
}
|
2958
|
+
}),
|
2959
|
+
smalltalk.Date);
|
2960
|
+
|
2961
|
+
smalltalk.addMethod(
|
2962
|
+
unescape('_seconds'),
|
2963
|
+
smalltalk.method({
|
2964
|
+
selector: unescape('seconds'),
|
2965
|
+
fn: function () {
|
2966
|
+
var self = this;
|
2967
|
+
return self.getSeconds();
|
2968
|
+
return self;
|
2969
|
+
}
|
2970
|
+
}),
|
2971
|
+
smalltalk.Date);
|
2972
|
+
|
2973
|
+
smalltalk.addMethod(
|
2974
|
+
unescape('_milliseconds'),
|
2975
|
+
smalltalk.method({
|
2976
|
+
selector: unescape('milliseconds'),
|
2977
|
+
fn: function () {
|
2978
|
+
var self = this;
|
2979
|
+
return self.getMilliseconds();
|
2980
|
+
return self;
|
2981
|
+
}
|
2982
|
+
}),
|
2983
|
+
smalltalk.Date);
|
2984
|
+
|
2985
|
+
smalltalk.addMethod(
|
2986
|
+
unescape('__lt'),
|
2987
|
+
smalltalk.method({
|
2988
|
+
selector: unescape('%3C'),
|
2989
|
+
fn: function (aDate) {
|
2990
|
+
var self = this;
|
2991
|
+
return self < aDate;
|
2992
|
+
return self;
|
2993
|
+
}
|
2994
|
+
}),
|
2995
|
+
smalltalk.Date);
|
2996
|
+
|
2997
|
+
smalltalk.addMethod(
|
2998
|
+
unescape('__gt'),
|
2999
|
+
smalltalk.method({
|
3000
|
+
selector: unescape('%3E'),
|
3001
|
+
fn: function (aDate) {
|
3002
|
+
var self = this;
|
3003
|
+
return self > aDate;
|
3004
|
+
return self;
|
3005
|
+
}
|
3006
|
+
}),
|
3007
|
+
smalltalk.Date);
|
3008
|
+
|
3009
|
+
smalltalk.addMethod(
|
3010
|
+
unescape('__lt_eq'),
|
3011
|
+
smalltalk.method({
|
3012
|
+
selector: unescape('%3C%3D'),
|
3013
|
+
fn: function (aDate) {
|
3014
|
+
var self = this;
|
3015
|
+
return self <= aDate;
|
3016
|
+
return self;
|
3017
|
+
}
|
3018
|
+
}),
|
3019
|
+
smalltalk.Date);
|
3020
|
+
|
3021
|
+
smalltalk.addMethod(
|
3022
|
+
unescape('__gt_eq'),
|
3023
|
+
smalltalk.method({
|
3024
|
+
selector: unescape('%3E%3D'),
|
3025
|
+
fn: function (aDate) {
|
3026
|
+
var self = this;
|
3027
|
+
return self >= aDate;
|
3028
|
+
return self;
|
3029
|
+
}
|
3030
|
+
}),
|
3031
|
+
smalltalk.Date);
|
2519
3032
|
|
2520
3033
|
smalltalk.addMethod(
|
2521
3034
|
unescape('__minus'),
|
2522
3035
|
smalltalk.method({
|
2523
3036
|
selector: unescape('-'),
|
2524
|
-
fn: function (
|
2525
|
-
var self=this;
|
2526
|
-
return
|
2527
|
-
return self;
|
3037
|
+
fn: function (aDate) {
|
3038
|
+
var self = this;
|
3039
|
+
return self - aDate;
|
3040
|
+
return self;
|
3041
|
+
}
|
2528
3042
|
}),
|
2529
|
-
smalltalk.
|
3043
|
+
smalltalk.Date);
|
2530
3044
|
|
2531
3045
|
smalltalk.addMethod(
|
2532
|
-
unescape('
|
3046
|
+
unescape('__plus'),
|
2533
3047
|
smalltalk.method({
|
2534
|
-
selector: unescape('
|
2535
|
-
fn: function (
|
2536
|
-
var self=this;
|
2537
|
-
return
|
2538
|
-
return self;
|
3048
|
+
selector: unescape('+'),
|
3049
|
+
fn: function (aDate) {
|
3050
|
+
var self = this;
|
3051
|
+
return self + aDate;
|
3052
|
+
return self;
|
3053
|
+
}
|
2539
3054
|
}),
|
2540
|
-
smalltalk.
|
3055
|
+
smalltalk.Date);
|
3056
|
+
|
2541
3057
|
|
2542
3058
|
smalltalk.addMethod(
|
2543
|
-
unescape('
|
3059
|
+
unescape('_new_'),
|
2544
3060
|
smalltalk.method({
|
2545
|
-
selector: unescape('
|
2546
|
-
fn: function (){
|
2547
|
-
var self=this;
|
2548
|
-
return
|
2549
|
-
return self;
|
3061
|
+
selector: unescape('new%3A'),
|
3062
|
+
fn: function (anObject) {
|
3063
|
+
var self = this;
|
3064
|
+
return new Date(anObject);
|
3065
|
+
return self;
|
3066
|
+
}
|
2550
3067
|
}),
|
2551
|
-
smalltalk.
|
3068
|
+
smalltalk.Date.klass);
|
2552
3069
|
|
2553
3070
|
smalltalk.addMethod(
|
2554
|
-
unescape('
|
3071
|
+
unescape('_fromString_'),
|
2555
3072
|
smalltalk.method({
|
2556
|
-
selector: unescape('%
|
2557
|
-
fn: function (
|
2558
|
-
var self=this;
|
2559
|
-
return smalltalk.send(
|
2560
|
-
return self;
|
3073
|
+
selector: unescape('fromString%3A'),
|
3074
|
+
fn: function (aString) {
|
3075
|
+
var self = this;
|
3076
|
+
return smalltalk.send(self, "_new_", [aString]);
|
3077
|
+
return self;
|
3078
|
+
}
|
2561
3079
|
}),
|
2562
|
-
smalltalk.
|
3080
|
+
smalltalk.Date.klass);
|
2563
3081
|
|
2564
3082
|
smalltalk.addMethod(
|
2565
|
-
unescape('
|
3083
|
+
unescape('_fromSeconds_'),
|
2566
3084
|
smalltalk.method({
|
2567
|
-
selector: unescape('
|
2568
|
-
fn: function (){
|
2569
|
-
var self=this;
|
2570
|
-
return smalltalk.send(
|
2571
|
-
return self;
|
3085
|
+
selector: unescape('fromSeconds%3A'),
|
3086
|
+
fn: function (aNumber) {
|
3087
|
+
var self = this;
|
3088
|
+
return smalltalk.send(self, "_fromMilliseconds_", [($receiver = aNumber).klass === smalltalk.Number ? $receiver * 1000 : smalltalk.send($receiver, "__star", [1000])]);
|
3089
|
+
return self;
|
3090
|
+
}
|
2572
3091
|
}),
|
2573
|
-
smalltalk.
|
3092
|
+
smalltalk.Date.klass);
|
2574
3093
|
|
3094
|
+
smalltalk.addMethod(
|
3095
|
+
unescape('_fromMilliseconds_'),
|
3096
|
+
smalltalk.method({
|
3097
|
+
selector: unescape('fromMilliseconds%3A'),
|
3098
|
+
fn: function (aNumber) {
|
3099
|
+
var self = this;
|
3100
|
+
return smalltalk.send(self, "_new_", [aNumber]);
|
3101
|
+
return self;
|
3102
|
+
}
|
3103
|
+
}),
|
3104
|
+
smalltalk.Date.klass);
|
2575
3105
|
|
2576
3106
|
smalltalk.addMethod(
|
2577
|
-
unescape('
|
3107
|
+
unescape('_today'),
|
2578
3108
|
smalltalk.method({
|
2579
|
-
selector: unescape('
|
2580
|
-
fn: function (
|
2581
|
-
var self=this;
|
2582
|
-
return
|
2583
|
-
return self;
|
3109
|
+
selector: unescape('today'),
|
3110
|
+
fn: function () {
|
3111
|
+
var self = this;
|
3112
|
+
return smalltalk.send(self, "_new", []);
|
3113
|
+
return self;
|
3114
|
+
}
|
2584
3115
|
}),
|
2585
|
-
smalltalk.
|
3116
|
+
smalltalk.Date.klass);
|
3117
|
+
|
3118
|
+
smalltalk.addMethod(
|
3119
|
+
unescape('_now'),
|
3120
|
+
smalltalk.method({
|
3121
|
+
selector: unescape('now'),
|
3122
|
+
fn: function () {
|
3123
|
+
var self = this;
|
3124
|
+
return smalltalk.send(self, "_today", []);
|
3125
|
+
return self;
|
3126
|
+
}
|
3127
|
+
}),
|
3128
|
+
smalltalk.Date.klass);
|
3129
|
+
|
3130
|
+
smalltalk.addMethod(
|
3131
|
+
unescape('_millisecondsToRun_'),
|
3132
|
+
smalltalk.method({
|
3133
|
+
selector: unescape('millisecondsToRun%3A'),
|
3134
|
+
fn: function (aBlock) {
|
3135
|
+
var self = this;
|
3136
|
+
var t = nil;
|
3137
|
+
t = smalltalk.send(smalltalk.Date || Date, "_now", []);
|
3138
|
+
smalltalk.send(aBlock, "_value", []);
|
3139
|
+
return ($receiver = smalltalk.send(smalltalk.Date || Date, "_now", [])).klass === smalltalk.Number ? $receiver - t : smalltalk.send($receiver, "__minus", [t]);
|
3140
|
+
return self;
|
3141
|
+
}
|
3142
|
+
}),
|
3143
|
+
smalltalk.Date.klass);
|
2586
3144
|
|
2587
3145
|
|
2588
3146
|
smalltalk.addClass('JSObjectProxy', smalltalk.Object, ['jsObject'], 'Kernel-Objects');
|
@@ -2590,10 +3148,11 @@ smalltalk.addMethod(
|
|
2590
3148
|
unescape('_jsObject_'),
|
2591
3149
|
smalltalk.method({
|
2592
3150
|
selector: unescape('jsObject%3A'),
|
2593
|
-
fn: function (aJSObject){
|
2594
|
-
var self=this;
|
2595
|
-
|
2596
|
-
return self;
|
3151
|
+
fn: function (aJSObject) {
|
3152
|
+
var self = this;
|
3153
|
+
self['@jsObject'] = aJSObject;
|
3154
|
+
return self;
|
3155
|
+
}
|
2597
3156
|
}),
|
2598
3157
|
smalltalk.JSObjectProxy);
|
2599
3158
|
|
@@ -2601,10 +3160,11 @@ smalltalk.addMethod(
|
|
2601
3160
|
unescape('_jsObject'),
|
2602
3161
|
smalltalk.method({
|
2603
3162
|
selector: unescape('jsObject'),
|
2604
|
-
fn: function (){
|
2605
|
-
var self=this;
|
2606
|
-
return self['@jsObject'];
|
2607
|
-
return self;
|
3163
|
+
fn: function () {
|
3164
|
+
var self = this;
|
3165
|
+
return self['@jsObject'];
|
3166
|
+
return self;
|
3167
|
+
}
|
2608
3168
|
}),
|
2609
3169
|
smalltalk.JSObjectProxy);
|
2610
3170
|
|
@@ -2612,10 +3172,11 @@ smalltalk.addMethod(
|
|
2612
3172
|
unescape('_printString'),
|
2613
3173
|
smalltalk.method({
|
2614
3174
|
selector: unescape('printString'),
|
2615
|
-
fn: function (){
|
2616
|
-
var self=this;
|
2617
|
-
return smalltalk.send(smalltalk.send(self, "_jsObject", []), "_toString", []);
|
2618
|
-
return self;
|
3175
|
+
fn: function () {
|
3176
|
+
var self = this;
|
3177
|
+
return smalltalk.send(smalltalk.send(self, "_jsObject", []), "_toString", []);
|
3178
|
+
return self;
|
3179
|
+
}
|
2619
3180
|
}),
|
2620
3181
|
smalltalk.JSObjectProxy);
|
2621
3182
|
|
@@ -2623,17 +3184,18 @@ smalltalk.addMethod(
|
|
2623
3184
|
unescape('_inspectOn_'),
|
2624
3185
|
smalltalk.method({
|
2625
3186
|
selector: unescape('inspectOn%3A'),
|
2626
|
-
fn: function (anInspector){
|
2627
|
-
var self=this;
|
2628
|
-
var variables=nil;
|
2629
|
-
|
2630
|
-
smalltalk.send(variables, "_at_put_", [unescape("%23self"), smalltalk.send(self, "_jsObject", [])]);
|
2631
|
-
smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
|
2632
|
-
for(var i in self['@jsObject']) {
|
2633
|
-
|
2634
|
-
|
2635
|
-
smalltalk.send(anInspector, "_setVariables_", [variables]);
|
2636
|
-
return self;
|
3187
|
+
fn: function (anInspector) {
|
3188
|
+
var self = this;
|
3189
|
+
var variables = nil;
|
3190
|
+
variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
|
3191
|
+
smalltalk.send(variables, "_at_put_", [unescape("%23self"), smalltalk.send(self, "_jsObject", [])]);
|
3192
|
+
smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
|
3193
|
+
for (var i in self['@jsObject']) {
|
3194
|
+
variables._at_put_(i, self['@jsObject'][i]);
|
3195
|
+
}
|
3196
|
+
smalltalk.send(anInspector, "_setVariables_", [variables]);
|
3197
|
+
return self;
|
3198
|
+
}
|
2637
3199
|
}),
|
2638
3200
|
smalltalk.JSObjectProxy);
|
2639
3201
|
|
@@ -2641,19 +3203,22 @@ smalltalk.addMethod(
|
|
2641
3203
|
unescape('_doesNotUnderstand_'),
|
2642
3204
|
smalltalk.method({
|
2643
3205
|
selector: unescape('doesNotUnderstand%3A'),
|
2644
|
-
fn: function (aMessage){
|
2645
|
-
var self=this;
|
2646
|
-
var obj=nil;
|
2647
|
-
var selector=nil;
|
2648
|
-
var jsSelector=nil;
|
2649
|
-
var arguments=nil;
|
2650
|
-
|
2651
|
-
|
2652
|
-
|
2653
|
-
|
2654
|
-
if(obj[jsSelector] != undefined) {
|
2655
|
-
smalltalk.send(
|
2656
|
-
|
3206
|
+
fn: function (aMessage) {
|
3207
|
+
var self = this;
|
3208
|
+
var obj = nil;
|
3209
|
+
var selector = nil;
|
3210
|
+
var jsSelector = nil;
|
3211
|
+
var arguments = nil;
|
3212
|
+
obj = smalltalk.send(self, "_jsObject", []);
|
3213
|
+
selector = smalltalk.send(aMessage, "_selector", []);
|
3214
|
+
jsSelector = smalltalk.send(selector, "_asJavaScriptSelector", []);
|
3215
|
+
arguments = smalltalk.send(aMessage, "_arguments", []);
|
3216
|
+
if (obj[jsSelector] != undefined) {
|
3217
|
+
return smalltalk.send(obj, jsSelector, arguments);
|
3218
|
+
}
|
3219
|
+
smalltalk.send(self, "_doesNotUnderstand_", [aMessage], smalltalk.Object);
|
3220
|
+
return self;
|
3221
|
+
}
|
2657
3222
|
}),
|
2658
3223
|
smalltalk.JSObjectProxy);
|
2659
3224
|
|
@@ -2661,12 +3226,13 @@ smalltalk.addMethod(
|
|
2661
3226
|
unescape('_at_'),
|
2662
3227
|
smalltalk.method({
|
2663
3228
|
selector: unescape('at%3A'),
|
2664
|
-
fn: function (aSymbol){
|
2665
|
-
var self=this;
|
2666
|
-
var attr=nil;
|
2667
|
-
|
2668
|
-
return self['@jsObject'][attr];
|
2669
|
-
return self;
|
3229
|
+
fn: function (aSymbol) {
|
3230
|
+
var self = this;
|
3231
|
+
var attr = nil;
|
3232
|
+
attr = smalltalk.send(aSymbol, "_asString", []);
|
3233
|
+
return self['@jsObject'][attr];
|
3234
|
+
return self;
|
3235
|
+
}
|
2670
3236
|
}),
|
2671
3237
|
smalltalk.JSObjectProxy);
|
2672
3238
|
|
@@ -2674,12 +3240,13 @@ smalltalk.addMethod(
|
|
2674
3240
|
unescape('_at_put_'),
|
2675
3241
|
smalltalk.method({
|
2676
3242
|
selector: unescape('at%3Aput%3A'),
|
2677
|
-
fn: function (aSymbol, anObject){
|
2678
|
-
var self=this;
|
2679
|
-
var attr=nil;
|
2680
|
-
|
2681
|
-
self['@jsObject'][attr] = anObject;
|
2682
|
-
return self;
|
3243
|
+
fn: function (aSymbol, anObject) {
|
3244
|
+
var self = this;
|
3245
|
+
var attr = nil;
|
3246
|
+
attr = smalltalk.send(aSymbol, "_asString", []);
|
3247
|
+
self['@jsObject'][attr] = anObject;
|
3248
|
+
return self;
|
3249
|
+
}
|
2683
3250
|
}),
|
2684
3251
|
smalltalk.JSObjectProxy);
|
2685
3252
|
|
@@ -2688,11 +3255,186 @@ smalltalk.addMethod(
|
|
2688
3255
|
unescape('_on_'),
|
2689
3256
|
smalltalk.method({
|
2690
3257
|
selector: unescape('on%3A'),
|
2691
|
-
fn: function (aJSObject){
|
2692
|
-
var self=this;
|
2693
|
-
return
|
2694
|
-
return self;
|
3258
|
+
fn: function (aJSObject) {
|
3259
|
+
var self = this;
|
3260
|
+
return function ($rec) {smalltalk.send($rec, "_jsObject_", [aJSObject]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(self, "_new", []));
|
3261
|
+
return self;
|
3262
|
+
}
|
2695
3263
|
}),
|
2696
3264
|
smalltalk.JSObjectProxy.klass);
|
2697
3265
|
|
2698
3266
|
|
3267
|
+
smalltalk.addClass('Point', smalltalk.Object, ['x', 'y'], 'Kernel-Objects');
|
3268
|
+
smalltalk.addMethod(
|
3269
|
+
unescape('_x'),
|
3270
|
+
smalltalk.method({
|
3271
|
+
selector: unescape('x'),
|
3272
|
+
fn: function () {
|
3273
|
+
var self = this;
|
3274
|
+
return self['@x'];
|
3275
|
+
return self;
|
3276
|
+
}
|
3277
|
+
}),
|
3278
|
+
smalltalk.Point);
|
3279
|
+
|
3280
|
+
smalltalk.addMethod(
|
3281
|
+
unescape('_y'),
|
3282
|
+
smalltalk.method({
|
3283
|
+
selector: unescape('y'),
|
3284
|
+
fn: function () {
|
3285
|
+
var self = this;
|
3286
|
+
return self['@y'];
|
3287
|
+
return self;
|
3288
|
+
}
|
3289
|
+
}),
|
3290
|
+
smalltalk.Point);
|
3291
|
+
|
3292
|
+
smalltalk.addMethod(
|
3293
|
+
unescape('_y_'),
|
3294
|
+
smalltalk.method({
|
3295
|
+
selector: unescape('y%3A'),
|
3296
|
+
fn: function (aNumber) {
|
3297
|
+
var self = this;
|
3298
|
+
self['@y'] = aNumber;
|
3299
|
+
return self;
|
3300
|
+
}
|
3301
|
+
}),
|
3302
|
+
smalltalk.Point);
|
3303
|
+
|
3304
|
+
smalltalk.addMethod(
|
3305
|
+
unescape('_x_'),
|
3306
|
+
smalltalk.method({
|
3307
|
+
selector: unescape('x%3A'),
|
3308
|
+
fn: function (aNumber) {
|
3309
|
+
var self = this;
|
3310
|
+
self['@x'] = aNumber;
|
3311
|
+
return self;
|
3312
|
+
}
|
3313
|
+
}),
|
3314
|
+
smalltalk.Point);
|
3315
|
+
|
3316
|
+
smalltalk.addMethod(
|
3317
|
+
unescape('__star'),
|
3318
|
+
smalltalk.method({
|
3319
|
+
selector: unescape('*'),
|
3320
|
+
fn: function (aPoint) {
|
3321
|
+
var self = this;
|
3322
|
+
return smalltalk.send(smalltalk.Point || Point, "_x_y_", [($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number ? $receiver * smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__star", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])]), ($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number ? $receiver * smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__star", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])])]);
|
3323
|
+
return self;
|
3324
|
+
}
|
3325
|
+
}),
|
3326
|
+
smalltalk.Point);
|
3327
|
+
|
3328
|
+
smalltalk.addMethod(
|
3329
|
+
unescape('__plus'),
|
3330
|
+
smalltalk.method({
|
3331
|
+
selector: unescape('+'),
|
3332
|
+
fn: function (aPoint) {
|
3333
|
+
var self = this;
|
3334
|
+
return smalltalk.send(smalltalk.Point || Point, "_x_y_", [($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number ? $receiver + smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])]), ($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number ? $receiver + smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])])]);
|
3335
|
+
return self;
|
3336
|
+
}
|
3337
|
+
}),
|
3338
|
+
smalltalk.Point);
|
3339
|
+
|
3340
|
+
smalltalk.addMethod(
|
3341
|
+
unescape('__minus'),
|
3342
|
+
smalltalk.method({
|
3343
|
+
selector: unescape('-'),
|
3344
|
+
fn: function (aPoint) {
|
3345
|
+
var self = this;
|
3346
|
+
return smalltalk.send(smalltalk.Point || Point, "_x_y_", [($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number ? $receiver - smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__minus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])]), ($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number ? $receiver - smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__minus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])])]);
|
3347
|
+
return self;
|
3348
|
+
}
|
3349
|
+
}),
|
3350
|
+
smalltalk.Point);
|
3351
|
+
|
3352
|
+
smalltalk.addMethod(
|
3353
|
+
unescape('__slash'),
|
3354
|
+
smalltalk.method({
|
3355
|
+
selector: unescape('/'),
|
3356
|
+
fn: function (aPoint) {
|
3357
|
+
var self = this;
|
3358
|
+
return smalltalk.send(smalltalk.Point || Point, "_x_y_", [($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number ? $receiver / smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__slash", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])]), ($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number ? $receiver / smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__slash", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])])]);
|
3359
|
+
return self;
|
3360
|
+
}
|
3361
|
+
}),
|
3362
|
+
smalltalk.Point);
|
3363
|
+
|
3364
|
+
smalltalk.addMethod(
|
3365
|
+
unescape('_asPoint'),
|
3366
|
+
smalltalk.method({
|
3367
|
+
selector: unescape('asPoint'),
|
3368
|
+
fn: function () {
|
3369
|
+
var self = this;
|
3370
|
+
return self;
|
3371
|
+
return self;
|
3372
|
+
}
|
3373
|
+
}),
|
3374
|
+
smalltalk.Point);
|
3375
|
+
|
3376
|
+
smalltalk.addMethod(
|
3377
|
+
unescape('__eq'),
|
3378
|
+
smalltalk.method({
|
3379
|
+
selector: unescape('%3D'),
|
3380
|
+
fn: function (aPoint) {
|
3381
|
+
var self = this;
|
3382
|
+
return smalltalk.send(smalltalk.send(smalltalk.send(aPoint, "_class", []), "__eq", [smalltalk.send(self, "_class", [])]), "_and_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(aPoint, "_x", []), "__eq", [smalltalk.send(self, "_x", [])]), "_&", [smalltalk.send(smalltalk.send(aPoint, "_y", []), "__eq", [smalltalk.send(self, "_y", [])])]);}]);
|
3383
|
+
return self;
|
3384
|
+
}
|
3385
|
+
}),
|
3386
|
+
smalltalk.Point);
|
3387
|
+
|
3388
|
+
smalltalk.addMethod(
|
3389
|
+
unescape('_printString'),
|
3390
|
+
smalltalk.method({
|
3391
|
+
selector: unescape('printString'),
|
3392
|
+
fn: function () {
|
3393
|
+
var self = this;
|
3394
|
+
return smalltalk.send(smalltalk.String || String, "_streamContents_", [function (stream) {smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(smalltalk.send(self['@x'], "_printString", []), "__comma", [unescape("@")])]);($receiver = smalltalk.send(smalltalk.send(self['@y'], "_notNil", []), "_and_", [function () {return smalltalk.send(self['@y'], "_negative", []);}])).klass === smalltalk.Boolean ? $receiver ? function () {return smalltalk.send(stream, "_space", []);}() : nil : smalltalk.send($receiver, "_ifTrue_", [function () {return smalltalk.send(stream, "_space", []);}]);return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self['@y'], "_printString", [])]);}]);
|
3395
|
+
return self;
|
3396
|
+
}
|
3397
|
+
}),
|
3398
|
+
smalltalk.Point);
|
3399
|
+
|
3400
|
+
|
3401
|
+
smalltalk.addMethod(
|
3402
|
+
unescape('_x_y_'),
|
3403
|
+
smalltalk.method({
|
3404
|
+
selector: unescape('x%3Ay%3A'),
|
3405
|
+
fn: function (aNumber, anotherNumber) {
|
3406
|
+
var self = this;
|
3407
|
+
return function ($rec) {smalltalk.send($rec, "_x_", [aNumber]);smalltalk.send($rec, "_y_", [anotherNumber]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(self, "_new", []));
|
3408
|
+
return self;
|
3409
|
+
}
|
3410
|
+
}),
|
3411
|
+
smalltalk.Point.klass);
|
3412
|
+
|
3413
|
+
|
3414
|
+
smalltalk.addClass('Random', smalltalk.Object, [], 'Kernel-Objects');
|
3415
|
+
smalltalk.addMethod(
|
3416
|
+
unescape('_next'),
|
3417
|
+
smalltalk.method({
|
3418
|
+
selector: unescape('next'),
|
3419
|
+
fn: function () {
|
3420
|
+
var self = this;
|
3421
|
+
return Math.random();
|
3422
|
+
return self;
|
3423
|
+
}
|
3424
|
+
}),
|
3425
|
+
smalltalk.Random);
|
3426
|
+
|
3427
|
+
smalltalk.addMethod(
|
3428
|
+
unescape('_next_'),
|
3429
|
+
smalltalk.method({
|
3430
|
+
selector: unescape('next%3A'),
|
3431
|
+
fn: function (anInteger) {
|
3432
|
+
var self = this;
|
3433
|
+
return smalltalk.send(smalltalk.send(1, "_to_", [anInteger]), "_collect_", [function (each) {return smalltalk.send(self, "_next", []);}]);
|
3434
|
+
return self;
|
3435
|
+
}
|
3436
|
+
}),
|
3437
|
+
smalltalk.Random);
|
3438
|
+
|
3439
|
+
|
3440
|
+
|