resin 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -6,9 +6,19 @@ smalltalk.method({
6
6
  selector: "context",
7
7
  fn: function (){
8
8
  var self=this;
9
- return self.context;
10
- ;
11
- return self}
9
+ return smalltalk.withContext(function($ctx1) {
10
+ return self}, function($ctx1) {$ctx1.fill(self,"context",{}, smalltalk.Error)})}
11
+ }),
12
+ smalltalk.Error);
13
+
14
+ smalltalk.addMethod(
15
+ "_initialize",
16
+ smalltalk.method({
17
+ selector: "initialize",
18
+ fn: function (){
19
+ var self=this;
20
+ return smalltalk.withContext(function($ctx1) {
21
+ return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.Error)})}
12
22
  }),
13
23
  smalltalk.Error);
14
24
 
@@ -18,9 +28,8 @@ smalltalk.method({
18
28
  selector: "isSmalltalkError",
19
29
  fn: function (){
20
30
  var self=this;
21
- return self.smalltalkError === true;
22
- ;
23
- return self}
31
+ return smalltalk.withContext(function($ctx1) {
32
+ return self}, function($ctx1) {$ctx1.fill(self,"isSmalltalkError",{}, smalltalk.Error)})}
24
33
  }),
25
34
  smalltalk.Error);
26
35
 
@@ -30,9 +39,8 @@ smalltalk.method({
30
39
  selector: "jsStack",
31
40
  fn: function (){
32
41
  var self=this;
33
- return self.stack;
34
- ;
35
- return self}
42
+ return smalltalk.withContext(function($ctx1) {
43
+ return self}, function($ctx1) {$ctx1.fill(self,"jsStack",{}, smalltalk.Error)})}
36
44
  }),
37
45
  smalltalk.Error);
38
46
 
@@ -42,8 +50,10 @@ smalltalk.method({
42
50
  selector: "messageText",
43
51
  fn: function (){
44
52
  var self=this;
45
- return self["@messageText"];
46
- }
53
+ return smalltalk.withContext(function($ctx1) {
54
+ $1=self["@messageText"];
55
+ return $1;
56
+ }, function($ctx1) {$ctx1.fill(self,"messageText",{}, smalltalk.Error)})}
47
57
  }),
48
58
  smalltalk.Error);
49
59
 
@@ -53,8 +63,8 @@ smalltalk.method({
53
63
  selector: "messageText:",
54
64
  fn: function (aString){
55
65
  var self=this;
56
- self["@messageText"]=aString;
57
- return self}
66
+ return smalltalk.withContext(function($ctx1) {
67
+ return self}, function($ctx1) {$ctx1.fill(self,"messageText:",{aString:aString}, smalltalk.Error)})}
58
68
  }),
59
69
  smalltalk.Error);
60
70
 
@@ -64,9 +74,8 @@ smalltalk.method({
64
74
  selector: "signal",
65
75
  fn: function (){
66
76
  var self=this;
67
- self.context = smalltalk.getThisContext(); self.smalltalkError = true; throw(self);
68
- ;
69
- return self}
77
+ return smalltalk.withContext(function($ctx1) {
78
+ return self}, function($ctx1) {$ctx1.fill(self,"signal",{}, smalltalk.Error)})}
70
79
  }),
71
80
  smalltalk.Error);
72
81
 
@@ -76,9 +85,9 @@ smalltalk.method({
76
85
  selector: "signal:",
77
86
  fn: function (aString){
78
87
  var self=this;
79
- smalltalk.send(self,"_messageText_",[aString]);
80
- smalltalk.send(self,"_signal",[]);
81
- return self}
88
+ return smalltalk.withContext(function($ctx1) {
89
+ _st(self)._signal();
90
+ return self}, function($ctx1) {$ctx1.fill(self,"signal:",{aString:aString}, smalltalk.Error)})}
82
91
  }),
83
92
  smalltalk.Error);
84
93
 
@@ -89,10 +98,10 @@ smalltalk.method({
89
98
  selector: "signal",
90
99
  fn: function (){
91
100
  var self=this;
92
- var $1;
93
- $1=smalltalk.send(smalltalk.send(self,"_new",[]),"_signal",[]);
101
+ return smalltalk.withContext(function($ctx1) {
102
+ $1=_st(_st(self)._new())._signal();
94
103
  return $1;
95
- }
104
+ }, function($ctx1) {$ctx1.fill(self,"signal",{}, smalltalk.Error.klass)})}
96
105
  }),
97
106
  smalltalk.Error.klass);
98
107
 
@@ -102,14 +111,96 @@ smalltalk.method({
102
111
  selector: "signal:",
103
112
  fn: function (aString){
104
113
  var self=this;
105
- var $1;
106
- $1=smalltalk.send(smalltalk.send(self,"_new",[]),"_signal_",[aString]);
114
+ return smalltalk.withContext(function($ctx1) {
115
+ $1=_st(_st(self)._new())._signal_(aString);
107
116
  return $1;
108
- }
117
+ }, function($ctx1) {$ctx1.fill(self,"signal:",{aString:aString}, smalltalk.Error.klass)})}
109
118
  }),
110
119
  smalltalk.Error.klass);
111
120
 
112
121
 
122
+ smalltalk.addClass('JavaScriptException', smalltalk.Error, ['exception'], 'Kernel-Exceptions');
123
+ smalltalk.addMethod(
124
+ "_context_",
125
+ smalltalk.method({
126
+ selector: "context:",
127
+ fn: function (aMethodContext){
128
+ var self=this;
129
+ return smalltalk.withContext(function($ctx1) {
130
+ return self}, function($ctx1) {$ctx1.fill(self,"context:",{aMethodContext:aMethodContext}, smalltalk.JavaScriptException)})}
131
+ }),
132
+ smalltalk.JavaScriptException);
133
+
134
+ smalltalk.addMethod(
135
+ "_exception",
136
+ smalltalk.method({
137
+ selector: "exception",
138
+ fn: function (){
139
+ var self=this;
140
+ return smalltalk.withContext(function($ctx1) {
141
+ $1=self["@exception"];
142
+ return $1;
143
+ }, function($ctx1) {$ctx1.fill(self,"exception",{}, smalltalk.JavaScriptException)})}
144
+ }),
145
+ smalltalk.JavaScriptException);
146
+
147
+ smalltalk.addMethod(
148
+ "_exception_",
149
+ smalltalk.method({
150
+ selector: "exception:",
151
+ fn: function (anException){
152
+ var self=this;
153
+ return smalltalk.withContext(function($ctx1) {
154
+ return self}, function($ctx1) {$ctx1.fill(self,"exception:",{anException:anException}, smalltalk.JavaScriptException)})}
155
+ }),
156
+ smalltalk.JavaScriptException);
157
+
158
+ smalltalk.addMethod(
159
+ "_messageText",
160
+ smalltalk.method({
161
+ selector: "messageText",
162
+ fn: function (){
163
+ var self=this;
164
+ return smalltalk.withContext(function($ctx1) {
165
+ return self}, function($ctx1) {$ctx1.fill(self,"messageText",{}, smalltalk.JavaScriptException)})}
166
+ }),
167
+ smalltalk.JavaScriptException);
168
+
169
+
170
+ smalltalk.addMethod(
171
+ "_on_",
172
+ smalltalk.method({
173
+ selector: "on:",
174
+ fn: function (anException){
175
+ var self=this;
176
+ return smalltalk.withContext(function($ctx1) {
177
+ $2=_st(self)._new();
178
+ _st($2)._exception_(anException);
179
+ $3=_st($2)._yourself();
180
+ $1=$3;
181
+ return $1;
182
+ }, function($ctx1) {$ctx1.fill(self,"on:",{anException:anException}, smalltalk.JavaScriptException.klass)})}
183
+ }),
184
+ smalltalk.JavaScriptException.klass);
185
+
186
+ smalltalk.addMethod(
187
+ "_on_context_",
188
+ smalltalk.method({
189
+ selector: "on:context:",
190
+ fn: function (anException,aMethodContext){
191
+ var self=this;
192
+ return smalltalk.withContext(function($ctx1) {
193
+ $2=_st(self)._new();
194
+ _st($2)._exception_(anException);
195
+ _st($2)._context_(aMethodContext);
196
+ $3=_st($2)._yourself();
197
+ $1=$3;
198
+ return $1;
199
+ }, function($ctx1) {$ctx1.fill(self,"on:context:",{anException:anException,aMethodContext:aMethodContext}, smalltalk.JavaScriptException.klass)})}
200
+ }),
201
+ smalltalk.JavaScriptException.klass);
202
+
203
+
113
204
  smalltalk.addClass('MessageNotUnderstood', smalltalk.Error, ['message', 'receiver'], 'Kernel-Exceptions');
114
205
  smalltalk.addMethod(
115
206
  "_message",
@@ -117,8 +208,10 @@ smalltalk.method({
117
208
  selector: "message",
118
209
  fn: function (){
119
210
  var self=this;
120
- return self["@message"];
121
- }
211
+ return smalltalk.withContext(function($ctx1) {
212
+ $1=self["@message"];
213
+ return $1;
214
+ }, function($ctx1) {$ctx1.fill(self,"message",{}, smalltalk.MessageNotUnderstood)})}
122
215
  }),
123
216
  smalltalk.MessageNotUnderstood);
124
217
 
@@ -128,8 +221,8 @@ smalltalk.method({
128
221
  selector: "message:",
129
222
  fn: function (aMessage){
130
223
  var self=this;
131
- self["@message"]=aMessage;
132
- return self}
224
+ return smalltalk.withContext(function($ctx1) {
225
+ return self}, function($ctx1) {$ctx1.fill(self,"message:",{aMessage:aMessage}, smalltalk.MessageNotUnderstood)})}
133
226
  }),
134
227
  smalltalk.MessageNotUnderstood);
135
228
 
@@ -139,10 +232,10 @@ smalltalk.method({
139
232
  selector: "messageText",
140
233
  fn: function (){
141
234
  var self=this;
142
- var $1;
143
- $1=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self,"_receiver",[]),"_asString",[]),"__comma",[" does not understand #"]),"__comma",[smalltalk.send(smalltalk.send(self,"_message",[]),"_selector",[])]);
235
+ return smalltalk.withContext(function($ctx1) {
236
+ $1=_st(_st(_st(_st(self)._receiver())._asString()).__comma(" does not understand #")).__comma(_st(_st(self)._message())._selector());
144
237
  return $1;
145
- }
238
+ }, function($ctx1) {$ctx1.fill(self,"messageText",{}, smalltalk.MessageNotUnderstood)})}
146
239
  }),
147
240
  smalltalk.MessageNotUnderstood);
148
241
 
@@ -152,8 +245,10 @@ smalltalk.method({
152
245
  selector: "receiver",
153
246
  fn: function (){
154
247
  var self=this;
155
- return self["@receiver"];
156
- }
248
+ return smalltalk.withContext(function($ctx1) {
249
+ $1=self["@receiver"];
250
+ return $1;
251
+ }, function($ctx1) {$ctx1.fill(self,"receiver",{}, smalltalk.MessageNotUnderstood)})}
157
252
  }),
158
253
  smalltalk.MessageNotUnderstood);
159
254
 
@@ -163,8 +258,8 @@ smalltalk.method({
163
258
  selector: "receiver:",
164
259
  fn: function (anObject){
165
260
  var self=this;
166
- self["@receiver"]=anObject;
167
- return self}
261
+ return smalltalk.withContext(function($ctx1) {
262
+ return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{anObject:anObject}, smalltalk.MessageNotUnderstood)})}
168
263
  }),
169
264
  smalltalk.MessageNotUnderstood);
170
265
 
@@ -177,8 +272,10 @@ smalltalk.method({
177
272
  selector: "object",
178
273
  fn: function (){
179
274
  var self=this;
180
- return self["@object"];
181
- }
275
+ return smalltalk.withContext(function($ctx1) {
276
+ $1=self["@object"];
277
+ return $1;
278
+ }, function($ctx1) {$ctx1.fill(self,"object",{}, smalltalk.NonBooleanReceiver)})}
182
279
  }),
183
280
  smalltalk.NonBooleanReceiver);
184
281
 
@@ -188,8 +285,8 @@ smalltalk.method({
188
285
  selector: "object:",
189
286
  fn: function (anObject){
190
287
  var self=this;
191
- self["@object"]=anObject;
192
- return self}
288
+ return smalltalk.withContext(function($ctx1) {
289
+ return self}, function($ctx1) {$ctx1.fill(self,"object:",{anObject:anObject}, smalltalk.NonBooleanReceiver)})}
193
290
  }),
194
291
  smalltalk.NonBooleanReceiver);
195
292
 
@@ -202,15 +299,15 @@ smalltalk.method({
202
299
  selector: "handleError:",
203
300
  fn: function (anError){
204
301
  var self=this;
205
- var $1;
206
- $1=smalltalk.send(anError,"_context",[]);
302
+ return smalltalk.withContext(function($ctx1) {
303
+ $1=_st(anError)._context();
207
304
  if(($receiver = $1) == nil || $receiver == undefined){
208
305
  $1;
209
306
  } else {
210
- smalltalk.send(self,"_logErrorContext_",[smalltalk.send(anError,"_context",[])]);
307
+ _st(self)._logErrorContext_(_st(anError)._context());
211
308
  };
212
- smalltalk.send(self,"_logError_",[anError]);
213
- return self}
309
+ _st(self)._logError_(anError);
310
+ return self}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError}, smalltalk.ErrorHandler)})}
214
311
  }),
215
312
  smalltalk.ErrorHandler);
216
313
 
@@ -220,8 +317,8 @@ smalltalk.method({
220
317
  selector: "log:",
221
318
  fn: function (aString){
222
319
  var self=this;
223
- smalltalk.send(console,"_log_",[aString]);
224
- return self}
320
+ return smalltalk.withContext(function($ctx1) {
321
+ return self}, function($ctx1) {$ctx1.fill(self,"log:",{aString:aString}, smalltalk.ErrorHandler)})}
225
322
  }),
226
323
  smalltalk.ErrorHandler);
227
324
 
@@ -231,15 +328,15 @@ smalltalk.method({
231
328
  selector: "logContext:",
232
329
  fn: function (aContext){
233
330
  var self=this;
234
- var $1;
235
- $1=smalltalk.send(aContext,"_home",[]);
331
+ return smalltalk.withContext(function($ctx1) {
332
+ $1=_st(aContext)._home();
236
333
  if(($receiver = $1) == nil || $receiver == undefined){
237
334
  $1;
238
335
  } else {
239
- smalltalk.send(self,"_logContext_",[smalltalk.send(aContext,"_home",[])]);
336
+ _st(self)._logContext_(_st(aContext)._home());
240
337
  };
241
- smalltalk.send(self,"_log_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aContext,"_receiver",[]),"_asString",[]),"__comma",[">>"]),"__comma",[smalltalk.send(aContext,"_selector",[])])]);
242
- return self}
338
+ _st(self)._log_(_st(_st(_st(_st(aContext)._receiver())._asString()).__comma(">>")).__comma(_st(_st(aContext)._selector())._asString()));
339
+ return self}, function($ctx1) {$ctx1.fill(self,"logContext:",{aContext:aContext}, smalltalk.ErrorHandler)})}
243
340
  }),
244
341
  smalltalk.ErrorHandler);
245
342
 
@@ -249,8 +346,8 @@ smalltalk.method({
249
346
  selector: "logError:",
250
347
  fn: function (anError){
251
348
  var self=this;
252
- smalltalk.send(self,"_log_",[smalltalk.send(anError,"_messageText",[])]);
253
- return self}
349
+ return smalltalk.withContext(function($ctx1) {
350
+ return self}, function($ctx1) {$ctx1.fill(self,"logError:",{anError:anError}, smalltalk.ErrorHandler)})}
254
351
  }),
255
352
  smalltalk.ErrorHandler);
256
353
 
@@ -260,18 +357,18 @@ smalltalk.method({
260
357
  selector: "logErrorContext:",
261
358
  fn: function (aContext){
262
359
  var self=this;
263
- var $1;
264
- if(($receiver = aContext) == nil || $receiver == undefined){
265
- aContext;
360
+ return smalltalk.withContext(function($ctx1) {
361
+ $1=aContext;
362
+ $2=(function(){
363
+ return smalltalk.withContext(function($ctx2) {
364
+ if(($receiver = $3) == nil || $receiver == undefined){
365
+ return $3;
266
366
  } else {
267
- $1=smalltalk.send(aContext,"_home",[]);
268
- if(($receiver = $1) == nil || $receiver == undefined){
269
- $1;
270
- } else {
271
- smalltalk.send(self,"_logContext_",[smalltalk.send(aContext,"_home",[])]);
272
- };
367
+ return _st(self)._logContext_(_st(aContext)._home());
273
368
  };
274
- return self}
369
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
370
+ _st($1)._ifNotNil_($2);
371
+ return self}, function($ctx1) {$ctx1.fill(self,"logErrorContext:",{aContext:aContext}, smalltalk.ErrorHandler)})}
275
372
  }),
276
373
  smalltalk.ErrorHandler);
277
374
 
@@ -283,15 +380,16 @@ smalltalk.method({
283
380
  selector: "current",
284
381
  fn: function (){
285
382
  var self=this;
286
- var $1;
287
- if(($receiver = self["@current"]) == nil || $receiver == undefined){
288
- self["@current"]=smalltalk.send(self,"_new",[]);
383
+ return smalltalk.withContext(function($ctx1) {
384
+ $2=self["@current"];
385
+ if(($receiver = $2) == nil || $receiver == undefined){
386
+ self["@current"]=_st(self)._new();
289
387
  $1=self["@current"];
290
388
  } else {
291
- $1=self["@current"];
389
+ $1=$2;
292
390
  };
293
391
  return $1;
294
- }
392
+ }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.ErrorHandler.klass)})}
295
393
  }),
296
394
  smalltalk.ErrorHandler.klass);
297
395
 
@@ -301,8 +399,8 @@ smalltalk.method({
301
399
  selector: "initialize",
302
400
  fn: function (){
303
401
  var self=this;
304
- smalltalk.send(self,"_register",[]);
305
- return self}
402
+ return smalltalk.withContext(function($ctx1) {
403
+ return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.ErrorHandler.klass)})}
306
404
  }),
307
405
  smalltalk.ErrorHandler.klass);
308
406
 
@@ -312,8 +410,8 @@ smalltalk.method({
312
410
  selector: "register",
313
411
  fn: function (){
314
412
  var self=this;
315
- smalltalk.send((smalltalk.ErrorHandler || ErrorHandler),"_setCurrent_",[smalltalk.send(self,"_new",[])]);
316
- return self}
413
+ return smalltalk.withContext(function($ctx1) {
414
+ return self}, function($ctx1) {$ctx1.fill(self,"register",{}, smalltalk.ErrorHandler.klass)})}
317
415
  }),
318
416
  smalltalk.ErrorHandler.klass);
319
417
 
@@ -323,8 +421,8 @@ smalltalk.method({
323
421
  selector: "setCurrent:",
324
422
  fn: function (anHandler){
325
423
  var self=this;
326
- self["@current"]=anHandler;
327
- return self}
424
+ return smalltalk.withContext(function($ctx1) {
425
+ return self}, function($ctx1) {$ctx1.fill(self,"setCurrent:",{anHandler:anHandler}, smalltalk.ErrorHandler.klass)})}
328
426
  }),
329
427
  smalltalk.ErrorHandler.klass);
330
428
 
@@ -1,5 +1,6 @@
1
1
  smalltalk.addPackage('Kernel-Exceptions', {});
2
2
  smalltalk.addClass('Error', smalltalk.Object, ['messageText'], 'Kernel-Exceptions');
3
+ smalltalk.Error.comment="From the ANSI standard:\x0a\x0aThis protocol describes the behavior of instances of class `Error`. \x0aThese are used to represent error conditions that prevent the normal continuation of processing. \x0aActual error exceptions used by an application may be subclasses of this class.\x0aAs `Error` is explicitly specified to be subclassable, conforming implementations must implement its behavior in a non-fragile manner."
3
4
  smalltalk.addMethod(
4
5
  "_context",
5
6
  smalltalk.method({
@@ -7,9 +8,8 @@ selector: "context",
7
8
  category: 'accessing',
8
9
  fn: function (){
9
10
  var self=this;
10
- return self.context;
11
- ;
12
- return self},
11
+ return smalltalk.withContext(function($ctx1) {
12
+ return self}, function($ctx1) {$ctx1.fill(self,"context",{}, smalltalk.Error)})},
13
13
  args: [],
14
14
  source: "context\x0a\x09<return self.context>",
15
15
  messageSends: [],
@@ -17,6 +17,22 @@ referencedClasses: []
17
17
  }),
18
18
  smalltalk.Error);
19
19
 
20
+ smalltalk.addMethod(
21
+ "_initialize",
22
+ smalltalk.method({
23
+ selector: "initialize",
24
+ category: 'initialization',
25
+ fn: function (){
26
+ var self=this;
27
+ return smalltalk.withContext(function($ctx1) {
28
+ return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.Error)})},
29
+ args: [],
30
+ source: "initialize\x0a\x09self messageText: 'Errorclass: ', (self class name).",
31
+ messageSends: ["messageText:", ",", "name", "class"],
32
+ referencedClasses: []
33
+ }),
34
+ smalltalk.Error);
35
+
20
36
  smalltalk.addMethod(
21
37
  "_isSmalltalkError",
22
38
  smalltalk.method({
@@ -24,9 +40,8 @@ selector: "isSmalltalkError",
24
40
  category: 'testing',
25
41
  fn: function (){
26
42
  var self=this;
27
- return self.smalltalkError === true;
28
- ;
29
- return self},
43
+ return smalltalk.withContext(function($ctx1) {
44
+ return self}, function($ctx1) {$ctx1.fill(self,"isSmalltalkError",{}, smalltalk.Error)})},
30
45
  args: [],
31
46
  source: "isSmalltalkError\x0a\x09<return self.smalltalkError === true>",
32
47
  messageSends: [],
@@ -41,9 +56,8 @@ selector: "jsStack",
41
56
  category: 'accessing',
42
57
  fn: function (){
43
58
  var self=this;
44
- return self.stack;
45
- ;
46
- return self},
59
+ return smalltalk.withContext(function($ctx1) {
60
+ return self}, function($ctx1) {$ctx1.fill(self,"jsStack",{}, smalltalk.Error)})},
47
61
  args: [],
48
62
  source: "jsStack\x0a\x09<return self.stack>",
49
63
  messageSends: [],
@@ -58,8 +72,10 @@ selector: "messageText",
58
72
  category: 'accessing',
59
73
  fn: function (){
60
74
  var self=this;
61
- return self["@messageText"];
62
- },
75
+ return smalltalk.withContext(function($ctx1) {
76
+ $1=self["@messageText"];
77
+ return $1;
78
+ }, function($ctx1) {$ctx1.fill(self,"messageText",{}, smalltalk.Error)})},
63
79
  args: [],
64
80
  source: "messageText\x0a\x09^messageText",
65
81
  messageSends: [],
@@ -74,8 +90,8 @@ selector: "messageText:",
74
90
  category: 'accessing',
75
91
  fn: function (aString){
76
92
  var self=this;
77
- self["@messageText"]=aString;
78
- return self},
93
+ return smalltalk.withContext(function($ctx1) {
94
+ return self}, function($ctx1) {$ctx1.fill(self,"messageText:",{aString:aString}, smalltalk.Error)})},
79
95
  args: ["aString"],
80
96
  source: "messageText: aString\x0a\x09messageText := aString",
81
97
  messageSends: [],
@@ -90,9 +106,8 @@ selector: "signal",
90
106
  category: 'signaling',
91
107
  fn: function (){
92
108
  var self=this;
93
- self.context = smalltalk.getThisContext(); self.smalltalkError = true; throw(self);
94
- ;
95
- return self},
109
+ return smalltalk.withContext(function($ctx1) {
110
+ return self}, function($ctx1) {$ctx1.fill(self,"signal",{}, smalltalk.Error)})},
96
111
  args: [],
97
112
  source: "signal\x0a\x09<self.context = smalltalk.getThisContext(); self.smalltalkError = true; throw(self)>",
98
113
  messageSends: [],
@@ -107,9 +122,9 @@ selector: "signal:",
107
122
  category: 'signaling',
108
123
  fn: function (aString){
109
124
  var self=this;
110
- smalltalk.send(self,"_messageText_",[aString]);
111
- smalltalk.send(self,"_signal",[]);
112
- return self},
125
+ return smalltalk.withContext(function($ctx1) {
126
+ _st(self)._signal();
127
+ return self}, function($ctx1) {$ctx1.fill(self,"signal:",{aString:aString}, smalltalk.Error)})},
113
128
  args: ["aString"],
114
129
  source: "signal: aString\x0a\x09self messageText: aString.\x0a\x09self signal",
115
130
  messageSends: ["messageText:", "signal"],
@@ -125,10 +140,10 @@ selector: "signal",
125
140
  category: 'instance creation',
126
141
  fn: function (){
127
142
  var self=this;
128
- var $1;
129
- $1=smalltalk.send(smalltalk.send(self,"_new",[]),"_signal",[]);
143
+ return smalltalk.withContext(function($ctx1) {
144
+ $1=_st(_st(self)._new())._signal();
130
145
  return $1;
131
- },
146
+ }, function($ctx1) {$ctx1.fill(self,"signal",{}, smalltalk.Error.klass)})},
132
147
  args: [],
133
148
  source: "signal\x0a\x09^self new signal",
134
149
  messageSends: ["signal", "new"],
@@ -143,10 +158,10 @@ selector: "signal:",
143
158
  category: 'instance creation',
144
159
  fn: function (aString){
145
160
  var self=this;
146
- var $1;
147
- $1=smalltalk.send(smalltalk.send(self,"_new",[]),"_signal_",[aString]);
161
+ return smalltalk.withContext(function($ctx1) {
162
+ $1=_st(_st(self)._new())._signal_(aString);
148
163
  return $1;
149
- },
164
+ }, function($ctx1) {$ctx1.fill(self,"signal:",{aString:aString}, smalltalk.Error.klass)})},
150
165
  args: ["aString"],
151
166
  source: "signal: aString\x0a\x09 ^self new\x0a\x09\x09signal: aString",
152
167
  messageSends: ["signal:", "new"],
@@ -155,7 +170,121 @@ referencedClasses: []
155
170
  smalltalk.Error.klass);
156
171
 
157
172
 
173
+ smalltalk.addClass('JavaScriptException', smalltalk.Error, ['exception'], 'Kernel-Exceptions');
174
+ smalltalk.JavaScriptException.comment="A JavaScriptException is thrown when a non-Smalltalk exception occurs while in the Smalltalk stack.\x0aSee `boot.js` `inContext()` and `BlockClosure >> on:do:`"
175
+ smalltalk.addMethod(
176
+ "_context_",
177
+ smalltalk.method({
178
+ selector: "context:",
179
+ category: 'accessing',
180
+ fn: function (aMethodContext){
181
+ var self=this;
182
+ return smalltalk.withContext(function($ctx1) {
183
+ return self}, function($ctx1) {$ctx1.fill(self,"context:",{aMethodContext:aMethodContext}, smalltalk.JavaScriptException)})},
184
+ args: ["aMethodContext"],
185
+ source: "context: aMethodContext\x0a\x09\x22Set the context from the outside.\x0a See boot.js `inContext()` exception handling\x22\x0a \x0a <self.context = aMethodContext>",
186
+ messageSends: [],
187
+ referencedClasses: []
188
+ }),
189
+ smalltalk.JavaScriptException);
190
+
191
+ smalltalk.addMethod(
192
+ "_exception",
193
+ smalltalk.method({
194
+ selector: "exception",
195
+ category: 'accessing',
196
+ fn: function (){
197
+ var self=this;
198
+ return smalltalk.withContext(function($ctx1) {
199
+ $1=self["@exception"];
200
+ return $1;
201
+ }, function($ctx1) {$ctx1.fill(self,"exception",{}, smalltalk.JavaScriptException)})},
202
+ args: [],
203
+ source: "exception\x0a\x09^ exception",
204
+ messageSends: [],
205
+ referencedClasses: []
206
+ }),
207
+ smalltalk.JavaScriptException);
208
+
209
+ smalltalk.addMethod(
210
+ "_exception_",
211
+ smalltalk.method({
212
+ selector: "exception:",
213
+ category: 'accessing',
214
+ fn: function (anException){
215
+ var self=this;
216
+ return smalltalk.withContext(function($ctx1) {
217
+ return self}, function($ctx1) {$ctx1.fill(self,"exception:",{anException:anException}, smalltalk.JavaScriptException)})},
218
+ args: ["anException"],
219
+ source: "exception: anException\x0a\x09exception := anException",
220
+ messageSends: [],
221
+ referencedClasses: []
222
+ }),
223
+ smalltalk.JavaScriptException);
224
+
225
+ smalltalk.addMethod(
226
+ "_messageText",
227
+ smalltalk.method({
228
+ selector: "messageText",
229
+ category: 'accessing',
230
+ fn: function (){
231
+ var self=this;
232
+ return smalltalk.withContext(function($ctx1) {
233
+ return self}, function($ctx1) {$ctx1.fill(self,"messageText",{}, smalltalk.JavaScriptException)})},
234
+ args: [],
235
+ source: "messageText\x0a\x09<return 'JavaScript exception: ' + self[\x22@exception\x22].toString()>",
236
+ messageSends: [],
237
+ referencedClasses: []
238
+ }),
239
+ smalltalk.JavaScriptException);
240
+
241
+
242
+ smalltalk.addMethod(
243
+ "_on_",
244
+ smalltalk.method({
245
+ selector: "on:",
246
+ category: 'instance creation',
247
+ fn: function (anException){
248
+ var self=this;
249
+ return smalltalk.withContext(function($ctx1) {
250
+ $2=_st(self)._new();
251
+ _st($2)._exception_(anException);
252
+ $3=_st($2)._yourself();
253
+ $1=$3;
254
+ return $1;
255
+ }, function($ctx1) {$ctx1.fill(self,"on:",{anException:anException}, smalltalk.JavaScriptException.klass)})},
256
+ args: ["anException"],
257
+ source: "on: anException\x0a\x09^ self new\x0a \x09exception: anException;\x0a yourself",
258
+ messageSends: ["exception:", "new", "yourself"],
259
+ referencedClasses: []
260
+ }),
261
+ smalltalk.JavaScriptException.klass);
262
+
263
+ smalltalk.addMethod(
264
+ "_on_context_",
265
+ smalltalk.method({
266
+ selector: "on:context:",
267
+ category: 'instance creation',
268
+ fn: function (anException,aMethodContext){
269
+ var self=this;
270
+ return smalltalk.withContext(function($ctx1) {
271
+ $2=_st(self)._new();
272
+ _st($2)._exception_(anException);
273
+ _st($2)._context_(aMethodContext);
274
+ $3=_st($2)._yourself();
275
+ $1=$3;
276
+ return $1;
277
+ }, function($ctx1) {$ctx1.fill(self,"on:context:",{anException:anException,aMethodContext:aMethodContext}, smalltalk.JavaScriptException.klass)})},
278
+ args: ["anException", "aMethodContext"],
279
+ source: "on: anException context: aMethodContext\x0a\x09^ self new\x0a \x09exception: anException;\x0a context: aMethodContext;\x0a yourself",
280
+ messageSends: ["exception:", "new", "context:", "yourself"],
281
+ referencedClasses: []
282
+ }),
283
+ smalltalk.JavaScriptException.klass);
284
+
285
+
158
286
  smalltalk.addClass('MessageNotUnderstood', smalltalk.Error, ['message', 'receiver'], 'Kernel-Exceptions');
287
+ smalltalk.MessageNotUnderstood.comment="This exception is provided to support `Object>>doesNotUnderstand:`."
159
288
  smalltalk.addMethod(
160
289
  "_message",
161
290
  smalltalk.method({
@@ -163,8 +292,10 @@ selector: "message",
163
292
  category: 'accessing',
164
293
  fn: function (){
165
294
  var self=this;
166
- return self["@message"];
167
- },
295
+ return smalltalk.withContext(function($ctx1) {
296
+ $1=self["@message"];
297
+ return $1;
298
+ }, function($ctx1) {$ctx1.fill(self,"message",{}, smalltalk.MessageNotUnderstood)})},
168
299
  args: [],
169
300
  source: "message\x0a\x09^message",
170
301
  messageSends: [],
@@ -179,8 +310,8 @@ selector: "message:",
179
310
  category: 'accessing',
180
311
  fn: function (aMessage){
181
312
  var self=this;
182
- self["@message"]=aMessage;
183
- return self},
313
+ return smalltalk.withContext(function($ctx1) {
314
+ return self}, function($ctx1) {$ctx1.fill(self,"message:",{aMessage:aMessage}, smalltalk.MessageNotUnderstood)})},
184
315
  args: ["aMessage"],
185
316
  source: "message: aMessage\x0a\x09message := aMessage",
186
317
  messageSends: [],
@@ -195,10 +326,10 @@ selector: "messageText",
195
326
  category: 'accessing',
196
327
  fn: function (){
197
328
  var self=this;
198
- var $1;
199
- $1=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self,"_receiver",[]),"_asString",[]),"__comma",[" does not understand #"]),"__comma",[smalltalk.send(smalltalk.send(self,"_message",[]),"_selector",[])]);
329
+ return smalltalk.withContext(function($ctx1) {
330
+ $1=_st(_st(_st(_st(self)._receiver())._asString()).__comma(" does not understand #")).__comma(_st(_st(self)._message())._selector());
200
331
  return $1;
201
- },
332
+ }, function($ctx1) {$ctx1.fill(self,"messageText",{}, smalltalk.MessageNotUnderstood)})},
202
333
  args: [],
203
334
  source: "messageText\x0a\x09^self receiver asString, ' does not understand #', self message selector",
204
335
  messageSends: [",", "selector", "message", "asString", "receiver"],
@@ -213,8 +344,10 @@ selector: "receiver",
213
344
  category: 'accessing',
214
345
  fn: function (){
215
346
  var self=this;
216
- return self["@receiver"];
217
- },
347
+ return smalltalk.withContext(function($ctx1) {
348
+ $1=self["@receiver"];
349
+ return $1;
350
+ }, function($ctx1) {$ctx1.fill(self,"receiver",{}, smalltalk.MessageNotUnderstood)})},
218
351
  args: [],
219
352
  source: "receiver\x0a\x09^receiver",
220
353
  messageSends: [],
@@ -229,8 +362,8 @@ selector: "receiver:",
229
362
  category: 'accessing',
230
363
  fn: function (anObject){
231
364
  var self=this;
232
- self["@receiver"]=anObject;
233
- return self},
365
+ return smalltalk.withContext(function($ctx1) {
366
+ return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{anObject:anObject}, smalltalk.MessageNotUnderstood)})},
234
367
  args: ["anObject"],
235
368
  source: "receiver: anObject\x0a\x09receiver := anObject",
236
369
  messageSends: [],
@@ -241,6 +374,7 @@ smalltalk.MessageNotUnderstood);
241
374
 
242
375
 
243
376
  smalltalk.addClass('NonBooleanReceiver', smalltalk.Error, ['object'], 'Kernel-Exceptions');
377
+ smalltalk.NonBooleanReceiver.comment="NonBooleanReceiver exceptions may be thrown when executing inlined methods such as `#ifTrue:` with a non boolean receiver."
244
378
  smalltalk.addMethod(
245
379
  "_object",
246
380
  smalltalk.method({
@@ -248,8 +382,10 @@ selector: "object",
248
382
  category: 'accessing',
249
383
  fn: function (){
250
384
  var self=this;
251
- return self["@object"];
252
- },
385
+ return smalltalk.withContext(function($ctx1) {
386
+ $1=self["@object"];
387
+ return $1;
388
+ }, function($ctx1) {$ctx1.fill(self,"object",{}, smalltalk.NonBooleanReceiver)})},
253
389
  args: [],
254
390
  source: "object\x0a\x09^ object",
255
391
  messageSends: [],
@@ -264,8 +400,8 @@ selector: "object:",
264
400
  category: 'accessing',
265
401
  fn: function (anObject){
266
402
  var self=this;
267
- self["@object"]=anObject;
268
- return self},
403
+ return smalltalk.withContext(function($ctx1) {
404
+ return self}, function($ctx1) {$ctx1.fill(self,"object:",{anObject:anObject}, smalltalk.NonBooleanReceiver)})},
269
405
  args: ["anObject"],
270
406
  source: "object: anObject\x0a\x09object := anObject",
271
407
  messageSends: [],
@@ -276,6 +412,7 @@ smalltalk.NonBooleanReceiver);
276
412
 
277
413
 
278
414
  smalltalk.addClass('ErrorHandler', smalltalk.Object, [], 'Kernel-Exceptions');
415
+ smalltalk.ErrorHandler.comment="ErrorHandler is used to manage Smalltalk errors. \x0aSee `boot.js` `handleError()` function.\x0a\x0aSubclasses of `ErrorHandler` can register themselves as the current handler with\x0a`ErrorHandler class >> register`.\x0a\x0aSubclasses may override `#handleError:` to perform an action on the thrown exception.\x0aThe default behavior is to log the error and the context stack to the JavaScript console."
279
416
  smalltalk.addMethod(
280
417
  "_handleError_",
281
418
  smalltalk.method({
@@ -283,15 +420,15 @@ selector: "handleError:",
283
420
  category: 'error handling',
284
421
  fn: function (anError){
285
422
  var self=this;
286
- var $1;
287
- $1=smalltalk.send(anError,"_context",[]);
423
+ return smalltalk.withContext(function($ctx1) {
424
+ $1=_st(anError)._context();
288
425
  if(($receiver = $1) == nil || $receiver == undefined){
289
426
  $1;
290
427
  } else {
291
- smalltalk.send(self,"_logErrorContext_",[smalltalk.send(anError,"_context",[])]);
428
+ _st(self)._logErrorContext_(_st(anError)._context());
292
429
  };
293
- smalltalk.send(self,"_logError_",[anError]);
294
- return self},
430
+ _st(self)._logError_(anError);
431
+ return self}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError}, smalltalk.ErrorHandler)})},
295
432
  args: ["anError"],
296
433
  source: "handleError: anError\x0a\x09anError context ifNotNil: [self logErrorContext: anError context].\x0a\x09self logError: anError",
297
434
  messageSends: ["ifNotNil:", "logErrorContext:", "context", "logError:"],
@@ -306,8 +443,8 @@ selector: "log:",
306
443
  category: 'private',
307
444
  fn: function (aString){
308
445
  var self=this;
309
- smalltalk.send(console,"_log_",[aString]);
310
- return self},
446
+ return smalltalk.withContext(function($ctx1) {
447
+ return self}, function($ctx1) {$ctx1.fill(self,"log:",{aString:aString}, smalltalk.ErrorHandler)})},
311
448
  args: ["aString"],
312
449
  source: "log: aString\x0a\x09console log: aString",
313
450
  messageSends: ["log:"],
@@ -322,18 +459,18 @@ selector: "logContext:",
322
459
  category: 'private',
323
460
  fn: function (aContext){
324
461
  var self=this;
325
- var $1;
326
- $1=smalltalk.send(aContext,"_home",[]);
462
+ return smalltalk.withContext(function($ctx1) {
463
+ $1=_st(aContext)._home();
327
464
  if(($receiver = $1) == nil || $receiver == undefined){
328
465
  $1;
329
466
  } else {
330
- smalltalk.send(self,"_logContext_",[smalltalk.send(aContext,"_home",[])]);
467
+ _st(self)._logContext_(_st(aContext)._home());
331
468
  };
332
- smalltalk.send(self,"_log_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aContext,"_receiver",[]),"_asString",[]),"__comma",[">>"]),"__comma",[smalltalk.send(aContext,"_selector",[])])]);
333
- return self},
469
+ _st(self)._log_(_st(_st(_st(_st(aContext)._receiver())._asString()).__comma(">>")).__comma(_st(_st(aContext)._selector())._asString()));
470
+ return self}, function($ctx1) {$ctx1.fill(self,"logContext:",{aContext:aContext}, smalltalk.ErrorHandler)})},
334
471
  args: ["aContext"],
335
- source: "logContext: aContext\x0a\x09aContext home ifNotNil: [\x0a\x09\x09self logContext: aContext home].\x0a\x09self log: aContext receiver asString, '>>', aContext selector",
336
- messageSends: ["ifNotNil:", "logContext:", "home", "log:", ",", "selector", "asString", "receiver"],
472
+ source: "logContext: aContext\x0a\x09aContext home ifNotNil: [\x0a\x09\x09self logContext: aContext home].\x0a\x09self log: aContext receiver asString, '>>', aContext selector asString",
473
+ messageSends: ["ifNotNil:", "logContext:", "home", "log:", ",", "asString", "selector", "receiver"],
337
474
  referencedClasses: []
338
475
  }),
339
476
  smalltalk.ErrorHandler);
@@ -345,8 +482,8 @@ selector: "logError:",
345
482
  category: 'private',
346
483
  fn: function (anError){
347
484
  var self=this;
348
- smalltalk.send(self,"_log_",[smalltalk.send(anError,"_messageText",[])]);
349
- return self},
485
+ return smalltalk.withContext(function($ctx1) {
486
+ return self}, function($ctx1) {$ctx1.fill(self,"logError:",{anError:anError}, smalltalk.ErrorHandler)})},
350
487
  args: ["anError"],
351
488
  source: "logError: anError\x0a\x09self log: anError messageText",
352
489
  messageSends: ["log:", "messageText"],
@@ -361,18 +498,18 @@ selector: "logErrorContext:",
361
498
  category: 'private',
362
499
  fn: function (aContext){
363
500
  var self=this;
364
- var $1;
365
- if(($receiver = aContext) == nil || $receiver == undefined){
366
- aContext;
501
+ return smalltalk.withContext(function($ctx1) {
502
+ $1=aContext;
503
+ $2=(function(){
504
+ return smalltalk.withContext(function($ctx2) {
505
+ if(($receiver = $3) == nil || $receiver == undefined){
506
+ return $3;
367
507
  } else {
368
- $1=smalltalk.send(aContext,"_home",[]);
369
- if(($receiver = $1) == nil || $receiver == undefined){
370
- $1;
371
- } else {
372
- smalltalk.send(self,"_logContext_",[smalltalk.send(aContext,"_home",[])]);
508
+ return _st(self)._logContext_(_st(aContext)._home());
373
509
  };
374
- };
375
- return self},
510
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
511
+ _st($1)._ifNotNil_($2);
512
+ return self}, function($ctx1) {$ctx1.fill(self,"logErrorContext:",{aContext:aContext}, smalltalk.ErrorHandler)})},
376
513
  args: ["aContext"],
377
514
  source: "logErrorContext: aContext\x0a\x09aContext ifNotNil: [\x0a\x09\x09aContext home ifNotNil: [\x0a\x09\x09\x09self logContext: aContext home]]",
378
515
  messageSends: ["ifNotNil:", "logContext:", "home"],
@@ -389,15 +526,16 @@ selector: "current",
389
526
  category: 'accessing',
390
527
  fn: function (){
391
528
  var self=this;
392
- var $1;
393
- if(($receiver = self["@current"]) == nil || $receiver == undefined){
394
- self["@current"]=smalltalk.send(self,"_new",[]);
529
+ return smalltalk.withContext(function($ctx1) {
530
+ $2=self["@current"];
531
+ if(($receiver = $2) == nil || $receiver == undefined){
532
+ self["@current"]=_st(self)._new();
395
533
  $1=self["@current"];
396
534
  } else {
397
- $1=self["@current"];
535
+ $1=$2;
398
536
  };
399
537
  return $1;
400
- },
538
+ }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.ErrorHandler.klass)})},
401
539
  args: [],
402
540
  source: "current\x0a\x09^current ifNil: [current := self new]",
403
541
  messageSends: ["ifNil:", "new"],
@@ -412,8 +550,8 @@ selector: "initialize",
412
550
  category: 'initialization',
413
551
  fn: function (){
414
552
  var self=this;
415
- smalltalk.send(self,"_register",[]);
416
- return self},
553
+ return smalltalk.withContext(function($ctx1) {
554
+ return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.ErrorHandler.klass)})},
417
555
  args: [],
418
556
  source: "initialize\x0a\x09self register",
419
557
  messageSends: ["register"],
@@ -428,8 +566,8 @@ selector: "register",
428
566
  category: 'initialization',
429
567
  fn: function (){
430
568
  var self=this;
431
- smalltalk.send((smalltalk.ErrorHandler || ErrorHandler),"_setCurrent_",[smalltalk.send(self,"_new",[])]);
432
- return self},
569
+ return smalltalk.withContext(function($ctx1) {
570
+ return self}, function($ctx1) {$ctx1.fill(self,"register",{}, smalltalk.ErrorHandler.klass)})},
433
571
  args: [],
434
572
  source: "register\x0a\x09ErrorHandler setCurrent: self new",
435
573
  messageSends: ["setCurrent:", "new"],
@@ -444,8 +582,8 @@ selector: "setCurrent:",
444
582
  category: 'accessing',
445
583
  fn: function (anHandler){
446
584
  var self=this;
447
- self["@current"]=anHandler;
448
- return self},
585
+ return smalltalk.withContext(function($ctx1) {
586
+ return self}, function($ctx1) {$ctx1.fill(self,"setCurrent:",{anHandler:anHandler}, smalltalk.ErrorHandler.klass)})},
449
587
  args: ["anHandler"],
450
588
  source: "setCurrent: anHandler\x0a\x09current := anHandler",
451
589
  messageSends: [],