resin 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. data/amber/bin/amberc +10 -350
  2. data/amber/js/Benchfib.deploy.js +80 -89
  3. data/amber/js/Benchfib.js +80 -89
  4. data/amber/js/Canvas.deploy.js +558 -545
  5. data/amber/js/Canvas.js +563 -545
  6. data/amber/js/Compiler-AST.deploy.js +431 -243
  7. data/amber/js/Compiler-AST.js +487 -244
  8. data/amber/js/Compiler-Core.deploy.js +201 -1045
  9. data/amber/js/Compiler-Core.js +208 -1207
  10. data/amber/js/Compiler-Exceptions.deploy.js +37 -18
  11. data/amber/js/Compiler-Exceptions.js +42 -18
  12. data/amber/js/Compiler-IR.deploy.js +1071 -774
  13. data/amber/js/Compiler-IR.js +1194 -848
  14. data/amber/js/Compiler-Inlining.deploy.js +395 -373
  15. data/amber/js/Compiler-Inlining.js +395 -373
  16. data/amber/js/Compiler-Interpreter.deploy.js +1202 -0
  17. data/amber/js/Compiler-Interpreter.js +1631 -0
  18. data/amber/js/Compiler-Semantic.deploy.js +695 -600
  19. data/amber/js/Compiler-Semantic.js +721 -611
  20. data/amber/js/Compiler-Tests.deploy.js +699 -376
  21. data/amber/js/Compiler-Tests.js +834 -381
  22. data/amber/js/Compiler.deploy.js +8563 -1805
  23. data/amber/js/Compiler.js +11476 -2633
  24. data/amber/js/Examples.deploy.js +29 -29
  25. data/amber/js/Examples.js +29 -29
  26. data/amber/js/IDE.deploy.js +3292 -2649
  27. data/amber/js/IDE.js +3318 -2710
  28. data/amber/js/Importer-Exporter.deploy.js +393 -349
  29. data/amber/js/Importer-Exporter.js +398 -354
  30. data/amber/js/Kernel-Announcements.deploy.js +53 -44
  31. data/amber/js/Kernel-Announcements.js +55 -44
  32. data/amber/js/Kernel-Classes.deploy.js +566 -368
  33. data/amber/js/Kernel-Classes.js +660 -402
  34. data/amber/js/Kernel-Collections.deploy.js +1149 -1098
  35. data/amber/js/Kernel-Collections.js +1183 -1116
  36. data/amber/js/Kernel-Exceptions.deploy.js +173 -75
  37. data/amber/js/Kernel-Exceptions.js +215 -77
  38. data/amber/js/Kernel-Methods.deploy.js +530 -313
  39. data/amber/js/Kernel-Methods.js +632 -338
  40. data/amber/js/Kernel-Objects.deploy.js +1734 -1577
  41. data/amber/js/Kernel-Objects.js +1867 -1654
  42. data/amber/js/Kernel-Tests.deploy.js +1416 -973
  43. data/amber/js/Kernel-Tests.js +1495 -981
  44. data/amber/js/Kernel-Transcript.deploy.js +23 -24
  45. data/amber/js/Kernel-Transcript.js +25 -26
  46. data/amber/js/SUnit-Tests.deploy.js +402 -0
  47. data/amber/js/SUnit-Tests.js +518 -0
  48. data/amber/js/SUnit.deploy.js +535 -237
  49. data/amber/js/SUnit.js +634 -246
  50. data/amber/js/amber.js +90 -53
  51. data/amber/js/boot.js +441 -255
  52. data/amber/js/init.js +1 -3
  53. data/amber/js/lib/CodeMirror/codemirror.css +3 -0
  54. data/amber/js/lib/CodeMirror/codemirror.js +104 -55
  55. data/amber/js/lib/peg-0.7.0.min.js +9 -0
  56. data/amber/js/parser.js +1504 -802
  57. data/amber/js/parser.pegjs +170 -165
  58. data/amber/st/Canvas.st +6 -0
  59. data/amber/st/Compiler-AST.st +54 -3
  60. data/amber/st/Compiler-Core.st +6 -551
  61. data/amber/st/Compiler-Exceptions.st +4 -0
  62. data/amber/st/Compiler-IR.st +205 -87
  63. data/amber/st/Compiler-Interpreter.st +597 -0
  64. data/amber/st/Compiler-Semantic.st +46 -21
  65. data/amber/st/Compiler-Tests.st +254 -7
  66. data/amber/st/Compiler.st +3172 -1541
  67. data/amber/st/IDE.st +57 -93
  68. data/amber/st/Importer-Exporter.st +4 -7
  69. data/amber/st/Kernel-Announcements.st +8 -0
  70. data/amber/st/Kernel-Classes.st +149 -40
  71. data/amber/st/Kernel-Collections.st +43 -32
  72. data/amber/st/Kernel-Exceptions.st +70 -1
  73. data/amber/st/Kernel-Methods.st +165 -27
  74. data/amber/st/Kernel-Objects.st +215 -140
  75. data/amber/st/Kernel-Tests.st +195 -10
  76. data/amber/st/Kernel-Transcript.st +1 -3
  77. data/amber/st/SUnit-Tests.st +186 -0
  78. data/amber/st/SUnit.st +186 -14
  79. data/bin/resin +6 -0
  80. data/lib/resin/cli.rb +19 -0
  81. metadata +41 -25
  82. data/amber/js/lib/peg-0.6.2.min.js +0 -2
  83. data/bin/resin-compile +0 -6
  84. data/bin/runresin +0 -12
@@ -4,11 +4,21 @@ smalltalk.addMethod(
4
4
  "_applyTo_arguments_",
5
5
  smalltalk.method({
6
6
  selector: "applyTo:arguments:",
7
- fn: function (anObject, aCollection) {
8
- var self = this;
9
- return self.apply(anObject, aCollection);
10
- return self;
11
- }
7
+ fn: function (anObject,aCollection){
8
+ var self=this;
9
+ return smalltalk.withContext(function($ctx1) {
10
+ return self}, function($ctx1) {$ctx1.fill(self,"applyTo:arguments:",{anObject:anObject,aCollection:aCollection}, smalltalk.BlockClosure)})}
11
+ }),
12
+ smalltalk.BlockClosure);
13
+
14
+ smalltalk.addMethod(
15
+ "_asCompiledMethod_",
16
+ smalltalk.method({
17
+ selector: "asCompiledMethod:",
18
+ fn: function (aString){
19
+ var self=this;
20
+ return smalltalk.withContext(function($ctx1) {
21
+ return self}, function($ctx1) {$ctx1.fill(self,"asCompiledMethod:",{aString:aString}, smalltalk.BlockClosure)})}
12
22
  }),
13
23
  smalltalk.BlockClosure);
14
24
 
@@ -16,11 +26,10 @@ smalltalk.addMethod(
16
26
  "_compiledSource",
17
27
  smalltalk.method({
18
28
  selector: "compiledSource",
19
- fn: function () {
20
- var self = this;
21
- return self.toString();
22
- return self;
23
- }
29
+ fn: function (){
30
+ var self=this;
31
+ return smalltalk.withContext(function($ctx1) {
32
+ return self}, function($ctx1) {$ctx1.fill(self,"compiledSource",{}, smalltalk.BlockClosure)})}
24
33
  }),
25
34
  smalltalk.BlockClosure);
26
35
 
@@ -30,9 +39,8 @@ smalltalk.method({
30
39
  selector: "ensure:",
31
40
  fn: function (aBlock){
32
41
  var self=this;
33
- try{self()}finally{return aBlock._value()};
34
- ;
35
- return self}
42
+ return smalltalk.withContext(function($ctx1) {
43
+ return self}, function($ctx1) {$ctx1.fill(self,"ensure:",{aBlock:aBlock}, smalltalk.BlockClosure)})}
36
44
  }),
37
45
  smalltalk.BlockClosure);
38
46
 
@@ -42,8 +50,8 @@ smalltalk.method({
42
50
  selector: "fork",
43
51
  fn: function (){
44
52
  var self=this;
45
- smalltalk.send(smalltalk.send((smalltalk.ForkPool || ForkPool),"_default",[]),"_fork_",[self]);
46
- return self}
53
+ return smalltalk.withContext(function($ctx1) {
54
+ return self}, function($ctx1) {$ctx1.fill(self,"fork",{}, smalltalk.BlockClosure)})}
47
55
  }),
48
56
  smalltalk.BlockClosure);
49
57
 
@@ -51,11 +59,10 @@ smalltalk.addMethod(
51
59
  "_new",
52
60
  smalltalk.method({
53
61
  selector: "new",
54
- fn: function () {
55
- var self = this;
56
- return new self;
57
- return self;
58
- }
62
+ fn: function (){
63
+ var self=this;
64
+ return smalltalk.withContext(function($ctx1) {
65
+ return self}, function($ctx1) {$ctx1.fill(self,"new",{}, smalltalk.BlockClosure)})}
59
66
  }),
60
67
  smalltalk.BlockClosure);
61
68
 
@@ -63,11 +70,10 @@ smalltalk.addMethod(
63
70
  "_newValue_",
64
71
  smalltalk.method({
65
72
  selector: "newValue:",
66
- fn: function (anObject) {
67
- var self = this;
68
- return new self(anObject);
69
- return self;
70
- }
73
+ fn: function (anObject){
74
+ var self=this;
75
+ return smalltalk.withContext(function($ctx1) {
76
+ return self}, function($ctx1) {$ctx1.fill(self,"newValue:",{anObject:anObject}, smalltalk.BlockClosure)})}
71
77
  }),
72
78
  smalltalk.BlockClosure);
73
79
 
@@ -75,11 +81,10 @@ smalltalk.addMethod(
75
81
  "_newValue_value_",
76
82
  smalltalk.method({
77
83
  selector: "newValue:value:",
78
- fn: function (anObject, anObject2) {
79
- var self = this;
80
- return new self(anObject, anObject2);
81
- return self;
82
- }
84
+ fn: function (anObject,anObject2){
85
+ var self=this;
86
+ return smalltalk.withContext(function($ctx1) {
87
+ return self}, function($ctx1) {$ctx1.fill(self,"newValue:value:",{anObject:anObject,anObject2:anObject2}, smalltalk.BlockClosure)})}
83
88
  }),
84
89
  smalltalk.BlockClosure);
85
90
 
@@ -87,11 +92,10 @@ smalltalk.addMethod(
87
92
  "_newValue_value_value_",
88
93
  smalltalk.method({
89
94
  selector: "newValue:value:value:",
90
- fn: function (anObject, anObject2, anObject3) {
91
- var self = this;
92
- return new self(anObject, anObject2);
93
- return self;
94
- }
95
+ fn: function (anObject,anObject2,anObject3){
96
+ var self=this;
97
+ return smalltalk.withContext(function($ctx1) {
98
+ return self}, function($ctx1) {$ctx1.fill(self,"newValue:value:value:",{anObject:anObject,anObject2:anObject2,anObject3:anObject3}, smalltalk.BlockClosure)})}
95
99
  }),
96
100
  smalltalk.BlockClosure);
97
101
 
@@ -99,11 +103,10 @@ smalltalk.addMethod(
99
103
  "_numArgs",
100
104
  smalltalk.method({
101
105
  selector: "numArgs",
102
- fn: function () {
103
- var self = this;
104
- return self.length;
105
- return self;
106
- }
106
+ fn: function (){
107
+ var self=this;
108
+ return smalltalk.withContext(function($ctx1) {
109
+ return self}, function($ctx1) {$ctx1.fill(self,"numArgs",{}, smalltalk.BlockClosure)})}
107
110
  }),
108
111
  smalltalk.BlockClosure);
109
112
 
@@ -111,12 +114,22 @@ smalltalk.addMethod(
111
114
  "_on_do_",
112
115
  smalltalk.method({
113
116
  selector: "on:do:",
114
- fn: function (anErrorClass, aBlock) {
115
- var self = this;
116
- var $2, $1;
117
- $1 = smalltalk.send(self, "_try_catch_", [self, function (error) {$2 = smalltalk.send(error, "_isKindOf_", [anErrorClass]);if (smalltalk.assert($2)) {return smalltalk.send(aBlock, "_value_", [error]);} else {return smalltalk.send(error, "_signal", []);}}]);
118
- return $1;
119
- }
117
+ fn: function (anErrorClass,aBlock){
118
+ var self=this;
119
+ return smalltalk.withContext(function($ctx1) {
120
+ $1=_st(self)._try_catch_(self,(function(error){
121
+ var smalltalkError;
122
+ return smalltalk.withContext(function($ctx2) {
123
+ smalltalkError;
124
+ $2=_st(smalltalkError)._isKindOf_(anErrorClass);
125
+ if(smalltalk.assert($2)){
126
+ return _st(aBlock)._value_(smalltalkError);
127
+ } else {
128
+ return _st(smalltalkError)._signal();
129
+ };
130
+ }, function($ctx2) {$ctx2.fillBlock({error:error,smalltalkError:smalltalkError},$ctx1)})}));
131
+ return $1;
132
+ }, function($ctx1) {$ctx1.fill(self,"on:do:",{anErrorClass:anErrorClass,aBlock:aBlock}, smalltalk.BlockClosure)})}
120
133
  }),
121
134
  smalltalk.BlockClosure);
122
135
 
@@ -124,12 +137,12 @@ smalltalk.addMethod(
124
137
  "_timeToRun",
125
138
  smalltalk.method({
126
139
  selector: "timeToRun",
127
- fn: function () {
128
- var self = this;
129
- var $1;
130
- $1 = smalltalk.send(smalltalk.Date || Date, "_millisecondsToRun_", [self]);
131
- return $1;
132
- }
140
+ fn: function (){
141
+ var self=this;
142
+ return smalltalk.withContext(function($ctx1) {
143
+ $1=_st((smalltalk.Date || Date))._millisecondsToRun_(self);
144
+ return $1;
145
+ }, function($ctx1) {$ctx1.fill(self,"timeToRun",{}, smalltalk.BlockClosure)})}
133
146
  }),
134
147
  smalltalk.BlockClosure);
135
148
 
@@ -137,11 +150,10 @@ smalltalk.addMethod(
137
150
  "_value",
138
151
  smalltalk.method({
139
152
  selector: "value",
140
- fn: function () {
141
- var self = this;
142
- return self();
143
- return self;
144
- }
153
+ fn: function (){
154
+ var self=this;
155
+ return smalltalk.withContext(function($ctx1) {
156
+ return self}, function($ctx1) {$ctx1.fill(self,"value",{}, smalltalk.BlockClosure)})}
145
157
  }),
146
158
  smalltalk.BlockClosure);
147
159
 
@@ -149,11 +161,10 @@ smalltalk.addMethod(
149
161
  "_value_",
150
162
  smalltalk.method({
151
163
  selector: "value:",
152
- fn: function (anArg) {
153
- var self = this;
154
- return self(anArg);
155
- return self;
156
- }
164
+ fn: function (anArg){
165
+ var self=this;
166
+ return smalltalk.withContext(function($ctx1) {
167
+ return self}, function($ctx1) {$ctx1.fill(self,"value:",{anArg:anArg}, smalltalk.BlockClosure)})}
157
168
  }),
158
169
  smalltalk.BlockClosure);
159
170
 
@@ -161,11 +172,10 @@ smalltalk.addMethod(
161
172
  "_value_value_",
162
173
  smalltalk.method({
163
174
  selector: "value:value:",
164
- fn: function (firstArg, secondArg) {
165
- var self = this;
166
- return self(firstArg, secondArg);
167
- return self;
168
- }
175
+ fn: function (firstArg,secondArg){
176
+ var self=this;
177
+ return smalltalk.withContext(function($ctx1) {
178
+ return self}, function($ctx1) {$ctx1.fill(self,"value:value:",{firstArg:firstArg,secondArg:secondArg}, smalltalk.BlockClosure)})}
169
179
  }),
170
180
  smalltalk.BlockClosure);
171
181
 
@@ -173,11 +183,10 @@ smalltalk.addMethod(
173
183
  "_value_value_value_",
174
184
  smalltalk.method({
175
185
  selector: "value:value:value:",
176
- fn: function (firstArg, secondArg, thirdArg) {
177
- var self = this;
178
- return self(firstArg, secondArg, thirdArg);
179
- return self;
180
- }
186
+ fn: function (firstArg,secondArg,thirdArg){
187
+ var self=this;
188
+ return smalltalk.withContext(function($ctx1) {
189
+ return self}, function($ctx1) {$ctx1.fill(self,"value:value:value:",{firstArg:firstArg,secondArg:secondArg,thirdArg:thirdArg}, smalltalk.BlockClosure)})}
181
190
  }),
182
191
  smalltalk.BlockClosure);
183
192
 
@@ -185,11 +194,13 @@ smalltalk.addMethod(
185
194
  "_valueWithInterval_",
186
195
  smalltalk.method({
187
196
  selector: "valueWithInterval:",
188
- fn: function (aNumber) {
189
- var self = this;
190
- return setInterval(self, aNumber);
191
- return self;
192
- }
197
+ fn: function (aNumber){
198
+ var self=this;
199
+ return smalltalk.withContext(function($ctx1) {
200
+ var interval = setInterval(self, aNumber);
201
+ return smalltalk.Timeout._on_(interval);
202
+ ;
203
+ return self}, function($ctx1) {$ctx1.fill(self,"valueWithInterval:",{aNumber:aNumber}, smalltalk.BlockClosure)})}
193
204
  }),
194
205
  smalltalk.BlockClosure);
195
206
 
@@ -197,11 +208,10 @@ smalltalk.addMethod(
197
208
  "_valueWithPossibleArguments_",
198
209
  smalltalk.method({
199
210
  selector: "valueWithPossibleArguments:",
200
- fn: function (aCollection) {
201
- var self = this;
202
- return self.apply(null, aCollection);
203
- return self;
204
- }
211
+ fn: function (aCollection){
212
+ var self=this;
213
+ return smalltalk.withContext(function($ctx1) {
214
+ return self}, function($ctx1) {$ctx1.fill(self,"valueWithPossibleArguments:",{aCollection:aCollection}, smalltalk.BlockClosure)})}
205
215
  }),
206
216
  smalltalk.BlockClosure);
207
217
 
@@ -209,11 +219,13 @@ smalltalk.addMethod(
209
219
  "_valueWithTimeout_",
210
220
  smalltalk.method({
211
221
  selector: "valueWithTimeout:",
212
- fn: function (aNumber) {
213
- var self = this;
214
- return setTimeout(self, aNumber);
215
- return self;
216
- }
222
+ fn: function (aNumber){
223
+ var self=this;
224
+ return smalltalk.withContext(function($ctx1) {
225
+ var timeout = setTimeout(self, aNumber);
226
+ return smalltalk.Timeout._on_(timeout);
227
+ ;
228
+ return self}, function($ctx1) {$ctx1.fill(self,"valueWithTimeout:",{aNumber:aNumber}, smalltalk.BlockClosure)})}
217
229
  }),
218
230
  smalltalk.BlockClosure);
219
231
 
@@ -221,11 +233,11 @@ smalltalk.addMethod(
221
233
  "_whileFalse",
222
234
  smalltalk.method({
223
235
  selector: "whileFalse",
224
- fn: function () {
225
- var self = this;
226
- smalltalk.send(self, "_whileFalse_", [function () {}]);
227
- return self;
228
- }
236
+ fn: function (){
237
+ var self=this;
238
+ return smalltalk.withContext(function($ctx1) {
239
+ return smalltalk.withContext(function($ctx2) {
240
+ return self}, function($ctx1) {$ctx1.fill(self,"whileFalse",{}, smalltalk.BlockClosure)})}
229
241
  }),
230
242
  smalltalk.BlockClosure);
231
243
 
@@ -233,13 +245,10 @@ smalltalk.addMethod(
233
245
  "_whileFalse_",
234
246
  smalltalk.method({
235
247
  selector: "whileFalse:",
236
- fn: function (aBlock) {
237
- var self = this;
238
- while (!self()) {
239
- aBlock();
240
- }
241
- return self;
242
- }
248
+ fn: function (aBlock){
249
+ var self=this;
250
+ return smalltalk.withContext(function($ctx1) {
251
+ return self}, function($ctx1) {$ctx1.fill(self,"whileFalse:",{aBlock:aBlock}, smalltalk.BlockClosure)})}
243
252
  }),
244
253
  smalltalk.BlockClosure);
245
254
 
@@ -247,11 +256,11 @@ smalltalk.addMethod(
247
256
  "_whileTrue",
248
257
  smalltalk.method({
249
258
  selector: "whileTrue",
250
- fn: function () {
251
- var self = this;
252
- smalltalk.send(self, "_whileTrue_", [function () {}]);
253
- return self;
254
- }
259
+ fn: function (){
260
+ var self=this;
261
+ return smalltalk.withContext(function($ctx1) {
262
+ return smalltalk.withContext(function($ctx2) {
263
+ return self}, function($ctx1) {$ctx1.fill(self,"whileTrue",{}, smalltalk.BlockClosure)})}
255
264
  }),
256
265
  smalltalk.BlockClosure);
257
266
 
@@ -259,13 +268,10 @@ smalltalk.addMethod(
259
268
  "_whileTrue_",
260
269
  smalltalk.method({
261
270
  selector: "whileTrue:",
262
- fn: function (aBlock) {
263
- var self = this;
264
- while (self()) {
265
- aBlock();
266
- }
267
- return self;
268
- }
271
+ fn: function (aBlock){
272
+ var self=this;
273
+ return smalltalk.withContext(function($ctx1) {
274
+ return self}, function($ctx1) {$ctx1.fill(self,"whileTrue:",{aBlock:aBlock}, smalltalk.BlockClosure)})}
269
275
  }),
270
276
  smalltalk.BlockClosure);
271
277
 
@@ -276,11 +282,10 @@ smalltalk.addMethod(
276
282
  "_arguments",
277
283
  smalltalk.method({
278
284
  selector: "arguments",
279
- fn: function () {
280
- var self = this;
281
- return self.args || [];
282
- return self;
283
- }
285
+ fn: function (){
286
+ var self=this;
287
+ return smalltalk.withContext(function($ctx1) {
288
+ return self}, function($ctx1) {$ctx1.fill(self,"arguments",{}, smalltalk.CompiledMethod)})}
284
289
  }),
285
290
  smalltalk.CompiledMethod);
286
291
 
@@ -288,17 +293,17 @@ smalltalk.addMethod(
288
293
  "_category",
289
294
  smalltalk.method({
290
295
  selector: "category",
291
- fn: function () {
292
- var self = this;
293
- var $2, $1;
294
- $2 = smalltalk.send(self, "_basicAt_", ["category"]);
295
- if (($receiver = $2) == nil || $receiver == undefined) {
296
- $1 = "";
297
- } else {
298
- $1 = $2;
299
- }
300
- return $1;
301
- }
296
+ fn: function (){
297
+ var self=this;
298
+ return smalltalk.withContext(function($ctx1) {
299
+ $2=_st(self)._basicAt_("category");
300
+ if(($receiver = $2) == nil || $receiver == undefined){
301
+ $1="";
302
+ } else {
303
+ $1=$2;
304
+ };
305
+ return $1;
306
+ }, function($ctx1) {$ctx1.fill(self,"category",{}, smalltalk.CompiledMethod)})}
302
307
  }),
303
308
  smalltalk.CompiledMethod);
304
309
 
@@ -308,22 +313,22 @@ smalltalk.method({
308
313
  selector: "category:",
309
314
  fn: function (aString){
310
315
  var self=this;
311
- var $1;
312
316
  var oldCategory;
313
- oldCategory=smalltalk.send(self,"_category",[]);
314
- smalltalk.send(self,"_basicAt_put_",["category",aString]);
315
- $1=smalltalk.send(self,"_methodClass",[]);
317
+ return smalltalk.withContext(function($ctx1) {
318
+ oldCategory=_st(self)._category();
319
+ _st(self)._basicAt_put_("category",aString);
320
+ $1=_st(self)._methodClass();
316
321
  if(($receiver = $1) == nil || $receiver == undefined){
317
322
  $1;
318
323
  } else {
319
- smalltalk.send(smalltalk.send(smalltalk.send(self,"_methodClass",[]),"_organization",[]),"_addElement_",[aString]);
320
- smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self,"_methodClass",[]),"_methods",[]),"_select_",[(function(each){
321
- return smalltalk.send(smalltalk.send(each,"_category",[]),"__eq",[oldCategory]);
322
- })]),"_ifEmpty_",[(function(){
323
- return smalltalk.send(smalltalk.send(smalltalk.send(self,"_methodClass",[]),"_organization",[]),"_removeElement_",[oldCategory]);
324
- })]);
324
+ _st(_st(_st(self)._methodClass())._organization())._addElement_(aString);
325
+ _st(_st(_st(_st(self)._methodClass())._methods())._select_((function(each){
326
+ return smalltalk.withContext(function($ctx2) {
327
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._ifEmpty_((function(){
328
+ return smalltalk.withContext(function($ctx2) {
329
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
325
330
  };
326
- return self}
331
+ return self}, function($ctx1) {$ctx1.fill(self,"category:",{aString:aString,oldCategory:oldCategory}, smalltalk.CompiledMethod)})}
327
332
  }),
328
333
  smalltalk.CompiledMethod);
329
334
 
@@ -331,12 +336,12 @@ smalltalk.addMethod(
331
336
  "_fn",
332
337
  smalltalk.method({
333
338
  selector: "fn",
334
- fn: function () {
335
- var self = this;
336
- var $1;
337
- $1 = smalltalk.send(self, "_basicAt_", ["fn"]);
338
- return $1;
339
- }
339
+ fn: function (){
340
+ var self=this;
341
+ return smalltalk.withContext(function($ctx1) {
342
+ $1=_st(self)._basicAt_("fn");
343
+ return $1;
344
+ }, function($ctx1) {$ctx1.fill(self,"fn",{}, smalltalk.CompiledMethod)})}
340
345
  }),
341
346
  smalltalk.CompiledMethod);
342
347
 
@@ -344,11 +349,10 @@ smalltalk.addMethod(
344
349
  "_fn_",
345
350
  smalltalk.method({
346
351
  selector: "fn:",
347
- fn: function (aBlock) {
348
- var self = this;
349
- smalltalk.send(self, "_basicAt_put_", ["fn", aBlock]);
350
- return self;
351
- }
352
+ fn: function (aBlock){
353
+ var self=this;
354
+ return smalltalk.withContext(function($ctx1) {
355
+ return self}, function($ctx1) {$ctx1.fill(self,"fn:",{aBlock:aBlock}, smalltalk.CompiledMethod)})}
352
356
  }),
353
357
  smalltalk.CompiledMethod);
354
358
 
@@ -356,12 +360,12 @@ smalltalk.addMethod(
356
360
  "_messageSends",
357
361
  smalltalk.method({
358
362
  selector: "messageSends",
359
- fn: function () {
360
- var self = this;
361
- var $1;
362
- $1 = smalltalk.send(self, "_basicAt_", ["messageSends"]);
363
- return $1;
364
- }
363
+ fn: function (){
364
+ var self=this;
365
+ return smalltalk.withContext(function($ctx1) {
366
+ $1=_st(self)._basicAt_("messageSends");
367
+ return $1;
368
+ }, function($ctx1) {$ctx1.fill(self,"messageSends",{}, smalltalk.CompiledMethod)})}
365
369
  }),
366
370
  smalltalk.CompiledMethod);
367
371
 
@@ -369,12 +373,12 @@ smalltalk.addMethod(
369
373
  "_methodClass",
370
374
  smalltalk.method({
371
375
  selector: "methodClass",
372
- fn: function () {
373
- var self = this;
374
- var $1;
375
- $1 = smalltalk.send(self, "_basicAt_", ["methodClass"]);
376
- return $1;
377
- }
376
+ fn: function (){
377
+ var self=this;
378
+ return smalltalk.withContext(function($ctx1) {
379
+ $1=_st(self)._basicAt_("methodClass");
380
+ return $1;
381
+ }, function($ctx1) {$ctx1.fill(self,"methodClass",{}, smalltalk.CompiledMethod)})}
378
382
  }),
379
383
  smalltalk.CompiledMethod);
380
384
 
@@ -382,12 +386,12 @@ smalltalk.addMethod(
382
386
  "_protocol",
383
387
  smalltalk.method({
384
388
  selector: "protocol",
385
- fn: function () {
386
- var self = this;
387
- var $1;
388
- $1 = smalltalk.send(self, "_category", []);
389
- return $1;
390
- }
389
+ fn: function (){
390
+ var self=this;
391
+ return smalltalk.withContext(function($ctx1) {
392
+ $1=_st(self)._category();
393
+ return $1;
394
+ }, function($ctx1) {$ctx1.fill(self,"protocol",{}, smalltalk.CompiledMethod)})}
391
395
  }),
392
396
  smalltalk.CompiledMethod);
393
397
 
@@ -395,12 +399,12 @@ smalltalk.addMethod(
395
399
  "_referencedClasses",
396
400
  smalltalk.method({
397
401
  selector: "referencedClasses",
398
- fn: function () {
399
- var self = this;
400
- var $1;
401
- $1 = smalltalk.send(self, "_basicAt_", ["referencedClasses"]);
402
- return $1;
403
- }
402
+ fn: function (){
403
+ var self=this;
404
+ return smalltalk.withContext(function($ctx1) {
405
+ $1=_st(self)._basicAt_("referencedClasses");
406
+ return $1;
407
+ }, function($ctx1) {$ctx1.fill(self,"referencedClasses",{}, smalltalk.CompiledMethod)})}
404
408
  }),
405
409
  smalltalk.CompiledMethod);
406
410
 
@@ -408,12 +412,12 @@ smalltalk.addMethod(
408
412
  "_selector",
409
413
  smalltalk.method({
410
414
  selector: "selector",
411
- fn: function () {
412
- var self = this;
413
- var $1;
414
- $1 = smalltalk.send(self, "_basicAt_", ["selector"]);
415
- return $1;
416
- }
415
+ fn: function (){
416
+ var self=this;
417
+ return smalltalk.withContext(function($ctx1) {
418
+ $1=_st(self)._basicAt_("selector");
419
+ return $1;
420
+ }, function($ctx1) {$ctx1.fill(self,"selector",{}, smalltalk.CompiledMethod)})}
417
421
  }),
418
422
  smalltalk.CompiledMethod);
419
423
 
@@ -421,11 +425,10 @@ smalltalk.addMethod(
421
425
  "_selector_",
422
426
  smalltalk.method({
423
427
  selector: "selector:",
424
- fn: function (aString) {
425
- var self = this;
426
- smalltalk.send(self, "_basicAt_put_", ["selector", aString]);
427
- return self;
428
- }
428
+ fn: function (aString){
429
+ var self=this;
430
+ return smalltalk.withContext(function($ctx1) {
431
+ return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString}, smalltalk.CompiledMethod)})}
429
432
  }),
430
433
  smalltalk.CompiledMethod);
431
434
 
@@ -433,17 +436,17 @@ smalltalk.addMethod(
433
436
  "_source",
434
437
  smalltalk.method({
435
438
  selector: "source",
436
- fn: function () {
437
- var self = this;
438
- var $2, $1;
439
- $2 = smalltalk.send(self, "_basicAt_", ["source"]);
440
- if (($receiver = $2) == nil || $receiver == undefined) {
441
- $1 = "";
442
- } else {
443
- $1 = $2;
444
- }
445
- return $1;
446
- }
439
+ fn: function (){
440
+ var self=this;
441
+ return smalltalk.withContext(function($ctx1) {
442
+ $2=_st(self)._basicAt_("source");
443
+ if(($receiver = $2) == nil || $receiver == undefined){
444
+ $1="";
445
+ } else {
446
+ $1=$2;
447
+ };
448
+ return $1;
449
+ }, function($ctx1) {$ctx1.fill(self,"source",{}, smalltalk.CompiledMethod)})}
447
450
  }),
448
451
  smalltalk.CompiledMethod);
449
452
 
@@ -451,11 +454,10 @@ smalltalk.addMethod(
451
454
  "_source_",
452
455
  smalltalk.method({
453
456
  selector: "source:",
454
- fn: function (aString) {
455
- var self = this;
456
- smalltalk.send(self, "_basicAt_put_", ["source", aString]);
457
- return self;
458
- }
457
+ fn: function (aString){
458
+ var self=this;
459
+ return smalltalk.withContext(function($ctx1) {
460
+ return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString}, smalltalk.CompiledMethod)})}
459
461
  }),
460
462
  smalltalk.CompiledMethod);
461
463
 
@@ -468,9 +470,22 @@ smalltalk.method({
468
470
  selector: "addWorker",
469
471
  fn: function (){
470
472
  var self=this;
471
- smalltalk.send(self["@worker"],"_valueWithTimeout_",[(0)]);
472
- self["@poolSize"]=smalltalk.send(self["@poolSize"],"__plus",[(1)]);
473
- return self}
473
+ return smalltalk.withContext(function($ctx1) {
474
+ self["@poolSize"]=_st(self["@poolSize"]).__plus((1));
475
+ return self}, function($ctx1) {$ctx1.fill(self,"addWorker",{}, smalltalk.ForkPool)})}
476
+ }),
477
+ smalltalk.ForkPool);
478
+
479
+ smalltalk.addMethod(
480
+ "_defaultMaxPoolSize",
481
+ smalltalk.method({
482
+ selector: "defaultMaxPoolSize",
483
+ fn: function (){
484
+ var self=this;
485
+ return smalltalk.withContext(function($ctx1) {
486
+ $1=_st(_st(self)._class())._defaultMaxPoolSize();
487
+ return $1;
488
+ }, function($ctx1) {$ctx1.fill(self,"defaultMaxPoolSize",{}, smalltalk.ForkPool)})}
474
489
  }),
475
490
  smalltalk.ForkPool);
476
491
 
@@ -480,13 +495,13 @@ smalltalk.method({
480
495
  selector: "fork:",
481
496
  fn: function (aBlock){
482
497
  var self=this;
483
- var $1;
484
- $1=smalltalk.send(self["@poolSize"],"__lt",[self["@maxPoolSize"]]);
498
+ return smalltalk.withContext(function($ctx1) {
499
+ $1=_st(self["@poolSize"]).__lt(_st(self)._maxPoolSize());
485
500
  if(smalltalk.assert($1)){
486
- smalltalk.send(self,"_addWorker",[]);
501
+ _st(self)._addWorker();
487
502
  };
488
- smalltalk.send(self["@queue"],"_back_",[aBlock]);
489
- return self}
503
+ _st(self["@queue"])._back_(aBlock);
504
+ return self}, function($ctx1) {$ctx1.fill(self,"fork:",{aBlock:aBlock}, smalltalk.ForkPool)})}
490
505
  }),
491
506
  smalltalk.ForkPool);
492
507
 
@@ -496,30 +511,71 @@ smalltalk.method({
496
511
  selector: "initialize",
497
512
  fn: function (){
498
513
  var self=this;
499
- var $1;
500
- var sentinel;
514
+ return smalltalk.withContext(function($ctx1) {
501
515
  self["@poolSize"]=(0);
502
- self["@maxPoolSize"]=smalltalk.send(smalltalk.send(self,"_class",[]),"_defaultMaxPoolSize",[]);
503
- self["@queue"]=smalltalk.send((smalltalk.Queue || Queue),"_new",[]);
504
- sentinel=smalltalk.send((smalltalk.Object || Object),"_new",[]);
505
- self["@worker"]=(function(){
516
+ self["@queue"]=_st((smalltalk.Queue || Queue))._new();
517
+ self["@worker"]=_st(self)._makeWorker();
518
+ return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.ForkPool)})}
519
+ }),
520
+ smalltalk.ForkPool);
521
+
522
+ smalltalk.addMethod(
523
+ "_makeWorker",
524
+ smalltalk.method({
525
+ selector: "makeWorker",
526
+ fn: function (){
527
+ var self=this;
528
+ var sentinel;
529
+ return smalltalk.withContext(function($ctx1) {
530
+ sentinel=_st((smalltalk.Object || Object))._new();
531
+ $1=(function(){
506
532
  var block;
507
- self["@poolSize"]=smalltalk.send(self["@poolSize"],"__minus",[(1)]);
533
+ return smalltalk.withContext(function($ctx2) {
508
534
  self["@poolSize"];
509
- block=smalltalk.send(self["@queue"],"_frontIfAbsent_",[(function(){
510
- return sentinel;
511
- })]);
535
+ block=_st(self["@queue"])._frontIfAbsent_((function(){
536
+ return smalltalk.withContext(function($ctx3) {
537
+ }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
512
538
  block;
513
- $1=smalltalk.send(block,"__eq_eq",[sentinel]);
514
- if(! smalltalk.assert($1)){
515
- return smalltalk.send((function(){
516
- return smalltalk.send(block,"_value",[]);
517
- }),"_ensure_",[(function(){
518
- return smalltalk.send(self,"_addWorker",[]);
519
- })]);
539
+ $2=_st(block).__eq_eq(sentinel);
540
+ if(! smalltalk.assert($2)){
541
+ return _st((function(){
542
+ return smalltalk.withContext(function($ctx3) {
543
+ }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._ensure_((function(){
544
+ return smalltalk.withContext(function($ctx3) {
545
+ }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
520
546
  };
521
- });
522
- return self}
547
+ }, function($ctx2) {$ctx2.fillBlock({block:block},$ctx1)})});
548
+ return $1;
549
+ }, function($ctx1) {$ctx1.fill(self,"makeWorker",{sentinel:sentinel}, smalltalk.ForkPool)})}
550
+ }),
551
+ smalltalk.ForkPool);
552
+
553
+ smalltalk.addMethod(
554
+ "_maxPoolSize",
555
+ smalltalk.method({
556
+ selector: "maxPoolSize",
557
+ fn: function (){
558
+ var self=this;
559
+ return smalltalk.withContext(function($ctx1) {
560
+ $2=self["@maxPoolSize"];
561
+ if(($receiver = $2) == nil || $receiver == undefined){
562
+ $1=_st(self)._defaultMaxPoolSize();
563
+ } else {
564
+ $1=$2;
565
+ };
566
+ return $1;
567
+ }, function($ctx1) {$ctx1.fill(self,"maxPoolSize",{}, smalltalk.ForkPool)})}
568
+ }),
569
+ smalltalk.ForkPool);
570
+
571
+ smalltalk.addMethod(
572
+ "_maxPoolSize_",
573
+ smalltalk.method({
574
+ selector: "maxPoolSize:",
575
+ fn: function (anInteger){
576
+ var self=this;
577
+ return smalltalk.withContext(function($ctx1) {
578
+ return self}, function($ctx1) {$ctx1.fill(self,"maxPoolSize:",{anInteger:anInteger}, smalltalk.ForkPool)})}
523
579
  }),
524
580
  smalltalk.ForkPool);
525
581
 
@@ -531,15 +587,16 @@ smalltalk.method({
531
587
  selector: "default",
532
588
  fn: function (){
533
589
  var self=this;
534
- var $1;
535
- if(($receiver = self["@default"]) == nil || $receiver == undefined){
536
- self["@default"]=smalltalk.send(self,"_new",[]);
590
+ return smalltalk.withContext(function($ctx1) {
591
+ $2=self["@default"];
592
+ if(($receiver = $2) == nil || $receiver == undefined){
593
+ self["@default"]=_st(self)._new();
537
594
  $1=self["@default"];
538
595
  } else {
539
- $1=self["@default"];
596
+ $1=$2;
540
597
  };
541
598
  return $1;
542
- }
599
+ }, function($ctx1) {$ctx1.fill(self,"default",{}, smalltalk.ForkPool.klass)})}
543
600
  }),
544
601
  smalltalk.ForkPool.klass);
545
602
 
@@ -549,8 +606,8 @@ smalltalk.method({
549
606
  selector: "defaultMaxPoolSize",
550
607
  fn: function (){
551
608
  var self=this;
552
- return (100);
553
- }
609
+ return smalltalk.withContext(function($ctx1) {
610
+ }, function($ctx1) {$ctx1.fill(self,"defaultMaxPoolSize",{}, smalltalk.ForkPool.klass)})}
554
611
  }),
555
612
  smalltalk.ForkPool.klass);
556
613
 
@@ -560,8 +617,8 @@ smalltalk.method({
560
617
  selector: "resetDefault",
561
618
  fn: function (){
562
619
  var self=this;
563
- self["@default"]=nil;
564
- return self}
620
+ return smalltalk.withContext(function($ctx1) {
621
+ return self}, function($ctx1) {$ctx1.fill(self,"resetDefault",{}, smalltalk.ForkPool.klass)})}
565
622
  }),
566
623
  smalltalk.ForkPool.klass);
567
624
 
@@ -571,10 +628,12 @@ smalltalk.addMethod(
571
628
  "_arguments",
572
629
  smalltalk.method({
573
630
  selector: "arguments",
574
- fn: function () {
575
- var self = this;
576
- return self['@arguments'];
577
- }
631
+ fn: function (){
632
+ var self=this;
633
+ return smalltalk.withContext(function($ctx1) {
634
+ $1=self["@arguments"];
635
+ return $1;
636
+ }, function($ctx1) {$ctx1.fill(self,"arguments",{}, smalltalk.Message)})}
578
637
  }),
579
638
  smalltalk.Message);
580
639
 
@@ -582,11 +641,10 @@ smalltalk.addMethod(
582
641
  "_arguments_",
583
642
  smalltalk.method({
584
643
  selector: "arguments:",
585
- fn: function (anArray) {
586
- var self = this;
587
- self['@arguments'] = anArray;
588
- return self;
589
- }
644
+ fn: function (anArray){
645
+ var self=this;
646
+ return smalltalk.withContext(function($ctx1) {
647
+ return self}, function($ctx1) {$ctx1.fill(self,"arguments:",{anArray:anArray}, smalltalk.Message)})}
590
648
  }),
591
649
  smalltalk.Message);
592
650
 
@@ -594,12 +652,19 @@ smalltalk.addMethod(
594
652
  "_printString",
595
653
  smalltalk.method({
596
654
  selector: "printString",
597
- fn: function () {
598
- var self = this;
599
- var $2, $1;
600
- $1 = smalltalk.send(smalltalk.String || String, "_streamContents_", [function (aStream) {smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(self, "_printString", [], smalltalk.Object)]);smalltalk.send(aStream, "_nextPutAll_", ["("]);smalltalk.send(aStream, "_nextPutAll_", [self['@selector']]);$2 = smalltalk.send(aStream, "_nextPutAll_", [")"]);return $2;}]);
601
- return $1;
602
- }
655
+ fn: function (){
656
+ var self=this;
657
+ return smalltalk.withContext(function($ctx1) {
658
+ $1=_st((smalltalk.String || String))._streamContents_((function(aStream){
659
+ return smalltalk.withContext(function($ctx2) {
660
+ _st($2)._nextPutAll_(smalltalk.Object.fn.prototype._printString.apply(_st(self), []));
661
+ _st($2)._nextPutAll_("(");
662
+ _st($2)._nextPutAll_(self["@selector"]);
663
+ $3=_st($2)._nextPutAll_(")");
664
+ return $3;
665
+ }, function($ctx2) {$ctx2.fillBlock({aStream:aStream},$ctx1)})}));
666
+ return $1;
667
+ }, function($ctx1) {$ctx1.fill(self,"printString",{}, smalltalk.Message)})}
603
668
  }),
604
669
  smalltalk.Message);
605
670
 
@@ -607,10 +672,12 @@ smalltalk.addMethod(
607
672
  "_selector",
608
673
  smalltalk.method({
609
674
  selector: "selector",
610
- fn: function () {
611
- var self = this;
612
- return self['@selector'];
613
- }
675
+ fn: function (){
676
+ var self=this;
677
+ return smalltalk.withContext(function($ctx1) {
678
+ $1=self["@selector"];
679
+ return $1;
680
+ }, function($ctx1) {$ctx1.fill(self,"selector",{}, smalltalk.Message)})}
614
681
  }),
615
682
  smalltalk.Message);
616
683
 
@@ -618,11 +685,10 @@ smalltalk.addMethod(
618
685
  "_selector_",
619
686
  smalltalk.method({
620
687
  selector: "selector:",
621
- fn: function (aString) {
622
- var self = this;
623
- self['@selector'] = aString;
624
- return self;
625
- }
688
+ fn: function (aString){
689
+ var self=this;
690
+ return smalltalk.withContext(function($ctx1) {
691
+ return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString}, smalltalk.Message)})}
626
692
  }),
627
693
  smalltalk.Message);
628
694
 
@@ -630,12 +696,12 @@ smalltalk.addMethod(
630
696
  "_sendTo_",
631
697
  smalltalk.method({
632
698
  selector: "sendTo:",
633
- fn: function (anObject) {
634
- var self = this;
635
- var $1;
636
- $1 = smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_send_to_arguments_", [smalltalk.send(self, "_selector", []), anObject, smalltalk.send(self, "_arguments", [])]);
637
- return $1;
638
- }
699
+ fn: function (anObject){
700
+ var self=this;
701
+ return smalltalk.withContext(function($ctx1) {
702
+ $1=_st(anObject)._perform_withArguments_(_st(self)._selector(),_st(self)._arguments());
703
+ return $1;
704
+ }, function($ctx1) {$ctx1.fill(self,"sendTo:",{anObject:anObject}, smalltalk.Message)})}
639
705
  }),
640
706
  smalltalk.Message);
641
707
 
@@ -644,16 +710,16 @@ smalltalk.addMethod(
644
710
  "_selector_arguments_",
645
711
  smalltalk.method({
646
712
  selector: "selector:arguments:",
647
- fn: function (aString, anArray) {
648
- var self = this;
649
- var $2, $3, $1;
650
- $2 = smalltalk.send(self, "_new", []);
651
- smalltalk.send($2, "_selector_", [aString]);
652
- smalltalk.send($2, "_arguments_", [anArray]);
653
- $3 = smalltalk.send($2, "_yourself", []);
654
- $1 = $3;
655
- return $1;
656
- }
713
+ fn: function (aString,anArray){
714
+ var self=this;
715
+ return smalltalk.withContext(function($ctx1) {
716
+ $2=_st(self)._new();
717
+ _st($2)._selector_(aString);
718
+ _st($2)._arguments_(anArray);
719
+ $3=_st($2)._yourself();
720
+ $1=$3;
721
+ return $1;
722
+ }, function($ctx1) {$ctx1.fill(self,"selector:arguments:",{aString:aString,anArray:anArray}, smalltalk.Message.klass)})}
657
723
  }),
658
724
  smalltalk.Message.klass);
659
725
 
@@ -663,12 +729,17 @@ smalltalk.addMethod(
663
729
  "_asString",
664
730
  smalltalk.method({
665
731
  selector: "asString",
666
- fn: function () {
667
- var self = this;
668
- var $1;
669
- $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_receiver", []), "_class", []), "_printString", []), "__comma", [" >> "]), "__comma", [smalltalk.send(self, "_selector", [])]);
670
- return $1;
671
- }
732
+ fn: function (){
733
+ var self=this;
734
+ return smalltalk.withContext(function($ctx1) {
735
+ $2=_st(self)._isBlockContext();
736
+ if(smalltalk.assert($2)){
737
+ $1=_st(_st("a block (in ").__comma(_st(_st(_st(_st(self)._methodContext())._receiver())._class())._printString())).__comma(")");
738
+ } else {
739
+ $1=_st(_st(_st(_st(_st(self)._receiver())._class())._printString()).__comma(" >> ")).__comma(_st(self)._selector());
740
+ };
741
+ return $1;
742
+ }, function($ctx1) {$ctx1.fill(self,"asString",{}, smalltalk.MethodContext)})}
672
743
  }),
673
744
  smalltalk.MethodContext);
674
745
 
@@ -676,11 +747,76 @@ smalltalk.addMethod(
676
747
  "_home",
677
748
  smalltalk.method({
678
749
  selector: "home",
679
- fn: function () {
680
- var self = this;
681
- return self.homeContext;
682
- return self;
683
- }
750
+ fn: function (){
751
+ var self=this;
752
+ return smalltalk.withContext(function($ctx1) {
753
+ return self}, function($ctx1) {$ctx1.fill(self,"home",{}, smalltalk.MethodContext)})}
754
+ }),
755
+ smalltalk.MethodContext);
756
+
757
+ smalltalk.addMethod(
758
+ "_isBlockContext",
759
+ smalltalk.method({
760
+ selector: "isBlockContext",
761
+ fn: function (){
762
+ var self=this;
763
+ return smalltalk.withContext(function($ctx1) {
764
+ $1=_st(_st(self)._selector())._isNil();
765
+ return $1;
766
+ }, function($ctx1) {$ctx1.fill(self,"isBlockContext",{}, smalltalk.MethodContext)})}
767
+ }),
768
+ smalltalk.MethodContext);
769
+
770
+ smalltalk.addMethod(
771
+ "_locals",
772
+ smalltalk.method({
773
+ selector: "locals",
774
+ fn: function (){
775
+ var self=this;
776
+ return smalltalk.withContext(function($ctx1) {
777
+ return self}, function($ctx1) {$ctx1.fill(self,"locals",{}, smalltalk.MethodContext)})}
778
+ }),
779
+ smalltalk.MethodContext);
780
+
781
+ smalltalk.addMethod(
782
+ "_method",
783
+ smalltalk.method({
784
+ selector: "method",
785
+ fn: function (){
786
+ var self=this;
787
+ return smalltalk.withContext(function($ctx1) {
788
+ $1=_st(_st(_st(_st(self)._methodContext())._receiver())._class())._lookupSelector_(_st(_st(self)._methodContext())._selector());
789
+ return $1;
790
+ }, function($ctx1) {$ctx1.fill(self,"method",{}, smalltalk.MethodContext)})}
791
+ }),
792
+ smalltalk.MethodContext);
793
+
794
+ smalltalk.addMethod(
795
+ "_methodContext",
796
+ smalltalk.method({
797
+ selector: "methodContext",
798
+ fn: function (){
799
+ var self=this;
800
+ return smalltalk.withContext(function($ctx1) {
801
+ $1=_st(self)._isBlockContext();
802
+ if(! smalltalk.assert($1)){
803
+ $2=self;
804
+ return $2;
805
+ };
806
+ $3=_st(self)._home();
807
+ return $3;
808
+ }, function($ctx1) {$ctx1.fill(self,"methodContext",{}, smalltalk.MethodContext)})}
809
+ }),
810
+ smalltalk.MethodContext);
811
+
812
+ smalltalk.addMethod(
813
+ "_outerContext",
814
+ smalltalk.method({
815
+ selector: "outerContext",
816
+ fn: function (){
817
+ var self=this;
818
+ return smalltalk.withContext(function($ctx1) {
819
+ return self}, function($ctx1) {$ctx1.fill(self,"outerContext",{}, smalltalk.MethodContext)})}
684
820
  }),
685
821
  smalltalk.MethodContext);
686
822
 
@@ -688,11 +824,10 @@ smalltalk.addMethod(
688
824
  "_pc",
689
825
  smalltalk.method({
690
826
  selector: "pc",
691
- fn: function () {
692
- var self = this;
693
- return self.pc;
694
- return self;
695
- }
827
+ fn: function (){
828
+ var self=this;
829
+ return smalltalk.withContext(function($ctx1) {
830
+ return self}, function($ctx1) {$ctx1.fill(self,"pc",{}, smalltalk.MethodContext)})}
696
831
  }),
697
832
  smalltalk.MethodContext);
698
833
 
@@ -700,12 +835,12 @@ smalltalk.addMethod(
700
835
  "_printString",
701
836
  smalltalk.method({
702
837
  selector: "printString",
703
- fn: function () {
704
- var self = this;
705
- var $1;
706
- $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.Object), "__comma", ["("]), "__comma", [smalltalk.send(self, "_asString", [])]), "__comma", [")"]);
707
- return $1;
708
- }
838
+ fn: function (){
839
+ var self=this;
840
+ return smalltalk.withContext(function($ctx1) {
841
+ $1=_st(_st(_st(smalltalk.Object.fn.prototype._printString.apply(_st(self), [])).__comma("(")).__comma(_st(self)._asString())).__comma(")");
842
+ return $1;
843
+ }, function($ctx1) {$ctx1.fill(self,"printString",{}, smalltalk.MethodContext)})}
709
844
  }),
710
845
  smalltalk.MethodContext);
711
846
 
@@ -713,11 +848,10 @@ smalltalk.addMethod(
713
848
  "_receiver",
714
849
  smalltalk.method({
715
850
  selector: "receiver",
716
- fn: function () {
717
- var self = this;
718
- return self.receiver;
719
- return self;
720
- }
851
+ fn: function (){
852
+ var self=this;
853
+ return smalltalk.withContext(function($ctx1) {
854
+ return self}, function($ctx1) {$ctx1.fill(self,"receiver",{}, smalltalk.MethodContext)})}
721
855
  }),
722
856
  smalltalk.MethodContext);
723
857
 
@@ -725,11 +859,16 @@ smalltalk.addMethod(
725
859
  "_selector",
726
860
  smalltalk.method({
727
861
  selector: "selector",
728
- fn: function () {
729
- var self = this;
730
- return smalltalk.convertSelector(self.selector);
731
- return self;
732
- }
862
+ fn: function (){
863
+ var self=this;
864
+ return smalltalk.withContext(function($ctx1) {
865
+ if(self.selector) {
866
+ return smalltalk.convertSelector(self.selector);
867
+ } else {
868
+ return nil;
869
+ }
870
+ ;
871
+ return self}, function($ctx1) {$ctx1.fill(self,"selector",{}, smalltalk.MethodContext)})}
733
872
  }),
734
873
  smalltalk.MethodContext);
735
874
 
@@ -737,13 +876,91 @@ smalltalk.addMethod(
737
876
  "_temps",
738
877
  smalltalk.method({
739
878
  selector: "temps",
740
- fn: function () {
741
- var self = this;
742
- return self.temps;
743
- return self;
744
- }
879
+ fn: function (){
880
+ var self=this;
881
+ return smalltalk.withContext(function($ctx1) {
882
+ _st(self)._deprecatedAPI();
883
+ $1=_st(self)._locals();
884
+ return $1;
885
+ }, function($ctx1) {$ctx1.fill(self,"temps",{}, smalltalk.MethodContext)})}
745
886
  }),
746
887
  smalltalk.MethodContext);
747
888
 
748
889
 
749
890
 
891
+ smalltalk.addClass('NativeFunction', smalltalk.Object, [], 'Kernel-Methods');
892
+
893
+ smalltalk.addMethod(
894
+ "_constructor_",
895
+ smalltalk.method({
896
+ selector: "constructor:",
897
+ fn: function (aString){
898
+ var self=this;
899
+ return smalltalk.withContext(function($ctx1) {
900
+ var native=eval(aString);
901
+ return new native();
902
+ ;
903
+ return self}, function($ctx1) {$ctx1.fill(self,"constructor:",{aString:aString}, smalltalk.NativeFunction.klass)})}
904
+ }),
905
+ smalltalk.NativeFunction.klass);
906
+
907
+ smalltalk.addMethod(
908
+ "_constructor_value_",
909
+ smalltalk.method({
910
+ selector: "constructor:value:",
911
+ fn: function (aString,anObject){
912
+ var self=this;
913
+ return smalltalk.withContext(function($ctx1) {
914
+ var native=eval(aString);
915
+ return new native(anObject);
916
+ ;
917
+ return self}, function($ctx1) {$ctx1.fill(self,"constructor:value:",{aString:aString,anObject:anObject}, smalltalk.NativeFunction.klass)})}
918
+ }),
919
+ smalltalk.NativeFunction.klass);
920
+
921
+ smalltalk.addMethod(
922
+ "_constructor_value_value_",
923
+ smalltalk.method({
924
+ selector: "constructor:value:value:",
925
+ fn: function (aString,anObject,anObject2){
926
+ var self=this;
927
+ return smalltalk.withContext(function($ctx1) {
928
+ var native=eval(aString);
929
+ return new native(anObject,anObject2);
930
+ ;
931
+ return self}, function($ctx1) {$ctx1.fill(self,"constructor:value:value:",{aString:aString,anObject:anObject,anObject2:anObject2}, smalltalk.NativeFunction.klass)})}
932
+ }),
933
+ smalltalk.NativeFunction.klass);
934
+
935
+ smalltalk.addMethod(
936
+ "_constructor_value_value_value_",
937
+ smalltalk.method({
938
+ selector: "constructor:value:value:value:",
939
+ fn: function (aString,anObject,anObject2,anObject3){
940
+ var self=this;
941
+ return smalltalk.withContext(function($ctx1) {
942
+ var native=eval(aString);
943
+ return new native(anObject,anObject2, anObject3);
944
+ ;
945
+ return self}, function($ctx1) {$ctx1.fill(self,"constructor:value:value:value:",{aString:aString,anObject:anObject,anObject2:anObject2,anObject3:anObject3}, smalltalk.NativeFunction.klass)})}
946
+ }),
947
+ smalltalk.NativeFunction.klass);
948
+
949
+ smalltalk.addMethod(
950
+ "_exists_",
951
+ smalltalk.method({
952
+ selector: "exists:",
953
+ fn: function (aString){
954
+ var self=this;
955
+ return smalltalk.withContext(function($ctx1) {
956
+ if(aString in window) {
957
+ return true
958
+ } else {
959
+ return false
960
+ }
961
+ ;
962
+ return self}, function($ctx1) {$ctx1.fill(self,"exists:",{aString:aString}, smalltalk.NativeFunction.klass)})}
963
+ }),
964
+ smalltalk.NativeFunction.klass);
965
+
966
+