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
@@ -7,14 +7,14 @@ selector: "=",
7
7
  category: 'comparing',
8
8
  fn: function (anAssociation){
9
9
  var self=this;
10
- var $1;
11
- $1=smalltalk.send(smalltalk.send(smalltalk.send(self,"_class",[]),"__eq",[smalltalk.send(anAssociation,"_class",[])]),"_and_",[(function(){
12
- return smalltalk.send(smalltalk.send(smalltalk.send(self,"_key",[]),"__eq",[smalltalk.send(anAssociation,"_key",[])]),"_and_",[(function(){
13
- return smalltalk.send(smalltalk.send(self,"_value",[]),"__eq",[smalltalk.send(anAssociation,"_value",[])]);
14
- })]);
15
- })]);
16
- return $1;
17
- },
10
+ return smalltalk.withContext(function($ctx1) {
11
+ $1=_st(_st(_st(self)._class()).__eq(_st(anAssociation)._class()))._and_((function(){
12
+ return smalltalk.withContext(function($ctx2) {
13
+ return smalltalk.withContext(function($ctx3) {
14
+ }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
15
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
16
+ return $1;
17
+ }, function($ctx1) {$ctx1.fill(self,"=",{anAssociation:anAssociation}, smalltalk.Association)})},
18
18
  args: ["anAssociation"],
19
19
  source: "= anAssociation\x0a\x09^self class = anAssociation class and: [\x0a\x09 self key = anAssociation key and: [\x0a\x09\x09self value = anAssociation value]]",
20
20
  messageSends: ["and:", "=", "value", "key", "class"],
@@ -29,8 +29,10 @@ selector: "key",
29
29
  category: 'accessing',
30
30
  fn: function (){
31
31
  var self=this;
32
- return self["@key"];
33
- },
32
+ return smalltalk.withContext(function($ctx1) {
33
+ $1=self["@key"];
34
+ return $1;
35
+ }, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.Association)})},
34
36
  args: [],
35
37
  source: "key\x0a\x09^key",
36
38
  messageSends: [],
@@ -45,8 +47,8 @@ selector: "key:",
45
47
  category: 'accessing',
46
48
  fn: function (aKey){
47
49
  var self=this;
48
- self["@key"]=aKey;
49
- return self},
50
+ return smalltalk.withContext(function($ctx1) {
51
+ return self}, function($ctx1) {$ctx1.fill(self,"key:",{aKey:aKey}, smalltalk.Association)})},
50
52
  args: ["aKey"],
51
53
  source: "key: aKey\x0a\x09key := aKey",
52
54
  messageSends: [],
@@ -61,12 +63,12 @@ selector: "printString",
61
63
  category: 'printing',
62
64
  fn: function (){
63
65
  var self=this;
64
- var $1;
65
- $1=smalltalk.send((smalltalk.String || String),"_streamContents_",[(function(aStream){
66
- return smalltalk.send(self,"_storeOn_",[aStream]);
67
- })]);
66
+ return smalltalk.withContext(function($ctx1) {
67
+ $1=_st((smalltalk.String || String))._streamContents_((function(aStream){
68
+ return smalltalk.withContext(function($ctx2) {
69
+ }, function($ctx2) {$ctx2.fillBlock({aStream:aStream},$ctx1)})}));
68
70
  return $1;
69
- },
71
+ }, function($ctx1) {$ctx1.fill(self,"printString",{}, smalltalk.Association)})},
70
72
  args: [],
71
73
  source: "printString\x0a\x09\x22print the contents of the Association into a string and return the string\x22\x0a\x09^String streamContents: [:aStream |\x0a\x09\x09self storeOn: aStream]",
72
74
  messageSends: ["streamContents:", "storeOn:"],
@@ -81,10 +83,10 @@ selector: "storeOn:",
81
83
  category: 'printing',
82
84
  fn: function (aStream){
83
85
  var self=this;
84
- smalltalk.send(self["@key"],"_storeOn_",[aStream]);
85
- smalltalk.send(aStream,"_nextPutAll_",["->"]);
86
- smalltalk.send(self["@value"],"_storeOn_",[aStream]);
87
- return self},
86
+ return smalltalk.withContext(function($ctx1) {
87
+ _st(aStream)._nextPutAll_("->");
88
+ _st(self["@value"])._storeOn_(aStream);
89
+ return self}, function($ctx1) {$ctx1.fill(self,"storeOn:",{aStream:aStream}, smalltalk.Association)})},
88
90
  args: ["aStream"],
89
91
  source: "storeOn: aStream\x0a\x09\x22Store in the format: key->value\x22\x0a\x0a\x09key storeOn: aStream.\x0a\x09aStream nextPutAll: '->'.\x0a\x09value storeOn: aStream.",
90
92
  messageSends: ["storeOn:", "nextPutAll:"],
@@ -99,8 +101,10 @@ selector: "value",
99
101
  category: 'accessing',
100
102
  fn: function (){
101
103
  var self=this;
102
- return self["@value"];
103
- },
104
+ return smalltalk.withContext(function($ctx1) {
105
+ $1=self["@value"];
106
+ return $1;
107
+ }, function($ctx1) {$ctx1.fill(self,"value",{}, smalltalk.Association)})},
104
108
  args: [],
105
109
  source: "value\x0a\x09^value",
106
110
  messageSends: [],
@@ -115,8 +119,8 @@ selector: "value:",
115
119
  category: 'accessing',
116
120
  fn: function (aValue){
117
121
  var self=this;
118
- self["@value"]=aValue;
119
- return self},
122
+ return smalltalk.withContext(function($ctx1) {
123
+ return self}, function($ctx1) {$ctx1.fill(self,"value:",{aValue:aValue}, smalltalk.Association)})},
120
124
  args: ["aValue"],
121
125
  source: "value: aValue\x0a\x09value := aValue",
122
126
  messageSends: [],
@@ -132,14 +136,14 @@ selector: "key:value:",
132
136
  category: 'instance creation',
133
137
  fn: function (aKey,aValue){
134
138
  var self=this;
135
- var $2,$3,$1;
136
- $2=smalltalk.send(self,"_new",[]);
137
- smalltalk.send($2,"_key_",[aKey]);
138
- smalltalk.send($2,"_value_",[aValue]);
139
- $3=smalltalk.send($2,"_yourself",[]);
139
+ return smalltalk.withContext(function($ctx1) {
140
+ $2=_st(self)._new();
141
+ _st($2)._key_(aKey);
142
+ _st($2)._value_(aValue);
143
+ $3=_st($2)._yourself();
140
144
  $1=$3;
141
145
  return $1;
142
- },
146
+ }, function($ctx1) {$ctx1.fill(self,"key:value:",{aKey:aKey,aValue:aValue}, smalltalk.Association.klass)})},
143
147
  args: ["aKey", "aValue"],
144
148
  source: "key: aKey value: aValue\x0a\x09 ^self new\x0a\x09\x09key: aKey;\x0a\x09\x09value: aValue;\x0a\x09\x09yourself",
145
149
  messageSends: ["key:", "new", "value:", "yourself"],
@@ -156,13 +160,13 @@ selector: ",",
156
160
  category: 'copying',
157
161
  fn: function (aCollection){
158
162
  var self=this;
159
- var $2,$3,$1;
160
- $2=smalltalk.send(self,"_copy",[]);
161
- smalltalk.send($2,"_addAll_",[aCollection]);
162
- $3=smalltalk.send($2,"_yourself",[]);
163
+ return smalltalk.withContext(function($ctx1) {
164
+ $2=_st(self)._copy();
165
+ _st($2)._addAll_(aCollection);
166
+ $3=_st($2)._yourself();
163
167
  $1=$3;
164
168
  return $1;
165
- },
169
+ }, function($ctx1) {$ctx1.fill(self,",",{aCollection:aCollection}, smalltalk.Collection)})},
166
170
  args: ["aCollection"],
167
171
  source: ", aCollection\x0a\x09^self copy \x0a\x09 addAll: aCollection; \x0a\x09 yourself",
168
172
  messageSends: ["addAll:", "copy", "yourself"],
@@ -177,8 +181,8 @@ selector: "add:",
177
181
  category: 'adding/removing',
178
182
  fn: function (anObject){
179
183
  var self=this;
180
- smalltalk.send(self,"_subclassResponsibility",[]);
181
- return self},
184
+ return smalltalk.withContext(function($ctx1) {
185
+ return self}, function($ctx1) {$ctx1.fill(self,"add:",{anObject:anObject}, smalltalk.Collection)})},
182
186
  args: ["anObject"],
183
187
  source: "add: anObject\x0a\x09self subclassResponsibility",
184
188
  messageSends: ["subclassResponsibility"],
@@ -193,11 +197,13 @@ selector: "addAll:",
193
197
  category: 'adding/removing',
194
198
  fn: function (aCollection){
195
199
  var self=this;
196
- smalltalk.send(aCollection,"_do_",[(function(each){
197
- return smalltalk.send(self,"_add_",[each]);
198
- })]);
199
- return aCollection;
200
- },
200
+ return smalltalk.withContext(function($ctx1) {
201
+ _st(aCollection)._do_((function(each){
202
+ return smalltalk.withContext(function($ctx2) {
203
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
204
+ $1=aCollection;
205
+ return $1;
206
+ }, function($ctx1) {$ctx1.fill(self,"addAll:",{aCollection:aCollection}, smalltalk.Collection)})},
201
207
  args: ["aCollection"],
202
208
  source: "addAll: aCollection\x0a\x09aCollection do: [:each |\x0a\x09 self add: each].\x0a\x09^aCollection",
203
209
  messageSends: ["do:", "add:"],
@@ -212,10 +218,10 @@ selector: "asArray",
212
218
  category: 'converting',
213
219
  fn: function (){
214
220
  var self=this;
215
- var $1;
216
- $1=smalltalk.send((smalltalk.Array || Array),"_withAll_",[self]);
221
+ return smalltalk.withContext(function($ctx1) {
222
+ $1=_st((smalltalk.Array || Array))._withAll_(self);
217
223
  return $1;
218
- },
224
+ }, function($ctx1) {$ctx1.fill(self,"asArray",{}, smalltalk.Collection)})},
219
225
  args: [],
220
226
  source: "asArray\x0a\x09^Array withAll: self",
221
227
  messageSends: ["withAll:"],
@@ -230,12 +236,12 @@ selector: "asJSON",
230
236
  category: 'converting',
231
237
  fn: function (){
232
238
  var self=this;
233
- var $1;
234
- $1=smalltalk.send(smalltalk.send(self,"_asArray",[]),"_collect_",[(function(each){
235
- return smalltalk.send(each,"_asJSON",[]);
236
- })]);
239
+ return smalltalk.withContext(function($ctx1) {
240
+ $1=_st(_st(self)._asArray())._collect_((function(each){
241
+ return smalltalk.withContext(function($ctx2) {
242
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
237
243
  return $1;
238
- },
244
+ }, function($ctx1) {$ctx1.fill(self,"asJSON",{}, smalltalk.Collection)})},
239
245
  args: [],
240
246
  source: "asJSON\x0a\x09^self asArray collect: [:each | each asJSON]",
241
247
  messageSends: ["collect:", "asJSON", "asArray"],
@@ -250,10 +256,10 @@ selector: "asOrderedCollection",
250
256
  category: 'converting',
251
257
  fn: function (){
252
258
  var self=this;
253
- var $1;
254
- $1=smalltalk.send(self,"_asArray",[]);
259
+ return smalltalk.withContext(function($ctx1) {
260
+ $1=_st(self)._asArray();
255
261
  return $1;
256
- },
262
+ }, function($ctx1) {$ctx1.fill(self,"asOrderedCollection",{}, smalltalk.Collection)})},
257
263
  args: [],
258
264
  source: "asOrderedCollection\x0a\x09^self asArray",
259
265
  messageSends: ["asArray"],
@@ -268,10 +274,10 @@ selector: "asSet",
268
274
  category: 'converting',
269
275
  fn: function (){
270
276
  var self=this;
271
- var $1;
272
- $1=smalltalk.send((smalltalk.Set || Set),"_withAll_",[self]);
277
+ return smalltalk.withContext(function($ctx1) {
278
+ $1=_st((smalltalk.Set || Set))._withAll_(self);
273
279
  return $1;
274
- },
280
+ }, function($ctx1) {$ctx1.fill(self,"asSet",{}, smalltalk.Collection)})},
275
281
  args: [],
276
282
  source: "asSet\x0a\x09^Set withAll: self",
277
283
  messageSends: ["withAll:"],
@@ -286,15 +292,15 @@ selector: "collect:",
286
292
  category: 'enumerating',
287
293
  fn: function (aBlock){
288
294
  var self=this;
289
- var $1;
290
295
  var stream;
291
- stream=smalltalk.send(smalltalk.send(smalltalk.send(self,"_class",[]),"_new",[]),"_writeStream",[]);
292
- smalltalk.send(self,"_do_",[(function(each){
293
- return smalltalk.send(stream,"_nextPut_",[smalltalk.send(aBlock,"_value_",[each])]);
294
- })]);
295
- $1=smalltalk.send(stream,"_contents",[]);
296
+ return smalltalk.withContext(function($ctx1) {
297
+ stream=_st(_st(_st(self)._class())._new())._writeStream();
298
+ _st(self)._do_((function(each){
299
+ return smalltalk.withContext(function($ctx2) {
300
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
301
+ $1=_st(stream)._contents();
296
302
  return $1;
297
- },
303
+ }, function($ctx1) {$ctx1.fill(self,"collect:",{aBlock:aBlock,stream:stream}, smalltalk.Collection)})},
298
304
  args: ["aBlock"],
299
305
  source: "collect: aBlock\x0a\x09| stream |\x0a\x09stream := self class new writeStream.\x0a\x09self do: [ :each |\x0a\x09\x09stream nextPut: (aBlock value: each) ].\x0a\x09^stream contents",
300
306
  messageSends: ["writeStream", "new", "class", "do:", "nextPut:", "value:", "contents"],
@@ -309,13 +315,13 @@ selector: "copyWith:",
309
315
  category: 'copying',
310
316
  fn: function (anObject){
311
317
  var self=this;
312
- var $2,$3,$1;
313
- $2=smalltalk.send(self,"_copy",[]);
314
- smalltalk.send($2,"_add_",[anObject]);
315
- $3=smalltalk.send($2,"_yourself",[]);
318
+ return smalltalk.withContext(function($ctx1) {
319
+ $2=_st(self)._copy();
320
+ _st($2)._add_(anObject);
321
+ $3=_st($2)._yourself();
316
322
  $1=$3;
317
323
  return $1;
318
- },
324
+ }, function($ctx1) {$ctx1.fill(self,"copyWith:",{anObject:anObject}, smalltalk.Collection)})},
319
325
  args: ["anObject"],
320
326
  source: "copyWith: anObject\x0a\x09^self copy add: anObject; yourself",
321
327
  messageSends: ["add:", "copy", "yourself"],
@@ -330,13 +336,13 @@ selector: "copyWithAll:",
330
336
  category: 'copying',
331
337
  fn: function (aCollection){
332
338
  var self=this;
333
- var $2,$3,$1;
334
- $2=smalltalk.send(self,"_copy",[]);
335
- smalltalk.send($2,"_addAll_",[aCollection]);
336
- $3=smalltalk.send($2,"_yourself",[]);
339
+ return smalltalk.withContext(function($ctx1) {
340
+ $2=_st(self)._copy();
341
+ _st($2)._addAll_(aCollection);
342
+ $3=_st($2)._yourself();
337
343
  $1=$3;
338
344
  return $1;
339
- },
345
+ }, function($ctx1) {$ctx1.fill(self,"copyWithAll:",{aCollection:aCollection}, smalltalk.Collection)})},
340
346
  args: ["aCollection"],
341
347
  source: "copyWithAll: aCollection\x0a\x09^self copy addAll: aCollection; yourself",
342
348
  messageSends: ["addAll:", "copy", "yourself"],
@@ -351,12 +357,12 @@ selector: "copyWithoutAll:",
351
357
  category: 'copying',
352
358
  fn: function (aCollection){
353
359
  var self=this;
354
- var $1;
355
- $1=smalltalk.send(self,"_reject_",[(function(each){
356
- return smalltalk.send(aCollection,"_includes_",[each]);
357
- })]);
360
+ return smalltalk.withContext(function($ctx1) {
361
+ $1=_st(self)._reject_((function(each){
362
+ return smalltalk.withContext(function($ctx2) {
363
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
358
364
  return $1;
359
- },
365
+ }, function($ctx1) {$ctx1.fill(self,"copyWithoutAll:",{aCollection:aCollection}, smalltalk.Collection)})},
360
366
  args: ["aCollection"],
361
367
  source: "copyWithoutAll: aCollection\x0a\x09\x22Answer a copy of the receiver that does not contain any elements \x0a\x09equal to those in aCollection.\x22\x0a\x0a\x09^ self reject: [:each | aCollection includes: each]",
362
368
  messageSends: ["reject:", "includes:"],
@@ -371,12 +377,12 @@ selector: "detect:",
371
377
  category: 'enumerating',
372
378
  fn: function (aBlock){
373
379
  var self=this;
374
- var $1;
375
- $1=smalltalk.send(self,"_detect_ifNone_",[aBlock,(function(){
376
- return smalltalk.send(self,"_errorNotFound",[]);
377
- })]);
380
+ return smalltalk.withContext(function($ctx1) {
381
+ $1=_st(self)._detect_ifNone_(aBlock,(function(){
382
+ return smalltalk.withContext(function($ctx2) {
383
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
378
384
  return $1;
379
- },
385
+ }, function($ctx1) {$ctx1.fill(self,"detect:",{aBlock:aBlock}, smalltalk.Collection)})},
380
386
  args: ["aBlock"],
381
387
  source: "detect: aBlock\x0a\x09^self detect: aBlock ifNone: [self errorNotFound]",
382
388
  messageSends: ["detect:ifNone:", "errorNotFound"],
@@ -391,14 +397,13 @@ selector: "detect:ifNone:",
391
397
  category: 'enumerating',
392
398
  fn: function (aBlock,anotherBlock){
393
399
  var self=this;
394
-
400
+ return smalltalk.withContext(function($ctx1) {
395
401
  for(var i = 0; i < self.length; i++)
396
402
  if(aBlock(self[i]))
397
403
  return self[i];
398
404
  return anotherBlock();
399
405
  ;
400
- ;
401
- return self},
406
+ return self}, function($ctx1) {$ctx1.fill(self,"detect:ifNone:",{aBlock:aBlock,anotherBlock:anotherBlock}, smalltalk.Collection)})},
402
407
  args: ["aBlock", "anotherBlock"],
403
408
  source: "detect: aBlock ifNone: anotherBlock\x0a\x09<\x0a\x09\x09for(var i = 0; i < self.length; i++)\x0a\x09\x09\x09if(aBlock(self[i]))\x0a\x09\x09\x09\x09return self[i];\x0a\x09\x09return anotherBlock();\x0a\x09>",
404
409
  messageSends: [],
@@ -413,9 +418,8 @@ selector: "do:",
413
418
  category: 'enumerating',
414
419
  fn: function (aBlock){
415
420
  var self=this;
416
- for(var i=0;i<self.length;i++){aBlock(self[i]);};
417
- ;
418
- return self},
421
+ return smalltalk.withContext(function($ctx1) {
422
+ return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock}, smalltalk.Collection)})},
419
423
  args: ["aBlock"],
420
424
  source: "do: aBlock\x0a\x09<for(var i=0;i<self.length;i++){aBlock(self[i]);}>",
421
425
  messageSends: [],
@@ -431,17 +435,21 @@ category: 'enumerating',
431
435
  fn: function (aBlock,anotherBlock){
432
436
  var self=this;
433
437
  var first;
438
+ return smalltalk.withContext(function($ctx1) {
434
439
  first=true;
435
- smalltalk.send(self,"_do_",[(function(each){
436
- if(smalltalk.assert(first)){
440
+ $1=self;
441
+ $2=(function(each){
442
+ return smalltalk.withContext(function($ctx2) {
443
+ if(smalltalk.assert($3)){
437
444
  first=false;
438
445
  first;
439
446
  } else {
440
- smalltalk.send(anotherBlock,"_value",[]);
447
+ _st(anotherBlock)._value();
441
448
  };
442
- return smalltalk.send(aBlock,"_value_",[each]);
443
- })]);
444
- return self},
449
+ return _st(aBlock)._value_(each);
450
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
451
+ _st($1)._do_($2);
452
+ return self}, function($ctx1) {$ctx1.fill(self,"do:separatedBy:",{aBlock:aBlock,anotherBlock:anotherBlock,first:first}, smalltalk.Collection)})},
445
453
  args: ["aBlock", "anotherBlock"],
446
454
  source: "do: aBlock separatedBy: anotherBlock\x0a\x09| first |\x0a\x09first := true.\x0a\x09self do: [:each |\x0a\x09 first\x0a\x09\x09ifTrue: [first := false]\x0a\x09\x09ifFalse: [anotherBlock value].\x0a\x09 aBlock value: each]",
447
455
  messageSends: ["do:", "ifTrue:ifFalse:", "value", "value:"],
@@ -456,8 +464,8 @@ selector: "errorNotFound",
456
464
  category: 'error handling',
457
465
  fn: function (){
458
466
  var self=this;
459
- smalltalk.send(self,"_error_",["Object is not in the collection"]);
460
- return self},
467
+ return smalltalk.withContext(function($ctx1) {
468
+ return self}, function($ctx1) {$ctx1.fill(self,"errorNotFound",{}, smalltalk.Collection)})},
461
469
  args: [],
462
470
  source: "errorNotFound\x0a\x09self error: 'Object is not in the collection'",
463
471
  messageSends: ["error:"],
@@ -472,15 +480,15 @@ selector: "ifEmpty:",
472
480
  category: 'testing',
473
481
  fn: function (aBlock){
474
482
  var self=this;
475
- var $2,$1;
476
- $2=smalltalk.send(self,"_isEmpty",[]);
483
+ return smalltalk.withContext(function($ctx1) {
484
+ $2=_st(self)._isEmpty();
477
485
  if(smalltalk.assert($2)){
478
- $1=smalltalk.send(aBlock,"_value",[]);
486
+ $1=_st(aBlock)._value();
479
487
  } else {
480
488
  $1=self;
481
489
  };
482
490
  return $1;
483
- },
491
+ }, function($ctx1) {$ctx1.fill(self,"ifEmpty:",{aBlock:aBlock}, smalltalk.Collection)})},
484
492
  args: ["aBlock"],
485
493
  source: "ifEmpty: aBlock\x0a\x09\x22Evaluate the given block with the receiver as argument, answering its value if the receiver is empty, otherwise answer the receiver. Note that the fact that this method returns its argument in case the receiver is not empty allows one to write expressions like the following ones: self classifyMethodAs: \x0a\x09\x09(myProtocol ifEmpty: ['As yet unclassified'])\x22\x0a\x09^ self isEmpty \x0a\x09\x09ifTrue: [ aBlock value ]\x0a\x09\x09ifFalse: [ self ]",
486
494
  messageSends: ["ifTrue:ifFalse:", "value", "isEmpty"],
@@ -495,10 +503,10 @@ selector: "ifNotEmpty:",
495
503
  category: 'testing',
496
504
  fn: function (aBlock){
497
505
  var self=this;
498
- var $1;
499
- $1=smalltalk.send(self,"_notEmpty",[]);
500
- smalltalk.send($1,"_ifTrue_",[aBlock]);
501
- return self},
506
+ return smalltalk.withContext(function($ctx1) {
507
+ $1=_st(self)._notEmpty();
508
+ _st($1)._ifTrue_(aBlock);
509
+ return self}, function($ctx1) {$ctx1.fill(self,"ifNotEmpty:",{aBlock:aBlock}, smalltalk.Collection)})},
502
510
  args: ["aBlock"],
503
511
  source: "ifNotEmpty: aBlock\x0a\x09self notEmpty ifTrue: aBlock.",
504
512
  messageSends: ["ifTrue:", "notEmpty"],
@@ -513,19 +521,20 @@ selector: "includes:",
513
521
  category: 'testing',
514
522
  fn: function (anObject){
515
523
  var self=this;
516
-
517
- var i = self.length;
518
- while (i--) {
519
- if (smalltalk.send(self[i], "__eq", [anObject])) {return true;}
520
- }
521
- return false
522
- ;
523
- ;
524
- return self},
524
+ var sentinel;
525
+ return smalltalk.withContext(function($ctx1) {
526
+ sentinel=_st((smalltalk.Object || Object))._new();
527
+ $1=_st(_st(self)._detect_ifNone_((function(each){
528
+ return smalltalk.withContext(function($ctx2) {
529
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
530
+ return smalltalk.withContext(function($ctx2) {
531
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))).__tild_eq(sentinel);
532
+ return $1;
533
+ }, function($ctx1) {$ctx1.fill(self,"includes:",{anObject:anObject,sentinel:sentinel}, smalltalk.Collection)})},
525
534
  args: ["anObject"],
526
- source: "includes: anObject\x0a\x09<\x0a\x09\x09var i = self.length;\x0a\x09\x09while (i--) {\x0a\x09\x09\x09if (smalltalk.send(self[i], \x22__eq\x22, [anObject])) {return true;}\x09\x0a\x09\x09}\x0a\x09\x09return false\x0a\x09>",
527
- messageSends: [],
528
- referencedClasses: []
535
+ source: "includes: anObject\x0a\x09| sentinel |\x0a sentinel := Object new.\x0a ^(self detect: [ :each | each = anObject] ifNone: [ sentinel ]) ~= sentinel",
536
+ messageSends: ["new", "~=", "detect:ifNone:", "="],
537
+ referencedClasses: ["Object"]
529
538
  }),
530
539
  smalltalk.Collection);
531
540
 
@@ -537,13 +546,15 @@ category: 'enumerating',
537
546
  fn: function (anObject,aBlock){
538
547
  var self=this;
539
548
  var result;
549
+ return smalltalk.withContext(function($ctx1) {
540
550
  result=anObject;
541
- smalltalk.send(self,"_do_",[(function(each){
542
- result=smalltalk.send(aBlock,"_value_value_",[result,each]);
551
+ _st(self)._do_((function(each){
552
+ return smalltalk.withContext(function($ctx2) {
543
553
  return result;
544
- })]);
545
- return result;
546
- },
554
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
555
+ $1=result;
556
+ return $1;
557
+ }, function($ctx1) {$ctx1.fill(self,"inject:into:",{anObject:anObject,aBlock:aBlock,result:result}, smalltalk.Collection)})},
547
558
  args: ["anObject", "aBlock"],
548
559
  source: "inject: anObject into: aBlock\x0a\x09| result |\x0a\x09result := anObject.\x0a\x09self do: [:each | \x0a\x09 result := aBlock value: result value: each].\x0a\x09^result",
549
560
  messageSends: ["do:", "value:value:"],
@@ -558,22 +569,23 @@ selector: "intersection:",
558
569
  category: 'enumerating',
559
570
  fn: function (aCollection){
560
571
  var self=this;
561
- var $1,$2;
562
- var set;
563
- var outputSet;
564
- set=smalltalk.send(self,"_asSet",[]);
565
- outputSet=smalltalk.send((smalltalk.Set || Set),"_new",[]);
566
- smalltalk.send(aCollection,"_do_",[(function(each){
567
- $1=smalltalk.send(smalltalk.send(set,"_includes_",[each]),"_and_",[(function(){
568
- return smalltalk.send(smalltalk.send(outputSet,"_includes_",[each]),"_not",[]);
569
- })]);
570
- if(smalltalk.assert($1)){
571
- return smalltalk.send(outputSet,"_add_",[each]);
572
+ var set,outputSet;
573
+ return smalltalk.withContext(function($ctx1) {
574
+ set=_st(self)._asSet();
575
+ outputSet=_st((smalltalk.Set || Set))._new();
576
+ $1=aCollection;
577
+ $2=(function(each){
578
+ return smalltalk.withContext(function($ctx2) {
579
+ return smalltalk.withContext(function($ctx3) {
580
+ }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
581
+ if(smalltalk.assert($3)){
582
+ return _st(outputSet)._add_(each);
572
583
  };
573
- })]);
574
- $2=smalltalk.send(smalltalk.send(self,"_class",[]),"_withAll_",[smalltalk.send(outputSet,"_asArray",[])]);
575
- return $2;
576
- },
584
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
585
+ _st($1)._do_($2);
586
+ $4=_st(_st(self)._class())._withAll_(_st(outputSet)._asArray());
587
+ return $4;
588
+ }, function($ctx1) {$ctx1.fill(self,"intersection:",{aCollection:aCollection,set:set,outputSet:outputSet}, smalltalk.Collection)})},
577
589
  args: ["aCollection"],
578
590
  source: "intersection: aCollection\x0a\x09\x22Answer the set theoretic intersection of two collections.\x22\x0a\x0a\x09| set outputSet |\x0a\x09\x0a\x09set := self asSet.\x0a\x09outputSet := Set new.\x0a\x09\x0a\x09aCollection do: [ :each |\x0a\x09\x09((set includes: each) and: [(outputSet includes: each) not])\x0a\x09\x09\x09ifTrue: [ \x0a\x09\x09\x09\x09outputSet add: each]].\x0a\x09\x09\x0a\x09^ self class withAll: outputSet asArray",
579
591
  messageSends: ["asSet", "new", "do:", "ifTrue:", "add:", "and:", "not", "includes:", "withAll:", "asArray", "class"],
@@ -588,10 +600,10 @@ selector: "isEmpty",
588
600
  category: 'testing',
589
601
  fn: function (){
590
602
  var self=this;
591
- var $1;
592
- $1=smalltalk.send(smalltalk.send(self,"_size",[]),"__eq",[(0)]);
603
+ return smalltalk.withContext(function($ctx1) {
604
+ $1=_st(_st(self)._size()).__eq((0));
593
605
  return $1;
594
- },
606
+ }, function($ctx1) {$ctx1.fill(self,"isEmpty",{}, smalltalk.Collection)})},
595
607
  args: [],
596
608
  source: "isEmpty\x0a\x09^self size = 0",
597
609
  messageSends: ["=", "size"],
@@ -606,10 +618,10 @@ selector: "notEmpty",
606
618
  category: 'testing',
607
619
  fn: function (){
608
620
  var self=this;
609
- var $1;
610
- $1=smalltalk.send(smalltalk.send(self,"_isEmpty",[]),"_not",[]);
621
+ return smalltalk.withContext(function($ctx1) {
622
+ $1=_st(_st(self)._isEmpty())._not();
611
623
  return $1;
612
- },
624
+ }, function($ctx1) {$ctx1.fill(self,"notEmpty",{}, smalltalk.Collection)})},
613
625
  args: [],
614
626
  source: "notEmpty\x0a\x09^self isEmpty not",
615
627
  messageSends: ["not", "isEmpty"],
@@ -624,18 +636,21 @@ selector: "occurrencesOf:",
624
636
  category: 'accessing',
625
637
  fn: function (anObject){
626
638
  var self=this;
627
- var $1;
628
639
  var tally;
640
+ return smalltalk.withContext(function($ctx1) {
629
641
  tally=(0);
630
- smalltalk.send(self,"_do_",[(function(each){
631
- $1=smalltalk.send(anObject,"__eq",[each]);
632
- if(smalltalk.assert($1)){
633
- tally=smalltalk.send(tally,"__plus",[(1)]);
642
+ $1=self;
643
+ $2=(function(each){
644
+ return smalltalk.withContext(function($ctx2) {
645
+ if(smalltalk.assert($3)){
646
+ tally=_st(tally).__plus((1));
634
647
  return tally;
635
648
  };
636
- })]);
637
- return tally;
638
- },
649
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
650
+ _st($1)._do_($2);
651
+ $4=tally;
652
+ return $4;
653
+ }, function($ctx1) {$ctx1.fill(self,"occurrencesOf:",{anObject:anObject,tally:tally}, smalltalk.Collection)})},
639
654
  args: ["anObject"],
640
655
  source: "occurrencesOf: anObject \x0a\x09\x22Answer how many of the receiver's elements are equal to anObject.\x22\x0a\x0a\x09| tally |\x0a\x09tally := 0.\x0a\x09self do: [:each | anObject = each ifTrue: [tally := tally + 1]].\x0a\x09^tally",
641
656
  messageSends: ["do:", "ifTrue:", "+", "="],
@@ -650,18 +665,18 @@ selector: "printString",
650
665
  category: 'printing',
651
666
  fn: function (){
652
667
  var self=this;
653
- var $1;
654
- $1=smalltalk.send((smalltalk.String || String),"_streamContents_",[(function(aStream){
655
- smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(self,"_printString",[],smalltalk.Object),"__comma",[" ("])]);
656
- smalltalk.send(self,"_do_separatedBy_",[(function(each){
657
- return smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(each,"_printString",[])]);
658
- }),(function(){
659
- return smalltalk.send(aStream,"_nextPutAll_",[" "]);
660
- })]);
661
- return smalltalk.send(aStream,"_nextPutAll_",[")"]);
662
- })]);
663
- return $1;
664
- },
668
+ return smalltalk.withContext(function($ctx1) {
669
+ $1=_st((smalltalk.String || String))._streamContents_((function(aStream){
670
+ return smalltalk.withContext(function($ctx2) {
671
+ _st(self)._do_separatedBy_((function(each){
672
+ return smalltalk.withContext(function($ctx3) {
673
+ }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}),(function(){
674
+ return smalltalk.withContext(function($ctx3) {
675
+ }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
676
+ return _st(aStream)._nextPutAll_(")");
677
+ }, function($ctx2) {$ctx2.fillBlock({aStream:aStream},$ctx1)})}));
678
+ return $1;
679
+ }, function($ctx1) {$ctx1.fill(self,"printString",{}, smalltalk.Collection)})},
665
680
  args: [],
666
681
  source: "printString\x0a\x09\x22print the contents of the Collection into a string and return it\x22\x0a\x09^String streamContents: [:aStream |\x0a\x09\x09aStream\x0a\x09\x09\x09nextPutAll: super printString, ' ('.\x0a\x09\x09self do: [:each | aStream nextPutAll: each printString]\x0a\x09\x09\x09separatedBy: [aStream nextPutAll: ' '].\x0a\x09\x09aStream nextPutAll: ')']",
667
682
  messageSends: ["streamContents:", "nextPutAll:", ",", "printString", "do:separatedBy:"],
@@ -676,10 +691,10 @@ selector: "readStream",
676
691
  category: 'accessing',
677
692
  fn: function (){
678
693
  var self=this;
679
- var $1;
680
- $1=smalltalk.send(self,"_stream",[]);
694
+ return smalltalk.withContext(function($ctx1) {
695
+ $1=_st(self)._stream();
681
696
  return $1;
682
- },
697
+ }, function($ctx1) {$ctx1.fill(self,"readStream",{}, smalltalk.Collection)})},
683
698
  args: [],
684
699
  source: "readStream\x0a\x09^self stream",
685
700
  messageSends: ["stream"],
@@ -694,12 +709,12 @@ selector: "reject:",
694
709
  category: 'enumerating',
695
710
  fn: function (aBlock){
696
711
  var self=this;
697
- var $1;
698
- $1=smalltalk.send(self,"_select_",[(function(each){
699
- return smalltalk.send(smalltalk.send(aBlock,"_value_",[each]),"__eq",[false]);
700
- })]);
712
+ return smalltalk.withContext(function($ctx1) {
713
+ $1=_st(self)._select_((function(each){
714
+ return smalltalk.withContext(function($ctx2) {
715
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
701
716
  return $1;
702
- },
717
+ }, function($ctx1) {$ctx1.fill(self,"reject:",{aBlock:aBlock}, smalltalk.Collection)})},
703
718
  args: ["aBlock"],
704
719
  source: "reject: aBlock\x0a\x09^self select: [:each | (aBlock value: each) = false]",
705
720
  messageSends: ["select:", "=", "value:"],
@@ -714,12 +729,12 @@ selector: "remove:",
714
729
  category: 'adding/removing',
715
730
  fn: function (anObject){
716
731
  var self=this;
717
- var $1;
718
- $1=smalltalk.send(self,"_remove_ifAbsent_",[anObject,(function(){
719
- return smalltalk.send(self,"_errorNotFound",[]);
720
- })]);
732
+ return smalltalk.withContext(function($ctx1) {
733
+ $1=_st(self)._remove_ifAbsent_(anObject,(function(){
734
+ return smalltalk.withContext(function($ctx2) {
735
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
721
736
  return $1;
722
- },
737
+ }, function($ctx1) {$ctx1.fill(self,"remove:",{anObject:anObject}, smalltalk.Collection)})},
723
738
  args: ["anObject"],
724
739
  source: "remove: anObject\x0a ^self remove: anObject ifAbsent: [self errorNotFound]",
725
740
  messageSends: ["remove:ifAbsent:", "errorNotFound"],
@@ -734,8 +749,8 @@ selector: "remove:ifAbsent:",
734
749
  category: 'adding/removing',
735
750
  fn: function (anObject,aBlock){
736
751
  var self=this;
737
- smalltalk.send(self,"_subclassResponsibility",[]);
738
- return self},
752
+ return smalltalk.withContext(function($ctx1) {
753
+ return self}, function($ctx1) {$ctx1.fill(self,"remove:ifAbsent:",{anObject:anObject,aBlock:aBlock}, smalltalk.Collection)})},
739
754
  args: ["anObject", "aBlock"],
740
755
  source: "remove: anObject ifAbsent: aBlock\x0a self subclassResponsibility",
741
756
  messageSends: ["subclassResponsibility"],
@@ -750,18 +765,20 @@ selector: "select:",
750
765
  category: 'enumerating',
751
766
  fn: function (aBlock){
752
767
  var self=this;
753
- var $1,$2;
754
768
  var stream;
755
- stream=smalltalk.send(smalltalk.send(smalltalk.send(self,"_class",[]),"_new",[]),"_writeStream",[]);
756
- smalltalk.send(self,"_do_",[(function(each){
757
- $1=smalltalk.send(aBlock,"_value_",[each]);
758
- if(smalltalk.assert($1)){
759
- return smalltalk.send(stream,"_nextPut_",[each]);
769
+ return smalltalk.withContext(function($ctx1) {
770
+ stream=_st(_st(_st(self)._class())._new())._writeStream();
771
+ $1=self;
772
+ $2=(function(each){
773
+ return smalltalk.withContext(function($ctx2) {
774
+ if(smalltalk.assert($3)){
775
+ return _st(stream)._nextPut_(each);
760
776
  };
761
- })]);
762
- $2=smalltalk.send(stream,"_contents",[]);
763
- return $2;
764
- },
777
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
778
+ _st($1)._do_($2);
779
+ $4=_st(stream)._contents();
780
+ return $4;
781
+ }, function($ctx1) {$ctx1.fill(self,"select:",{aBlock:aBlock,stream:stream}, smalltalk.Collection)})},
765
782
  args: ["aBlock"],
766
783
  source: "select: aBlock\x0a\x09| stream |\x0a\x09stream := self class new writeStream.\x0a\x09self do: [:each |\x0a\x09 (aBlock value: each) ifTrue: [\x0a\x09\x09stream nextPut: each]].\x0a\x09^stream contents",
767
784
  messageSends: ["writeStream", "new", "class", "do:", "ifTrue:", "nextPut:", "value:", "contents"],
@@ -776,8 +793,8 @@ selector: "size",
776
793
  category: 'accessing',
777
794
  fn: function (){
778
795
  var self=this;
779
- smalltalk.send(self,"_subclassResponsibility",[]);
780
- return self},
796
+ return smalltalk.withContext(function($ctx1) {
797
+ return self}, function($ctx1) {$ctx1.fill(self,"size",{}, smalltalk.Collection)})},
781
798
  args: [],
782
799
  source: "size\x0a\x09self subclassResponsibility",
783
800
  messageSends: ["subclassResponsibility"],
@@ -792,10 +809,10 @@ selector: "stream",
792
809
  category: 'accessing',
793
810
  fn: function (){
794
811
  var self=this;
795
- var $1;
796
- $1=smalltalk.send(smalltalk.send(self,"_streamClass",[]),"_on_",[self]);
812
+ return smalltalk.withContext(function($ctx1) {
813
+ $1=_st(_st(self)._streamClass())._on_(self);
797
814
  return $1;
798
- },
815
+ }, function($ctx1) {$ctx1.fill(self,"stream",{}, smalltalk.Collection)})},
799
816
  args: [],
800
817
  source: "stream\x0a\x09^self streamClass on: self",
801
818
  messageSends: ["on:", "streamClass"],
@@ -810,10 +827,10 @@ selector: "streamClass",
810
827
  category: 'accessing',
811
828
  fn: function (){
812
829
  var self=this;
813
- var $1;
814
- $1=smalltalk.send(smalltalk.send(self,"_class",[]),"_streamClass",[]);
830
+ return smalltalk.withContext(function($ctx1) {
831
+ $1=_st(_st(self)._class())._streamClass();
815
832
  return $1;
816
- },
833
+ }, function($ctx1) {$ctx1.fill(self,"streamClass",{}, smalltalk.Collection)})},
817
834
  args: [],
818
835
  source: "streamClass\x0a\x09^self class streamClass",
819
836
  messageSends: ["streamClass", "class"],
@@ -828,10 +845,10 @@ selector: "writeStream",
828
845
  category: 'accessing',
829
846
  fn: function (){
830
847
  var self=this;
831
- var $1;
832
- $1=smalltalk.send(self,"_stream",[]);
848
+ return smalltalk.withContext(function($ctx1) {
849
+ $1=_st(self)._stream();
833
850
  return $1;
834
- },
851
+ }, function($ctx1) {$ctx1.fill(self,"writeStream",{}, smalltalk.Collection)})},
835
852
  args: [],
836
853
  source: "writeStream\x0a\x09^self stream",
837
854
  messageSends: ["stream"],
@@ -847,10 +864,10 @@ selector: "new:",
847
864
  category: 'instance creation',
848
865
  fn: function (anInteger){
849
866
  var self=this;
850
- var $1;
851
- $1=smalltalk.send(self,"_new",[]);
867
+ return smalltalk.withContext(function($ctx1) {
868
+ $1=_st(self)._new();
852
869
  return $1;
853
- },
870
+ }, function($ctx1) {$ctx1.fill(self,"new:",{anInteger:anInteger}, smalltalk.Collection.klass)})},
854
871
  args: ["anInteger"],
855
872
  source: "new: anInteger\x0a\x09^self new",
856
873
  messageSends: ["new"],
@@ -865,8 +882,10 @@ selector: "streamClass",
865
882
  category: 'accessing',
866
883
  fn: function (){
867
884
  var self=this;
868
- return (smalltalk.Stream || Stream);
869
- },
885
+ return smalltalk.withContext(function($ctx1) {
886
+ $1=(smalltalk.Stream || Stream);
887
+ return $1;
888
+ }, function($ctx1) {$ctx1.fill(self,"streamClass",{}, smalltalk.Collection.klass)})},
870
889
  args: [],
871
890
  source: "streamClass\x0a\x09 ^Stream",
872
891
  messageSends: [],
@@ -881,13 +900,13 @@ selector: "with:",
881
900
  category: 'instance creation',
882
901
  fn: function (anObject){
883
902
  var self=this;
884
- var $2,$3,$1;
885
- $2=smalltalk.send(self,"_new",[]);
886
- smalltalk.send($2,"_add_",[anObject]);
887
- $3=smalltalk.send($2,"_yourself",[]);
903
+ return smalltalk.withContext(function($ctx1) {
904
+ $2=_st(self)._new();
905
+ _st($2)._add_(anObject);
906
+ $3=_st($2)._yourself();
888
907
  $1=$3;
889
908
  return $1;
890
- },
909
+ }, function($ctx1) {$ctx1.fill(self,"with:",{anObject:anObject}, smalltalk.Collection.klass)})},
891
910
  args: ["anObject"],
892
911
  source: "with: anObject\x0a\x09 ^self new\x0a\x09\x09add: anObject;\x0a\x09\x09yourself",
893
912
  messageSends: ["add:", "new", "yourself"],
@@ -902,14 +921,14 @@ selector: "with:with:",
902
921
  category: 'instance creation',
903
922
  fn: function (anObject,anotherObject){
904
923
  var self=this;
905
- var $2,$3,$1;
906
- $2=smalltalk.send(self,"_new",[]);
907
- smalltalk.send($2,"_add_",[anObject]);
908
- smalltalk.send($2,"_add_",[anotherObject]);
909
- $3=smalltalk.send($2,"_yourself",[]);
924
+ return smalltalk.withContext(function($ctx1) {
925
+ $2=_st(self)._new();
926
+ _st($2)._add_(anObject);
927
+ _st($2)._add_(anotherObject);
928
+ $3=_st($2)._yourself();
910
929
  $1=$3;
911
930
  return $1;
912
- },
931
+ }, function($ctx1) {$ctx1.fill(self,"with:with:",{anObject:anObject,anotherObject:anotherObject}, smalltalk.Collection.klass)})},
913
932
  args: ["anObject", "anotherObject"],
914
933
  source: "with: anObject with: anotherObject\x0a\x09 ^self new\x0a\x09\x09add: anObject;\x0a\x09\x09add: anotherObject;\x0a\x09\x09yourself",
915
934
  messageSends: ["add:", "new", "yourself"],
@@ -924,15 +943,15 @@ selector: "with:with:with:",
924
943
  category: 'instance creation',
925
944
  fn: function (firstObject,secondObject,thirdObject){
926
945
  var self=this;
927
- var $2,$3,$1;
928
- $2=smalltalk.send(self,"_new",[]);
929
- smalltalk.send($2,"_add_",[firstObject]);
930
- smalltalk.send($2,"_add_",[secondObject]);
931
- smalltalk.send($2,"_add_",[thirdObject]);
932
- $3=smalltalk.send($2,"_yourself",[]);
946
+ return smalltalk.withContext(function($ctx1) {
947
+ $2=_st(self)._new();
948
+ _st($2)._add_(firstObject);
949
+ _st($2)._add_(secondObject);
950
+ _st($2)._add_(thirdObject);
951
+ $3=_st($2)._yourself();
933
952
  $1=$3;
934
953
  return $1;
935
- },
954
+ }, function($ctx1) {$ctx1.fill(self,"with:with:with:",{firstObject:firstObject,secondObject:secondObject,thirdObject:thirdObject}, smalltalk.Collection.klass)})},
936
955
  args: ["firstObject", "secondObject", "thirdObject"],
937
956
  source: "with: firstObject with: secondObject with: thirdObject\x0a\x09 ^self new\x0a\x09\x09add: firstObject;\x0a\x09\x09add: secondObject;\x0a\x09\x09add: thirdObject;\x0a\x09\x09yourself",
938
957
  messageSends: ["add:", "new", "yourself"],
@@ -947,13 +966,13 @@ selector: "withAll:",
947
966
  category: 'instance creation',
948
967
  fn: function (aCollection){
949
968
  var self=this;
950
- var $2,$3,$1;
951
- $2=smalltalk.send(self,"_new",[]);
952
- smalltalk.send($2,"_addAll_",[aCollection]);
953
- $3=smalltalk.send($2,"_yourself",[]);
969
+ return smalltalk.withContext(function($ctx1) {
970
+ $2=_st(self)._new();
971
+ _st($2)._addAll_(aCollection);
972
+ $3=_st($2)._yourself();
954
973
  $1=$3;
955
974
  return $1;
956
- },
975
+ }, function($ctx1) {$ctx1.fill(self,"withAll:",{aCollection:aCollection}, smalltalk.Collection.klass)})},
957
976
  args: ["aCollection"],
958
977
  source: "withAll: aCollection\x0a\x09 ^self new\x0a\x09\x09addAll: aCollection;\x0a\x09\x09yourself",
959
978
  messageSends: ["addAll:", "new", "yourself"],
@@ -971,8 +990,8 @@ selector: ",",
971
990
  category: 'copying',
972
991
  fn: function (aCollection){
973
992
  var self=this;
974
- smalltalk.send(self,"_shouldNotImplement",[]);
975
- return self},
993
+ return smalltalk.withContext(function($ctx1) {
994
+ return self}, function($ctx1) {$ctx1.fill(self,",",{aCollection:aCollection}, smalltalk.HashedCollection)})},
976
995
  args: ["aCollection"],
977
996
  source: ", aCollection\x0a\x09self shouldNotImplement",
978
997
  messageSends: ["shouldNotImplement"],
@@ -987,18 +1006,18 @@ selector: "=",
987
1006
  category: 'comparing',
988
1007
  fn: function (aHashedCollection){
989
1008
  var self=this;
990
- var $1,$2,$3;
991
- $1=smalltalk.send(smalltalk.send(self,"_class",[]),"__eq",[smalltalk.send(aHashedCollection,"_class",[])]);
1009
+ return smalltalk.withContext(function($ctx1) {
1010
+ $1=_st(_st(self)._class()).__eq(_st(aHashedCollection)._class());
992
1011
  if(! smalltalk.assert($1)){
993
1012
  return false;
994
1013
  };
995
- $2=smalltalk.send(smalltalk.send(self,"_size",[]),"__eq",[smalltalk.send(aHashedCollection,"_size",[])]);
1014
+ $2=_st(_st(self)._size()).__eq(_st(aHashedCollection)._size());
996
1015
  if(! smalltalk.assert($2)){
997
1016
  return false;
998
1017
  };
999
- $3=smalltalk.send(smalltalk.send(self,"_associations",[]),"__eq",[smalltalk.send(aHashedCollection,"_associations",[])]);
1018
+ $3=_st(_st(self)._associations()).__eq(_st(aHashedCollection)._associations());
1000
1019
  return $3;
1001
- },
1020
+ }, function($ctx1) {$ctx1.fill(self,"=",{aHashedCollection:aHashedCollection}, smalltalk.HashedCollection)})},
1002
1021
  args: ["aHashedCollection"],
1003
1022
  source: "= aHashedCollection\x0a\x09self class = aHashedCollection class ifFalse: [^false].\x0a\x09self size = aHashedCollection size ifFalse: [^false].\x0a\x09^self associations = aHashedCollection associations",
1004
1023
  messageSends: ["ifFalse:", "=", "class", "size", "associations"],
@@ -1013,8 +1032,8 @@ selector: "add:",
1013
1032
  category: 'adding/removing',
1014
1033
  fn: function (anAssociation){
1015
1034
  var self=this;
1016
- smalltalk.send(self,"_at_put_",[smalltalk.send(anAssociation,"_key",[]),smalltalk.send(anAssociation,"_value",[])]);
1017
- return self},
1035
+ return smalltalk.withContext(function($ctx1) {
1036
+ return self}, function($ctx1) {$ctx1.fill(self,"add:",{anAssociation:anAssociation}, smalltalk.HashedCollection)})},
1018
1037
  args: ["anAssociation"],
1019
1038
  source: "add: anAssociation\x0a\x09self at: anAssociation key put: anAssociation value",
1020
1039
  messageSends: ["at:put:", "key", "value"],
@@ -1029,9 +1048,11 @@ selector: "addAll:",
1029
1048
  category: 'adding/removing',
1030
1049
  fn: function (aHashedCollection){
1031
1050
  var self=this;
1032
- smalltalk.send(self,"_addAll_",[smalltalk.send(aHashedCollection,"_associations",[])],smalltalk.Collection);
1033
- return aHashedCollection;
1034
- },
1051
+ return smalltalk.withContext(function($ctx1) {
1052
+ smalltalk.Collection.fn.prototype._addAll_.apply(_st(self), [_st(aHashedCollection)._associations()]);
1053
+ $1=aHashedCollection;
1054
+ return $1;
1055
+ }, function($ctx1) {$ctx1.fill(self,"addAll:",{aHashedCollection:aHashedCollection}, smalltalk.HashedCollection)})},
1035
1056
  args: ["aHashedCollection"],
1036
1057
  source: "addAll: aHashedCollection\x0a\x09super addAll: aHashedCollection associations.\x0a\x09^aHashedCollection",
1037
1058
  messageSends: ["addAll:", "associations"],
@@ -1046,10 +1067,10 @@ selector: "asDictionary",
1046
1067
  category: 'converting',
1047
1068
  fn: function (){
1048
1069
  var self=this;
1049
- var $1;
1050
- $1=smalltalk.send((smalltalk.Dictionary || Dictionary),"_fromPairs_",[smalltalk.send(self,"_associations",[])]);
1070
+ return smalltalk.withContext(function($ctx1) {
1071
+ $1=_st((smalltalk.Dictionary || Dictionary))._fromPairs_(_st(self)._associations());
1051
1072
  return $1;
1052
- },
1073
+ }, function($ctx1) {$ctx1.fill(self,"asDictionary",{}, smalltalk.HashedCollection)})},
1053
1074
  args: [],
1054
1075
  source: "asDictionary\x0a\x09^Dictionary fromPairs: self associations",
1055
1076
  messageSends: ["fromPairs:", "associations"],
@@ -1065,12 +1086,14 @@ category: 'converting',
1065
1086
  fn: function (){
1066
1087
  var self=this;
1067
1088
  var c;
1068
- c=smalltalk.send(smalltalk.send(self,"_class",[]),"_new",[]);
1069
- smalltalk.send(self,"_keysAndValuesDo_",[(function(key,value){
1070
- return smalltalk.send(c,"_at_put_",[key,smalltalk.send(value,"_asJSON",[])]);
1071
- })]);
1072
- return c;
1073
- },
1089
+ return smalltalk.withContext(function($ctx1) {
1090
+ c=_st(_st(self)._class())._new();
1091
+ _st(self)._keysAndValuesDo_((function(key,value){
1092
+ return smalltalk.withContext(function($ctx2) {
1093
+ }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1)})}));
1094
+ $1=c;
1095
+ return $1;
1096
+ }, function($ctx1) {$ctx1.fill(self,"asJSON",{c:c}, smalltalk.HashedCollection)})},
1074
1097
  args: [],
1075
1098
  source: "asJSON\x0a\x09| c |\x0a\x09c := self class new.\x0a\x09self keysAndValuesDo: [:key :value |\x0a\x09\x09c at: key put: value asJSON].\x0a\x09^c",
1076
1099
  messageSends: ["new", "class", "keysAndValuesDo:", "at:put:", "asJSON"],
@@ -1086,12 +1109,14 @@ category: 'accessing',
1086
1109
  fn: function (){
1087
1110
  var self=this;
1088
1111
  var associations;
1112
+ return smalltalk.withContext(function($ctx1) {
1089
1113
  associations=[];
1090
- smalltalk.send(smalltalk.send(self,"_keys",[]),"_do_",[(function(each){
1091
- return smalltalk.send(associations,"_add_",[smalltalk.send((smalltalk.Association || Association),"_key_value_",[each,smalltalk.send(self,"_at_",[each])])]);
1092
- })]);
1093
- return associations;
1094
- },
1114
+ _st(_st(self)._keys())._do_((function(each){
1115
+ return smalltalk.withContext(function($ctx2) {
1116
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
1117
+ $1=associations;
1118
+ return $1;
1119
+ }, function($ctx1) {$ctx1.fill(self,"associations",{associations:associations}, smalltalk.HashedCollection)})},
1095
1120
  args: [],
1096
1121
  source: "associations\x0a\x09| associations |\x0a\x09associations := #().\x0a\x09self keys do: [:each |\x0a\x09 associations add: (Association key: each value: (self at: each))].\x0a\x09^associations",
1097
1122
  messageSends: ["do:", "add:", "key:value:", "at:", "keys"],
@@ -1106,8 +1131,8 @@ selector: "associationsDo:",
1106
1131
  category: 'enumerating',
1107
1132
  fn: function (aBlock){
1108
1133
  var self=this;
1109
- smalltalk.send(smalltalk.send(self,"_associations",[]),"_do_",[aBlock]);
1110
- return self},
1134
+ return smalltalk.withContext(function($ctx1) {
1135
+ return self}, function($ctx1) {$ctx1.fill(self,"associationsDo:",{aBlock:aBlock}, smalltalk.HashedCollection)})},
1111
1136
  args: ["aBlock"],
1112
1137
  source: "associationsDo: aBlock\x0a\x09self associations do: aBlock",
1113
1138
  messageSends: ["do:", "associations"],
@@ -1122,12 +1147,12 @@ selector: "at:",
1122
1147
  category: 'accessing',
1123
1148
  fn: function (aKey){
1124
1149
  var self=this;
1125
- var $1;
1126
- $1=smalltalk.send(self,"_at_ifAbsent_",[aKey,(function(){
1127
- return smalltalk.send(self,"_errorNotFound",[]);
1128
- })]);
1150
+ return smalltalk.withContext(function($ctx1) {
1151
+ $1=_st(self)._at_ifAbsent_(aKey,(function(){
1152
+ return smalltalk.withContext(function($ctx2) {
1153
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
1129
1154
  return $1;
1130
- },
1155
+ }, function($ctx1) {$ctx1.fill(self,"at:",{aKey:aKey}, smalltalk.HashedCollection)})},
1131
1156
  args: ["aKey"],
1132
1157
  source: "at: aKey\x0a\x09^self at: aKey ifAbsent: [self errorNotFound]",
1133
1158
  messageSends: ["at:ifAbsent:", "errorNotFound"],
@@ -1142,13 +1167,13 @@ selector: "at:ifAbsent:",
1142
1167
  category: 'accessing',
1143
1168
  fn: function (aKey,aBlock){
1144
1169
  var self=this;
1145
- var $2,$1;
1146
- $2=smalltalk.send(self,"_includesKey_",[aKey]);
1147
- $1=smalltalk.send($2,"_ifTrue_ifFalse_",[(function(){
1148
- return smalltalk.send(self,"_basicAt_",[aKey]);
1149
- }),aBlock]);
1170
+ return smalltalk.withContext(function($ctx1) {
1171
+ $2=_st(self)._includesKey_(aKey);
1172
+ $1=_st($2)._ifTrue_ifFalse_((function(){
1173
+ return smalltalk.withContext(function($ctx2) {
1174
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),aBlock);
1150
1175
  return $1;
1151
- },
1176
+ }, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{aKey:aKey,aBlock:aBlock}, smalltalk.HashedCollection)})},
1152
1177
  args: ["aKey", "aBlock"],
1153
1178
  source: "at: aKey ifAbsent: aBlock\x0a\x09^(self includesKey: aKey)\x0a\x09\x09ifTrue: [self basicAt: aKey]\x0a\x09\x09ifFalse: aBlock",
1154
1179
  messageSends: ["ifTrue:ifFalse:", "basicAt:", "includesKey:"],
@@ -1163,12 +1188,12 @@ selector: "at:ifAbsentPut:",
1163
1188
  category: 'accessing',
1164
1189
  fn: function (aKey,aBlock){
1165
1190
  var self=this;
1166
- var $1;
1167
- $1=smalltalk.send(self,"_at_ifAbsent_",[aKey,(function(){
1168
- return smalltalk.send(self,"_at_put_",[aKey,smalltalk.send(aBlock,"_value",[])]);
1169
- })]);
1191
+ return smalltalk.withContext(function($ctx1) {
1192
+ $1=_st(self)._at_ifAbsent_(aKey,(function(){
1193
+ return smalltalk.withContext(function($ctx2) {
1194
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
1170
1195
  return $1;
1171
- },
1196
+ }, function($ctx1) {$ctx1.fill(self,"at:ifAbsentPut:",{aKey:aKey,aBlock:aBlock}, smalltalk.HashedCollection)})},
1172
1197
  args: ["aKey", "aBlock"],
1173
1198
  source: "at: aKey ifAbsentPut: aBlock\x0a\x09^self at: aKey ifAbsent: [\x0a\x09 self at: aKey put: aBlock value]",
1174
1199
  messageSends: ["at:ifAbsent:", "at:put:", "value"],
@@ -1183,15 +1208,15 @@ selector: "at:ifPresent:",
1183
1208
  category: 'accessing',
1184
1209
  fn: function (aKey,aBlock){
1185
1210
  var self=this;
1186
- var $2,$1;
1187
- $2=smalltalk.send(self,"_includesKey_",[aKey]);
1211
+ return smalltalk.withContext(function($ctx1) {
1212
+ $2=_st(self)._includesKey_(aKey);
1188
1213
  if(smalltalk.assert($2)){
1189
- $1=smalltalk.send(aBlock,"_value_",[smalltalk.send(self,"_at_",[aKey])]);
1214
+ $1=_st(aBlock)._value_(_st(self)._at_(aKey));
1190
1215
  } else {
1191
1216
  $1=nil;
1192
1217
  };
1193
1218
  return $1;
1194
- },
1219
+ }, function($ctx1) {$ctx1.fill(self,"at:ifPresent:",{aKey:aKey,aBlock:aBlock}, smalltalk.HashedCollection)})},
1195
1220
  args: ["aKey", "aBlock"],
1196
1221
  source: "at: aKey ifPresent: aBlock\x0a\x09\x22Lookup the given key in the receiver. \x0a\x09If it is present, answer the value of evaluating the given block with the value associated with the key. \x0a\x09Otherwise, answer nil.\x22\x0a\x09^(self includesKey: aKey)\x0a\x09\x09ifTrue: [ aBlock value: (self at: aKey) ]\x0a\x09\x09ifFalse: [ nil ]",
1197
1222
  messageSends: ["ifTrue:ifFalse:", "value:", "at:", "includesKey:"],
@@ -1206,13 +1231,13 @@ selector: "at:ifPresent:ifAbsent:",
1206
1231
  category: 'accessing',
1207
1232
  fn: function (aKey,aBlock,anotherBlock){
1208
1233
  var self=this;
1209
- var $2,$1;
1210
- $2=smalltalk.send(self,"_includesKey_",[aKey]);
1211
- $1=smalltalk.send($2,"_ifTrue_ifFalse_",[(function(){
1212
- return smalltalk.send(aBlock,"_value_",[smalltalk.send(self,"_at_",[aKey])]);
1213
- }),anotherBlock]);
1234
+ return smalltalk.withContext(function($ctx1) {
1235
+ $2=_st(self)._includesKey_(aKey);
1236
+ $1=_st($2)._ifTrue_ifFalse_((function(){
1237
+ return smalltalk.withContext(function($ctx2) {
1238
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),anotherBlock);
1214
1239
  return $1;
1215
- },
1240
+ }, function($ctx1) {$ctx1.fill(self,"at:ifPresent:ifAbsent:",{aKey:aKey,aBlock:aBlock,anotherBlock:anotherBlock}, smalltalk.HashedCollection)})},
1216
1241
  args: ["aKey", "aBlock", "anotherBlock"],
1217
1242
  source: "at: aKey ifPresent: aBlock ifAbsent: anotherBlock\x0a\x09\x22Lookup the given key in the receiver. \x0a\x09If it is present, answer the value of evaluating the oneArgBlock with the value associated with the key, \x0a\x09otherwise answer the value of absentBlock.\x22\x0a\x09^(self includesKey: aKey)\x0a\x09\x09ifTrue: [ aBlock value: (self at: aKey) ]\x0a\x09\x09ifFalse: anotherBlock",
1218
1243
  messageSends: ["ifTrue:ifFalse:", "value:", "at:", "includesKey:"],
@@ -1227,10 +1252,10 @@ selector: "at:put:",
1227
1252
  category: 'accessing',
1228
1253
  fn: function (aKey,aValue){
1229
1254
  var self=this;
1230
- var $1;
1231
- $1=smalltalk.send(self,"_basicAt_put_",[aKey,aValue]);
1255
+ return smalltalk.withContext(function($ctx1) {
1256
+ $1=_st(self)._basicAt_put_(aKey,aValue);
1232
1257
  return $1;
1233
- },
1258
+ }, function($ctx1) {$ctx1.fill(self,"at:put:",{aKey:aKey,aValue:aValue}, smalltalk.HashedCollection)})},
1234
1259
  args: ["aKey", "aValue"],
1235
1260
  source: "at: aKey put: aValue\x0a\x09^self basicAt: aKey put: aValue",
1236
1261
  messageSends: ["basicAt:put:"],
@@ -1246,12 +1271,14 @@ category: 'enumerating',
1246
1271
  fn: function (aBlock){
1247
1272
  var self=this;
1248
1273
  var newDict;
1249
- newDict=smalltalk.send(smalltalk.send(self,"_class",[]),"_new",[]);
1250
- smalltalk.send(self,"_keysAndValuesDo_",[(function(key,value){
1251
- return smalltalk.send(newDict,"_at_put_",[key,smalltalk.send(aBlock,"_value_",[value])]);
1252
- })]);
1253
- return newDict;
1254
- },
1274
+ return smalltalk.withContext(function($ctx1) {
1275
+ newDict=_st(_st(self)._class())._new();
1276
+ _st(self)._keysAndValuesDo_((function(key,value){
1277
+ return smalltalk.withContext(function($ctx2) {
1278
+ }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1)})}));
1279
+ $1=newDict;
1280
+ return $1;
1281
+ }, function($ctx1) {$ctx1.fill(self,"collect:",{aBlock:aBlock,newDict:newDict}, smalltalk.HashedCollection)})},
1255
1282
  args: ["aBlock"],
1256
1283
  source: "collect: aBlock\x0a\x09| newDict |\x0a\x09newDict := self class new.\x0a\x09self keysAndValuesDo: [:key :value |\x0a\x09 newDict at: key put: (aBlock value: value)].\x0a\x09^newDict",
1257
1284
  messageSends: ["new", "class", "keysAndValuesDo:", "at:put:", "value:"],
@@ -1266,8 +1293,8 @@ selector: "copyFrom:to:",
1266
1293
  category: 'copying',
1267
1294
  fn: function (anIndex,anotherIndex){
1268
1295
  var self=this;
1269
- smalltalk.send(self,"_shouldNotImplement",[]);
1270
- return self},
1296
+ return smalltalk.withContext(function($ctx1) {
1297
+ return self}, function($ctx1) {$ctx1.fill(self,"copyFrom:to:",{anIndex:anIndex,anotherIndex:anotherIndex}, smalltalk.HashedCollection)})},
1271
1298
  args: ["anIndex", "anotherIndex"],
1272
1299
  source: "copyFrom: anIndex to: anotherIndex\x0a\x09self shouldNotImplement",
1273
1300
  messageSends: ["shouldNotImplement"],
@@ -1283,12 +1310,14 @@ category: 'copying',
1283
1310
  fn: function (){
1284
1311
  var self=this;
1285
1312
  var copy;
1286
- copy=smalltalk.send(smalltalk.send(self,"_class",[]),"_new",[]);
1287
- smalltalk.send(self,"_associationsDo_",[(function(each){
1288
- return smalltalk.send(copy,"_at_put_",[smalltalk.send(each,"_key",[]),smalltalk.send(smalltalk.send(each,"_value",[]),"_deepCopy",[])]);
1289
- })]);
1290
- return copy;
1291
- },
1313
+ return smalltalk.withContext(function($ctx1) {
1314
+ copy=_st(_st(self)._class())._new();
1315
+ _st(self)._associationsDo_((function(each){
1316
+ return smalltalk.withContext(function($ctx2) {
1317
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
1318
+ $1=copy;
1319
+ return $1;
1320
+ }, function($ctx1) {$ctx1.fill(self,"deepCopy",{copy:copy}, smalltalk.HashedCollection)})},
1292
1321
  args: [],
1293
1322
  source: "deepCopy\x0a\x09| copy |\x0a\x09copy := self class new.\x0a\x09self associationsDo: [:each |\x0a\x09 copy at: each key put: each value deepCopy].\x0a\x09^copy",
1294
1323
  messageSends: ["new", "class", "associationsDo:", "at:put:", "key", "deepCopy", "value"],
@@ -1303,10 +1332,10 @@ selector: "detect:ifNone:",
1303
1332
  category: 'enumerating',
1304
1333
  fn: function (aBlock,anotherBlock){
1305
1334
  var self=this;
1306
- var $1;
1307
- $1=smalltalk.send(smalltalk.send(self,"_values",[]),"_detect_ifNone_",[aBlock,anotherBlock]);
1335
+ return smalltalk.withContext(function($ctx1) {
1336
+ $1=_st(_st(self)._values())._detect_ifNone_(aBlock,anotherBlock);
1308
1337
  return $1;
1309
- },
1338
+ }, function($ctx1) {$ctx1.fill(self,"detect:ifNone:",{aBlock:aBlock,anotherBlock:anotherBlock}, smalltalk.HashedCollection)})},
1310
1339
  args: ["aBlock", "anotherBlock"],
1311
1340
  source: "detect: aBlock ifNone: anotherBlock\x0a\x09^self values detect: aBlock ifNone: anotherBlock",
1312
1341
  messageSends: ["detect:ifNone:", "values"],
@@ -1321,8 +1350,8 @@ selector: "do:",
1321
1350
  category: 'enumerating',
1322
1351
  fn: function (aBlock){
1323
1352
  var self=this;
1324
- smalltalk.send(smalltalk.send(self,"_values",[]),"_do_",[aBlock]);
1325
- return self},
1353
+ return smalltalk.withContext(function($ctx1) {
1354
+ return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock}, smalltalk.HashedCollection)})},
1326
1355
  args: ["aBlock"],
1327
1356
  source: "do: aBlock\x0a\x09self values do: aBlock",
1328
1357
  messageSends: ["do:", "values"],
@@ -1337,10 +1366,10 @@ selector: "includes:",
1337
1366
  category: 'enumerating',
1338
1367
  fn: function (anObject){
1339
1368
  var self=this;
1340
- var $1;
1341
- $1=smalltalk.send(smalltalk.send(self,"_values",[]),"_includes_",[anObject]);
1369
+ return smalltalk.withContext(function($ctx1) {
1370
+ $1=_st(_st(self)._values())._includes_(anObject);
1342
1371
  return $1;
1343
- },
1372
+ }, function($ctx1) {$ctx1.fill(self,"includes:",{anObject:anObject}, smalltalk.HashedCollection)})},
1344
1373
  args: ["anObject"],
1345
1374
  source: "includes: anObject\x0a\x09^self values includes: anObject",
1346
1375
  messageSends: ["includes:", "values"],
@@ -1355,9 +1384,8 @@ selector: "includesKey:",
1355
1384
  category: 'testing',
1356
1385
  fn: function (aKey){
1357
1386
  var self=this;
1358
- return self.hasOwnProperty(aKey);
1359
- ;
1360
- return self},
1387
+ return smalltalk.withContext(function($ctx1) {
1388
+ return self}, function($ctx1) {$ctx1.fill(self,"includesKey:",{aKey:aKey}, smalltalk.HashedCollection)})},
1361
1389
  args: ["aKey"],
1362
1390
  source: "includesKey: aKey\x0a\x09<return self.hasOwnProperty(aKey)>",
1363
1391
  messageSends: [],
@@ -1372,7 +1400,7 @@ selector: "keys",
1372
1400
  category: 'accessing',
1373
1401
  fn: function (){
1374
1402
  var self=this;
1375
-
1403
+ return smalltalk.withContext(function($ctx1) {
1376
1404
  if ('function'===typeof Object.keys) return Object.keys(self);
1377
1405
  var keys = [];
1378
1406
  for(var i in self) {
@@ -1382,8 +1410,7 @@ var self=this;
1382
1410
  };
1383
1411
  return keys;
1384
1412
  ;
1385
- ;
1386
- return self},
1413
+ return self}, function($ctx1) {$ctx1.fill(self,"keys",{}, smalltalk.HashedCollection)})},
1387
1414
  args: [],
1388
1415
  source: "keys\x0a\x09<\x0a\x09\x09if ('function'===typeof Object.keys) return Object.keys(self);\x0a\x09\x09var keys = [];\x0a\x09\x09for(var i in self) {\x0a\x09\x09\x09if(self.hasOwnProperty(i)) {\x0a\x09\x09\x09\x09keys.push(i);\x0a\x09\x09\x09}\x0a\x09\x09};\x0a\x09\x09return keys;\x0a\x09>",
1389
1416
  messageSends: [],
@@ -1398,10 +1425,10 @@ selector: "keysAndValuesDo:",
1398
1425
  category: 'enumerating',
1399
1426
  fn: function (aBlock){
1400
1427
  var self=this;
1401
- smalltalk.send(self,"_associationsDo_",[(function(each){
1402
- return smalltalk.send(aBlock,"_value_value_",[smalltalk.send(each,"_key",[]),smalltalk.send(each,"_value",[])]);
1403
- })]);
1404
- return self},
1428
+ return smalltalk.withContext(function($ctx1) {
1429
+ return smalltalk.withContext(function($ctx2) {
1430
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
1431
+ return self}, function($ctx1) {$ctx1.fill(self,"keysAndValuesDo:",{aBlock:aBlock}, smalltalk.HashedCollection)})},
1405
1432
  args: ["aBlock"],
1406
1433
  source: "keysAndValuesDo: aBlock\x0a\x09self associationsDo: [:each |\x0a\x09 aBlock value: each key value: each value]",
1407
1434
  messageSends: ["associationsDo:", "value:value:", "key", "value"],
@@ -1416,18 +1443,18 @@ selector: "printString",
1416
1443
  category: 'printing',
1417
1444
  fn: function (){
1418
1445
  var self=this;
1419
- var $1;
1420
- $1=smalltalk.send((smalltalk.String || String),"_streamContents_",[(function(aStream){
1421
- smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("a ","__comma",[smalltalk.send(smalltalk.send(self,"_class",[]),"_name",[])]),"__comma",["("])]);
1422
- smalltalk.send(smalltalk.send(self,"_associations",[]),"_do_separatedBy_",[(function(each){
1423
- return smalltalk.send(each,"_storeOn_",[aStream]);
1424
- }),(function(){
1425
- return smalltalk.send(aStream,"_nextPutAll_",[" , "]);
1426
- })]);
1427
- return smalltalk.send(aStream,"_nextPutAll_",[")"]);
1428
- })]);
1429
- return $1;
1430
- },
1446
+ return smalltalk.withContext(function($ctx1) {
1447
+ $1=_st((smalltalk.String || String))._streamContents_((function(aStream){
1448
+ return smalltalk.withContext(function($ctx2) {
1449
+ _st(_st(self)._associations())._do_separatedBy_((function(each){
1450
+ return smalltalk.withContext(function($ctx3) {
1451
+ }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}),(function(){
1452
+ return smalltalk.withContext(function($ctx3) {
1453
+ }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
1454
+ return _st(aStream)._nextPutAll_(")");
1455
+ }, function($ctx2) {$ctx2.fillBlock({aStream:aStream},$ctx1)})}));
1456
+ return $1;
1457
+ }, function($ctx1) {$ctx1.fill(self,"printString",{}, smalltalk.HashedCollection)})},
1431
1458
  args: [],
1432
1459
  source: "printString\x0a\x09\x22print the contents of the HashedCollection into a string and return the string\x22\x0a\x09^String streamContents: [:aStream |\x0a\x09\x09aStream nextPutAll: 'a ', self class name, '('.\x0a\x09\x09self associations\x0a\x09\x09\x09do: [:each | each storeOn: aStream]\x0a\x09\x09\x09separatedBy: [ aStream nextPutAll: ' , '].\x0a\x09\x09aStream nextPutAll: ')']",
1433
1460
  messageSends: ["streamContents:", "nextPutAll:", ",", "name", "class", "do:separatedBy:", "storeOn:", "associations"],
@@ -1442,10 +1469,10 @@ selector: "remove:ifAbsent:",
1442
1469
  category: 'adding/removing',
1443
1470
  fn: function (aKey,aBlock){
1444
1471
  var self=this;
1445
- var $1;
1446
- $1=smalltalk.send(self,"_removeKey_ifAbsent_",[aKey,aBlock]);
1472
+ return smalltalk.withContext(function($ctx1) {
1473
+ $1=_st(self)._removeKey_ifAbsent_(aKey,aBlock);
1447
1474
  return $1;
1448
- },
1475
+ }, function($ctx1) {$ctx1.fill(self,"remove:ifAbsent:",{aKey:aKey,aBlock:aBlock}, smalltalk.HashedCollection)})},
1449
1476
  args: ["aKey", "aBlock"],
1450
1477
  source: "remove: aKey ifAbsent: aBlock\x0a ^self removeKey: aKey ifAbsent: aBlock",
1451
1478
  messageSends: ["removeKey:ifAbsent:"],
@@ -1460,10 +1487,10 @@ selector: "removeKey:",
1460
1487
  category: 'adding/removing',
1461
1488
  fn: function (aKey){
1462
1489
  var self=this;
1463
- var $1;
1464
- $1=smalltalk.send(self,"_remove_",[aKey]);
1490
+ return smalltalk.withContext(function($ctx1) {
1491
+ $1=_st(self)._remove_(aKey);
1465
1492
  return $1;
1466
- },
1493
+ }, function($ctx1) {$ctx1.fill(self,"removeKey:",{aKey:aKey}, smalltalk.HashedCollection)})},
1467
1494
  args: ["aKey"],
1468
1495
  source: "removeKey: aKey\x0a ^self remove: aKey",
1469
1496
  messageSends: ["remove:"],
@@ -1478,15 +1505,15 @@ selector: "removeKey:ifAbsent:",
1478
1505
  category: 'adding/removing',
1479
1506
  fn: function (aKey,aBlock){
1480
1507
  var self=this;
1481
- var $2,$1;
1482
- $2=smalltalk.send(self,"_includesKey_",[aKey]);
1508
+ return smalltalk.withContext(function($ctx1) {
1509
+ $2=_st(self)._includesKey_(aKey);
1483
1510
  if(smalltalk.assert($2)){
1484
- $1=smalltalk.send(self,"_basicDelete_",[aKey]);
1511
+ $1=_st(self)._basicDelete_(aKey);
1485
1512
  } else {
1486
- $1=smalltalk.send(aBlock,"_value",[]);
1513
+ $1=_st(aBlock)._value();
1487
1514
  };
1488
1515
  return $1;
1489
- },
1516
+ }, function($ctx1) {$ctx1.fill(self,"removeKey:ifAbsent:",{aKey:aKey,aBlock:aBlock}, smalltalk.HashedCollection)})},
1490
1517
  args: ["aKey", "aBlock"],
1491
1518
  source: "removeKey: aKey ifAbsent: aBlock\x0a\x09^(self includesKey: aKey) \x0a\x09\x09ifFalse: [aBlock value]\x0a\x09\x09ifTrue: [self basicDelete: aKey]",
1492
1519
  messageSends: ["ifFalse:ifTrue:", "value", "basicDelete:", "includesKey:"],
@@ -1501,17 +1528,20 @@ selector: "select:",
1501
1528
  category: 'enumerating',
1502
1529
  fn: function (aBlock){
1503
1530
  var self=this;
1504
- var $1;
1505
1531
  var newDict;
1506
- newDict=smalltalk.send(smalltalk.send(self,"_class",[]),"_new",[]);
1507
- smalltalk.send(self,"_keysAndValuesDo_",[(function(key,value){
1508
- $1=smalltalk.send(aBlock,"_value_",[value]);
1509
- if(smalltalk.assert($1)){
1510
- return smalltalk.send(newDict,"_at_put_",[key,value]);
1532
+ return smalltalk.withContext(function($ctx1) {
1533
+ newDict=_st(_st(self)._class())._new();
1534
+ $1=self;
1535
+ $2=(function(key,value){
1536
+ return smalltalk.withContext(function($ctx2) {
1537
+ if(smalltalk.assert($3)){
1538
+ return _st(newDict)._at_put_(key,value);
1511
1539
  };
1512
- })]);
1513
- return newDict;
1514
- },
1540
+ }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1)})});
1541
+ _st($1)._keysAndValuesDo_($2);
1542
+ $4=newDict;
1543
+ return $4;
1544
+ }, function($ctx1) {$ctx1.fill(self,"select:",{aBlock:aBlock,newDict:newDict}, smalltalk.HashedCollection)})},
1515
1545
  args: ["aBlock"],
1516
1546
  source: "select: aBlock\x0a\x09| newDict |\x0a\x09newDict := self class new.\x0a\x09self keysAndValuesDo: [:key :value |\x0a\x09 (aBlock value: value) ifTrue: [newDict at: key put: value]].\x0a\x09^newDict",
1517
1547
  messageSends: ["new", "class", "keysAndValuesDo:", "ifTrue:", "at:put:", "value:"],
@@ -1527,12 +1557,14 @@ category: 'copying',
1527
1557
  fn: function (){
1528
1558
  var self=this;
1529
1559
  var copy;
1530
- copy=smalltalk.send(smalltalk.send(self,"_class",[]),"_new",[]);
1531
- smalltalk.send(self,"_associationsDo_",[(function(each){
1532
- return smalltalk.send(copy,"_at_put_",[smalltalk.send(each,"_key",[]),smalltalk.send(each,"_value",[])]);
1533
- })]);
1534
- return copy;
1535
- },
1560
+ return smalltalk.withContext(function($ctx1) {
1561
+ copy=_st(_st(self)._class())._new();
1562
+ _st(self)._associationsDo_((function(each){
1563
+ return smalltalk.withContext(function($ctx2) {
1564
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
1565
+ $1=copy;
1566
+ return $1;
1567
+ }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{copy:copy}, smalltalk.HashedCollection)})},
1536
1568
  args: [],
1537
1569
  source: "shallowCopy\x0a\x09| copy |\x0a\x09copy := self class new.\x0a\x09self associationsDo: [:each |\x0a\x09 copy at: each key put: each value].\x0a\x09^copy",
1538
1570
  messageSends: ["new", "class", "associationsDo:", "at:put:", "key", "value"],
@@ -1547,10 +1579,10 @@ selector: "size",
1547
1579
  category: 'accessing',
1548
1580
  fn: function (){
1549
1581
  var self=this;
1550
- var $1;
1551
- $1=smalltalk.send(smalltalk.send(self,"_keys",[]),"_size",[]);
1582
+ return smalltalk.withContext(function($ctx1) {
1583
+ $1=_st(_st(self)._keys())._size();
1552
1584
  return $1;
1553
- },
1585
+ }, function($ctx1) {$ctx1.fill(self,"size",{}, smalltalk.HashedCollection)})},
1554
1586
  args: [],
1555
1587
  source: "size\x0a\x09^self keys size",
1556
1588
  messageSends: ["size", "keys"],
@@ -1565,14 +1597,14 @@ selector: "storeOn:",
1565
1597
  category: 'printing',
1566
1598
  fn: function (aStream){
1567
1599
  var self=this;
1568
- smalltalk.send(aStream,"_nextPutAll_",["#{"]);
1569
- smalltalk.send(smalltalk.send(self,"_associations",[]),"_do_separatedBy_",[(function(each){
1570
- return smalltalk.send(each,"_storeOn_",[aStream]);
1571
- }),(function(){
1572
- return smalltalk.send(aStream,"_nextPutAll_",[". "]);
1573
- })]);
1574
- smalltalk.send(aStream,"_nextPutAll_",["}"]);
1575
- return self},
1600
+ return smalltalk.withContext(function($ctx1) {
1601
+ _st(_st(self)._associations())._do_separatedBy_((function(each){
1602
+ return smalltalk.withContext(function($ctx2) {
1603
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
1604
+ return smalltalk.withContext(function($ctx2) {
1605
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
1606
+ _st(aStream)._nextPutAll_("}");
1607
+ return self}, function($ctx1) {$ctx1.fill(self,"storeOn:",{aStream:aStream}, smalltalk.HashedCollection)})},
1576
1608
  args: ["aStream"],
1577
1609
  source: "storeOn: aStream\x0a\x09aStream nextPutAll: '#{'.\x0a\x09self associations\x0a\x09\x09do: [:each | each storeOn: aStream]\x0a\x09\x09separatedBy: [ aStream nextPutAll: '. '].\x0a\x09aStream nextPutAll: '}'",
1578
1610
  messageSends: ["nextPutAll:", "do:separatedBy:", "storeOn:", "associations"],
@@ -1587,12 +1619,12 @@ selector: "values",
1587
1619
  category: 'accessing',
1588
1620
  fn: function (){
1589
1621
  var self=this;
1590
- var $1;
1591
- $1=smalltalk.send(smalltalk.send(self,"_keys",[]),"_collect_",[(function(each){
1592
- return smalltalk.send(self,"_at_",[each]);
1593
- })]);
1622
+ return smalltalk.withContext(function($ctx1) {
1623
+ $1=_st(_st(self)._keys())._collect_((function(each){
1624
+ return smalltalk.withContext(function($ctx2) {
1625
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
1594
1626
  return $1;
1595
- },
1627
+ }, function($ctx1) {$ctx1.fill(self,"values",{}, smalltalk.HashedCollection)})},
1596
1628
  args: [],
1597
1629
  source: "values\x0a\x09^self keys collect: [:each | self at: each]",
1598
1630
  messageSends: ["collect:", "at:", "keys"],
@@ -1609,12 +1641,14 @@ category: 'instance creation',
1609
1641
  fn: function (aCollection){
1610
1642
  var self=this;
1611
1643
  var dict;
1612
- dict=smalltalk.send(self,"_new",[]);
1613
- smalltalk.send(aCollection,"_do_",[(function(each){
1614
- return smalltalk.send(dict,"_add_",[each]);
1615
- })]);
1616
- return dict;
1617
- },
1644
+ return smalltalk.withContext(function($ctx1) {
1645
+ dict=_st(self)._new();
1646
+ _st(aCollection)._do_((function(each){
1647
+ return smalltalk.withContext(function($ctx2) {
1648
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
1649
+ $1=dict;
1650
+ return $1;
1651
+ }, function($ctx1) {$ctx1.fill(self,"fromPairs:",{aCollection:aCollection,dict:dict}, smalltalk.HashedCollection.klass)})},
1618
1652
  args: ["aCollection"],
1619
1653
  source: "fromPairs: aCollection\x0a\x09| dict |\x0a\x09dict := self new.\x0a\x09aCollection do: [:each | dict add: each].\x0a\x09^dict",
1620
1654
  messageSends: ["new", "do:", "add:"],
@@ -1631,10 +1665,10 @@ selector: "asHashedCollection",
1631
1665
  category: 'converting',
1632
1666
  fn: function (){
1633
1667
  var self=this;
1634
- var $1;
1635
- $1=smalltalk.send((smalltalk.HashedCollection || HashedCollection),"_fromPairs_",[smalltalk.send(self,"_associations",[])]);
1668
+ return smalltalk.withContext(function($ctx1) {
1669
+ $1=_st((smalltalk.HashedCollection || HashedCollection))._fromPairs_(_st(self)._associations());
1636
1670
  return $1;
1637
- },
1671
+ }, function($ctx1) {$ctx1.fill(self,"asHashedCollection",{}, smalltalk.Dictionary)})},
1638
1672
  args: [],
1639
1673
  source: "asHashedCollection\x0a\x09^HashedCollection fromPairs: self associations",
1640
1674
  messageSends: ["fromPairs:", "associations"],
@@ -1649,10 +1683,10 @@ selector: "asJSON",
1649
1683
  category: 'converting',
1650
1684
  fn: function (){
1651
1685
  var self=this;
1652
- var $1;
1653
- $1=smalltalk.send(smalltalk.send(self,"_asHashedCollection",[]),"_asJSON",[]);
1686
+ return smalltalk.withContext(function($ctx1) {
1687
+ $1=_st(_st(self)._asHashedCollection())._asJSON();
1654
1688
  return $1;
1655
- },
1689
+ }, function($ctx1) {$ctx1.fill(self,"asJSON",{}, smalltalk.Dictionary)})},
1656
1690
  args: [],
1657
1691
  source: "asJSON\x0a\x09^self asHashedCollection asJSON",
1658
1692
  messageSends: ["asJSON", "asHashedCollection"],
@@ -1667,7 +1701,7 @@ selector: "at:ifAbsent:",
1667
1701
  category: 'accessing',
1668
1702
  fn: function (aKey,aBlock){
1669
1703
  var self=this;
1670
-
1704
+ return smalltalk.withContext(function($ctx1) {
1671
1705
  var index;
1672
1706
  for(var i=0;i<self['@keys'].length;i++){
1673
1707
  if(self['@keys'][i].__eq(aKey)) {index = i;}
@@ -1678,8 +1712,7 @@ var self=this;
1678
1712
  return self['@values'][index];
1679
1713
  }
1680
1714
  ;
1681
- ;
1682
- return self},
1715
+ return self}, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{aKey:aKey,aBlock:aBlock}, smalltalk.Dictionary)})},
1683
1716
  args: ["aKey", "aBlock"],
1684
1717
  source: "at: aKey ifAbsent: aBlock\x0a\x09<\x0a\x09\x09var index;\x0a\x09\x09for(var i=0;i<self['@keys'].length;i++){\x0a\x09\x09\x09if(self['@keys'][i].__eq(aKey)) {index = i;}\x0a\x09\x09};\x0a\x09\x09if(typeof index === 'undefined') {\x0a\x09\x09\x09return aBlock();\x0a\x09\x09} else {\x0a\x09\x09\x09return self['@values'][index];\x0a\x09\x09}\x0a\x09>",
1685
1718
  messageSends: [],
@@ -1694,7 +1727,7 @@ selector: "at:put:",
1694
1727
  category: 'accessing',
1695
1728
  fn: function (aKey,aValue){
1696
1729
  var self=this;
1697
-
1730
+ return smalltalk.withContext(function($ctx1) {
1698
1731
  var index = self['@keys'].indexOf(aKey);
1699
1732
  if(index === -1) {
1700
1733
  self['@values'].push(aValue);
@@ -1705,8 +1738,7 @@ var self=this;
1705
1738
 
1706
1739
  return aValue;
1707
1740
  ;
1708
- ;
1709
- return self},
1741
+ return self}, function($ctx1) {$ctx1.fill(self,"at:put:",{aKey:aKey,aValue:aValue}, smalltalk.Dictionary)})},
1710
1742
  args: ["aKey", "aValue"],
1711
1743
  source: "at: aKey put: aValue\x0a\x09<\x0a\x09\x09var index = self['@keys'].indexOf(aKey);\x0a\x09\x09if(index === -1) {\x0a\x09\x09\x09self['@values'].push(aValue);\x0a\x09\x09\x09self['@keys'].push(aKey);\x0a\x09\x09} else {\x0a\x09\x09\x09self['@values'][index] = aValue;\x0a\x09\x09};\x0a\x0a\x09\x09return aValue;\x0a\x09>",
1712
1744
  messageSends: [],
@@ -1721,10 +1753,10 @@ selector: "includesKey:",
1721
1753
  category: 'testing',
1722
1754
  fn: function (aKey){
1723
1755
  var self=this;
1724
- var $1;
1725
- $1=smalltalk.send(self["@keys"],"_includes_",[aKey]);
1756
+ return smalltalk.withContext(function($ctx1) {
1757
+ $1=_st(self["@keys"])._includes_(aKey);
1726
1758
  return $1;
1727
- },
1759
+ }, function($ctx1) {$ctx1.fill(self,"includesKey:",{aKey:aKey}, smalltalk.Dictionary)})},
1728
1760
  args: ["aKey"],
1729
1761
  source: "includesKey: aKey\x0a\x09^keys includes: aKey",
1730
1762
  messageSends: ["includes:"],
@@ -1739,10 +1771,10 @@ selector: "initialize",
1739
1771
  category: 'initialization',
1740
1772
  fn: function (){
1741
1773
  var self=this;
1742
- smalltalk.send(self,"_initialize",[],smalltalk.HashedCollection);
1774
+ return smalltalk.withContext(function($ctx1) {
1743
1775
  self["@keys"]=[];
1744
1776
  self["@values"]=[];
1745
- return self},
1777
+ return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.Dictionary)})},
1746
1778
  args: [],
1747
1779
  source: "initialize\x0a\x09super initialize.\x0a\x09keys := #().\x0a\x09values := #()",
1748
1780
  messageSends: ["initialize"],
@@ -1757,14 +1789,14 @@ selector: "keyAtValue:",
1757
1789
  category: 'accessing',
1758
1790
  fn: function (anObject){
1759
1791
  var self=this;
1760
- var $1;
1761
- $1=smalltalk.send(smalltalk.send(smalltalk.send(self,"_associations",[]),"_detect_ifNone_",[(function(k,v){
1762
- return smalltalk.send(v,"__eq_eq",[anObject]);
1763
- }),(function(){
1764
- return smalltalk.send(self,"_error_",["Not found"]);
1765
- })]),"_key",[]);
1792
+ return smalltalk.withContext(function($ctx1) {
1793
+ $1=_st(_st(_st(self)._associations())._detect_ifNone_((function(k,v){
1794
+ return smalltalk.withContext(function($ctx2) {
1795
+ }, function($ctx2) {$ctx2.fillBlock({k:k,v:v},$ctx1)})}),(function(){
1796
+ return smalltalk.withContext(function($ctx2) {
1797
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._key();
1766
1798
  return $1;
1767
- },
1799
+ }, function($ctx1) {$ctx1.fill(self,"keyAtValue:",{anObject:anObject}, smalltalk.Dictionary)})},
1768
1800
  args: ["anObject"],
1769
1801
  source: "keyAtValue: anObject\x0a\x0a\x09^ (self associations \x0a \x09detect:[:k :v| v == anObject] \x0a \x09ifNone:[self error: 'Not found']) key",
1770
1802
  messageSends: ["key", "detect:ifNone:", "==", "error:", "associations"],
@@ -1779,10 +1811,10 @@ selector: "keys",
1779
1811
  category: 'accessing',
1780
1812
  fn: function (){
1781
1813
  var self=this;
1782
- var $1;
1783
- $1=smalltalk.send(self["@keys"],"_copy",[]);
1814
+ return smalltalk.withContext(function($ctx1) {
1815
+ $1=_st(self["@keys"])._copy();
1784
1816
  return $1;
1785
- },
1817
+ }, function($ctx1) {$ctx1.fill(self,"keys",{}, smalltalk.Dictionary)})},
1786
1818
  args: [],
1787
1819
  source: "keys\x0a\x09^keys copy",
1788
1820
  messageSends: ["copy"],
@@ -1797,7 +1829,7 @@ selector: "removeKey:ifAbsent:",
1797
1829
  category: 'adding/removing',
1798
1830
  fn: function (aKey,aBlock){
1799
1831
  var self=this;
1800
-
1832
+ return smalltalk.withContext(function($ctx1) {
1801
1833
  var index = self['@keys'].indexOf(aKey);
1802
1834
  if(index === -1) {
1803
1835
  return aBlock()
@@ -1808,8 +1840,7 @@ var self=this;
1808
1840
  return value[0];
1809
1841
  };
1810
1842
  ;
1811
- ;
1812
- return self},
1843
+ return self}, function($ctx1) {$ctx1.fill(self,"removeKey:ifAbsent:",{aKey:aKey,aBlock:aBlock}, smalltalk.Dictionary)})},
1813
1844
  args: ["aKey", "aBlock"],
1814
1845
  source: "removeKey: aKey ifAbsent: aBlock\x0a <\x0a var index = self['@keys'].indexOf(aKey);\x0a if(index === -1) {\x0a return aBlock()\x0a } else {\x0a var value;\x0a self['@keys'].splice(index, 1);\x0a value = self['@values'].splice(index, 1);\x0a return value[0];\x0a };\x0a >",
1815
1846
  messageSends: [],
@@ -1824,10 +1855,10 @@ selector: "valueAt:",
1824
1855
  category: 'accessing',
1825
1856
  fn: function (anObject){
1826
1857
  var self=this;
1827
- var $1;
1828
- $1=smalltalk.send(self,"_associationsDo_",[(2)]);
1858
+ return smalltalk.withContext(function($ctx1) {
1859
+ $1=_st(self)._associationsDo_((2));
1829
1860
  return $1;
1830
- },
1861
+ }, function($ctx1) {$ctx1.fill(self,"valueAt:",{anObject:anObject}, smalltalk.Dictionary)})},
1831
1862
  args: ["anObject"],
1832
1863
  source: "valueAt: anObject\x0a\x0a\x09^ self associationsDo:2",
1833
1864
  messageSends: ["associationsDo:"],
@@ -1842,10 +1873,10 @@ selector: "values",
1842
1873
  category: 'accessing',
1843
1874
  fn: function (){
1844
1875
  var self=this;
1845
- var $1;
1846
- $1=smalltalk.send(self["@values"],"_copy",[]);
1876
+ return smalltalk.withContext(function($ctx1) {
1877
+ $1=_st(self["@values"])._copy();
1847
1878
  return $1;
1848
- },
1879
+ }, function($ctx1) {$ctx1.fill(self,"values",{}, smalltalk.Dictionary)})},
1849
1880
  args: [],
1850
1881
  source: "values\x0a\x09^values copy",
1851
1882
  messageSends: ["copy"],
@@ -1863,25 +1894,27 @@ selector: "=",
1863
1894
  category: 'comparing',
1864
1895
  fn: function (aCollection){
1865
1896
  var self=this;
1866
- var $1,$2;
1897
+ return smalltalk.withContext(function($ctx1) {
1867
1898
  var $early={};
1868
1899
  try {
1869
- $1=smalltalk.send(smalltalk.send(smalltalk.send(self,"_class",[]),"__eq",[smalltalk.send(aCollection,"_class",[])]),"_and_",[(function(){
1870
- return smalltalk.send(smalltalk.send(self,"_size",[]),"__eq",[smalltalk.send(aCollection,"_size",[])]);
1871
- })]);
1900
+ $1=_st(_st(_st(self)._class()).__eq(_st(aCollection)._class()))._and_((function(){
1901
+ return smalltalk.withContext(function($ctx2) {
1902
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
1872
1903
  if(! smalltalk.assert($1)){
1873
1904
  return false;
1874
1905
  };
1875
- smalltalk.send(self,"_withIndexDo_",[(function(each,i){
1876
- $2=smalltalk.send(smalltalk.send(aCollection,"_at_",[i]),"__eq",[each]);
1877
- if(! smalltalk.assert($2)){
1906
+ $2=self;
1907
+ $3=(function(each,i){
1908
+ return smalltalk.withContext(function($ctx2) {
1909
+ if(! smalltalk.assert($4)){
1878
1910
  throw $early=[false];
1879
1911
  };
1880
- })]);
1912
+ }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1)})});
1913
+ _st($2)._withIndexDo_($3);
1881
1914
  return true;
1882
1915
  }
1883
1916
  catch(e) {if(e===$early)return e[0]; throw e}
1884
- },
1917
+ }, function($ctx1) {$ctx1.fill(self,"=",{aCollection:aCollection}, smalltalk.SequenceableCollection)})},
1885
1918
  args: ["aCollection"],
1886
1919
  source: "= aCollection\x0a\x09(self class = aCollection class and: [\x0a\x09\x09self size = aCollection size]) ifFalse: [^false].\x0a\x09self withIndexDo: [:each :i |\x0a (aCollection at: i) = each ifFalse: [^false]].\x0a\x09^true",
1887
1920
  messageSends: ["ifFalse:", "and:", "=", "size", "class", "withIndexDo:", "at:"],
@@ -1896,8 +1929,8 @@ selector: "addLast:",
1896
1929
  category: 'adding',
1897
1930
  fn: function (anObject){
1898
1931
  var self=this;
1899
- smalltalk.send(self,"_add_",[anObject]);
1900
- return self},
1932
+ return smalltalk.withContext(function($ctx1) {
1933
+ return self}, function($ctx1) {$ctx1.fill(self,"addLast:",{anObject:anObject}, smalltalk.SequenceableCollection)})},
1901
1934
  args: ["anObject"],
1902
1935
  source: "addLast: anObject\x0a\x09self add: anObject",
1903
1936
  messageSends: ["add:"],
@@ -1912,10 +1945,10 @@ selector: "allButFirst",
1912
1945
  category: 'accessing',
1913
1946
  fn: function (){
1914
1947
  var self=this;
1915
- var $1;
1916
- $1=smalltalk.send(self,"_copyFrom_to_",[(2),smalltalk.send(self,"_size",[])]);
1948
+ return smalltalk.withContext(function($ctx1) {
1949
+ $1=_st(self)._copyFrom_to_((2),_st(self)._size());
1917
1950
  return $1;
1918
- },
1951
+ }, function($ctx1) {$ctx1.fill(self,"allButFirst",{}, smalltalk.SequenceableCollection)})},
1919
1952
  args: [],
1920
1953
  source: "allButFirst\x0a\x09^self copyFrom: 2 to: self size",
1921
1954
  messageSends: ["copyFrom:to:", "size"],
@@ -1930,10 +1963,10 @@ selector: "allButLast",
1930
1963
  category: 'accessing',
1931
1964
  fn: function (){
1932
1965
  var self=this;
1933
- var $1;
1934
- $1=smalltalk.send(self,"_copyFrom_to_",[(1),smalltalk.send(smalltalk.send(self,"_size",[]),"__minus",[(1)])]);
1966
+ return smalltalk.withContext(function($ctx1) {
1967
+ $1=_st(self)._copyFrom_to_((1),_st(_st(self)._size()).__minus((1)));
1935
1968
  return $1;
1936
- },
1969
+ }, function($ctx1) {$ctx1.fill(self,"allButLast",{}, smalltalk.SequenceableCollection)})},
1937
1970
  args: [],
1938
1971
  source: "allButLast\x0a\x09^self copyFrom: 1 to: self size - 1",
1939
1972
  messageSends: ["copyFrom:to:", "-", "size"],
@@ -1948,12 +1981,12 @@ selector: "at:",
1948
1981
  category: 'accessing',
1949
1982
  fn: function (anIndex){
1950
1983
  var self=this;
1951
- var $1;
1952
- $1=smalltalk.send(self,"_at_ifAbsent_",[anIndex,(function(){
1953
- return smalltalk.send(self,"_errorNotFound",[]);
1954
- })]);
1984
+ return smalltalk.withContext(function($ctx1) {
1985
+ $1=_st(self)._at_ifAbsent_(anIndex,(function(){
1986
+ return smalltalk.withContext(function($ctx2) {
1987
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
1955
1988
  return $1;
1956
- },
1989
+ }, function($ctx1) {$ctx1.fill(self,"at:",{anIndex:anIndex}, smalltalk.SequenceableCollection)})},
1957
1990
  args: ["anIndex"],
1958
1991
  source: "at: anIndex\x0a\x09^self at: anIndex ifAbsent: [\x0a\x09 self errorNotFound]",
1959
1992
  messageSends: ["at:ifAbsent:", "errorNotFound"],
@@ -1968,8 +2001,8 @@ selector: "at:ifAbsent:",
1968
2001
  category: 'accessing',
1969
2002
  fn: function (anIndex,aBlock){
1970
2003
  var self=this;
1971
- smalltalk.send(self,"_subclassResponsibility",[]);
1972
- return self},
2004
+ return smalltalk.withContext(function($ctx1) {
2005
+ return self}, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{anIndex:anIndex,aBlock:aBlock}, smalltalk.SequenceableCollection)})},
1973
2006
  args: ["anIndex", "aBlock"],
1974
2007
  source: "at: anIndex ifAbsent: aBlock\x0a\x09self subclassResponsibility",
1975
2008
  messageSends: ["subclassResponsibility"],
@@ -1984,8 +2017,8 @@ selector: "at:put:",
1984
2017
  category: 'accessing',
1985
2018
  fn: function (anIndex,anObject){
1986
2019
  var self=this;
1987
- smalltalk.send(self,"_subclassResponsibility",[]);
1988
- return self},
2020
+ return smalltalk.withContext(function($ctx1) {
2021
+ return self}, function($ctx1) {$ctx1.fill(self,"at:put:",{anIndex:anIndex,anObject:anObject}, smalltalk.SequenceableCollection)})},
1989
2022
  args: ["anIndex", "anObject"],
1990
2023
  source: "at: anIndex put: anObject\x0a\x09self subclassResponsibility",
1991
2024
  messageSends: ["subclassResponsibility"],
@@ -2000,10 +2033,10 @@ selector: "atRandom",
2000
2033
  category: 'accessing',
2001
2034
  fn: function (){
2002
2035
  var self=this;
2003
- var $1;
2004
- $1=smalltalk.send(self,"_at_",[smalltalk.send(smalltalk.send(self,"_size",[]),"_atRandom",[])]);
2036
+ return smalltalk.withContext(function($ctx1) {
2037
+ $1=_st(self)._at_(_st(_st(self)._size())._atRandom());
2005
2038
  return $1;
2006
- },
2039
+ }, function($ctx1) {$ctx1.fill(self,"atRandom",{}, smalltalk.SequenceableCollection)})},
2007
2040
  args: [],
2008
2041
  source: "atRandom\x0a\x09^ self at: self size atRandom",
2009
2042
  messageSends: ["at:", "atRandom", "size"],
@@ -2018,15 +2051,16 @@ selector: "copyFrom:to:",
2018
2051
  category: 'copying',
2019
2052
  fn: function (anIndex,anotherIndex){
2020
2053
  var self=this;
2021
- var range;
2022
- var newCollection;
2023
- range=smalltalk.send(anIndex,"_to_",[anotherIndex]);
2024
- newCollection=smalltalk.send(smalltalk.send(self,"_class",[]),"_new_",[smalltalk.send(range,"_size",[])]);
2025
- smalltalk.send(range,"_withIndexDo_",[(function(each,i){
2026
- return smalltalk.send(newCollection,"_at_put_",[i,smalltalk.send(self,"_at_",[each])]);
2027
- })]);
2028
- return newCollection;
2029
- },
2054
+ var range,newCollection;
2055
+ return smalltalk.withContext(function($ctx1) {
2056
+ range=_st(anIndex)._to_(anotherIndex);
2057
+ newCollection=_st(_st(self)._class())._new_(_st(range)._size());
2058
+ _st(range)._withIndexDo_((function(each,i){
2059
+ return smalltalk.withContext(function($ctx2) {
2060
+ }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1)})}));
2061
+ $1=newCollection;
2062
+ return $1;
2063
+ }, function($ctx1) {$ctx1.fill(self,"copyFrom:to:",{anIndex:anIndex,anotherIndex:anotherIndex,range:range,newCollection:newCollection}, smalltalk.SequenceableCollection)})},
2030
2064
  args: ["anIndex", "anotherIndex"],
2031
2065
  source: "copyFrom: anIndex to: anotherIndex\x0a\x09| range newCollection |\x0a\x09range := anIndex to: anotherIndex.\x0a\x09newCollection := self class new: range size.\x0a\x09range withIndexDo: [:each :i |\x0a\x09 newCollection at: i put: (self at: each)].\x0a\x09^newCollection",
2032
2066
  messageSends: ["to:", "new:", "size", "class", "withIndexDo:", "at:put:", "at:"],
@@ -2042,12 +2076,14 @@ category: 'copying',
2042
2076
  fn: function (){
2043
2077
  var self=this;
2044
2078
  var newCollection;
2045
- newCollection=smalltalk.send(smalltalk.send(self,"_class",[]),"_new_",[smalltalk.send(self,"_size",[])]);
2046
- smalltalk.send(self,"_withIndexDo_",[(function(each,index){
2047
- return smalltalk.send(newCollection,"_at_put_",[index,smalltalk.send(each,"_deepCopy",[])]);
2048
- })]);
2049
- return newCollection;
2050
- },
2079
+ return smalltalk.withContext(function($ctx1) {
2080
+ newCollection=_st(_st(self)._class())._new_(_st(self)._size());
2081
+ _st(self)._withIndexDo_((function(each,index){
2082
+ return smalltalk.withContext(function($ctx2) {
2083
+ }, function($ctx2) {$ctx2.fillBlock({each:each,index:index},$ctx1)})}));
2084
+ $1=newCollection;
2085
+ return $1;
2086
+ }, function($ctx1) {$ctx1.fill(self,"deepCopy",{newCollection:newCollection}, smalltalk.SequenceableCollection)})},
2051
2087
  args: [],
2052
2088
  source: "deepCopy\x0a\x09| newCollection |\x0a\x09newCollection := self class new: self size.\x0a\x09self withIndexDo: [:each :index | \x0a\x09\x09newCollection at: index put: each deepCopy].\x0a\x09^newCollection",
2053
2089
  messageSends: ["new:", "size", "class", "withIndexDo:", "at:put:", "deepCopy"],
@@ -2062,10 +2098,10 @@ selector: "first",
2062
2098
  category: 'accessing',
2063
2099
  fn: function (){
2064
2100
  var self=this;
2065
- var $1;
2066
- $1=smalltalk.send(self,"_at_",[(1)]);
2101
+ return smalltalk.withContext(function($ctx1) {
2102
+ $1=_st(self)._at_((1));
2067
2103
  return $1;
2068
- },
2104
+ }, function($ctx1) {$ctx1.fill(self,"first",{}, smalltalk.SequenceableCollection)})},
2069
2105
  args: [],
2070
2106
  source: "first\x0a\x09^self at: 1",
2071
2107
  messageSends: ["at:"],
@@ -2080,10 +2116,10 @@ selector: "first:",
2080
2116
  category: 'accessing',
2081
2117
  fn: function (n){
2082
2118
  var self=this;
2083
- var $1;
2084
- $1=smalltalk.send(self,"_copyFrom_to_",[(1),n]);
2119
+ return smalltalk.withContext(function($ctx1) {
2120
+ $1=_st(self)._copyFrom_to_((1),n);
2085
2121
  return $1;
2086
- },
2122
+ }, function($ctx1) {$ctx1.fill(self,"first:",{n:n}, smalltalk.SequenceableCollection)})},
2087
2123
  args: ["n"],
2088
2124
  source: "first: n\x0a\x09\x22Answer the first n elements of the receiver.\x0a\x09Raise an error if there are not enough elements.\x22\x0a\x0a\x09^ self copyFrom: 1 to: n",
2089
2125
  messageSends: ["copyFrom:to:"],
@@ -2098,10 +2134,10 @@ selector: "fourth",
2098
2134
  category: 'accessing',
2099
2135
  fn: function (){
2100
2136
  var self=this;
2101
- var $1;
2102
- $1=smalltalk.send(self,"_at_",[(4)]);
2137
+ return smalltalk.withContext(function($ctx1) {
2138
+ $1=_st(self)._at_((4));
2103
2139
  return $1;
2104
- },
2140
+ }, function($ctx1) {$ctx1.fill(self,"fourth",{}, smalltalk.SequenceableCollection)})},
2105
2141
  args: [],
2106
2142
  source: "fourth\x0a\x09^self at: 4",
2107
2143
  messageSends: ["at:"],
@@ -2109,6 +2145,26 @@ referencedClasses: []
2109
2145
  }),
2110
2146
  smalltalk.SequenceableCollection);
2111
2147
 
2148
+ smalltalk.addMethod(
2149
+ "_includes_",
2150
+ smalltalk.method({
2151
+ selector: "includes:",
2152
+ category: 'testing',
2153
+ fn: function (anObject){
2154
+ var self=this;
2155
+ return smalltalk.withContext(function($ctx1) {
2156
+ $1=_st(_st(self)._indexOf_ifAbsent_(anObject,(function(){
2157
+ return smalltalk.withContext(function($ctx2) {
2158
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._notNil();
2159
+ return $1;
2160
+ }, function($ctx1) {$ctx1.fill(self,"includes:",{anObject:anObject}, smalltalk.SequenceableCollection)})},
2161
+ args: ["anObject"],
2162
+ source: "includes: anObject\x0a\x09^(self indexOf: anObject ifAbsent: [nil]) notNil",
2163
+ messageSends: ["notNil", "indexOf:ifAbsent:"],
2164
+ referencedClasses: []
2165
+ }),
2166
+ smalltalk.SequenceableCollection);
2167
+
2112
2168
  smalltalk.addMethod(
2113
2169
  "_indexOf_",
2114
2170
  smalltalk.method({
@@ -2116,12 +2172,12 @@ selector: "indexOf:",
2116
2172
  category: 'accessing',
2117
2173
  fn: function (anObject){
2118
2174
  var self=this;
2119
- var $1;
2120
- $1=smalltalk.send(self,"_indexOf_ifAbsent_",[anObject,(function(){
2121
- return smalltalk.send(self,"_errorNotFound",[]);
2122
- })]);
2175
+ return smalltalk.withContext(function($ctx1) {
2176
+ $1=_st(self)._indexOf_ifAbsent_(anObject,(function(){
2177
+ return smalltalk.withContext(function($ctx2) {
2178
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
2123
2179
  return $1;
2124
- },
2180
+ }, function($ctx1) {$ctx1.fill(self,"indexOf:",{anObject:anObject}, smalltalk.SequenceableCollection)})},
2125
2181
  args: ["anObject"],
2126
2182
  source: "indexOf: anObject\x0a\x09^self indexOf: anObject ifAbsent: [self errorNotFound]",
2127
2183
  messageSends: ["indexOf:ifAbsent:", "errorNotFound"],
@@ -2136,16 +2192,15 @@ selector: "indexOf:ifAbsent:",
2136
2192
  category: 'accessing',
2137
2193
  fn: function (anObject,aBlock){
2138
2194
  var self=this;
2139
-
2195
+ return smalltalk.withContext(function($ctx1) {
2140
2196
  for(var i=0;i<self.length;i++) {
2141
- if(smalltalk.send(self[i], '__eq', [anObject])) {return i+1}
2197
+ if(self[i].__eq(anObject)) {return i+1}
2142
2198
  };
2143
2199
  return aBlock();
2144
2200
  ;
2145
- ;
2146
- return self},
2201
+ return self}, function($ctx1) {$ctx1.fill(self,"indexOf:ifAbsent:",{anObject:anObject,aBlock:aBlock}, smalltalk.SequenceableCollection)})},
2147
2202
  args: ["anObject", "aBlock"],
2148
- source: "indexOf: anObject ifAbsent: aBlock\x0a\x09<\x0a\x09\x09for(var i=0;i<self.length;i++) {\x0a\x09\x09\x09if(smalltalk.send(self[i], '__eq', [anObject])) {return i+1}\x0a\x09\x09};\x0a\x09\x09return aBlock();\x0a\x09>",
2203
+ source: "indexOf: anObject ifAbsent: aBlock\x0a\x09<\x0a\x09\x09for(var i=0;i<self.length;i++) {\x0a\x09\x09\x09if(self[i].__eq(anObject)) {return i+1}\x0a\x09\x09};\x0a\x09\x09return aBlock();\x0a\x09>",
2149
2204
  messageSends: [],
2150
2205
  referencedClasses: []
2151
2206
  }),
@@ -2158,12 +2213,12 @@ selector: "indexOf:startingAt:",
2158
2213
  category: 'accessing',
2159
2214
  fn: function (anObject,start){
2160
2215
  var self=this;
2161
- var $1;
2162
- $1=smalltalk.send(self,"_indexOf_startingAt_ifAbsent_",[anObject,start,(function(){
2163
- return (0);
2164
- })]);
2216
+ return smalltalk.withContext(function($ctx1) {
2217
+ $1=_st(self)._indexOf_startingAt_ifAbsent_(anObject,start,(function(){
2218
+ return smalltalk.withContext(function($ctx2) {
2219
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
2165
2220
  return $1;
2166
- },
2221
+ }, function($ctx1) {$ctx1.fill(self,"indexOf:startingAt:",{anObject:anObject,start:start}, smalltalk.SequenceableCollection)})},
2167
2222
  args: ["anObject", "start"],
2168
2223
  source: "indexOf: anObject startingAt: start\x0a\x09\x22Answer the index of the first occurence of anElement after start\x0a\x09within the receiver. If the receiver does not contain anElement, \x0a\x09answer 0.\x22\x0a\x09^self indexOf: anObject startingAt: start ifAbsent: [0]",
2169
2224
  messageSends: ["indexOf:startingAt:ifAbsent:"],
@@ -2178,14 +2233,13 @@ selector: "indexOf:startingAt:ifAbsent:",
2178
2233
  category: 'accessing',
2179
2234
  fn: function (anObject,start,aBlock){
2180
2235
  var self=this;
2181
-
2236
+ return smalltalk.withContext(function($ctx1) {
2182
2237
  for(var i=start-1;i<self.length;i++){
2183
2238
  if(self[i].__eq(anObject)) {return i+1}
2184
2239
  }
2185
2240
  return aBlock();
2186
2241
  ;
2187
- ;
2188
- return self},
2242
+ return self}, function($ctx1) {$ctx1.fill(self,"indexOf:startingAt:ifAbsent:",{anObject:anObject,start:start,aBlock:aBlock}, smalltalk.SequenceableCollection)})},
2189
2243
  args: ["anObject", "start", "aBlock"],
2190
2244
  source: "indexOf: anObject startingAt: start ifAbsent: aBlock\x0a\x09<\x0a\x09\x09for(var i=start-1;i<self.length;i++){\x0a\x09\x09\x09if(self[i].__eq(anObject)) {return i+1}\x0a\x09\x09}\x0a\x09\x09return aBlock();\x0a\x09>",
2191
2245
  messageSends: [],
@@ -2200,10 +2254,10 @@ selector: "last",
2200
2254
  category: 'accessing',
2201
2255
  fn: function (){
2202
2256
  var self=this;
2203
- var $1;
2204
- $1=smalltalk.send(self,"_at_",[smalltalk.send(self,"_size",[])]);
2257
+ return smalltalk.withContext(function($ctx1) {
2258
+ $1=_st(self)._at_(_st(self)._size());
2205
2259
  return $1;
2206
- },
2260
+ }, function($ctx1) {$ctx1.fill(self,"last",{}, smalltalk.SequenceableCollection)})},
2207
2261
  args: [],
2208
2262
  source: "last\x0a\x09^self at: self size",
2209
2263
  messageSends: ["at:", "size"],
@@ -2218,8 +2272,8 @@ selector: "removeLast",
2218
2272
  category: 'adding',
2219
2273
  fn: function (){
2220
2274
  var self=this;
2221
- smalltalk.send(self,"_remove_",[smalltalk.send(self,"_last",[])]);
2222
- return self},
2275
+ return smalltalk.withContext(function($ctx1) {
2276
+ return self}, function($ctx1) {$ctx1.fill(self,"removeLast",{}, smalltalk.SequenceableCollection)})},
2223
2277
  args: [],
2224
2278
  source: "removeLast\x0a\x09self remove: self last",
2225
2279
  messageSends: ["remove:", "last"],
@@ -2234,8 +2288,8 @@ selector: "reversed",
2234
2288
  category: 'converting',
2235
2289
  fn: function (){
2236
2290
  var self=this;
2237
- smalltalk.send(self,"_subclassResponsibility",[]);
2238
- return self},
2291
+ return smalltalk.withContext(function($ctx1) {
2292
+ return self}, function($ctx1) {$ctx1.fill(self,"reversed",{}, smalltalk.SequenceableCollection)})},
2239
2293
  args: [],
2240
2294
  source: "reversed\x0a\x09self subclassResponsibility",
2241
2295
  messageSends: ["subclassResponsibility"],
@@ -2250,10 +2304,10 @@ selector: "second",
2250
2304
  category: 'accessing',
2251
2305
  fn: function (){
2252
2306
  var self=this;
2253
- var $1;
2254
- $1=smalltalk.send(self,"_at_",[(2)]);
2307
+ return smalltalk.withContext(function($ctx1) {
2308
+ $1=_st(self)._at_((2));
2255
2309
  return $1;
2256
- },
2310
+ }, function($ctx1) {$ctx1.fill(self,"second",{}, smalltalk.SequenceableCollection)})},
2257
2311
  args: [],
2258
2312
  source: "second\x0a\x09^self at: 2",
2259
2313
  messageSends: ["at:"],
@@ -2269,12 +2323,14 @@ category: 'copying',
2269
2323
  fn: function (){
2270
2324
  var self=this;
2271
2325
  var newCollection;
2272
- newCollection=smalltalk.send(smalltalk.send(self,"_class",[]),"_new_",[smalltalk.send(self,"_size",[])]);
2273
- smalltalk.send(self,"_withIndexDo_",[(function(each,index){
2274
- return smalltalk.send(newCollection,"_at_put_",[index,each]);
2275
- })]);
2276
- return newCollection;
2277
- },
2326
+ return smalltalk.withContext(function($ctx1) {
2327
+ newCollection=_st(_st(self)._class())._new_(_st(self)._size());
2328
+ _st(self)._withIndexDo_((function(each,index){
2329
+ return smalltalk.withContext(function($ctx2) {
2330
+ }, function($ctx2) {$ctx2.fillBlock({each:each,index:index},$ctx1)})}));
2331
+ $1=newCollection;
2332
+ return $1;
2333
+ }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{newCollection:newCollection}, smalltalk.SequenceableCollection)})},
2278
2334
  args: [],
2279
2335
  source: "shallowCopy\x0a\x09| newCollection |\x0a\x09newCollection := self class new: self size.\x0a\x09self withIndexDo: [ :each :index | \x0a\x09\x09newCollection at: index put: each].\x0a\x09^newCollection",
2280
2336
  messageSends: ["new:", "size", "class", "withIndexDo:", "at:put:"],
@@ -2289,10 +2345,10 @@ selector: "third",
2289
2345
  category: 'accessing',
2290
2346
  fn: function (){
2291
2347
  var self=this;
2292
- var $1;
2293
- $1=smalltalk.send(self,"_at_",[(3)]);
2348
+ return smalltalk.withContext(function($ctx1) {
2349
+ $1=_st(self)._at_((3));
2294
2350
  return $1;
2295
- },
2351
+ }, function($ctx1) {$ctx1.fill(self,"third",{}, smalltalk.SequenceableCollection)})},
2296
2352
  args: [],
2297
2353
  source: "third\x0a\x09^self at: 3",
2298
2354
  messageSends: ["at:"],
@@ -2307,9 +2363,8 @@ selector: "withIndexDo:",
2307
2363
  category: 'enumerating',
2308
2364
  fn: function (aBlock){
2309
2365
  var self=this;
2310
- for(var i=0;i<self.length;i++){aBlock(self[i], i+1);};
2311
- ;
2312
- return self},
2366
+ return smalltalk.withContext(function($ctx1) {
2367
+ return self}, function($ctx1) {$ctx1.fill(self,"withIndexDo:",{aBlock:aBlock}, smalltalk.SequenceableCollection)})},
2313
2368
  args: ["aBlock"],
2314
2369
  source: "withIndexDo: aBlock\x0a\x09<for(var i=0;i<self.length;i++){aBlock(self[i], i+1);}>",
2315
2370
  messageSends: [],
@@ -2327,9 +2382,8 @@ selector: "add:",
2327
2382
  category: 'adding/removing',
2328
2383
  fn: function (anObject){
2329
2384
  var self=this;
2330
- self.push(anObject); return anObject;;
2331
- ;
2332
- return self},
2385
+ return smalltalk.withContext(function($ctx1) {
2386
+ return self}, function($ctx1) {$ctx1.fill(self,"add:",{anObject:anObject}, smalltalk.Array)})},
2333
2387
  args: ["anObject"],
2334
2388
  source: "add: anObject\x0a\x09<self.push(anObject); return anObject;>",
2335
2389
  messageSends: [],
@@ -2344,12 +2398,12 @@ selector: "asJavascript",
2344
2398
  category: 'converting',
2345
2399
  fn: function (){
2346
2400
  var self=this;
2347
- var $1;
2348
- $1=smalltalk.send(smalltalk.send("[","__comma",[smalltalk.send(smalltalk.send(self,"_collect_",[(function(each){
2349
- return smalltalk.send(each,"_asJavascript",[]);
2350
- })]),"_join_",[", "])]),"__comma",["]"]);
2401
+ return smalltalk.withContext(function($ctx1) {
2402
+ $1=_st(_st("[").__comma(_st(_st(self)._collect_((function(each){
2403
+ return smalltalk.withContext(function($ctx2) {
2404
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._join_(", "))).__comma("]");
2351
2405
  return $1;
2352
- },
2406
+ }, function($ctx1) {$ctx1.fill(self,"asJavascript",{}, smalltalk.Array)})},
2353
2407
  args: [],
2354
2408
  source: "asJavascript\x0a\x09^'[', ((self collect: [:each | each asJavascript]) join: ', '), ']'",
2355
2409
  messageSends: [",", "join:", "collect:", "asJavascript"],
@@ -2364,12 +2418,11 @@ selector: "at:ifAbsent:",
2364
2418
  category: 'accessing',
2365
2419
  fn: function (anIndex,aBlock){
2366
2420
  var self=this;
2367
-
2421
+ return smalltalk.withContext(function($ctx1) {
2368
2422
  if((anIndex < 1) || (self.length < anIndex)) {return aBlock()};
2369
2423
  return self[anIndex - 1];
2370
2424
  ;
2371
- ;
2372
- return self},
2425
+ return self}, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{anIndex:anIndex,aBlock:aBlock}, smalltalk.Array)})},
2373
2426
  args: ["anIndex", "aBlock"],
2374
2427
  source: "at: anIndex ifAbsent: aBlock\x0a\x09<\x0a\x09\x09if((anIndex < 1) || (self.length < anIndex)) {return aBlock()};\x0a\x09\x09return self[anIndex - 1];\x0a\x09>",
2375
2428
  messageSends: [],
@@ -2384,9 +2437,8 @@ selector: "at:put:",
2384
2437
  category: 'accessing',
2385
2438
  fn: function (anIndex,anObject){
2386
2439
  var self=this;
2387
- return self[anIndex - 1] = anObject;
2388
- ;
2389
- return self},
2440
+ return smalltalk.withContext(function($ctx1) {
2441
+ return self}, function($ctx1) {$ctx1.fill(self,"at:put:",{anIndex:anIndex,anObject:anObject}, smalltalk.Array)})},
2390
2442
  args: ["anIndex", "anObject"],
2391
2443
  source: "at: anIndex put: anObject\x0a\x09<return self[anIndex - 1] = anObject>",
2392
2444
  messageSends: [],
@@ -2401,9 +2453,8 @@ selector: "join:",
2401
2453
  category: 'enumerating',
2402
2454
  fn: function (aString){
2403
2455
  var self=this;
2404
- return self.join(aString);
2405
- ;
2406
- return self},
2456
+ return smalltalk.withContext(function($ctx1) {
2457
+ return self}, function($ctx1) {$ctx1.fill(self,"join:",{aString:aString}, smalltalk.Array)})},
2407
2458
  args: ["aString"],
2408
2459
  source: "join: aString\x0a\x09<return self.join(aString)>",
2409
2460
  messageSends: [],
@@ -2418,20 +2469,19 @@ selector: "remove:ifAbsent:",
2418
2469
  category: 'adding/removing',
2419
2470
  fn: function (anObject,aBlock){
2420
2471
  var self=this;
2421
-
2472
+ return smalltalk.withContext(function($ctx1) {
2422
2473
  for(var i=0;i<self.length;i++) {
2423
2474
  if(self[i] == anObject) {
2424
2475
  self.splice(i,1);
2425
2476
  return self;
2426
2477
  }
2427
- }
2478
+ };
2479
+ aBlock._value();
2428
2480
  ;
2429
- ;
2430
- smalltalk.send(aBlock,"_value",[]);
2431
- return self},
2481
+ return self}, function($ctx1) {$ctx1.fill(self,"remove:ifAbsent:",{anObject:anObject,aBlock:aBlock}, smalltalk.Array)})},
2432
2482
  args: ["anObject", "aBlock"],
2433
- source: "remove: anObject ifAbsent: aBlock\x0a\x09<\x0a\x09\x09for(var i=0;i<self.length;i++) {\x0a\x09\x09\x09if(self[i] == anObject) {\x0a\x09\x09\x09\x09self.splice(i,1);\x0a\x09\x09\x09\x09return self;\x0a\x09\x09\x09}\x0a\x09\x09}\x0a\x09>.\x0a\x09aBlock value",
2434
- messageSends: ["value"],
2483
+ source: "remove: anObject ifAbsent: aBlock\x0a\x09<\x0a\x09\x09for(var i=0;i<self.length;i++) {\x0a\x09\x09\x09if(self[i] == anObject) {\x0a\x09\x09\x09\x09self.splice(i,1);\x0a\x09\x09\x09\x09return self;\x0a\x09\x09\x09}\x0a\x09\x09};\x0a aBlock._value();\x0a\x09>",
2484
+ messageSends: [],
2435
2485
  referencedClasses: []
2436
2486
  }),
2437
2487
  smalltalk.Array);
@@ -2443,9 +2493,8 @@ selector: "removeFrom:to:",
2443
2493
  category: 'adding/removing',
2444
2494
  fn: function (aNumber,anotherNumber){
2445
2495
  var self=this;
2446
- self.splice(aNumber - 1,anotherNumber - 1);
2447
- ;
2448
- return self},
2496
+ return smalltalk.withContext(function($ctx1) {
2497
+ return self}, function($ctx1) {$ctx1.fill(self,"removeFrom:to:",{aNumber:aNumber,anotherNumber:anotherNumber}, smalltalk.Array)})},
2449
2498
  args: ["aNumber", "anotherNumber"],
2450
2499
  source: "removeFrom: aNumber to: anotherNumber\x0a\x09<self.splice(aNumber - 1,anotherNumber - 1)>",
2451
2500
  messageSends: [],
@@ -2460,9 +2509,8 @@ selector: "reversed",
2460
2509
  category: 'converting',
2461
2510
  fn: function (){
2462
2511
  var self=this;
2463
- return self._copy().reverse();
2464
- ;
2465
- return self},
2512
+ return smalltalk.withContext(function($ctx1) {
2513
+ return self}, function($ctx1) {$ctx1.fill(self,"reversed",{}, smalltalk.Array)})},
2466
2514
  args: [],
2467
2515
  source: "reversed\x0a\x09<return self._copy().reverse()>",
2468
2516
  messageSends: [],
@@ -2477,9 +2525,8 @@ selector: "size",
2477
2525
  category: 'accessing',
2478
2526
  fn: function (){
2479
2527
  var self=this;
2480
- return self.length;
2481
- ;
2482
- return self},
2528
+ return smalltalk.withContext(function($ctx1) {
2529
+ return self}, function($ctx1) {$ctx1.fill(self,"size",{}, smalltalk.Array)})},
2483
2530
  args: [],
2484
2531
  source: "size\x0a\x09<return self.length>",
2485
2532
  messageSends: [],
@@ -2494,10 +2541,10 @@ selector: "sort",
2494
2541
  category: 'enumerating',
2495
2542
  fn: function (){
2496
2543
  var self=this;
2497
- var $1;
2498
- $1=smalltalk.send(self,"_basicPerform_",["sort"]);
2544
+ return smalltalk.withContext(function($ctx1) {
2545
+ $1=_st(self)._basicPerform_("sort");
2499
2546
  return $1;
2500
- },
2547
+ }, function($ctx1) {$ctx1.fill(self,"sort",{}, smalltalk.Array)})},
2501
2548
  args: [],
2502
2549
  source: "sort\x0a ^self basicPerform: 'sort'",
2503
2550
  messageSends: ["basicPerform:"],
@@ -2512,13 +2559,12 @@ selector: "sort:",
2512
2559
  category: 'enumerating',
2513
2560
  fn: function (aBlock){
2514
2561
  var self=this;
2515
-
2562
+ return smalltalk.withContext(function($ctx1) {
2516
2563
  return self.sort(function(a, b) {
2517
2564
  if(aBlock(a,b)) {return -1} else {return 1}
2518
2565
  })
2519
2566
  ;
2520
- ;
2521
- return self},
2567
+ return self}, function($ctx1) {$ctx1.fill(self,"sort:",{aBlock:aBlock}, smalltalk.Array)})},
2522
2568
  args: ["aBlock"],
2523
2569
  source: "sort: aBlock\x0a\x09<\x0a\x09\x09return self.sort(function(a, b) {\x0a\x09\x09\x09if(aBlock(a,b)) {return -1} else {return 1}\x0a\x09\x09})\x0a\x09>",
2524
2570
  messageSends: [],
@@ -2533,10 +2579,10 @@ selector: "sorted",
2533
2579
  category: 'enumerating',
2534
2580
  fn: function (){
2535
2581
  var self=this;
2536
- var $1;
2537
- $1=smalltalk.send(smalltalk.send(self,"_copy",[]),"_sort",[]);
2582
+ return smalltalk.withContext(function($ctx1) {
2583
+ $1=_st(_st(self)._copy())._sort();
2538
2584
  return $1;
2539
- },
2585
+ }, function($ctx1) {$ctx1.fill(self,"sorted",{}, smalltalk.Array)})},
2540
2586
  args: [],
2541
2587
  source: "sorted\x0a\x09^self copy sort",
2542
2588
  messageSends: ["sort", "copy"],
@@ -2551,10 +2597,10 @@ selector: "sorted:",
2551
2597
  category: 'enumerating',
2552
2598
  fn: function (aBlock){
2553
2599
  var self=this;
2554
- var $1;
2555
- $1=smalltalk.send(smalltalk.send(self,"_copy",[]),"_sort_",[aBlock]);
2600
+ return smalltalk.withContext(function($ctx1) {
2601
+ $1=_st(_st(self)._copy())._sort_(aBlock);
2556
2602
  return $1;
2557
- },
2603
+ }, function($ctx1) {$ctx1.fill(self,"sorted:",{aBlock:aBlock}, smalltalk.Array)})},
2558
2604
  args: ["aBlock"],
2559
2605
  source: "sorted: aBlock\x0a\x09^self copy sort: aBlock",
2560
2606
  messageSends: ["sort:", "copy"],
@@ -2570,9 +2616,8 @@ selector: "new:",
2570
2616
  category: 'instance creation',
2571
2617
  fn: function (anInteger){
2572
2618
  var self=this;
2573
- return new Array(anInteger);
2574
- ;
2575
- return self},
2619
+ return smalltalk.withContext(function($ctx1) {
2620
+ return self}, function($ctx1) {$ctx1.fill(self,"new:",{anInteger:anInteger}, smalltalk.Array.klass)})},
2576
2621
  args: ["anInteger"],
2577
2622
  source: "new: anInteger\x0a\x09<return new Array(anInteger)>",
2578
2623
  messageSends: [],
@@ -2587,13 +2632,13 @@ selector: "with:",
2587
2632
  category: 'instance creation',
2588
2633
  fn: function (anObject){
2589
2634
  var self=this;
2590
- var $2,$3,$1;
2591
- $2=smalltalk.send(self,"_new_",[(1)]);
2592
- smalltalk.send($2,"_at_put_",[(1),anObject]);
2593
- $3=smalltalk.send($2,"_yourself",[]);
2635
+ return smalltalk.withContext(function($ctx1) {
2636
+ $2=_st(self)._new_((1));
2637
+ _st($2)._at_put_((1),anObject);
2638
+ $3=_st($2)._yourself();
2594
2639
  $1=$3;
2595
2640
  return $1;
2596
- },
2641
+ }, function($ctx1) {$ctx1.fill(self,"with:",{anObject:anObject}, smalltalk.Array.klass)})},
2597
2642
  args: ["anObject"],
2598
2643
  source: "with: anObject\x0a\x09 ^(self new: 1)\x0a\x09\x09at: 1 put: anObject;\x0a\x09\x09yourself",
2599
2644
  messageSends: ["at:put:", "new:", "yourself"],
@@ -2608,14 +2653,14 @@ selector: "with:with:",
2608
2653
  category: 'instance creation',
2609
2654
  fn: function (anObject,anObject2){
2610
2655
  var self=this;
2611
- var $2,$3,$1;
2612
- $2=smalltalk.send(self,"_new_",[(2)]);
2613
- smalltalk.send($2,"_at_put_",[(1),anObject]);
2614
- smalltalk.send($2,"_at_put_",[(2),anObject2]);
2615
- $3=smalltalk.send($2,"_yourself",[]);
2656
+ return smalltalk.withContext(function($ctx1) {
2657
+ $2=_st(self)._new_((2));
2658
+ _st($2)._at_put_((1),anObject);
2659
+ _st($2)._at_put_((2),anObject2);
2660
+ $3=_st($2)._yourself();
2616
2661
  $1=$3;
2617
2662
  return $1;
2618
- },
2663
+ }, function($ctx1) {$ctx1.fill(self,"with:with:",{anObject:anObject,anObject2:anObject2}, smalltalk.Array.klass)})},
2619
2664
  args: ["anObject", "anObject2"],
2620
2665
  source: "with: anObject with: anObject2\x0a\x09 ^(self new: 2)\x0a\x09\x09at: 1 put: anObject;\x0a\x09\x09at: 2 put: anObject2;\x0a\x09\x09yourself",
2621
2666
  messageSends: ["at:put:", "new:", "yourself"],
@@ -2630,15 +2675,15 @@ selector: "with:with:with:",
2630
2675
  category: 'instance creation',
2631
2676
  fn: function (anObject,anObject2,anObject3){
2632
2677
  var self=this;
2633
- var $2,$3,$1;
2634
- $2=smalltalk.send(self,"_new_",[(3)]);
2635
- smalltalk.send($2,"_at_put_",[(1),anObject]);
2636
- smalltalk.send($2,"_at_put_",[(2),anObject2]);
2637
- smalltalk.send($2,"_at_put_",[(3),anObject3]);
2638
- $3=smalltalk.send($2,"_yourself",[]);
2678
+ return smalltalk.withContext(function($ctx1) {
2679
+ $2=_st(self)._new_((3));
2680
+ _st($2)._at_put_((1),anObject);
2681
+ _st($2)._at_put_((2),anObject2);
2682
+ _st($2)._at_put_((3),anObject3);
2683
+ $3=_st($2)._yourself();
2639
2684
  $1=$3;
2640
2685
  return $1;
2641
- },
2686
+ }, function($ctx1) {$ctx1.fill(self,"with:with:with:",{anObject:anObject,anObject2:anObject2,anObject3:anObject3}, smalltalk.Array.klass)})},
2642
2687
  args: ["anObject", "anObject2", "anObject3"],
2643
2688
  source: "with: anObject with: anObject2 with: anObject3\x0a\x09 ^(self new: 3)\x0a\x09\x09at: 1 put: anObject;\x0a\x09\x09at: 2 put: anObject2;\x0a\x09\x09at: 3 put: anObject3;\x0a\x09\x09yourself",
2644
2689
  messageSends: ["at:put:", "new:", "yourself"],
@@ -2653,17 +2698,18 @@ selector: "withAll:",
2653
2698
  category: 'instance creation',
2654
2699
  fn: function (aCollection){
2655
2700
  var self=this;
2656
- var instance;
2657
- var index;
2701
+ var instance,index;
2702
+ return smalltalk.withContext(function($ctx1) {
2658
2703
  index=(1);
2659
- instance=smalltalk.send(self,"_new_",[smalltalk.send(aCollection,"_size",[])]);
2660
- smalltalk.send(aCollection,"_do_",[(function(each){
2661
- smalltalk.send(instance,"_at_put_",[index,each]);
2662
- index=smalltalk.send(index,"__plus",[(1)]);
2704
+ instance=_st(self)._new_(_st(aCollection)._size());
2705
+ _st(aCollection)._do_((function(each){
2706
+ return smalltalk.withContext(function($ctx2) {
2707
+ index=_st(index).__plus((1));
2663
2708
  return index;
2664
- })]);
2665
- return instance;
2666
- },
2709
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
2710
+ $1=instance;
2711
+ return $1;
2712
+ }, function($ctx1) {$ctx1.fill(self,"withAll:",{aCollection:aCollection,instance:instance,index:index}, smalltalk.Array.klass)})},
2667
2713
  args: ["aCollection"],
2668
2714
  source: "withAll: aCollection\x0a\x09| instance index |\x0a\x09index := 1.\x0a\x09instance := self new: aCollection size.\x0a\x09aCollection do: [:each |\x0a\x09\x09instance at: index put: each.\x0a\x09\x09index := index + 1].\x0a\x09^instance",
2669
2715
  messageSends: ["new:", "size", "do:", "at:put:", "+"],
@@ -2680,10 +2726,10 @@ selector: ",",
2680
2726
  category: 'copying',
2681
2727
  fn: function (aString){
2682
2728
  var self=this;
2683
- var $1;
2684
- $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"__comma",[smalltalk.send(aString,"_asString",[])]);
2729
+ return smalltalk.withContext(function($ctx1) {
2730
+ $1=_st(_st(self)._asString()).__comma(_st(aString)._asString());
2685
2731
  return $1;
2686
- },
2732
+ }, function($ctx1) {$ctx1.fill(self,",",{aString:aString}, smalltalk.CharacterArray)})},
2687
2733
  args: ["aString"],
2688
2734
  source: ", aString\x0a\x09^self asString, aString asString",
2689
2735
  messageSends: [",", "asString"],
@@ -2698,8 +2744,8 @@ selector: "add:",
2698
2744
  category: 'adding',
2699
2745
  fn: function (anObject){
2700
2746
  var self=this;
2701
- smalltalk.send(self,"_errorReadOnly",[]);
2702
- return self},
2747
+ return smalltalk.withContext(function($ctx1) {
2748
+ return self}, function($ctx1) {$ctx1.fill(self,"add:",{anObject:anObject}, smalltalk.CharacterArray)})},
2703
2749
  args: ["anObject"],
2704
2750
  source: "add: anObject\x0a\x09self errorReadOnly",
2705
2751
  messageSends: ["errorReadOnly"],
@@ -2714,10 +2760,10 @@ selector: "asLowercase",
2714
2760
  category: 'converting',
2715
2761
  fn: function (){
2716
2762
  var self=this;
2717
- var $1;
2718
- $1=smalltalk.send(smalltalk.send(self,"_class",[]),"_fromString_",[smalltalk.send(smalltalk.send(self,"_asString",[]),"_asLowercase",[])]);
2763
+ return smalltalk.withContext(function($ctx1) {
2764
+ $1=_st(_st(self)._class())._fromString_(_st(_st(self)._asString())._asLowercase());
2719
2765
  return $1;
2720
- },
2766
+ }, function($ctx1) {$ctx1.fill(self,"asLowercase",{}, smalltalk.CharacterArray)})},
2721
2767
  args: [],
2722
2768
  source: "asLowercase\x0a\x09^self class fromString: self asString asLowercase",
2723
2769
  messageSends: ["fromString:", "asLowercase", "asString", "class"],
@@ -2732,10 +2778,10 @@ selector: "asNumber",
2732
2778
  category: 'converting',
2733
2779
  fn: function (){
2734
2780
  var self=this;
2735
- var $1;
2736
- $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"_asNumber",[]);
2781
+ return smalltalk.withContext(function($ctx1) {
2782
+ $1=_st(_st(self)._asString())._asNumber();
2737
2783
  return $1;
2738
- },
2784
+ }, function($ctx1) {$ctx1.fill(self,"asNumber",{}, smalltalk.CharacterArray)})},
2739
2785
  args: [],
2740
2786
  source: "asNumber\x0a\x09^self asString asNumber",
2741
2787
  messageSends: ["asNumber", "asString"],
@@ -2750,10 +2796,10 @@ selector: "asString",
2750
2796
  category: 'converting',
2751
2797
  fn: function (){
2752
2798
  var self=this;
2753
- var $1;
2754
- $1=smalltalk.send(self,"_subclassResponsibility",[]);
2799
+ return smalltalk.withContext(function($ctx1) {
2800
+ $1=_st(self)._subclassResponsibility();
2755
2801
  return $1;
2756
- },
2802
+ }, function($ctx1) {$ctx1.fill(self,"asString",{}, smalltalk.CharacterArray)})},
2757
2803
  args: [],
2758
2804
  source: "asString\x0a\x09^self subclassResponsibility",
2759
2805
  messageSends: ["subclassResponsibility"],
@@ -2768,10 +2814,10 @@ selector: "asSymbol",
2768
2814
  category: 'converting',
2769
2815
  fn: function (){
2770
2816
  var self=this;
2771
- var $1;
2772
- $1=smalltalk.send(self,"_subclassResponsibility",[]);
2817
+ return smalltalk.withContext(function($ctx1) {
2818
+ $1=_st(self)._subclassResponsibility();
2773
2819
  return $1;
2774
- },
2820
+ }, function($ctx1) {$ctx1.fill(self,"asSymbol",{}, smalltalk.CharacterArray)})},
2775
2821
  args: [],
2776
2822
  source: "asSymbol\x0a\x09^self subclassResponsibility",
2777
2823
  messageSends: ["subclassResponsibility"],
@@ -2786,10 +2832,10 @@ selector: "asUppercase",
2786
2832
  category: 'converting',
2787
2833
  fn: function (){
2788
2834
  var self=this;
2789
- var $1;
2790
- $1=smalltalk.send(smalltalk.send(self,"_class",[]),"_fromString_",[smalltalk.send(smalltalk.send(self,"_asString",[]),"_asUppercase",[])]);
2835
+ return smalltalk.withContext(function($ctx1) {
2836
+ $1=_st(_st(self)._class())._fromString_(_st(_st(self)._asString())._asUppercase());
2791
2837
  return $1;
2792
- },
2838
+ }, function($ctx1) {$ctx1.fill(self,"asUppercase",{}, smalltalk.CharacterArray)})},
2793
2839
  args: [],
2794
2840
  source: "asUppercase\x0a\x09^self class fromString: self asString asUppercase",
2795
2841
  messageSends: ["fromString:", "asUppercase", "asString", "class"],
@@ -2804,8 +2850,8 @@ selector: "at:put:",
2804
2850
  category: 'accessing',
2805
2851
  fn: function (anIndex,anObject){
2806
2852
  var self=this;
2807
- smalltalk.send(self,"_errorReadOnly",[]);
2808
- return self},
2853
+ return smalltalk.withContext(function($ctx1) {
2854
+ return self}, function($ctx1) {$ctx1.fill(self,"at:put:",{anIndex:anIndex,anObject:anObject}, smalltalk.CharacterArray)})},
2809
2855
  args: ["anIndex", "anObject"],
2810
2856
  source: "at: anIndex put: anObject\x0a\x09self errorReadOnly",
2811
2857
  messageSends: ["errorReadOnly"],
@@ -2820,8 +2866,8 @@ selector: "errorReadOnly",
2820
2866
  category: 'error handling',
2821
2867
  fn: function (){
2822
2868
  var self=this;
2823
- smalltalk.send(self,"_error_",["Object is read-only"]);
2824
- return self},
2869
+ return smalltalk.withContext(function($ctx1) {
2870
+ return self}, function($ctx1) {$ctx1.fill(self,"errorReadOnly",{}, smalltalk.CharacterArray)})},
2825
2871
  args: [],
2826
2872
  source: "errorReadOnly\x0a\x09self error: 'Object is read-only'",
2827
2873
  messageSends: ["error:"],
@@ -2836,10 +2882,10 @@ selector: "printString",
2836
2882
  category: 'printing',
2837
2883
  fn: function (){
2838
2884
  var self=this;
2839
- var $1;
2840
- $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"_printString",[]);
2885
+ return smalltalk.withContext(function($ctx1) {
2886
+ $1=_st(_st(self)._asString())._printString();
2841
2887
  return $1;
2842
- },
2888
+ }, function($ctx1) {$ctx1.fill(self,"printString",{}, smalltalk.CharacterArray)})},
2843
2889
  args: [],
2844
2890
  source: "printString\x0a\x09^self asString printString",
2845
2891
  messageSends: ["printString", "asString"],
@@ -2854,8 +2900,8 @@ selector: "remove:",
2854
2900
  category: 'adding',
2855
2901
  fn: function (anObject){
2856
2902
  var self=this;
2857
- smalltalk.send(self,"_errorReadOnly",[]);
2858
- return self},
2903
+ return smalltalk.withContext(function($ctx1) {
2904
+ return self}, function($ctx1) {$ctx1.fill(self,"remove:",{anObject:anObject}, smalltalk.CharacterArray)})},
2859
2905
  args: ["anObject"],
2860
2906
  source: "remove: anObject\x0a\x09self errorReadOnly",
2861
2907
  messageSends: ["errorReadOnly"],
@@ -2871,8 +2917,8 @@ selector: "fromString:",
2871
2917
  category: 'instance creation',
2872
2918
  fn: function (aString){
2873
2919
  var self=this;
2874
- smalltalk.send(self,"_subclassResponsibility",[]);
2875
- return self},
2920
+ return smalltalk.withContext(function($ctx1) {
2921
+ return self}, function($ctx1) {$ctx1.fill(self,"fromString:",{aString:aString}, smalltalk.CharacterArray.klass)})},
2876
2922
  args: ["aString"],
2877
2923
  source: "fromString: aString\x0a\x09self subclassResponsibility",
2878
2924
  messageSends: ["subclassResponsibility"],
@@ -2889,9 +2935,8 @@ selector: ",",
2889
2935
  category: 'copying',
2890
2936
  fn: function (aString){
2891
2937
  var self=this;
2892
- return self + aString;
2893
- ;
2894
- return self},
2938
+ return smalltalk.withContext(function($ctx1) {
2939
+ return self}, function($ctx1) {$ctx1.fill(self,",",{aString:aString}, smalltalk.String)})},
2895
2940
  args: ["aString"],
2896
2941
  source: ", aString\x0a\x09<return self + aString>",
2897
2942
  messageSends: [],
@@ -2906,9 +2951,8 @@ selector: "<",
2906
2951
  category: 'comparing',
2907
2952
  fn: function (aString){
2908
2953
  var self=this;
2909
- return String(self) < aString._asString();
2910
- ;
2911
- return self},
2954
+ return smalltalk.withContext(function($ctx1) {
2955
+ return self}, function($ctx1) {$ctx1.fill(self,"<",{aString:aString}, smalltalk.String)})},
2912
2956
  args: ["aString"],
2913
2957
  source: "< aString\x0a\x09<return String(self) < aString._asString()>",
2914
2958
  messageSends: [],
@@ -2923,9 +2967,8 @@ selector: "<=",
2923
2967
  category: 'comparing',
2924
2968
  fn: function (aString){
2925
2969
  var self=this;
2926
- return String(self) <= aString._asString();
2927
- ;
2928
- return self},
2970
+ return smalltalk.withContext(function($ctx1) {
2971
+ return self}, function($ctx1) {$ctx1.fill(self,"<=",{aString:aString}, smalltalk.String)})},
2929
2972
  args: ["aString"],
2930
2973
  source: "<= aString\x0a\x09<return String(self) <= aString._asString()>",
2931
2974
  messageSends: [],
@@ -2940,17 +2983,16 @@ selector: "=",
2940
2983
  category: 'comparing',
2941
2984
  fn: function (aString){
2942
2985
  var self=this;
2943
- var $1;
2944
- $1=smalltalk.send(smalltalk.send(aString,"_class",[]),"__eq",[smalltalk.send(self,"_class",[])]);
2945
- if(! smalltalk.assert($1)){
2946
- return false;
2947
- };
2948
- return String(self) === String(aString);
2949
- ;
2950
- return self},
2986
+ return smalltalk.withContext(function($ctx1) {
2987
+ if(! aString._isString || ! aString._isString()) {
2988
+ return false;
2989
+ }
2990
+ return String(self) === String(aString)
2991
+ ;
2992
+ return self}, function($ctx1) {$ctx1.fill(self,"=",{aString:aString}, smalltalk.String)})},
2951
2993
  args: ["aString"],
2952
- source: "= aString\x0a\x09aString class = self class ifFalse: [^false].\x0a\x09<return String(self) === String(aString)>",
2953
- messageSends: ["ifFalse:", "=", "class"],
2994
+ source: "= aString\x0a\x09<\x0a \x09if(! aString._isString || ! aString._isString()) {\x0a \x09return false;\x0a }\x0a \x09return String(self) === String(aString)\x0a >",
2995
+ messageSends: [],
2954
2996
  referencedClasses: []
2955
2997
  }),
2956
2998
  smalltalk.String);
@@ -2962,10 +3004,10 @@ selector: "==",
2962
3004
  category: 'comparing',
2963
3005
  fn: function (aString){
2964
3006
  var self=this;
2965
- var $1;
2966
- $1=smalltalk.send(self,"__eq",[aString]);
3007
+ return smalltalk.withContext(function($ctx1) {
3008
+ $1=_st(self).__eq(aString);
2967
3009
  return $1;
2968
- },
3010
+ }, function($ctx1) {$ctx1.fill(self,"==",{aString:aString}, smalltalk.String)})},
2969
3011
  args: ["aString"],
2970
3012
  source: "== aString\x0a\x09^self = aString",
2971
3013
  messageSends: ["="],
@@ -2980,9 +3022,8 @@ selector: ">",
2980
3022
  category: 'comparing',
2981
3023
  fn: function (aString){
2982
3024
  var self=this;
2983
- return String(self) > aString._asString();
2984
- ;
2985
- return self},
3025
+ return smalltalk.withContext(function($ctx1) {
3026
+ return self}, function($ctx1) {$ctx1.fill(self,">",{aString:aString}, smalltalk.String)})},
2986
3027
  args: ["aString"],
2987
3028
  source: "> aString\x0a\x09<return String(self) >> aString._asString()>",
2988
3029
  messageSends: [],
@@ -2997,9 +3038,8 @@ selector: ">=",
2997
3038
  category: 'comparing',
2998
3039
  fn: function (aString){
2999
3040
  var self=this;
3000
- return String(self) >= aString._asString();
3001
- ;
3002
- return self},
3041
+ return smalltalk.withContext(function($ctx1) {
3042
+ return self}, function($ctx1) {$ctx1.fill(self,">=",{aString:aString}, smalltalk.String)})},
3003
3043
  args: ["aString"],
3004
3044
  source: ">= aString\x0a\x09<return String(self) >>= aString._asString()>",
3005
3045
  messageSends: [],
@@ -3014,8 +3054,10 @@ selector: "asJSON",
3014
3054
  category: 'converting',
3015
3055
  fn: function (){
3016
3056
  var self=this;
3017
- return self;
3018
- },
3057
+ return smalltalk.withContext(function($ctx1) {
3058
+ $1=self;
3059
+ return $1;
3060
+ }, function($ctx1) {$ctx1.fill(self,"asJSON",{}, smalltalk.String)})},
3019
3061
  args: [],
3020
3062
  source: "asJSON\x0a\x09^self",
3021
3063
  messageSends: [],
@@ -3030,10 +3072,10 @@ selector: "asJavaScriptSelector",
3030
3072
  category: 'converting',
3031
3073
  fn: function (){
3032
3074
  var self=this;
3033
- var $1;
3034
- $1=smalltalk.send(smalltalk.send(smalltalk.send(self,"_asSelector",[]),"_replace_with_",["^_",""]),"_replace_with_",["_.*",""]);
3075
+ return smalltalk.withContext(function($ctx1) {
3076
+ $1=_st(_st(_st(self)._asSelector())._replace_with_("^_",""))._replace_with_("_.*","");
3035
3077
  return $1;
3036
- },
3078
+ }, function($ctx1) {$ctx1.fill(self,"asJavaScriptSelector",{}, smalltalk.String)})},
3037
3079
  args: [],
3038
3080
  source: "asJavaScriptSelector\x0a\x09^(self asSelector replace: '^_' with: '') replace: '_.*' with: ''.",
3039
3081
  messageSends: ["replace:with:", "asSelector"],
@@ -3048,14 +3090,13 @@ selector: "asJavascript",
3048
3090
  category: 'converting',
3049
3091
  fn: function (){
3050
3092
  var self=this;
3051
-
3093
+ return smalltalk.withContext(function($ctx1) {
3052
3094
  if(self.search(/^[a-zA-Z0-9_:.$ ]*$/) == -1)
3053
3095
  return "\"" + self.replace(/[\x00-\x1f"\\\x7f-\x9f]/g, function(ch){var c=ch.charCodeAt(0);return "\\x"+("0"+c.toString(16)).slice(-2)}) + "\"";
3054
3096
  else
3055
3097
  return "\"" + self + "\"";
3056
3098
  ;
3057
- ;
3058
- return self},
3099
+ return self}, function($ctx1) {$ctx1.fill(self,"asJavascript",{}, smalltalk.String)})},
3059
3100
  args: [],
3060
3101
  source: "asJavascript\x0a\x09<\x0a\x09\x09if(self.search(/^[a-zA-Z0-9_:.$ ]*$/) == -1)\x0a\x09\x09\x09return \x22\x5c\x22\x22 + self.replace(/[\x5cx00-\x5cx1f\x22\x5c\x5c\x5cx7f-\x5cx9f]/g, function(ch){var c=ch.charCodeAt(0);return \x22\x5c\x5cx\x22+(\x220\x22+c.toString(16)).slice(-2)}) + \x22\x5c\x22\x22;\x0a\x09\x09else\x0a\x09\x09\x09return \x22\x5c\x22\x22 + self + \x22\x5c\x22\x22;\x0a\x09>",
3061
3102
  messageSends: [],
@@ -3070,9 +3111,8 @@ selector: "asLowercase",
3070
3111
  category: 'converting',
3071
3112
  fn: function (){
3072
3113
  var self=this;
3073
- return self.toLowerCase();
3074
- ;
3075
- return self},
3114
+ return smalltalk.withContext(function($ctx1) {
3115
+ return self}, function($ctx1) {$ctx1.fill(self,"asLowercase",{}, smalltalk.String)})},
3076
3116
  args: [],
3077
3117
  source: "asLowercase\x0a\x09<return self.toLowerCase()>",
3078
3118
  messageSends: [],
@@ -3087,9 +3127,8 @@ selector: "asNumber",
3087
3127
  category: 'converting',
3088
3128
  fn: function (){
3089
3129
  var self=this;
3090
- return Number(self);
3091
- ;
3092
- return self},
3130
+ return smalltalk.withContext(function($ctx1) {
3131
+ return self}, function($ctx1) {$ctx1.fill(self,"asNumber",{}, smalltalk.String)})},
3093
3132
  args: [],
3094
3133
  source: "asNumber\x0a\x09<return Number(self)>",
3095
3134
  messageSends: [],
@@ -3097,6 +3136,24 @@ referencedClasses: []
3097
3136
  }),
3098
3137
  smalltalk.String);
3099
3138
 
3139
+ smalltalk.addMethod(
3140
+ "_asRegexp",
3141
+ smalltalk.method({
3142
+ selector: "asRegexp",
3143
+ category: 'converting',
3144
+ fn: function (){
3145
+ var self=this;
3146
+ return smalltalk.withContext(function($ctx1) {
3147
+ $1=_st((smalltalk.RegularExpression || RegularExpression))._fromString_(self);
3148
+ return $1;
3149
+ }, function($ctx1) {$ctx1.fill(self,"asRegexp",{}, smalltalk.String)})},
3150
+ args: [],
3151
+ source: "asRegexp\x0a\x09^ RegularExpression fromString: self",
3152
+ messageSends: ["fromString:"],
3153
+ referencedClasses: ["RegularExpression"]
3154
+ }),
3155
+ smalltalk.String);
3156
+
3100
3157
  smalltalk.addMethod(
3101
3158
  "_asSelector",
3102
3159
  smalltalk.method({
@@ -3104,23 +3161,11 @@ selector: "asSelector",
3104
3161
  category: 'converting',
3105
3162
  fn: function (){
3106
3163
  var self=this;
3107
- var selector;
3108
- selector=smalltalk.send("_","__comma",[self]);
3109
- selector=smalltalk.send(selector,"_replace_with_",[":","_"]);
3110
- selector=smalltalk.send(selector,"_replace_with_",["[+]","_plus"]);
3111
- selector=smalltalk.send(selector,"_replace_with_",["-","_minus"]);
3112
- selector=smalltalk.send(selector,"_replace_with_",["[*]","_star"]);
3113
- selector=smalltalk.send(selector,"_replace_with_",["[/]","_slash"]);
3114
- selector=smalltalk.send(selector,"_replace_with_",[">","_gt"]);
3115
- selector=smalltalk.send(selector,"_replace_with_",["<","_lt"]);
3116
- selector=smalltalk.send(selector,"_replace_with_",["=","_eq"]);
3117
- selector=smalltalk.send(selector,"_replace_with_",[",","_comma"]);
3118
- selector=smalltalk.send(selector,"_replace_with_",["[@]","_at"]);
3119
- return selector;
3120
- },
3164
+ return smalltalk.withContext(function($ctx1) {
3165
+ return self}, function($ctx1) {$ctx1.fill(self,"asSelector",{}, smalltalk.String)})},
3121
3166
  args: [],
3122
- source: "asSelector\x0a\x09\x22If you change this method, change smalltalk.convertSelector too (see js/boot.js file)\x22\x0a\x0a\x09| selector |\x0a\x09selector := '_', self.\x0a\x09selector := selector replace: ':' with: '_'.\x0a\x09selector := selector replace: '[+]' with: '_plus'.\x0a\x09selector := selector replace: '-' with: '_minus'.\x0a\x09selector := selector replace: '[*]' with: '_star'.\x0a\x09selector := selector replace: '[/]' with: '_slash'.\x0a\x09selector := selector replace: '>' with: '_gt'.\x0a\x09selector := selector replace: '<' with: '_lt'.\x0a\x09selector := selector replace: '=' with: '_eq'.\x0a\x09selector := selector replace: ',' with: '_comma'.\x0a\x09selector := selector replace: '[@]' with: '_at'.\x0a\x09^selector",
3123
- messageSends: [",", "replace:with:"],
3167
+ source: "asSelector\x0a\x09<return smalltalk.selector(self)>",
3168
+ messageSends: [],
3124
3169
  referencedClasses: []
3125
3170
  }),
3126
3171
  smalltalk.String);
@@ -3132,8 +3177,10 @@ selector: "asString",
3132
3177
  category: 'converting',
3133
3178
  fn: function (){
3134
3179
  var self=this;
3135
- return self;
3136
- },
3180
+ return smalltalk.withContext(function($ctx1) {
3181
+ $1=self;
3182
+ return $1;
3183
+ }, function($ctx1) {$ctx1.fill(self,"asString",{}, smalltalk.String)})},
3137
3184
  args: [],
3138
3185
  source: "asString\x0a\x09^self",
3139
3186
  messageSends: [],
@@ -3148,10 +3195,10 @@ selector: "asSymbol",
3148
3195
  category: 'converting',
3149
3196
  fn: function (){
3150
3197
  var self=this;
3151
- var $1;
3152
- $1=smalltalk.send((smalltalk.Symbol || Symbol),"_lookup_",[self]);
3198
+ return smalltalk.withContext(function($ctx1) {
3199
+ $1=_st((smalltalk.Symbol || Symbol))._lookup_(self);
3153
3200
  return $1;
3154
- },
3201
+ }, function($ctx1) {$ctx1.fill(self,"asSymbol",{}, smalltalk.String)})},
3155
3202
  args: [],
3156
3203
  source: "asSymbol\x0a\x09^Symbol lookup: self",
3157
3204
  messageSends: ["lookup:"],
@@ -3166,9 +3213,8 @@ selector: "asUppercase",
3166
3213
  category: 'converting',
3167
3214
  fn: function (){
3168
3215
  var self=this;
3169
- return self.toUpperCase();
3170
- ;
3171
- return self},
3216
+ return smalltalk.withContext(function($ctx1) {
3217
+ return self}, function($ctx1) {$ctx1.fill(self,"asUppercase",{}, smalltalk.String)})},
3172
3218
  args: [],
3173
3219
  source: "asUppercase\x0a\x09<return self.toUpperCase()>",
3174
3220
  messageSends: [],
@@ -3183,9 +3229,8 @@ selector: "asciiValue",
3183
3229
  category: 'accessing',
3184
3230
  fn: function (){
3185
3231
  var self=this;
3186
- return self.charCodeAt(0);;
3187
- ;
3188
- return self},
3232
+ return smalltalk.withContext(function($ctx1) {
3233
+ return self}, function($ctx1) {$ctx1.fill(self,"asciiValue",{}, smalltalk.String)})},
3189
3234
  args: [],
3190
3235
  source: "asciiValue\x0a\x09<return self.charCodeAt(0);>",
3191
3236
  messageSends: [],
@@ -3200,9 +3245,8 @@ selector: "at:ifAbsent:",
3200
3245
  category: 'accessing',
3201
3246
  fn: function (anIndex,aBlock){
3202
3247
  var self=this;
3203
- return String(self).charAt(anIndex - 1) || aBlock();
3204
- ;
3205
- return self},
3248
+ return smalltalk.withContext(function($ctx1) {
3249
+ return self}, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{anIndex:anIndex,aBlock:aBlock}, smalltalk.String)})},
3206
3250
  args: ["anIndex", "aBlock"],
3207
3251
  source: "at: anIndex ifAbsent: aBlock\x0a\x09<return String(self).charAt(anIndex - 1) || aBlock()>",
3208
3252
  messageSends: [],
@@ -3217,9 +3261,8 @@ selector: "copyFrom:to:",
3217
3261
  category: 'copying',
3218
3262
  fn: function (anIndex,anotherIndex){
3219
3263
  var self=this;
3220
- return self.substring(anIndex - 1, anotherIndex);
3221
- ;
3222
- return self},
3264
+ return smalltalk.withContext(function($ctx1) {
3265
+ return self}, function($ctx1) {$ctx1.fill(self,"copyFrom:to:",{anIndex:anIndex,anotherIndex:anotherIndex}, smalltalk.String)})},
3223
3266
  args: ["anIndex", "anotherIndex"],
3224
3267
  source: "copyFrom: anIndex to: anotherIndex\x0a\x09<return self.substring(anIndex - 1, anotherIndex)>",
3225
3268
  messageSends: [],
@@ -3234,10 +3277,10 @@ selector: "deepCopy",
3234
3277
  category: 'copying',
3235
3278
  fn: function (){
3236
3279
  var self=this;
3237
- var $1;
3238
- $1=smalltalk.send(self,"_shallowCopy",[]);
3280
+ return smalltalk.withContext(function($ctx1) {
3281
+ $1=_st(self)._shallowCopy();
3239
3282
  return $1;
3240
- },
3283
+ }, function($ctx1) {$ctx1.fill(self,"deepCopy",{}, smalltalk.String)})},
3241
3284
  args: [],
3242
3285
  source: "deepCopy\x0a\x09^self shallowCopy",
3243
3286
  messageSends: ["shallowCopy"],
@@ -3252,9 +3295,8 @@ selector: "do:",
3252
3295
  category: 'enumerating',
3253
3296
  fn: function (aBlock){
3254
3297
  var self=this;
3255
- for(var i=0;i<self.length;i++){aBlock(self.charAt(i));};
3256
- ;
3257
- return self},
3298
+ return smalltalk.withContext(function($ctx1) {
3299
+ return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock}, smalltalk.String)})},
3258
3300
  args: ["aBlock"],
3259
3301
  source: "do: aBlock\x0a\x09<for(var i=0;i<self.length;i++){aBlock(self.charAt(i));}>",
3260
3302
  messageSends: [],
@@ -3269,9 +3311,8 @@ selector: "escaped",
3269
3311
  category: 'accessing',
3270
3312
  fn: function (){
3271
3313
  var self=this;
3272
- return escape(self);
3273
- ;
3274
- return self},
3314
+ return smalltalk.withContext(function($ctx1) {
3315
+ return self}, function($ctx1) {$ctx1.fill(self,"escaped",{}, smalltalk.String)})},
3275
3316
  args: [],
3276
3317
  source: "escaped\x0a\x09<return escape(self)>",
3277
3318
  messageSends: [],
@@ -3286,9 +3327,8 @@ selector: "includesSubString:",
3286
3327
  category: 'testing',
3287
3328
  fn: function (subString){
3288
3329
  var self=this;
3289
- return self.indexOf(subString) != -1 ;
3290
- ;
3291
- return self},
3330
+ return smalltalk.withContext(function($ctx1) {
3292
3331
  return self.indexOf(subString) != -1 ;
3332
+ return self}, function($ctx1) {$ctx1.fill(self,"includesSubString:",{subString:subString}, smalltalk.String)})},
3293
3333
  args: ["subString"],
3294
3334
  source: "includesSubString: subString\x0a\x09< return self.indexOf(subString) != -1 >",
3295
3335
  messageSends: [],
@@ -3303,8 +3343,8 @@ selector: "isString",
3303
3343
  category: 'testing',
3304
3344
  fn: function (){
3305
3345
  var self=this;
3306
- return true;
3307
- },
3346
+ return smalltalk.withContext(function($ctx1) {
3347
+ }, function($ctx1) {$ctx1.fill(self,"isString",{}, smalltalk.String)})},
3308
3348
  args: [],
3309
3349
  source: "isString\x0a\x09^true",
3310
3350
  messageSends: [],
@@ -3319,16 +3359,16 @@ selector: "join:",
3319
3359
  category: 'split join',
3320
3360
  fn: function (aCollection){
3321
3361
  var self=this;
3322
- var $1;
3323
- $1=smalltalk.send((smalltalk.String || String),"_streamContents_",[(function(stream){
3324
- return smalltalk.send(aCollection,"_do_separatedBy_",[(function(each){
3325
- return smalltalk.send(stream,"_nextPutAll_",[smalltalk.send(each,"_asString",[])]);
3326
- }),(function(){
3327
- return smalltalk.send(stream,"_nextPutAll_",[self]);
3328
- })]);
3329
- })]);
3362
+ return smalltalk.withContext(function($ctx1) {
3363
+ $1=_st((smalltalk.String || String))._streamContents_((function(stream){
3364
+ return smalltalk.withContext(function($ctx2) {
3365
+ return smalltalk.withContext(function($ctx3) {
3366
+ }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}),(function(){
3367
+ return smalltalk.withContext(function($ctx3) {
3368
+ }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
3369
+ }, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1)})}));
3330
3370
  return $1;
3331
- },
3371
+ }, function($ctx1) {$ctx1.fill(self,"join:",{aCollection:aCollection}, smalltalk.String)})},
3332
3372
  args: ["aCollection"],
3333
3373
  source: "join: aCollection \x0a\x09^ String\x0a\x09\x09streamContents: [:stream | aCollection\x0a\x09\x09\x09\x09do: [:each | stream nextPutAll: each asString] \x0a\x09\x09\x09\x09separatedBy: [stream nextPutAll: self]]",
3334
3374
  messageSends: ["streamContents:", "do:separatedBy:", "nextPutAll:", "asString"],
@@ -3343,64 +3383,64 @@ selector: "lineIndicesDo:",
3343
3383
  category: 'split join',
3344
3384
  fn: function (aBlock){
3345
3385
  var self=this;
3346
- var $1,$2,$3;
3386
+ var cr,lf,start,sz,nextLF,nextCR;
3387
+ return smalltalk.withContext(function($ctx1) {
3347
3388
  var $early={};
3348
3389
  try {
3349
- var cr;
3350
- var lf;
3351
- var start;
3352
- var sz;
3353
- var nextLF;
3354
- var nextCR;
3355
3390
  start=(1);
3356
- sz=smalltalk.send(self,"_size",[]);
3357
- cr=smalltalk.send((smalltalk.String || String),"_cr",[]);
3358
- nextCR=smalltalk.send(self,"_indexOf_startingAt_",[cr,(1)]);
3359
- lf=smalltalk.send((smalltalk.String || String),"_lf",[]);
3360
- nextLF=smalltalk.send(self,"_indexOf_startingAt_",[lf,(1)]);
3361
- smalltalk.send((function(){
3362
- return smalltalk.send(start,"__lt_eq",[sz]);
3363
- }),"_whileTrue_",[(function(){
3364
- $1=smalltalk.send(smalltalk.send(nextLF,"__eq",[(0)]),"_and_",[(function(){
3365
- return smalltalk.send(nextCR,"__eq",[(0)]);
3366
- })]);
3367
- if(smalltalk.assert($1)){
3368
- smalltalk.send(aBlock,"_value_value_value_",[start,sz,sz]);
3369
- throw $early=[self];
3391
+ sz=_st(self)._size();
3392
+ cr=_st((smalltalk.String || String))._cr();
3393
+ nextCR=_st(self)._indexOf_startingAt_(cr,(1));
3394
+ lf=_st((smalltalk.String || String))._lf();
3395
+ nextLF=_st(self)._indexOf_startingAt_(lf,(1));
3396
+ $1=(function(){
3397
+ return smalltalk.withContext(function($ctx2) {
3398
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
3399
+ $2=(function(){
3400
+ return smalltalk.withContext(function($ctx2) {
3401
+ return smalltalk.withContext(function($ctx3) {
3402
+ }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
3403
+ if(smalltalk.assert($3)){
3404
+ _st(aBlock)._value_value_value_(start,sz,sz);
3405
+ $4=self;
3406
+ throw $early=[$4];
3370
3407
  };
3371
- $2=smalltalk.send(smalltalk.send(nextCR,"__eq",[(0)]),"_or_",[(function(){
3372
- return smalltalk.send(smalltalk.send((0),"__lt",[nextLF]),"_and_",[(function(){
3373
- return smalltalk.send(nextLF,"__lt",[nextCR]);
3374
- })]);
3375
- })]);
3376
- if(smalltalk.assert($2)){
3377
- smalltalk.send(aBlock,"_value_value_value_",[start,smalltalk.send(nextLF,"__minus",[(1)]),nextLF]);
3378
- start=smalltalk.send((1),"__plus",[nextLF]);
3408
+ $5=_st(_st(nextCR).__eq((0)))._or_((function(){
3409
+ return smalltalk.withContext(function($ctx3) {
3410
+ return smalltalk.withContext(function($ctx4) {
3411
+ }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
3412
+ }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
3413
+ $6=(function(){
3414
+ return smalltalk.withContext(function($ctx3) {
3415
+ start=_st((1)).__plus(nextLF);
3379
3416
  start;
3380
- nextLF=smalltalk.send(self,"_indexOf_startingAt_",[lf,start]);
3417
+ nextLF=_st(self)._indexOf_startingAt_(lf,start);
3381
3418
  return nextLF;
3382
- } else {
3383
- $3=smalltalk.send(smalltalk.send((1),"__plus",[nextCR]),"__eq",[nextLF]);
3384
- if(smalltalk.assert($3)){
3385
- smalltalk.send(aBlock,"_value_value_value_",[start,smalltalk.send(nextCR,"__minus",[(1)]),nextLF]);
3386
- start=smalltalk.send((1),"__plus",[nextLF]);
3419
+ }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
3420
+ $7=(function(){
3421
+ return smalltalk.withContext(function($ctx3) {
3422
+ if(smalltalk.assert($8)){
3423
+ _st(aBlock)._value_value_value_(start,_st(nextCR).__minus((1)),nextLF);
3424
+ start=_st((1)).__plus(nextLF);
3387
3425
  start;
3388
- nextCR=smalltalk.send(self,"_indexOf_startingAt_",[cr,start]);
3426
+ nextCR=_st(self)._indexOf_startingAt_(cr,start);
3389
3427
  nextCR;
3390
- nextLF=smalltalk.send(self,"_indexOf_startingAt_",[lf,start]);
3428
+ nextLF=_st(self)._indexOf_startingAt_(lf,start);
3391
3429
  return nextLF;
3392
3430
  } else {
3393
- smalltalk.send(aBlock,"_value_value_value_",[start,smalltalk.send(nextCR,"__minus",[(1)]),nextCR]);
3394
- start=smalltalk.send((1),"__plus",[nextCR]);
3431
+ _st(aBlock)._value_value_value_(start,_st(nextCR).__minus((1)),nextCR);
3432
+ start=_st((1)).__plus(nextCR);
3395
3433
  start;
3396
- nextCR=smalltalk.send(self,"_indexOf_startingAt_",[cr,start]);
3434
+ nextCR=_st(self)._indexOf_startingAt_(cr,start);
3397
3435
  return nextCR;
3398
3436
  };
3399
- };
3400
- })]);
3437
+ }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
3438
+ return _st($5)._ifTrue_ifFalse_($6,$7);
3439
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
3440
+ _st($1)._whileTrue_($2);
3401
3441
  return self}
3402
3442
  catch(e) {if(e===$early)return e[0]; throw e}
3403
- },
3443
+ }, function($ctx1) {$ctx1.fill(self,"lineIndicesDo:",{aBlock:aBlock,cr:cr,lf:lf,start:start,sz:sz,nextLF:nextLF,nextCR:nextCR}, smalltalk.String)})},
3404
3444
  args: ["aBlock"],
3405
3445
  source: "lineIndicesDo: aBlock\x0a\x09\x22execute aBlock with 3 arguments for each line:\x0a\x09- start index of line\x0a\x09- end index of line without line delimiter\x0a\x09- end index of line including line delimiter(s) CR, LF or CRLF\x22\x0a\x09\x0a\x09| cr lf start sz nextLF nextCR |\x0a\x09start := 1.\x0a\x09sz := self size.\x0a\x09cr := String cr.\x0a\x09nextCR := self indexOf: cr startingAt: 1.\x0a\x09lf := String lf.\x0a\x09nextLF := self indexOf: lf startingAt: 1.\x0a\x09[ start <= sz ] whileTrue: [\x0a\x09\x09(nextLF = 0 and: [ nextCR = 0 ])\x0a\x09\x09\x09ifTrue: [ \x22No more CR, nor LF, the string is over\x22\x0a\x09\x09\x09\x09\x09aBlock value: start value: sz value: sz.\x0a\x09\x09\x09\x09\x09^self ].\x0a\x09\x09(nextCR = 0 or: [ 0 < nextLF and: [ nextLF < nextCR ] ])\x0a\x09\x09\x09ifTrue: [ \x22Found a LF\x22\x0a\x09\x09\x09\x09\x09aBlock value: start value: nextLF - 1 value: nextLF.\x0a\x09\x09\x09\x09\x09start := 1 + nextLF.\x0a\x09\x09\x09\x09\x09nextLF := self indexOf: lf startingAt: start ]\x0a\x09\x09\x09ifFalse: [ 1 + nextCR = nextLF\x0a\x09\x09\x09\x09ifTrue: [ \x22Found a CR-LF pair\x22\x0a\x09\x09\x09\x09\x09aBlock value: start value: nextCR - 1 value: nextLF.\x0a\x09\x09\x09\x09\x09start := 1 + nextLF.\x0a\x09\x09\x09\x09\x09nextCR := self indexOf: cr startingAt: start.\x0a\x09\x09\x09\x09\x09nextLF := self indexOf: lf startingAt: start ]\x0a\x09\x09\x09\x09ifFalse: [ \x22Found a CR\x22\x0a\x09\x09\x09\x09\x09aBlock value: start value: nextCR - 1 value: nextCR.\x0a\x09\x09\x09\x09\x09start := 1 + nextCR.\x0a\x09\x09\x09\x09\x09nextCR := self indexOf: cr startingAt: start ]]]",
3406
3446
  messageSends: ["size", "cr", "indexOf:startingAt:", "lf", "whileTrue:", "ifTrue:", "value:value:value:", "and:", "=", "ifTrue:ifFalse:", "-", "+", "or:", "<", "<="],
@@ -3415,23 +3455,25 @@ selector: "lineNumber:",
3415
3455
  category: 'split join',
3416
3456
  fn: function (anIndex){
3417
3457
  var self=this;
3418
- var $1,$2;
3458
+ var lineCount;
3459
+ return smalltalk.withContext(function($ctx1) {
3419
3460
  var $early={};
3420
3461
  try {
3421
- var lineCount;
3422
3462
  lineCount=(0);
3423
- smalltalk.send(self,"_lineIndicesDo_",[(function(start,endWithoutDelimiters,end){
3424
- lineCount=smalltalk.send(lineCount,"__plus",[(1)]);
3425
- $1=smalltalk.send(lineCount,"__eq",[anIndex]);
3426
- if(smalltalk.assert($1)){
3427
- $2=smalltalk.send(self,"_copyFrom_to_",[start,endWithoutDelimiters]);
3428
- throw $early=[$2];
3463
+ $1=self;
3464
+ $2=(function(start,endWithoutDelimiters,end){
3465
+ return smalltalk.withContext(function($ctx2) {
3466
+ $3=_st(lineCount).__eq(anIndex);
3467
+ if(smalltalk.assert($3)){
3468
+ $4=_st(self)._copyFrom_to_(start,endWithoutDelimiters);
3469
+ throw $early=[$4];
3429
3470
  };
3430
- })]);
3471
+ }, function($ctx2) {$ctx2.fillBlock({start:start,endWithoutDelimiters:endWithoutDelimiters,end:end},$ctx1)})});
3472
+ _st($1)._lineIndicesDo_($2);
3431
3473
  return nil;
3432
3474
  }
3433
3475
  catch(e) {if(e===$early)return e[0]; throw e}
3434
- },
3476
+ }, function($ctx1) {$ctx1.fill(self,"lineNumber:",{anIndex:anIndex,lineCount:lineCount}, smalltalk.String)})},
3435
3477
  args: ["anIndex"],
3436
3478
  source: "lineNumber: anIndex\x0a\x09\x22Answer a string containing the characters in the given line number.\x22\x0a\x0a\x09| lineCount |\x0a\x09lineCount := 0.\x0a\x09self lineIndicesDo: [:start :endWithoutDelimiters :end |\x0a\x09\x09(lineCount := lineCount + 1) = anIndex ifTrue: [^self copyFrom: start to: endWithoutDelimiters]].\x0a\x09^nil",
3437
3479
  messageSends: ["lineIndicesDo:", "ifTrue:", "copyFrom:to:", "=", "+"],
@@ -3447,12 +3489,14 @@ category: 'split join',
3447
3489
  fn: function (){
3448
3490
  var self=this;
3449
3491
  var lines;
3450
- lines=smalltalk.send((smalltalk.Array || Array),"_new",[]);
3451
- smalltalk.send(self,"_linesDo_",[(function(aLine){
3452
- return smalltalk.send(lines,"_add_",[aLine]);
3453
- })]);
3454
- return lines;
3455
- },
3492
+ return smalltalk.withContext(function($ctx1) {
3493
+ lines=_st((smalltalk.Array || Array))._new();
3494
+ _st(self)._linesDo_((function(aLine){
3495
+ return smalltalk.withContext(function($ctx2) {
3496
+ }, function($ctx2) {$ctx2.fillBlock({aLine:aLine},$ctx1)})}));
3497
+ $1=lines;
3498
+ return $1;
3499
+ }, function($ctx1) {$ctx1.fill(self,"lines",{lines:lines}, smalltalk.String)})},
3456
3500
  args: [],
3457
3501
  source: "lines\x0a\x09\x22Answer an array of lines composing this receiver without the line ending delimiters.\x22\x0a\x0a\x09| lines |\x0a\x09lines := Array new.\x0a\x09self linesDo: [:aLine | lines add: aLine].\x0a\x09^lines",
3458
3502
  messageSends: ["new", "linesDo:", "add:"],
@@ -3467,10 +3511,10 @@ selector: "linesDo:",
3467
3511
  category: 'split join',
3468
3512
  fn: function (aBlock){
3469
3513
  var self=this;
3470
- smalltalk.send(self,"_lineIndicesDo_",[(function(start,endWithoutDelimiters,end){
3471
- return smalltalk.send(aBlock,"_value_",[smalltalk.send(self,"_copyFrom_to_",[start,endWithoutDelimiters])]);
3472
- })]);
3473
- return self},
3514
+ return smalltalk.withContext(function($ctx1) {
3515
+ return smalltalk.withContext(function($ctx2) {
3516
+ }, function($ctx2) {$ctx2.fillBlock({start:start,endWithoutDelimiters:endWithoutDelimiters,end:end},$ctx1)})}));
3517
+ return self}, function($ctx1) {$ctx1.fill(self,"linesDo:",{aBlock:aBlock}, smalltalk.String)})},
3474
3518
  args: ["aBlock"],
3475
3519
  source: "linesDo: aBlock\x0a\x09\x22Execute aBlock with each line in this string. The terminating line\x0a\x09delimiters CR, LF or CRLF pairs are not included in what is passed to aBlock\x22\x0a\x0a\x09self lineIndicesDo: [:start :endWithoutDelimiters :end |\x0a\x09\x09aBlock value: (self copyFrom: start to: endWithoutDelimiters)]",
3476
3520
  messageSends: ["lineIndicesDo:", "value:", "copyFrom:to:"],
@@ -3485,9 +3529,8 @@ selector: "match:",
3485
3529
  category: 'regular expressions',
3486
3530
  fn: function (aRegexp){
3487
3531
  var self=this;
3488
- return self.search(aRegexp) != -1;
3489
- ;
3490
- return self},
3532
+ return smalltalk.withContext(function($ctx1) {
3533
+ return self}, function($ctx1) {$ctx1.fill(self,"match:",{aRegexp:aRegexp}, smalltalk.String)})},
3491
3534
  args: ["aRegexp"],
3492
3535
  source: "match: aRegexp\x0a\x09<return self.search(aRegexp) != -1>",
3493
3536
  messageSends: [],
@@ -3502,9 +3545,8 @@ selector: "matchesOf:",
3502
3545
  category: 'regular expressions',
3503
3546
  fn: function (aRegularExpression){
3504
3547
  var self=this;
3505
- return self.match(aRegularExpression);
3506
- ;
3507
- return self},
3548
+ return smalltalk.withContext(function($ctx1) {
3549
+ return self}, function($ctx1) {$ctx1.fill(self,"matchesOf:",{aRegularExpression:aRegularExpression}, smalltalk.String)})},
3508
3550
  args: ["aRegularExpression"],
3509
3551
  source: "matchesOf: aRegularExpression\x0a <return self.match(aRegularExpression)>",
3510
3552
  messageSends: [],
@@ -3519,9 +3561,8 @@ selector: "printNl",
3519
3561
  category: 'printing',
3520
3562
  fn: function (){
3521
3563
  var self=this;
3522
- console.log(self);
3523
- ;
3524
- return self},
3564
+ return smalltalk.withContext(function($ctx1) {
3565
+ return self}, function($ctx1) {$ctx1.fill(self,"printNl",{}, smalltalk.String)})},
3525
3566
  args: [],
3526
3567
  source: "printNl\x0a\x09<console.log(self)>",
3527
3568
  messageSends: [],
@@ -3536,10 +3577,10 @@ selector: "printString",
3536
3577
  category: 'printing',
3537
3578
  fn: function (){
3538
3579
  var self=this;
3539
- var $1;
3540
- $1=smalltalk.send(smalltalk.send("'","__comma",[self]),"__comma",["'"]);
3580
+ return smalltalk.withContext(function($ctx1) {
3581
+ $1=_st(_st("'").__comma(self)).__comma("'");
3541
3582
  return $1;
3542
- },
3583
+ }, function($ctx1) {$ctx1.fill(self,"printString",{}, smalltalk.String)})},
3543
3584
  args: [],
3544
3585
  source: "printString\x0a\x09^'''', self, ''''",
3545
3586
  messageSends: [","],
@@ -3554,10 +3595,10 @@ selector: "replace:with:",
3554
3595
  category: 'regular expressions',
3555
3596
  fn: function (aString,anotherString){
3556
3597
  var self=this;
3557
- var $1;
3558
- $1=smalltalk.send(self,"_replaceRegexp_with_",[smalltalk.send((smalltalk.RegularExpression || RegularExpression),"_fromString_flag_",[aString,"g"]),anotherString]);
3598
+ return smalltalk.withContext(function($ctx1) {
3599
+ $1=_st(self)._replaceRegexp_with_(_st((smalltalk.RegularExpression || RegularExpression))._fromString_flag_(aString,"g"),anotherString);
3559
3600
  return $1;
3560
- },
3601
+ }, function($ctx1) {$ctx1.fill(self,"replace:with:",{aString:aString,anotherString:anotherString}, smalltalk.String)})},
3561
3602
  args: ["aString", "anotherString"],
3562
3603
  source: "replace: aString with: anotherString\x0a\x09^self replaceRegexp: (RegularExpression fromString: aString flag: 'g') with: anotherString",
3563
3604
  messageSends: ["replaceRegexp:with:", "fromString:flag:"],
@@ -3572,9 +3613,8 @@ selector: "replaceRegexp:with:",
3572
3613
  category: 'regular expressions',
3573
3614
  fn: function (aRegexp,aString){
3574
3615
  var self=this;
3575
- return self.replace(aRegexp, aString);
3576
- ;
3577
- return self},
3616
+ return smalltalk.withContext(function($ctx1) {
3617
+ return self}, function($ctx1) {$ctx1.fill(self,"replaceRegexp:with:",{aRegexp:aRegexp,aString:aString}, smalltalk.String)})},
3578
3618
  args: ["aRegexp", "aString"],
3579
3619
  source: "replaceRegexp: aRegexp with: aString\x0a\x09<return self.replace(aRegexp, aString)>",
3580
3620
  messageSends: [],
@@ -3589,9 +3629,8 @@ selector: "reversed",
3589
3629
  category: 'converting',
3590
3630
  fn: function (){
3591
3631
  var self=this;
3592
- return self.split("").reverse().join("");
3593
- ;
3594
- return self},
3632
+ return smalltalk.withContext(function($ctx1) {
3633
+ return self}, function($ctx1) {$ctx1.fill(self,"reversed",{}, smalltalk.String)})},
3595
3634
  args: [],
3596
3635
  source: "reversed\x0a\x09<return self.split(\x22\x22).reverse().join(\x22\x22)>",
3597
3636
  messageSends: [],
@@ -3606,10 +3645,10 @@ selector: "shallowCopy",
3606
3645
  category: 'copying',
3607
3646
  fn: function (){
3608
3647
  var self=this;
3609
- var $1;
3610
- $1=smalltalk.send(smalltalk.send(self,"_class",[]),"_fromString_",[self]);
3648
+ return smalltalk.withContext(function($ctx1) {
3649
+ $1=_st(_st(self)._class())._fromString_(self);
3611
3650
  return $1;
3612
- },
3651
+ }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{}, smalltalk.String)})},
3613
3652
  args: [],
3614
3653
  source: "shallowCopy\x0a\x09^self class fromString: self",
3615
3654
  messageSends: ["fromString:", "class"],
@@ -3624,9 +3663,8 @@ selector: "size",
3624
3663
  category: 'accessing',
3625
3664
  fn: function (){
3626
3665
  var self=this;
3627
- return self.length;
3628
- ;
3629
- return self},
3666
+ return smalltalk.withContext(function($ctx1) {
3667
+ return self}, function($ctx1) {$ctx1.fill(self,"size",{}, smalltalk.String)})},
3630
3668
  args: [],
3631
3669
  source: "size\x0a\x09<return self.length>",
3632
3670
  messageSends: [],
@@ -3641,9 +3679,8 @@ selector: "tokenize:",
3641
3679
  category: 'converting',
3642
3680
  fn: function (aString){
3643
3681
  var self=this;
3644
- return self.split(aString);
3645
- ;
3646
- return self},
3682
+ return smalltalk.withContext(function($ctx1) {
3683
+ return self}, function($ctx1) {$ctx1.fill(self,"tokenize:",{aString:aString}, smalltalk.String)})},
3647
3684
  args: ["aString"],
3648
3685
  source: "tokenize: aString\x0a\x09<return self.split(aString)>",
3649
3686
  messageSends: [],
@@ -3658,10 +3695,10 @@ selector: "trimBoth",
3658
3695
  category: 'regular expressions',
3659
3696
  fn: function (){
3660
3697
  var self=this;
3661
- var $1;
3662
- $1=smalltalk.send(self,"_trimBoth_",["\x5cs"]);
3698
+ return smalltalk.withContext(function($ctx1) {
3699
+ $1=_st(self)._trimBoth_("\x5cs");
3663
3700
  return $1;
3664
- },
3701
+ }, function($ctx1) {$ctx1.fill(self,"trimBoth",{}, smalltalk.String)})},
3665
3702
  args: [],
3666
3703
  source: "trimBoth\x0a\x09^self trimBoth: '\x5cs'",
3667
3704
  messageSends: ["trimBoth:"],
@@ -3676,10 +3713,10 @@ selector: "trimBoth:",
3676
3713
  category: 'regular expressions',
3677
3714
  fn: function (separators){
3678
3715
  var self=this;
3679
- var $1;
3680
- $1=smalltalk.send(smalltalk.send(self,"_trimLeft_",[separators]),"_trimRight_",[separators]);
3716
+ return smalltalk.withContext(function($ctx1) {
3717
+ $1=_st(_st(self)._trimLeft_(separators))._trimRight_(separators);
3681
3718
  return $1;
3682
- },
3719
+ }, function($ctx1) {$ctx1.fill(self,"trimBoth:",{separators:separators}, smalltalk.String)})},
3683
3720
  args: ["separators"],
3684
3721
  source: "trimBoth: separators\x0a\x0a\x09^(self trimLeft: separators) trimRight: separators",
3685
3722
  messageSends: ["trimRight:", "trimLeft:"],
@@ -3694,10 +3731,10 @@ selector: "trimLeft",
3694
3731
  category: 'regular expressions',
3695
3732
  fn: function (){
3696
3733
  var self=this;
3697
- var $1;
3698
- $1=smalltalk.send(self,"_trimLeft_",["\x5cs"]);
3734
+ return smalltalk.withContext(function($ctx1) {
3735
+ $1=_st(self)._trimLeft_("\x5cs");
3699
3736
  return $1;
3700
- },
3737
+ }, function($ctx1) {$ctx1.fill(self,"trimLeft",{}, smalltalk.String)})},
3701
3738
  args: [],
3702
3739
  source: "trimLeft\x0a\x09^self trimLeft: '\x5cs'",
3703
3740
  messageSends: ["trimLeft:"],
@@ -3712,10 +3749,10 @@ selector: "trimLeft:",
3712
3749
  category: 'regular expressions',
3713
3750
  fn: function (separators){
3714
3751
  var self=this;
3715
- var $1;
3716
- $1=smalltalk.send(self,"_replaceRegexp_with_",[smalltalk.send((smalltalk.RegularExpression || RegularExpression),"_fromString_flag_",[smalltalk.send(smalltalk.send("^[","__comma",[separators]),"__comma",["]+"]),"g"]),""]);
3752
+ return smalltalk.withContext(function($ctx1) {
3753
+ $1=_st(self)._replaceRegexp_with_(_st((smalltalk.RegularExpression || RegularExpression))._fromString_flag_(_st(_st("^[").__comma(separators)).__comma("]+"),"g"),"");
3717
3754
  return $1;
3718
- },
3755
+ }, function($ctx1) {$ctx1.fill(self,"trimLeft:",{separators:separators}, smalltalk.String)})},
3719
3756
  args: ["separators"],
3720
3757
  source: "trimLeft: separators\x0a\x0a\x09^self replaceRegexp: (RegularExpression fromString: '^[', separators, ']+' flag: 'g') with: ''",
3721
3758
  messageSends: ["replaceRegexp:with:", "fromString:flag:", ","],
@@ -3730,10 +3767,10 @@ selector: "trimRight",
3730
3767
  category: 'regular expressions',
3731
3768
  fn: function (){
3732
3769
  var self=this;
3733
- var $1;
3734
- $1=smalltalk.send(self,"_trimRight_",["\x5cs"]);
3770
+ return smalltalk.withContext(function($ctx1) {
3771
+ $1=_st(self)._trimRight_("\x5cs");
3735
3772
  return $1;
3736
- },
3773
+ }, function($ctx1) {$ctx1.fill(self,"trimRight",{}, smalltalk.String)})},
3737
3774
  args: [],
3738
3775
  source: "trimRight\x0a\x09^self trimRight: '\x5cs'",
3739
3776
  messageSends: ["trimRight:"],
@@ -3748,10 +3785,10 @@ selector: "trimRight:",
3748
3785
  category: 'regular expressions',
3749
3786
  fn: function (separators){
3750
3787
  var self=this;
3751
- var $1;
3752
- $1=smalltalk.send(self,"_replaceRegexp_with_",[smalltalk.send((smalltalk.RegularExpression || RegularExpression),"_fromString_flag_",[smalltalk.send(smalltalk.send("[","__comma",[separators]),"__comma",["]+$"]),"g"]),""]);
3788
+ return smalltalk.withContext(function($ctx1) {
3789
+ $1=_st(self)._replaceRegexp_with_(_st((smalltalk.RegularExpression || RegularExpression))._fromString_flag_(_st(_st("[").__comma(separators)).__comma("]+$"),"g"),"");
3753
3790
  return $1;
3754
- },
3791
+ }, function($ctx1) {$ctx1.fill(self,"trimRight:",{separators:separators}, smalltalk.String)})},
3755
3792
  args: ["separators"],
3756
3793
  source: "trimRight: separators\x0a\x0a\x09^self replaceRegexp: (RegularExpression fromString: '[', separators, ']+$' flag: 'g') with: ''",
3757
3794
  messageSends: ["replaceRegexp:with:", "fromString:flag:", ","],
@@ -3766,9 +3803,8 @@ selector: "unescaped",
3766
3803
  category: 'accessing',
3767
3804
  fn: function (){
3768
3805
  var self=this;
3769
- return unescape(self);
3770
- ;
3771
- return self},
3806
+ return smalltalk.withContext(function($ctx1) {
3807
+ return self}, function($ctx1) {$ctx1.fill(self,"unescaped",{}, smalltalk.String)})},
3772
3808
  args: [],
3773
3809
  source: "unescaped\x0a\x09<return unescape(self)>",
3774
3810
  messageSends: [],
@@ -3783,9 +3819,8 @@ selector: "withIndexDo:",
3783
3819
  category: 'enumerating',
3784
3820
  fn: function (aBlock){
3785
3821
  var self=this;
3786
- for(var i=0;i<self.length;i++){aBlock(self.charAt(i), i+1);};
3787
- ;
3788
- return self},
3822
+ return smalltalk.withContext(function($ctx1) {
3823
+ return self}, function($ctx1) {$ctx1.fill(self,"withIndexDo:",{aBlock:aBlock}, smalltalk.String)})},
3789
3824
  args: ["aBlock"],
3790
3825
  source: "withIndexDo: aBlock\x0a\x09<for(var i=0;i<self.length;i++){aBlock(self.charAt(i), i+1);}>",
3791
3826
  messageSends: [],
@@ -3801,9 +3836,8 @@ selector: "cr",
3801
3836
  category: 'accessing',
3802
3837
  fn: function (){
3803
3838
  var self=this;
3804
- return '\r';
3805
- ;
3806
- return self},
3839
+ return smalltalk.withContext(function($ctx1) {
3840
+ return self}, function($ctx1) {$ctx1.fill(self,"cr",{}, smalltalk.String.klass)})},
3807
3841
  args: [],
3808
3842
  source: "cr\x0a\x09<return '\x5cr'>",
3809
3843
  messageSends: [],
@@ -3818,9 +3852,8 @@ selector: "crlf",
3818
3852
  category: 'accessing',
3819
3853
  fn: function (){
3820
3854
  var self=this;
3821
- return '\r\n';
3822
- ;
3823
- return self},
3855
+ return smalltalk.withContext(function($ctx1) {
3856
+ return self}, function($ctx1) {$ctx1.fill(self,"crlf",{}, smalltalk.String.klass)})},
3824
3857
  args: [],
3825
3858
  source: "crlf\x0a\x09<return '\x5cr\x5cn'>",
3826
3859
  messageSends: [],
@@ -3835,9 +3868,8 @@ selector: "fromCharCode:",
3835
3868
  category: 'instance creation',
3836
3869
  fn: function (anInteger){
3837
3870
  var self=this;
3838
- return String.fromCharCode(anInteger);
3839
- ;
3840
- return self},
3871
+ return smalltalk.withContext(function($ctx1) {
3872
+ return self}, function($ctx1) {$ctx1.fill(self,"fromCharCode:",{anInteger:anInteger}, smalltalk.String.klass)})},
3841
3873
  args: ["anInteger"],
3842
3874
  source: "fromCharCode: anInteger\x0a\x09<return String.fromCharCode(anInteger)>",
3843
3875
  messageSends: [],
@@ -3852,9 +3884,8 @@ selector: "fromString:",
3852
3884
  category: 'instance creation',
3853
3885
  fn: function (aString){
3854
3886
  var self=this;
3855
- return new self.fn(aString);
3856
- ;
3857
- return self},
3887
+ return smalltalk.withContext(function($ctx1) {
3888
+ return self}, function($ctx1) {$ctx1.fill(self,"fromString:",{aString:aString}, smalltalk.String.klass)})},
3858
3889
  args: ["aString"],
3859
3890
  source: "fromString: aString\x0a\x09 <return new self.fn(aString)>",
3860
3891
  messageSends: [],
@@ -3869,9 +3900,8 @@ selector: "lf",
3869
3900
  category: 'accessing',
3870
3901
  fn: function (){
3871
3902
  var self=this;
3872
- return '\n';
3873
- ;
3874
- return self},
3903
+ return smalltalk.withContext(function($ctx1) {
3904
+ return self}, function($ctx1) {$ctx1.fill(self,"lf",{}, smalltalk.String.klass)})},
3875
3905
  args: [],
3876
3906
  source: "lf\x0a\x09<return '\x5cn'>",
3877
3907
  messageSends: [],
@@ -3886,9 +3916,8 @@ selector: "space",
3886
3916
  category: 'accessing',
3887
3917
  fn: function (){
3888
3918
  var self=this;
3889
- return ' ';
3890
- ;
3891
- return self},
3919
+ return smalltalk.withContext(function($ctx1) {
3920
+ return self}, function($ctx1) {$ctx1.fill(self,"space",{}, smalltalk.String.klass)})},
3892
3921
  args: [],
3893
3922
  source: "space\x0a\x09<return ' '>",
3894
3923
  messageSends: [],
@@ -3903,8 +3932,10 @@ selector: "streamClass",
3903
3932
  category: 'accessing',
3904
3933
  fn: function (){
3905
3934
  var self=this;
3906
- return (smalltalk.StringStream || StringStream);
3907
- },
3935
+ return smalltalk.withContext(function($ctx1) {
3936
+ $1=(smalltalk.StringStream || StringStream);
3937
+ return $1;
3938
+ }, function($ctx1) {$ctx1.fill(self,"streamClass",{}, smalltalk.String.klass)})},
3908
3939
  args: [],
3909
3940
  source: "streamClass\x0a\x09 ^StringStream",
3910
3941
  messageSends: [],
@@ -3919,13 +3950,13 @@ selector: "streamContents:",
3919
3950
  category: 'instance creation',
3920
3951
  fn: function (blockWithArg){
3921
3952
  var self=this;
3922
- var $1;
3923
3953
  var stream;
3924
- stream=smalltalk.send(smalltalk.send(self,"_streamClass",[]),"_on_",[smalltalk.send((smalltalk.String || String),"_new",[])]);
3925
- smalltalk.send(blockWithArg,"_value_",[stream]);
3926
- $1=smalltalk.send(stream,"_contents",[]);
3954
+ return smalltalk.withContext(function($ctx1) {
3955
+ stream=_st(_st(self)._streamClass())._on_(_st((smalltalk.String || String))._new());
3956
+ _st(blockWithArg)._value_(stream);
3957
+ $1=_st(stream)._contents();
3927
3958
  return $1;
3928
- },
3959
+ }, function($ctx1) {$ctx1.fill(self,"streamContents:",{blockWithArg:blockWithArg,stream:stream}, smalltalk.String.klass)})},
3929
3960
  args: ["blockWithArg"],
3930
3961
  source: "streamContents: blockWithArg\x0a\x09|stream|\x0a\x09stream := (self streamClass on: String new).\x0a\x09blockWithArg value: stream.\x0a\x09^ stream contents",
3931
3962
  messageSends: ["on:", "new", "streamClass", "value:", "contents"],
@@ -3940,9 +3971,8 @@ selector: "tab",
3940
3971
  category: 'accessing',
3941
3972
  fn: function (){
3942
3973
  var self=this;
3943
- return '\t';
3944
- ;
3945
- return self},
3974
+ return smalltalk.withContext(function($ctx1) {
3975
+ return self}, function($ctx1) {$ctx1.fill(self,"tab",{}, smalltalk.String.klass)})},
3946
3976
  args: [],
3947
3977
  source: "tab\x0a\x09<return '\x5ct'>",
3948
3978
  messageSends: [],
@@ -3957,9 +3987,8 @@ selector: "value:",
3957
3987
  category: 'instance creation',
3958
3988
  fn: function (aUTFCharCode){
3959
3989
  var self=this;
3960
- return String.fromCharCode(aUTFCharCode);;
3961
- ;
3962
- return self},
3990
+ return smalltalk.withContext(function($ctx1) {
3991
+ return self}, function($ctx1) {$ctx1.fill(self,"value:",{aUTFCharCode:aUTFCharCode}, smalltalk.String.klass)})},
3963
3992
  args: ["aUTFCharCode"],
3964
3993
  source: "value: aUTFCharCode\x0a\x0a\x09<return String.fromCharCode(aUTFCharCode);>",
3965
3994
  messageSends: [],
@@ -3976,10 +4005,10 @@ selector: "<",
3976
4005
  category: 'comparing',
3977
4006
  fn: function (aSymbol){
3978
4007
  var self=this;
3979
- var $1;
3980
- $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"__lt",[smalltalk.send(aSymbol,"_asString",[])]);
4008
+ return smalltalk.withContext(function($ctx1) {
4009
+ $1=_st(_st(self)._asString()).__lt(_st(aSymbol)._asString());
3981
4010
  return $1;
3982
- },
4011
+ }, function($ctx1) {$ctx1.fill(self,"<",{aSymbol:aSymbol}, smalltalk.Symbol)})},
3983
4012
  args: ["aSymbol"],
3984
4013
  source: "< aSymbol\x0a\x09^self asString < aSymbol asString",
3985
4014
  messageSends: ["<", "asString"],
@@ -3994,10 +4023,10 @@ selector: "<=",
3994
4023
  category: 'comparing',
3995
4024
  fn: function (aSymbol){
3996
4025
  var self=this;
3997
- var $1;
3998
- $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"__lt_eq",[smalltalk.send(aSymbol,"_asString",[])]);
4026
+ return smalltalk.withContext(function($ctx1) {
4027
+ $1=_st(_st(self)._asString()).__lt_eq(_st(aSymbol)._asString());
3999
4028
  return $1;
4000
- },
4029
+ }, function($ctx1) {$ctx1.fill(self,"<=",{aSymbol:aSymbol}, smalltalk.Symbol)})},
4001
4030
  args: ["aSymbol"],
4002
4031
  source: "<= aSymbol\x0a\x09^self asString <= aSymbol asString",
4003
4032
  messageSends: ["<=", "asString"],
@@ -4012,14 +4041,14 @@ selector: "=",
4012
4041
  category: 'comparing',
4013
4042
  fn: function (aSymbol){
4014
4043
  var self=this;
4015
- var $1,$2;
4016
- $1=smalltalk.send(smalltalk.send(aSymbol,"_class",[]),"__eq",[smalltalk.send(self,"_class",[])]);
4044
+ return smalltalk.withContext(function($ctx1) {
4045
+ $1=_st(_st(aSymbol)._class()).__eq(_st(self)._class());
4017
4046
  if(! smalltalk.assert($1)){
4018
4047
  return false;
4019
4048
  };
4020
- $2=smalltalk.send(smalltalk.send(self,"_asString",[]),"__eq",[smalltalk.send(aSymbol,"_asString",[])]);
4049
+ $2=_st(_st(self)._asString()).__eq(_st(aSymbol)._asString());
4021
4050
  return $2;
4022
- },
4051
+ }, function($ctx1) {$ctx1.fill(self,"=",{aSymbol:aSymbol}, smalltalk.Symbol)})},
4023
4052
  args: ["aSymbol"],
4024
4053
  source: "= aSymbol\x0a\x09aSymbol class = self class ifFalse: [^false].\x0a\x09^self asString = aSymbol asString",
4025
4054
  messageSends: ["ifFalse:", "=", "class", "asString"],
@@ -4034,10 +4063,10 @@ selector: ">",
4034
4063
  category: 'comparing',
4035
4064
  fn: function (aSymbol){
4036
4065
  var self=this;
4037
- var $1;
4038
- $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"__gt",[smalltalk.send(aSymbol,"_asString",[])]);
4066
+ return smalltalk.withContext(function($ctx1) {
4067
+ $1=_st(_st(self)._asString()).__gt(_st(aSymbol)._asString());
4039
4068
  return $1;
4040
- },
4069
+ }, function($ctx1) {$ctx1.fill(self,">",{aSymbol:aSymbol}, smalltalk.Symbol)})},
4041
4070
  args: ["aSymbol"],
4042
4071
  source: "> aSymbol\x0a\x09^self asString > aSymbol asString",
4043
4072
  messageSends: [">", "asString"],
@@ -4052,10 +4081,10 @@ selector: ">=",
4052
4081
  category: 'comparing',
4053
4082
  fn: function (aSymbol){
4054
4083
  var self=this;
4055
- var $1;
4056
- $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"__gt_eq",[smalltalk.send(aSymbol,"_asString",[])]);
4084
+ return smalltalk.withContext(function($ctx1) {
4085
+ $1=_st(_st(self)._asString()).__gt_eq(_st(aSymbol)._asString());
4057
4086
  return $1;
4058
- },
4087
+ }, function($ctx1) {$ctx1.fill(self,">=",{aSymbol:aSymbol}, smalltalk.Symbol)})},
4059
4088
  args: ["aSymbol"],
4060
4089
  source: ">= aSymbol\x0a\x09^self asString >= aSymbol asString",
4061
4090
  messageSends: [">=", "asString"],
@@ -4070,10 +4099,10 @@ selector: "asJSON",
4070
4099
  category: 'converting',
4071
4100
  fn: function (){
4072
4101
  var self=this;
4073
- var $1;
4074
- $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"_asJSON",[]);
4102
+ return smalltalk.withContext(function($ctx1) {
4103
+ $1=_st(_st(self)._asString())._asJSON();
4075
4104
  return $1;
4076
- },
4105
+ }, function($ctx1) {$ctx1.fill(self,"asJSON",{}, smalltalk.Symbol)})},
4077
4106
  args: [],
4078
4107
  source: "asJSON\x0a\x09^self asString asJSON",
4079
4108
  messageSends: ["asJSON", "asString"],
@@ -4088,10 +4117,10 @@ selector: "asJavascript",
4088
4117
  category: 'converting',
4089
4118
  fn: function (){
4090
4119
  var self=this;
4091
- var $1;
4092
- $1=smalltalk.send(smalltalk.send("smalltalk.symbolFor(\x22","__comma",[smalltalk.send(self,"_asString",[])]),"__comma",["\x22)"]);
4120
+ return smalltalk.withContext(function($ctx1) {
4121
+ $1=_st(_st("smalltalk.symbolFor(\x22").__comma(_st(self)._asString())).__comma("\x22)");
4093
4122
  return $1;
4094
- },
4123
+ }, function($ctx1) {$ctx1.fill(self,"asJavascript",{}, smalltalk.Symbol)})},
4095
4124
  args: [],
4096
4125
  source: "asJavascript\x0a\x09^'smalltalk.symbolFor(\x22', self asString, '\x22)'",
4097
4126
  messageSends: [",", "asString"],
@@ -4106,10 +4135,10 @@ selector: "asSelector",
4106
4135
  category: 'converting',
4107
4136
  fn: function (){
4108
4137
  var self=this;
4109
- var $1;
4110
- $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"_asSelector",[]);
4138
+ return smalltalk.withContext(function($ctx1) {
4139
+ $1=_st(_st(self)._asString())._asSelector();
4111
4140
  return $1;
4112
- },
4141
+ }, function($ctx1) {$ctx1.fill(self,"asSelector",{}, smalltalk.Symbol)})},
4113
4142
  args: [],
4114
4143
  source: "asSelector\x0a\x09^self asString asSelector",
4115
4144
  messageSends: ["asSelector", "asString"],
@@ -4124,9 +4153,8 @@ selector: "asString",
4124
4153
  category: 'converting',
4125
4154
  fn: function (){
4126
4155
  var self=this;
4127
- return self.value;
4128
- ;
4129
- return self},
4156
+ return smalltalk.withContext(function($ctx1) {
4157
+ return self}, function($ctx1) {$ctx1.fill(self,"asString",{}, smalltalk.Symbol)})},
4130
4158
  args: [],
4131
4159
  source: "asString\x0a\x09<return self.value>",
4132
4160
  messageSends: [],
@@ -4134,6 +4162,24 @@ referencedClasses: []
4134
4162
  }),
4135
4163
  smalltalk.Symbol);
4136
4164
 
4165
+ smalltalk.addMethod(
4166
+ "_asSuperSelector",
4167
+ smalltalk.method({
4168
+ selector: "asSuperSelector",
4169
+ category: 'converting',
4170
+ fn: function (){
4171
+ var self=this;
4172
+ return smalltalk.withContext(function($ctx1) {
4173
+ $1=_st(_st(self)._asString())._asSuperSelector();
4174
+ return $1;
4175
+ }, function($ctx1) {$ctx1.fill(self,"asSuperSelector",{}, smalltalk.Symbol)})},
4176
+ args: [],
4177
+ source: "asSuperSelector\x0a\x09^self asString asSuperSelector",
4178
+ messageSends: ["asSuperSelector", "asString"],
4179
+ referencedClasses: []
4180
+ }),
4181
+ smalltalk.Symbol);
4182
+
4137
4183
  smalltalk.addMethod(
4138
4184
  "_asSymbol",
4139
4185
  smalltalk.method({
@@ -4141,8 +4187,10 @@ selector: "asSymbol",
4141
4187
  category: 'converting',
4142
4188
  fn: function (){
4143
4189
  var self=this;
4144
- return self;
4145
- },
4190
+ return smalltalk.withContext(function($ctx1) {
4191
+ $1=self;
4192
+ return $1;
4193
+ }, function($ctx1) {$ctx1.fill(self,"asSymbol",{}, smalltalk.Symbol)})},
4146
4194
  args: [],
4147
4195
  source: "asSymbol\x0a\x09^self",
4148
4196
  messageSends: [],
@@ -4157,10 +4205,10 @@ selector: "at:ifAbsent:",
4157
4205
  category: 'accessing',
4158
4206
  fn: function (anIndex,aBlock){
4159
4207
  var self=this;
4160
- var $1;
4161
- $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"_at_ifAbsent_",[anIndex,aBlock]);
4208
+ return smalltalk.withContext(function($ctx1) {
4209
+ $1=_st(_st(self)._asString())._at_ifAbsent_(anIndex,aBlock);
4162
4210
  return $1;
4163
- },
4211
+ }, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{anIndex:anIndex,aBlock:aBlock}, smalltalk.Symbol)})},
4164
4212
  args: ["anIndex", "aBlock"],
4165
4213
  source: "at: anIndex ifAbsent: aBlock\x0a\x09^self asString at: anIndex ifAbsent: aBlock",
4166
4214
  messageSends: ["at:ifAbsent:", "asString"],
@@ -4175,10 +4223,10 @@ selector: "collect:",
4175
4223
  category: 'enumerating',
4176
4224
  fn: function (aBlock){
4177
4225
  var self=this;
4178
- var $1;
4179
- $1=smalltalk.send(smalltalk.send(smalltalk.send(self,"_asString",[]),"_collect_",[aBlock]),"_asSymbol",[]);
4226
+ return smalltalk.withContext(function($ctx1) {
4227
+ $1=_st(_st(_st(self)._asString())._collect_(aBlock))._asSymbol();
4180
4228
  return $1;
4181
- },
4229
+ }, function($ctx1) {$ctx1.fill(self,"collect:",{aBlock:aBlock}, smalltalk.Symbol)})},
4182
4230
  args: ["aBlock"],
4183
4231
  source: "collect: aBlock\x0a\x09^ (self asString collect: aBlock) asSymbol",
4184
4232
  messageSends: ["asSymbol", "collect:", "asString"],
@@ -4193,10 +4241,10 @@ selector: "copyFrom:to:",
4193
4241
  category: 'copying',
4194
4242
  fn: function (anIndex,anotherIndex){
4195
4243
  var self=this;
4196
- var $1;
4197
- $1=smalltalk.send(smalltalk.send(self,"_class",[]),"_fromString_",[smalltalk.send(smalltalk.send(self,"_asString",[]),"_copyFrom_to_",[anIndex,anotherIndex])]);
4244
+ return smalltalk.withContext(function($ctx1) {
4245
+ $1=_st(_st(self)._class())._fromString_(_st(_st(self)._asString())._copyFrom_to_(anIndex,anotherIndex));
4198
4246
  return $1;
4199
- },
4247
+ }, function($ctx1) {$ctx1.fill(self,"copyFrom:to:",{anIndex:anIndex,anotherIndex:anotherIndex}, smalltalk.Symbol)})},
4200
4248
  args: ["anIndex", "anotherIndex"],
4201
4249
  source: "copyFrom: anIndex to: anotherIndex\x0a\x09^self class fromString: (self asString copyFrom: anIndex to: anotherIndex)",
4202
4250
  messageSends: ["fromString:", "copyFrom:to:", "asString", "class"],
@@ -4211,8 +4259,10 @@ selector: "deepCopy",
4211
4259
  category: 'copying',
4212
4260
  fn: function (){
4213
4261
  var self=this;
4214
- return self;
4215
- },
4262
+ return smalltalk.withContext(function($ctx1) {
4263
+ $1=self;
4264
+ return $1;
4265
+ }, function($ctx1) {$ctx1.fill(self,"deepCopy",{}, smalltalk.Symbol)})},
4216
4266
  args: [],
4217
4267
  source: "deepCopy\x0a\x09^self",
4218
4268
  messageSends: [],
@@ -4227,10 +4277,10 @@ selector: "detect:",
4227
4277
  category: 'enumerating',
4228
4278
  fn: function (aBlock){
4229
4279
  var self=this;
4230
- var $1;
4231
- $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"_detect_",[aBlock]);
4280
+ return smalltalk.withContext(function($ctx1) {
4281
+ $1=_st(_st(self)._asString())._detect_(aBlock);
4232
4282
  return $1;
4233
- },
4283
+ }, function($ctx1) {$ctx1.fill(self,"detect:",{aBlock:aBlock}, smalltalk.Symbol)})},
4234
4284
  args: ["aBlock"],
4235
4285
  source: "detect: aBlock\x0a\x09^ self asString detect: aBlock",
4236
4286
  messageSends: ["detect:", "asString"],
@@ -4245,8 +4295,8 @@ selector: "do:",
4245
4295
  category: 'enumerating',
4246
4296
  fn: function (aBlock){
4247
4297
  var self=this;
4248
- smalltalk.send(smalltalk.send(self,"_asString",[]),"_do_",[aBlock]);
4249
- return self},
4298
+ return smalltalk.withContext(function($ctx1) {
4299
+ return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock}, smalltalk.Symbol)})},
4250
4300
  args: ["aBlock"],
4251
4301
  source: "do: aBlock\x0a\x09self asString do: aBlock",
4252
4302
  messageSends: ["do:", "asString"],
@@ -4261,8 +4311,8 @@ selector: "isSymbol",
4261
4311
  category: 'printing',
4262
4312
  fn: function (){
4263
4313
  var self=this;
4264
- return true;
4265
- },
4314
+ return smalltalk.withContext(function($ctx1) {
4315
+ }, function($ctx1) {$ctx1.fill(self,"isSymbol",{}, smalltalk.Symbol)})},
4266
4316
  args: [],
4267
4317
  source: "isSymbol\x0a\x09^true",
4268
4318
  messageSends: [],
@@ -4277,10 +4327,10 @@ selector: "printString",
4277
4327
  category: 'printing',
4278
4328
  fn: function (){
4279
4329
  var self=this;
4280
- var $1;
4281
- $1=smalltalk.send("#","__comma",[smalltalk.send(self,"_asString",[])]);
4330
+ return smalltalk.withContext(function($ctx1) {
4331
+ $1=_st("#").__comma(_st(self)._asString());
4282
4332
  return $1;
4283
- },
4333
+ }, function($ctx1) {$ctx1.fill(self,"printString",{}, smalltalk.Symbol)})},
4284
4334
  args: [],
4285
4335
  source: "printString\x0a\x09^'#', self asString",
4286
4336
  messageSends: [",", "asString"],
@@ -4295,10 +4345,10 @@ selector: "select:",
4295
4345
  category: 'enumerating',
4296
4346
  fn: function (aBlock){
4297
4347
  var self=this;
4298
- var $1;
4299
- $1=smalltalk.send(smalltalk.send(smalltalk.send(self,"_asString",[]),"_select_",[aBlock]),"_asSymbol",[]);
4348
+ return smalltalk.withContext(function($ctx1) {
4349
+ $1=_st(_st(_st(self)._asString())._select_(aBlock))._asSymbol();
4300
4350
  return $1;
4301
- },
4351
+ }, function($ctx1) {$ctx1.fill(self,"select:",{aBlock:aBlock}, smalltalk.Symbol)})},
4302
4352
  args: ["aBlock"],
4303
4353
  source: "select: aBlock\x0a\x09^ (self asString select: aBlock) asSymbol",
4304
4354
  messageSends: ["asSymbol", "select:", "asString"],
@@ -4313,8 +4363,10 @@ selector: "shallowCopy",
4313
4363
  category: 'copying',
4314
4364
  fn: function (){
4315
4365
  var self=this;
4316
- return self;
4317
- },
4366
+ return smalltalk.withContext(function($ctx1) {
4367
+ $1=self;
4368
+ return $1;
4369
+ }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{}, smalltalk.Symbol)})},
4318
4370
  args: [],
4319
4371
  source: "shallowCopy\x0a\x09^self",
4320
4372
  messageSends: [],
@@ -4329,10 +4381,10 @@ selector: "size",
4329
4381
  category: 'accessing',
4330
4382
  fn: function (){
4331
4383
  var self=this;
4332
- var $1;
4333
- $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"_size",[]);
4384
+ return smalltalk.withContext(function($ctx1) {
4385
+ $1=_st(_st(self)._asString())._size();
4334
4386
  return $1;
4335
- },
4387
+ }, function($ctx1) {$ctx1.fill(self,"size",{}, smalltalk.Symbol)})},
4336
4388
  args: [],
4337
4389
  source: "size\x0a\x09^self asString size",
4338
4390
  messageSends: ["size", "asString"],
@@ -4347,10 +4399,10 @@ selector: "value:",
4347
4399
  category: 'evaluating',
4348
4400
  fn: function (anObject){
4349
4401
  var self=this;
4350
- var $1;
4351
- $1=smalltalk.send(anObject,"_perform_",[self]);
4402
+ return smalltalk.withContext(function($ctx1) {
4403
+ $1=_st(anObject)._perform_(self);
4352
4404
  return $1;
4353
- },
4405
+ }, function($ctx1) {$ctx1.fill(self,"value:",{anObject:anObject}, smalltalk.Symbol)})},
4354
4406
  args: ["anObject"],
4355
4407
  source: "value: anObject \x0a\x09^anObject perform: self",
4356
4408
  messageSends: ["perform:"],
@@ -4365,8 +4417,8 @@ selector: "withIndexDo:",
4365
4417
  category: 'enumerating',
4366
4418
  fn: function (aBlock){
4367
4419
  var self=this;
4368
- smalltalk.send(smalltalk.send(self,"_asString",[]),"_withIndexDo_",[aBlock]);
4369
- return self},
4420
+ return smalltalk.withContext(function($ctx1) {
4421
+ return self}, function($ctx1) {$ctx1.fill(self,"withIndexDo:",{aBlock:aBlock}, smalltalk.Symbol)})},
4370
4422
  args: ["aBlock"],
4371
4423
  source: "withIndexDo: aBlock\x0a\x09self asString withIndexDo: aBlock",
4372
4424
  messageSends: ["withIndexDo:", "asString"],
@@ -4382,8 +4434,8 @@ selector: "basicNew",
4382
4434
  category: 'instance creation',
4383
4435
  fn: function (){
4384
4436
  var self=this;
4385
- smalltalk.send(self,"_shouldNotImplement",[]);
4386
- return self},
4437
+ return smalltalk.withContext(function($ctx1) {
4438
+ return self}, function($ctx1) {$ctx1.fill(self,"basicNew",{}, smalltalk.Symbol.klass)})},
4387
4439
  args: [],
4388
4440
  source: "basicNew\x0a\x09self shouldNotImplement",
4389
4441
  messageSends: ["shouldNotImplement"],
@@ -4398,10 +4450,10 @@ selector: "fromString:",
4398
4450
  category: 'instance creation',
4399
4451
  fn: function (aString){
4400
4452
  var self=this;
4401
- var $1;
4402
- $1=smalltalk.send(self,"_lookup_",[aString]);
4453
+ return smalltalk.withContext(function($ctx1) {
4454
+ $1=_st(self)._lookup_(aString);
4403
4455
  return $1;
4404
- },
4456
+ }, function($ctx1) {$ctx1.fill(self,"fromString:",{aString:aString}, smalltalk.Symbol.klass)})},
4405
4457
  args: ["aString"],
4406
4458
  source: "fromString: aString\x0a\x09^self lookup: aString",
4407
4459
  messageSends: ["lookup:"],
@@ -4416,9 +4468,8 @@ selector: "lookup:",
4416
4468
  category: 'instance creation',
4417
4469
  fn: function (aString){
4418
4470
  var self=this;
4419
- return smalltalk.symbolFor(aString);;
4420
- ;
4421
- return self},
4471
+ return smalltalk.withContext(function($ctx1) {
4472
+ return self}, function($ctx1) {$ctx1.fill(self,"lookup:",{aString:aString}, smalltalk.Symbol.klass)})},
4422
4473
  args: ["aString"],
4423
4474
  source: "lookup: aString\x0a\x09<return smalltalk.symbolFor(aString);>",
4424
4475
  messageSends: [],
@@ -4435,12 +4486,12 @@ selector: "=",
4435
4486
  category: 'comparing',
4436
4487
  fn: function (aCollection){
4437
4488
  var self=this;
4438
- var $1;
4439
- $1=smalltalk.send(smalltalk.send(smalltalk.send(self,"_class",[]),"__eq",[smalltalk.send(aCollection,"_class",[])]),"_and_",[(function(){
4440
- return smalltalk.send(self["@elements"],"__eq",[smalltalk.send(aCollection,"_asArray",[])]);
4441
- })]);
4489
+ return smalltalk.withContext(function($ctx1) {
4490
+ $1=_st(_st(_st(self)._class()).__eq(_st(aCollection)._class()))._and_((function(){
4491
+ return smalltalk.withContext(function($ctx2) {
4492
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
4442
4493
  return $1;
4443
- },
4494
+ }, function($ctx1) {$ctx1.fill(self,"=",{aCollection:aCollection}, smalltalk.Set)})},
4444
4495
  args: ["aCollection"],
4445
4496
  source: "= aCollection\x0a\x09^self class = aCollection class and: [\x0a\x09\x09elements = aCollection asArray]",
4446
4497
  messageSends: ["and:", "=", "asArray", "class"],
@@ -4455,7 +4506,7 @@ selector: "add:",
4455
4506
  category: 'adding/removing',
4456
4507
  fn: function (anObject){
4457
4508
  var self=this;
4458
-
4509
+ return smalltalk.withContext(function($ctx1) {
4459
4510
  var found;
4460
4511
  for(var i=0; i < self['@elements'].length; i++) {
4461
4512
  if(anObject == self['@elements'][i]) {
@@ -4465,8 +4516,7 @@ var self=this;
4465
4516
  }
4466
4517
  if(!found) {self['@elements'].push(anObject)}
4467
4518
  ;
4468
- ;
4469
- return self},
4519
+ return self}, function($ctx1) {$ctx1.fill(self,"add:",{anObject:anObject}, smalltalk.Set)})},
4470
4520
  args: ["anObject"],
4471
4521
  source: "add: anObject\x0a\x09<\x0a\x09\x09var found;\x0a\x09\x09for(var i=0; i < self['@elements'].length; i++) {\x0a\x09\x09\x09if(anObject == self['@elements'][i]) {\x0a\x09\x09\x09\x09found = true;\x0a\x09\x09\x09\x09break;\x0a\x09\x09\x09}\x0a\x09\x09}\x0a\x09\x09if(!found) {self['@elements'].push(anObject)}\x0a\x09>",
4472
4522
  messageSends: [],
@@ -4481,10 +4531,10 @@ selector: "asArray",
4481
4531
  category: 'converting',
4482
4532
  fn: function (){
4483
4533
  var self=this;
4484
- var $1;
4485
- $1=smalltalk.send(self["@elements"],"_copy",[]);
4534
+ return smalltalk.withContext(function($ctx1) {
4535
+ $1=_st(self["@elements"])._copy();
4486
4536
  return $1;
4487
- },
4537
+ }, function($ctx1) {$ctx1.fill(self,"asArray",{}, smalltalk.Set)})},
4488
4538
  args: [],
4489
4539
  source: "asArray\x0a\x09^elements copy",
4490
4540
  messageSends: ["copy"],
@@ -4499,10 +4549,10 @@ selector: "detect:ifNone:",
4499
4549
  category: 'enumerating',
4500
4550
  fn: function (aBlock,anotherBlock){
4501
4551
  var self=this;
4502
- var $1;
4503
- $1=smalltalk.send(self["@elements"],"_detect_ifNone_",[aBlock,anotherBlock]);
4552
+ return smalltalk.withContext(function($ctx1) {
4553
+ $1=_st(self["@elements"])._detect_ifNone_(aBlock,anotherBlock);
4504
4554
  return $1;
4505
- },
4555
+ }, function($ctx1) {$ctx1.fill(self,"detect:ifNone:",{aBlock:aBlock,anotherBlock:anotherBlock}, smalltalk.Set)})},
4506
4556
  args: ["aBlock", "anotherBlock"],
4507
4557
  source: "detect: aBlock ifNone: anotherBlock\x0a\x09^elements detect: aBlock ifNone: anotherBlock",
4508
4558
  messageSends: ["detect:ifNone:"],
@@ -4517,8 +4567,8 @@ selector: "do:",
4517
4567
  category: 'enumerating',
4518
4568
  fn: function (aBlock){
4519
4569
  var self=this;
4520
- smalltalk.send(self["@elements"],"_do_",[aBlock]);
4521
- return self},
4570
+ return smalltalk.withContext(function($ctx1) {
4571
+ return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock}, smalltalk.Set)})},
4522
4572
  args: ["aBlock"],
4523
4573
  source: "do: aBlock\x0a\x09elements do: aBlock",
4524
4574
  messageSends: ["do:"],
@@ -4533,10 +4583,10 @@ selector: "includes:",
4533
4583
  category: 'testing',
4534
4584
  fn: function (anObject){
4535
4585
  var self=this;
4536
- var $1;
4537
- $1=smalltalk.send(self["@elements"],"_includes_",[anObject]);
4586
+ return smalltalk.withContext(function($ctx1) {
4587
+ $1=_st(self["@elements"])._includes_(anObject);
4538
4588
  return $1;
4539
- },
4589
+ }, function($ctx1) {$ctx1.fill(self,"includes:",{anObject:anObject}, smalltalk.Set)})},
4540
4590
  args: ["anObject"],
4541
4591
  source: "includes: anObject\x0a\x09^elements includes: anObject",
4542
4592
  messageSends: ["includes:"],
@@ -4551,9 +4601,9 @@ selector: "initialize",
4551
4601
  category: 'initialization',
4552
4602
  fn: function (){
4553
4603
  var self=this;
4554
- smalltalk.send(self,"_initialize",[],smalltalk.Collection);
4604
+ return smalltalk.withContext(function($ctx1) {
4555
4605
  self["@elements"]=[];
4556
- return self},
4606
+ return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.Set)})},
4557
4607
  args: [],
4558
4608
  source: "initialize\x0a\x09super initialize.\x0a\x09elements := #()",
4559
4609
  messageSends: ["initialize"],
@@ -4568,8 +4618,8 @@ selector: "remove:",
4568
4618
  category: 'adding/removing',
4569
4619
  fn: function (anObject){
4570
4620
  var self=this;
4571
- smalltalk.send(self["@elements"],"_remove_",[anObject]);
4572
- return self},
4621
+ return smalltalk.withContext(function($ctx1) {
4622
+ return self}, function($ctx1) {$ctx1.fill(self,"remove:",{anObject:anObject}, smalltalk.Set)})},
4573
4623
  args: ["anObject"],
4574
4624
  source: "remove: anObject\x0a\x09elements remove: anObject",
4575
4625
  messageSends: ["remove:"],
@@ -4584,17 +4634,20 @@ selector: "select:",
4584
4634
  category: 'enumerating',
4585
4635
  fn: function (aBlock){
4586
4636
  var self=this;
4587
- var $1;
4588
4637
  var collection;
4589
- collection=smalltalk.send(smalltalk.send(self,"_class",[]),"_new",[]);
4590
- smalltalk.send(self,"_do_",[(function(each){
4591
- $1=smalltalk.send(aBlock,"_value_",[each]);
4592
- if(smalltalk.assert($1)){
4593
- return smalltalk.send(collection,"_add_",[each]);
4638
+ return smalltalk.withContext(function($ctx1) {
4639
+ collection=_st(_st(self)._class())._new();
4640
+ $1=self;
4641
+ $2=(function(each){
4642
+ return smalltalk.withContext(function($ctx2) {
4643
+ if(smalltalk.assert($3)){
4644
+ return _st(collection)._add_(each);
4594
4645
  };
4595
- })]);
4596
- return collection;
4597
- },
4646
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
4647
+ _st($1)._do_($2);
4648
+ $4=collection;
4649
+ return $4;
4650
+ }, function($ctx1) {$ctx1.fill(self,"select:",{aBlock:aBlock,collection:collection}, smalltalk.Set)})},
4598
4651
  args: ["aBlock"],
4599
4652
  source: "select: aBlock\x0a\x09| collection |\x0a\x09collection := self class new. \x0a\x09self do: [:each |\x0a\x09\x09(aBlock value: each) ifTrue: [\x0a\x09\x09\x09collection add: each]].\x0a\x09^collection",
4600
4653
  messageSends: ["new", "class", "do:", "ifTrue:", "add:", "value:"],
@@ -4609,10 +4662,10 @@ selector: "size",
4609
4662
  category: 'accessing',
4610
4663
  fn: function (){
4611
4664
  var self=this;
4612
- var $1;
4613
- $1=smalltalk.send(self["@elements"],"_size",[]);
4665
+ return smalltalk.withContext(function($ctx1) {
4666
+ $1=_st(self["@elements"])._size();
4614
4667
  return $1;
4615
- },
4668
+ }, function($ctx1) {$ctx1.fill(self,"size",{}, smalltalk.Set)})},
4616
4669
  args: [],
4617
4670
  source: "size\x0a\x09^elements size",
4618
4671
  messageSends: ["size"],
@@ -4623,6 +4676,7 @@ smalltalk.Set);
4623
4676
 
4624
4677
 
4625
4678
  smalltalk.addClass('Queue', smalltalk.Object, ['read', 'readIndex', 'write'], 'Kernel-Collections');
4679
+ smalltalk.Queue.comment="A Queue am a one-sided queue.\x0a\x0aA Queue uses two OrderedCollections inside,\x0a`read` is at the front, is not modified and only read using `readIndex`.\x0a`write` is at the back and is appended new items.\x0aWhen `read` is exhausted, `write` is promoted to `read` and new `write` is created.\x0a\x0aAs a consequence, no data moving is done by the Queue; write appending may do data moving\x0awhen growing `write`, but this is left to engine to implement as good as it chooses to."
4626
4680
  smalltalk.addMethod(
4627
4681
  "_back_",
4628
4682
  smalltalk.method({
@@ -4630,10 +4684,10 @@ selector: "back:",
4630
4684
  category: 'accessing',
4631
4685
  fn: function (anObject){
4632
4686
  var self=this;
4633
- smalltalk.send(self["@write"],"_add_",[anObject]);
4634
- return self},
4687
+ return smalltalk.withContext(function($ctx1) {
4688
+ return self}, function($ctx1) {$ctx1.fill(self,"back:",{anObject:anObject}, smalltalk.Queue)})},
4635
4689
  args: ["anObject"],
4636
- source: "back: anObject\x0a\x09write add: anObject\x0a",
4690
+ source: "back: anObject\x0a\x09write add: anObject",
4637
4691
  messageSends: ["add:"],
4638
4692
  referencedClasses: []
4639
4693
  }),
@@ -4646,14 +4700,14 @@ selector: "front",
4646
4700
  category: 'accessing',
4647
4701
  fn: function (){
4648
4702
  var self=this;
4649
- var $1;
4650
- $1=smalltalk.send(self,"_frontIfAbsent_",[(function(){
4651
- return smalltalk.send(self,"_error_",["Cannot read from empty Queue."]);
4652
- })]);
4703
+ return smalltalk.withContext(function($ctx1) {
4704
+ $1=_st(self)._frontIfAbsent_((function(){
4705
+ return smalltalk.withContext(function($ctx2) {
4706
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
4653
4707
  return $1;
4654
- },
4708
+ }, function($ctx1) {$ctx1.fill(self,"front",{}, smalltalk.Queue)})},
4655
4709
  args: [],
4656
- source: "front\x0a ^self frontIfAbsent: [ self error: 'Cannot read from empty Queue.']\x0a",
4710
+ source: "front\x0a ^self frontIfAbsent: [ self error: 'Cannot read from empty Queue.' ]",
4657
4711
  messageSends: ["frontIfAbsent:", "error:"],
4658
4712
  referencedClasses: []
4659
4713
  }),
@@ -4666,39 +4720,44 @@ selector: "frontIfAbsent:",
4666
4720
  category: 'accessing',
4667
4721
  fn: function (aBlock){
4668
4722
  var self=this;
4669
- var $1,$2,$3;
4723
+ var result;
4724
+ return smalltalk.withContext(function($ctx1) {
4670
4725
  var $early={};
4671
4726
  try {
4672
- var result;
4673
- result=smalltalk.send(self["@read"],"_at_ifAbsent_",[self["@readIndex"],(function(){
4674
- $1=smalltalk.send(self["@write"],"_isEmpty",[]);
4675
- if(smalltalk.assert($1)){
4676
- $2=smalltalk.send(self["@readIndex"],"__gt",[(1)]);
4677
- if(smalltalk.assert($2)){
4727
+ $1=self["@read"];
4728
+ $2=self["@readIndex"];
4729
+ $3=(function(){
4730
+ return smalltalk.withContext(function($ctx2) {
4731
+ $5=(function(){
4732
+ return smalltalk.withContext(function($ctx3) {
4733
+ if(smalltalk.assert($6)){
4678
4734
  self["@read"]=[];
4679
4735
  self["@read"];
4680
4736
  self["@readIndex"]=(1);
4681
4737
  self["@readIndex"];
4682
4738
  };
4683
- $3=smalltalk.send(aBlock,"_value",[]);
4684
- throw $early=[$3];
4685
- };
4739
+ $7=_st(aBlock)._value();
4740
+ throw $early=[$7];
4741
+ }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
4742
+ _st($4)._ifTrue_($5);
4686
4743
  self["@read"]=self["@write"];
4687
4744
  self["@read"];
4688
4745
  self["@readIndex"]=(1);
4689
4746
  self["@readIndex"];
4690
- self["@write"]=smalltalk.send((smalltalk.OrderedCollection || OrderedCollection),"_new",[]);
4747
+ self["@write"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
4691
4748
  self["@write"];
4692
- return smalltalk.send(self["@read"],"_first",[]);
4693
- })]);
4694
- smalltalk.send(self["@read"],"_at_put_",[self["@readIndex"],nil]);
4695
- self["@readIndex"]=smalltalk.send(self["@readIndex"],"__plus",[(1)]);
4696
- return result;
4749
+ return _st(self["@read"])._first();
4750
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
4751
+ result=_st($1)._at_ifAbsent_($2,$3);
4752
+ _st(self["@read"])._at_put_(self["@readIndex"],nil);
4753
+ self["@readIndex"]=_st(self["@readIndex"]).__plus((1));
4754
+ $8=result;
4755
+ return $8;
4697
4756
  }
4698
4757
  catch(e) {if(e===$early)return e[0]; throw e}
4699
- },
4758
+ }, function($ctx1) {$ctx1.fill(self,"frontIfAbsent:",{aBlock:aBlock,result:result}, smalltalk.Queue)})},
4700
4759
  args: ["aBlock"],
4701
- source: "frontIfAbsent: aBlock\x0a\x09| result |\x0a\x09result := read at: readIndex ifAbsent: [\x0a\x09\x09write isEmpty ifTrue: [\x0a\x09\x09\x09readIndex > 1 ifTrue: [ read := #(). readIndex := 1 ].\x0a\x09\x09\x09^aBlock value ].\x0a \x09read := write.\x0a \x09readIndex := 1.\x0a \x09write := OrderedCollection new.\x0a \x09read first ].\x0a read at: readIndex put: nil.\x0a readIndex := readIndex + 1.\x0a ^result\x0a",
4760
+ source: "frontIfAbsent: aBlock\x0a\x09| result |\x0a\x09result := read at: readIndex ifAbsent: [\x0a\x09\x09write isEmpty ifTrue: [\x0a\x09\x09\x09readIndex > 1 ifTrue: [ read := #(). readIndex := 1 ].\x0a\x09\x09\x09^aBlock value ].\x0a \x09read := write.\x0a \x09readIndex := 1.\x0a \x09write := OrderedCollection new.\x0a \x09read first ].\x0a read at: readIndex put: nil.\x0a readIndex := readIndex + 1.\x0a ^result",
4702
4761
  messageSends: ["at:ifAbsent:", "ifTrue:", ">", "value", "isEmpty", "new", "first", "at:put:", "+"],
4703
4762
  referencedClasses: ["OrderedCollection"]
4704
4763
  }),
@@ -4711,13 +4770,14 @@ selector: "initialize",
4711
4770
  category: 'initialization',
4712
4771
  fn: function (){
4713
4772
  var self=this;
4714
- self["@read"]=[];
4773
+ return smalltalk.withContext(function($ctx1) {
4774
+ self["@read"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
4775
+ self["@write"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
4715
4776
  self["@readIndex"]=(1);
4716
- self["@write"]=smalltalk.send((smalltalk.OrderedCollection || OrderedCollection),"_new",[]);
4717
- return self},
4777
+ return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.Queue)})},
4718
4778
  args: [],
4719
- source: "initialize\x0a\x09read := #().\x0a readIndex := 1.\x0a write := OrderedCollection new",
4720
- messageSends: ["new"],
4779
+ source: "initialize\x0a\x09super initialize.\x0a\x09read := OrderedCollection new.\x0a write := OrderedCollection new.\x0a readIndex := 1",
4780
+ messageSends: ["initialize", "new"],
4721
4781
  referencedClasses: ["OrderedCollection"]
4722
4782
  }),
4723
4783
  smalltalk.Queue);
@@ -4732,9 +4792,8 @@ selector: "compile:",
4732
4792
  category: 'evaluating',
4733
4793
  fn: function (aString){
4734
4794
  var self=this;
4735
- return self.compile(aString);
4736
- ;
4737
- return self},
4795
+ return smalltalk.withContext(function($ctx1) {
4796
+ return self}, function($ctx1) {$ctx1.fill(self,"compile:",{aString:aString}, smalltalk.RegularExpression)})},
4738
4797
  args: ["aString"],
4739
4798
  source: "compile: aString\x0a\x09<return self.compile(aString)>",
4740
4799
  messageSends: [],
@@ -4749,9 +4808,8 @@ selector: "exec:",
4749
4808
  category: 'evaluating',
4750
4809
  fn: function (aString){
4751
4810
  var self=this;
4752
- return self.exec(aString) || nil;
4753
- ;
4754
- return self},
4811
+ return smalltalk.withContext(function($ctx1) {
4812
+ return self}, function($ctx1) {$ctx1.fill(self,"exec:",{aString:aString}, smalltalk.RegularExpression)})},
4755
4813
  args: ["aString"],
4756
4814
  source: "exec: aString\x0a\x09<return self.exec(aString) || nil>",
4757
4815
  messageSends: [],
@@ -4766,9 +4824,8 @@ selector: "test:",
4766
4824
  category: 'evaluating',
4767
4825
  fn: function (aString){
4768
4826
  var self=this;
4769
- return self.test(aString);
4770
- ;
4771
- return self},
4827
+ return smalltalk.withContext(function($ctx1) {
4828
+ return self}, function($ctx1) {$ctx1.fill(self,"test:",{aString:aString}, smalltalk.RegularExpression)})},
4772
4829
  args: ["aString"],
4773
4830
  source: "test: aString\x0a\x09<return self.test(aString)>",
4774
4831
  messageSends: [],
@@ -4784,10 +4841,10 @@ selector: "fromString:",
4784
4841
  category: 'instance creation',
4785
4842
  fn: function (aString){
4786
4843
  var self=this;
4787
- var $1;
4788
- $1=smalltalk.send(self,"_fromString_flag_",[aString,""]);
4844
+ return smalltalk.withContext(function($ctx1) {
4845
+ $1=_st(self)._fromString_flag_(aString,"");
4789
4846
  return $1;
4790
- },
4847
+ }, function($ctx1) {$ctx1.fill(self,"fromString:",{aString:aString}, smalltalk.RegularExpression.klass)})},
4791
4848
  args: ["aString"],
4792
4849
  source: "fromString: aString\x0a\x09 ^self fromString: aString flag: ''",
4793
4850
  messageSends: ["fromString:flag:"],
@@ -4802,9 +4859,8 @@ selector: "fromString:flag:",
4802
4859
  category: 'instance creation',
4803
4860
  fn: function (aString,anotherString){
4804
4861
  var self=this;
4805
- return new RegExp(aString, anotherString);
4806
- ;
4807
- return self},
4862
+ return smalltalk.withContext(function($ctx1) {
4863
+ return self}, function($ctx1) {$ctx1.fill(self,"fromString:flag:",{aString:aString,anotherString:anotherString}, smalltalk.RegularExpression.klass)})},
4808
4864
  args: ["aString", "anotherString"],
4809
4865
  source: "fromString: aString flag: anotherString\x0a\x09<return new RegExp(aString, anotherString)>",
4810
4866
  messageSends: [],
@@ -4821,10 +4877,10 @@ selector: "atEnd",
4821
4877
  category: 'testing',
4822
4878
  fn: function (){
4823
4879
  var self=this;
4824
- var $1;
4825
- $1=smalltalk.send(smalltalk.send(self,"_position",[]),"__eq",[smalltalk.send(self,"_size",[])]);
4880
+ return smalltalk.withContext(function($ctx1) {
4881
+ $1=_st(_st(self)._position()).__eq(_st(self)._size());
4826
4882
  return $1;
4827
- },
4883
+ }, function($ctx1) {$ctx1.fill(self,"atEnd",{}, smalltalk.Stream)})},
4828
4884
  args: [],
4829
4885
  source: "atEnd\x0a\x09^self position = self size",
4830
4886
  messageSends: ["=", "size", "position"],
@@ -4839,10 +4895,10 @@ selector: "atStart",
4839
4895
  category: 'testing',
4840
4896
  fn: function (){
4841
4897
  var self=this;
4842
- var $1;
4843
- $1=smalltalk.send(smalltalk.send(self,"_position",[]),"__eq",[(0)]);
4898
+ return smalltalk.withContext(function($ctx1) {
4899
+ $1=_st(_st(self)._position()).__eq((0));
4844
4900
  return $1;
4845
- },
4901
+ }, function($ctx1) {$ctx1.fill(self,"atStart",{}, smalltalk.Stream)})},
4846
4902
  args: [],
4847
4903
  source: "atStart\x0a\x09^self position = 0",
4848
4904
  messageSends: ["=", "position"],
@@ -4857,7 +4913,7 @@ selector: "close",
4857
4913
  category: 'actions',
4858
4914
  fn: function (){
4859
4915
  var self=this;
4860
- return self},
4916
+ return smalltalk.withContext(function($ctx1) {
4861
4917
  args: [],
4862
4918
  source: "close",
4863
4919
  messageSends: [],
@@ -4872,8 +4928,10 @@ selector: "collection",
4872
4928
  category: 'accessing',
4873
4929
  fn: function (){
4874
4930
  var self=this;
4875
- return self["@collection"];
4876
- },
4931
+ return smalltalk.withContext(function($ctx1) {
4932
+ $1=self["@collection"];
4933
+ return $1;
4934
+ }, function($ctx1) {$ctx1.fill(self,"collection",{}, smalltalk.Stream)})},
4877
4935
  args: [],
4878
4936
  source: "collection\x0a\x09^collection",
4879
4937
  messageSends: [],
@@ -4888,10 +4946,10 @@ selector: "contents",
4888
4946
  category: 'accessing',
4889
4947
  fn: function (){
4890
4948
  var self=this;
4891
- var $1;
4892
- $1=smalltalk.send(smalltalk.send(self,"_collection",[]),"_copyFrom_to_",[(1),smalltalk.send(self,"_streamSize",[])]);
4949
+ return smalltalk.withContext(function($ctx1) {
4950
+ $1=_st(_st(self)._collection())._copyFrom_to_((1),_st(self)._streamSize());
4893
4951
  return $1;
4894
- },
4952
+ }, function($ctx1) {$ctx1.fill(self,"contents",{}, smalltalk.Stream)})},
4895
4953
  args: [],
4896
4954
  source: "contents\x0a\x09^self collection\x0a\x09 copyFrom: 1 \x0a\x09 to: self streamSize",
4897
4955
  messageSends: ["copyFrom:to:", "streamSize", "collection"],
@@ -4906,12 +4964,12 @@ selector: "do:",
4906
4964
  category: 'enumerating',
4907
4965
  fn: function (aBlock){
4908
4966
  var self=this;
4909
- smalltalk.send((function(){
4910
- return smalltalk.send(self,"_atEnd",[]);
4911
- }),"_whileFalse_",[(function(){
4912
- return smalltalk.send(aBlock,"_value_",[smalltalk.send(self,"_next",[])]);
4913
- })]);
4914
- return self},
4967
+ return smalltalk.withContext(function($ctx1) {
4968
+ return smalltalk.withContext(function($ctx2) {
4969
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileFalse_((function(){
4970
+ return smalltalk.withContext(function($ctx2) {
4971
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
4972
+ return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock}, smalltalk.Stream)})},
4915
4973
  args: ["aBlock"],
4916
4974
  source: "do: aBlock\x0a\x09[self atEnd] whileFalse: [aBlock value: self next]",
4917
4975
  messageSends: ["whileFalse:", "value:", "next", "atEnd"],
@@ -4926,7 +4984,7 @@ selector: "flush",
4926
4984
  category: 'actions',
4927
4985
  fn: function (){
4928
4986
  var self=this;
4929
- return self},
4987
+ return smalltalk.withContext(function($ctx1) {
4930
4988
  args: [],
4931
4989
  source: "flush",
4932
4990
  messageSends: [],
@@ -4941,10 +4999,10 @@ selector: "isEmpty",
4941
4999
  category: 'testing',
4942
5000
  fn: function (){
4943
5001
  var self=this;
4944
- var $1;
4945
- $1=smalltalk.send(smalltalk.send(self,"_size",[]),"__eq",[(0)]);
5002
+ return smalltalk.withContext(function($ctx1) {
5003
+ $1=_st(_st(self)._size()).__eq((0));
4946
5004
  return $1;
4947
- },
5005
+ }, function($ctx1) {$ctx1.fill(self,"isEmpty",{}, smalltalk.Stream)})},
4948
5006
  args: [],
4949
5007
  source: "isEmpty\x0a\x09^self size = 0",
4950
5008
  messageSends: ["=", "size"],
@@ -4959,16 +5017,16 @@ selector: "next",
4959
5017
  category: 'reading',
4960
5018
  fn: function (){
4961
5019
  var self=this;
4962
- var $2,$1;
4963
- $2=smalltalk.send(self,"_atEnd",[]);
5020
+ return smalltalk.withContext(function($ctx1) {
5021
+ $2=_st(self)._atEnd();
4964
5022
  if(smalltalk.assert($2)){
4965
5023
  $1=nil;
4966
5024
  } else {
4967
- smalltalk.send(self,"_position_",[smalltalk.send(smalltalk.send(self,"_position",[]),"__plus",[(1)])]);
4968
- $1=smalltalk.send(self["@collection"],"_at_",[smalltalk.send(self,"_position",[])]);
5025
+ _st(self)._position_(_st(_st(self)._position()).__plus((1)));
5026
+ $1=_st(self["@collection"])._at_(_st(self)._position());
4969
5027
  };
4970
5028
  return $1;
4971
- },
5029
+ }, function($ctx1) {$ctx1.fill(self,"next",{}, smalltalk.Stream)})},
4972
5030
  args: [],
4973
5031
  source: "next\x0a\x09^self atEnd \x0a\x09\x09ifTrue: [nil]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09self position: self position + 1. \x0a\x09\x09\x09collection at: self position]",
4974
5032
  messageSends: ["ifTrue:ifFalse:", "position:", "+", "position", "at:", "atEnd"],
@@ -4983,17 +5041,20 @@ selector: "next:",
4983
5041
  category: 'reading',
4984
5042
  fn: function (anInteger){
4985
5043
  var self=this;
4986
- var $1;
4987
5044
  var tempCollection;
4988
- tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self,"_collection",[]),"_class",[]),"_new",[]);
4989
- smalltalk.send(anInteger,"_timesRepeat_",[(function(){
4990
- $1=smalltalk.send(self,"_atEnd",[]);
4991
- if(! smalltalk.assert($1)){
4992
- return smalltalk.send(tempCollection,"_add_",[smalltalk.send(self,"_next",[])]);
5045
+ return smalltalk.withContext(function($ctx1) {
5046
+ tempCollection=_st(_st(_st(self)._collection())._class())._new();
5047
+ $1=anInteger;
5048
+ $2=(function(){
5049
+ return smalltalk.withContext(function($ctx2) {
5050
+ if(! smalltalk.assert($3)){
5051
+ return _st(tempCollection)._add_(_st(self)._next());
4993
5052
  };
4994
- })]);
4995
- return tempCollection;
4996
- },
5053
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
5054
+ _st($1)._timesRepeat_($2);
5055
+ $4=tempCollection;
5056
+ return $4;
5057
+ }, function($ctx1) {$ctx1.fill(self,"next:",{anInteger:anInteger,tempCollection:tempCollection}, smalltalk.Stream)})},
4997
5058
  args: ["anInteger"],
4998
5059
  source: "next: anInteger\x0a\x09| tempCollection |\x0a\x09tempCollection := self collection class new.\x0a\x09anInteger timesRepeat: [\x0a\x09 self atEnd ifFalse: [\x0a\x09\x09tempCollection add: self next]].\x0a\x09^tempCollection",
4999
5060
  messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "add:", "next", "atEnd"],
@@ -5008,10 +5069,10 @@ selector: "nextPut:",
5008
5069
  category: 'writing',
5009
5070
  fn: function (anObject){
5010
5071
  var self=this;
5011
- smalltalk.send(self,"_position_",[smalltalk.send(smalltalk.send(self,"_position",[]),"__plus",[(1)])]);
5012
- smalltalk.send(smalltalk.send(self,"_collection",[]),"_at_put_",[smalltalk.send(self,"_position",[]),anObject]);
5013
- smalltalk.send(self,"_setStreamSize_",[smalltalk.send(smalltalk.send(self,"_streamSize",[]),"_max_",[smalltalk.send(self,"_position",[])])]);
5014
- return self},
5072
+ return smalltalk.withContext(function($ctx1) {
5073
+ _st(_st(self)._collection())._at_put_(_st(self)._position(),anObject);
5074
+ _st(self)._setStreamSize_(_st(_st(self)._streamSize())._max_(_st(self)._position()));
5075
+ return self}, function($ctx1) {$ctx1.fill(self,"nextPut:",{anObject:anObject}, smalltalk.Stream)})},
5015
5076
  args: ["anObject"],
5016
5077
  source: "nextPut: anObject\x0a\x09self position: self position + 1.\x0a\x09self collection at: self position put: anObject.\x0a\x09self setStreamSize: (self streamSize max: self position)",
5017
5078
  messageSends: ["position:", "+", "position", "at:put:", "collection", "setStreamSize:", "max:", "streamSize"],
@@ -5026,10 +5087,10 @@ selector: "nextPutAll:",
5026
5087
  category: 'writing',
5027
5088
  fn: function (aCollection){
5028
5089
  var self=this;
5029
- smalltalk.send(aCollection,"_do_",[(function(each){
5030
- return smalltalk.send(self,"_nextPut_",[each]);
5031
- })]);
5032
- return self},
5090
+ return smalltalk.withContext(function($ctx1) {
5091
+ return smalltalk.withContext(function($ctx2) {
5092
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
5093
+ return self}, function($ctx1) {$ctx1.fill(self,"nextPutAll:",{aCollection:aCollection}, smalltalk.Stream)})},
5033
5094
  args: ["aCollection"],
5034
5095
  source: "nextPutAll: aCollection\x0a\x09aCollection do: [:each |\x0a\x09 self nextPut: each]",
5035
5096
  messageSends: ["do:", "nextPut:"],
@@ -5044,13 +5105,13 @@ selector: "peek",
5044
5105
  category: 'reading',
5045
5106
  fn: function (){
5046
5107
  var self=this;
5047
- var $2,$1;
5048
- $2=smalltalk.send(self,"_atEnd",[]);
5108
+ return smalltalk.withContext(function($ctx1) {
5109
+ $2=_st(self)._atEnd();
5049
5110
  if(! smalltalk.assert($2)){
5050
- $1=smalltalk.send(smalltalk.send(self,"_collection",[]),"_at_",[smalltalk.send(smalltalk.send(self,"_position",[]),"__plus",[(1)])]);
5111
+ $1=_st(_st(self)._collection())._at_(_st(_st(self)._position()).__plus((1)));
5051
5112
  };
5052
5113
  return $1;
5053
- },
5114
+ }, function($ctx1) {$ctx1.fill(self,"peek",{}, smalltalk.Stream)})},
5054
5115
  args: [],
5055
5116
  source: "peek\x0a\x09^self atEnd ifFalse: [\x0a\x09 self collection at: self position + 1]",
5056
5117
  messageSends: ["ifFalse:", "at:", "+", "position", "collection", "atEnd"],
@@ -5065,15 +5126,16 @@ selector: "position",
5065
5126
  category: 'accessing',
5066
5127
  fn: function (){
5067
5128
  var self=this;
5068
- var $1;
5069
- if(($receiver = self["@position"]) == nil || $receiver == undefined){
5129
+ return smalltalk.withContext(function($ctx1) {
5130
+ $2=self["@position"];
5131
+ if(($receiver = $2) == nil || $receiver == undefined){
5070
5132
  self["@position"]=(0);
5071
5133
  $1=self["@position"];
5072
5134
  } else {
5073
- $1=self["@position"];
5135
+ $1=$2;
5074
5136
  };
5075
5137
  return $1;
5076
- },
5138
+ }, function($ctx1) {$ctx1.fill(self,"position",{}, smalltalk.Stream)})},
5077
5139
  args: [],
5078
5140
  source: "position\x0a\x09^position ifNil: [position := 0]",
5079
5141
  messageSends: ["ifNil:"],
@@ -5088,8 +5150,8 @@ selector: "position:",
5088
5150
  category: 'accessing',
5089
5151
  fn: function (anInteger){
5090
5152
  var self=this;
5091
- self["@position"]=anInteger;
5092
- return self},
5153
+ return smalltalk.withContext(function($ctx1) {
5154
+ return self}, function($ctx1) {$ctx1.fill(self,"position:",{anInteger:anInteger}, smalltalk.Stream)})},
5093
5155
  args: ["anInteger"],
5094
5156
  source: "position: anInteger\x0a\x09position := anInteger",
5095
5157
  messageSends: [],
@@ -5104,8 +5166,8 @@ selector: "reset",
5104
5166
  category: 'actions',
5105
5167
  fn: function (){
5106
5168
  var self=this;
5107
- smalltalk.send(self,"_position_",[(0)]);
5108
- return self},
5169
+ return smalltalk.withContext(function($ctx1) {
5170
+ return self}, function($ctx1) {$ctx1.fill(self,"reset",{}, smalltalk.Stream)})},
5109
5171
  args: [],
5110
5172
  source: "reset\x0a\x09self position: 0",
5111
5173
  messageSends: ["position:"],
@@ -5120,9 +5182,9 @@ selector: "resetContents",
5120
5182
  category: 'actions',
5121
5183
  fn: function (){
5122
5184
  var self=this;
5123
- smalltalk.send(self,"_reset",[]);
5124
- smalltalk.send(self,"_setStreamSize_",[(0)]);
5125
- return self},
5185
+ return smalltalk.withContext(function($ctx1) {
5186
+ _st(self)._setStreamSize_((0));
5187
+ return self}, function($ctx1) {$ctx1.fill(self,"resetContents",{}, smalltalk.Stream)})},
5126
5188
  args: [],
5127
5189
  source: "resetContents\x0a\x09self reset.\x0a\x09self setStreamSize: 0",
5128
5190
  messageSends: ["reset", "setStreamSize:"],
@@ -5137,8 +5199,8 @@ selector: "setCollection:",
5137
5199
  category: 'accessing',
5138
5200
  fn: function (aCollection){
5139
5201
  var self=this;
5140
- self["@collection"]=aCollection;
5141
- return self},
5202
+ return smalltalk.withContext(function($ctx1) {
5203
+ return self}, function($ctx1) {$ctx1.fill(self,"setCollection:",{aCollection:aCollection}, smalltalk.Stream)})},
5142
5204
  args: ["aCollection"],
5143
5205
  source: "setCollection: aCollection\x0a\x09collection := aCollection",
5144
5206
  messageSends: [],
@@ -5153,8 +5215,8 @@ selector: "setStreamSize:",
5153
5215
  category: 'accessing',
5154
5216
  fn: function (anInteger){
5155
5217
  var self=this;
5156
- self["@streamSize"]=anInteger;
5157
- return self},
5218
+ return smalltalk.withContext(function($ctx1) {
5219
+ return self}, function($ctx1) {$ctx1.fill(self,"setStreamSize:",{anInteger:anInteger}, smalltalk.Stream)})},
5158
5220
  args: ["anInteger"],
5159
5221
  source: "setStreamSize: anInteger\x0a\x09streamSize := anInteger",
5160
5222
  messageSends: [],
@@ -5169,8 +5231,8 @@ selector: "setToEnd",
5169
5231
  category: 'positioning',
5170
5232
  fn: function (){
5171
5233
  var self=this;
5172
- smalltalk.send(self,"_position_",[smalltalk.send(self,"_size",[])]);
5173
- return self},
5234
+ return smalltalk.withContext(function($ctx1) {
5235
+ return self}, function($ctx1) {$ctx1.fill(self,"setToEnd",{}, smalltalk.Stream)})},
5174
5236
  args: [],
5175
5237
  source: "setToEnd\x0a\x09self position: self size",
5176
5238
  messageSends: ["position:", "size"],
@@ -5185,10 +5247,10 @@ selector: "size",
5185
5247
  category: 'accessing',
5186
5248
  fn: function (){
5187
5249
  var self=this;
5188
- var $1;
5189
- $1=smalltalk.send(self,"_streamSize",[]);
5250
+ return smalltalk.withContext(function($ctx1) {
5251
+ $1=_st(self)._streamSize();
5190
5252
  return $1;
5191
- },
5253
+ }, function($ctx1) {$ctx1.fill(self,"size",{}, smalltalk.Stream)})},
5192
5254
  args: [],
5193
5255
  source: "size\x0a\x09^self streamSize",
5194
5256
  messageSends: ["streamSize"],
@@ -5203,8 +5265,8 @@ selector: "skip:",
5203
5265
  category: 'positioning',
5204
5266
  fn: function (anInteger){
5205
5267
  var self=this;
5206
- smalltalk.send(self,"_position_",[smalltalk.send(smalltalk.send(smalltalk.send(self,"_position",[]),"__plus",[anInteger]),"_min_max_",[smalltalk.send(self,"_size",[]),(0)])]);
5207
- return self},
5268
+ return smalltalk.withContext(function($ctx1) {
5269
+ return self}, function($ctx1) {$ctx1.fill(self,"skip:",{anInteger:anInteger}, smalltalk.Stream)})},
5208
5270
  args: ["anInteger"],
5209
5271
  source: "skip: anInteger\x0a\x09self position: ((self position + anInteger) min: self size max: 0)",
5210
5272
  messageSends: ["position:", "min:max:", "size", "+", "position"],
@@ -5219,8 +5281,10 @@ selector: "streamSize",
5219
5281
  category: 'accessing',
5220
5282
  fn: function (){
5221
5283
  var self=this;
5222
- return self["@streamSize"];
5223
- },
5284
+ return smalltalk.withContext(function($ctx1) {
5285
+ $1=self["@streamSize"];
5286
+ return $1;
5287
+ }, function($ctx1) {$ctx1.fill(self,"streamSize",{}, smalltalk.Stream)})},
5224
5288
  args: [],
5225
5289
  source: "streamSize\x0a\x09^streamSize",
5226
5290
  messageSends: [],
@@ -5236,14 +5300,14 @@ selector: "on:",
5236
5300
  category: 'instance creation',
5237
5301
  fn: function (aCollection){
5238
5302
  var self=this;
5239
- var $2,$3,$1;
5240
- $2=smalltalk.send(self,"_new",[]);
5241
- smalltalk.send($2,"_setCollection_",[aCollection]);
5242
- smalltalk.send($2,"_setStreamSize_",[smalltalk.send(aCollection,"_size",[])]);
5243
- $3=smalltalk.send($2,"_yourself",[]);
5303
+ return smalltalk.withContext(function($ctx1) {
5304
+ $2=_st(self)._new();
5305
+ _st($2)._setCollection_(aCollection);
5306
+ _st($2)._setStreamSize_(_st(aCollection)._size());
5307
+ $3=_st($2)._yourself();
5244
5308
  $1=$3;
5245
5309
  return $1;
5246
- },
5310
+ }, function($ctx1) {$ctx1.fill(self,"on:",{aCollection:aCollection}, smalltalk.Stream.klass)})},
5247
5311
  args: ["aCollection"],
5248
5312
  source: "on: aCollection\x0a\x09 ^self new \x0a\x09\x09setCollection: aCollection;\x0a\x09\x09setStreamSize: aCollection size;\x0a\x09\x09yourself",
5249
5313
  messageSends: ["setCollection:", "new", "setStreamSize:", "size", "yourself"],
@@ -5260,10 +5324,10 @@ selector: "cr",
5260
5324
  category: 'writing',
5261
5325
  fn: function (){
5262
5326
  var self=this;
5263
- var $1;
5264
- $1=smalltalk.send(self,"_nextPutAll_",[smalltalk.send((smalltalk.String || String),"_cr",[])]);
5327
+ return smalltalk.withContext(function($ctx1) {
5328
+ $1=_st(self)._nextPutAll_(_st((smalltalk.String || String))._cr());
5265
5329
  return $1;
5266
- },
5330
+ }, function($ctx1) {$ctx1.fill(self,"cr",{}, smalltalk.StringStream)})},
5267
5331
  args: [],
5268
5332
  source: "cr\x0a\x09^self nextPutAll: String cr",
5269
5333
  messageSends: ["nextPutAll:", "cr"],
@@ -5278,10 +5342,10 @@ selector: "crlf",
5278
5342
  category: 'writing',
5279
5343
  fn: function (){
5280
5344
  var self=this;
5281
- var $1;
5282
- $1=smalltalk.send(self,"_nextPutAll_",[smalltalk.send((smalltalk.String || String),"_crlf",[])]);
5345
+ return smalltalk.withContext(function($ctx1) {
5346
+ $1=_st(self)._nextPutAll_(_st((smalltalk.String || String))._crlf());
5283
5347
  return $1;
5284
- },
5348
+ }, function($ctx1) {$ctx1.fill(self,"crlf",{}, smalltalk.StringStream)})},
5285
5349
  args: [],
5286
5350
  source: "crlf\x0a\x09^self nextPutAll: String crlf",
5287
5351
  messageSends: ["nextPutAll:", "crlf"],
@@ -5296,10 +5360,10 @@ selector: "lf",
5296
5360
  category: 'writing',
5297
5361
  fn: function (){
5298
5362
  var self=this;
5299
- var $1;
5300
- $1=smalltalk.send(self,"_nextPutAll_",[smalltalk.send((smalltalk.String || String),"_lf",[])]);
5363
+ return smalltalk.withContext(function($ctx1) {
5364
+ $1=_st(self)._nextPutAll_(_st((smalltalk.String || String))._lf());
5301
5365
  return $1;
5302
- },
5366
+ }, function($ctx1) {$ctx1.fill(self,"lf",{}, smalltalk.StringStream)})},
5303
5367
  args: [],
5304
5368
  source: "lf\x0a\x09^self nextPutAll: String lf",
5305
5369
  messageSends: ["nextPutAll:", "lf"],
@@ -5314,18 +5378,21 @@ selector: "next:",
5314
5378
  category: 'reading',
5315
5379
  fn: function (anInteger){
5316
5380
  var self=this;
5317
- var $1;
5318
5381
  var tempCollection;
5319
- tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self,"_collection",[]),"_class",[]),"_new",[]);
5320
- smalltalk.send(anInteger,"_timesRepeat_",[(function(){
5321
- $1=smalltalk.send(self,"_atEnd",[]);
5322
- if(! smalltalk.assert($1)){
5323
- tempCollection=smalltalk.send(tempCollection,"__comma",[smalltalk.send(self,"_next",[])]);
5382
+ return smalltalk.withContext(function($ctx1) {
5383
+ tempCollection=_st(_st(_st(self)._collection())._class())._new();
5384
+ $1=anInteger;
5385
+ $2=(function(){
5386
+ return smalltalk.withContext(function($ctx2) {
5387
+ if(! smalltalk.assert($3)){
5388
+ tempCollection=_st(tempCollection).__comma(_st(self)._next());
5324
5389
  return tempCollection;
5325
5390
  };
5326
- })]);
5327
- return tempCollection;
5328
- },
5391
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
5392
+ _st($1)._timesRepeat_($2);
5393
+ $4=tempCollection;
5394
+ return $4;
5395
+ }, function($ctx1) {$ctx1.fill(self,"next:",{anInteger:anInteger,tempCollection:tempCollection}, smalltalk.StringStream)})},
5329
5396
  args: ["anInteger"],
5330
5397
  source: "next: anInteger\x0a\x09| tempCollection |\x0a\x09tempCollection := self collection class new.\x0a\x09anInteger timesRepeat: [\x0a\x09 self atEnd ifFalse: [\x0a\x09\x09tempCollection := tempCollection, self next]].\x0a\x09^tempCollection",
5331
5398
  messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", ",", "next", "atEnd"],
@@ -5340,8 +5407,8 @@ selector: "nextPut:",
5340
5407
  category: 'writing',
5341
5408
  fn: function (aString){
5342
5409
  var self=this;
5343
- smalltalk.send(self,"_nextPutAll_",[aString]);
5344
- return self},
5410
+ return smalltalk.withContext(function($ctx1) {
5411
+ return self}, function($ctx1) {$ctx1.fill(self,"nextPut:",{aString:aString}, smalltalk.StringStream)})},
5345
5412
  args: ["aString"],
5346
5413
  source: "nextPut: aString\x0a\x09self nextPutAll: aString",
5347
5414
  messageSends: ["nextPutAll:"],
@@ -5356,10 +5423,10 @@ selector: "nextPutAll:",
5356
5423
  category: 'writing',
5357
5424
  fn: function (aString){
5358
5425
  var self=this;
5359
- smalltalk.send(self,"_setCollection_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self,"_collection",[]),"_copyFrom_to_",[(1),smalltalk.send(self,"_position",[])]),"__comma",[aString]),"__comma",[smalltalk.send(smalltalk.send(self,"_collection",[]),"_copyFrom_to_",[smalltalk.send(smalltalk.send(smalltalk.send(self,"_position",[]),"__plus",[(1)]),"__plus",[smalltalk.send(aString,"_size",[])]),smalltalk.send(smalltalk.send(self,"_collection",[]),"_size",[])])])]);
5360
- smalltalk.send(self,"_position_",[smalltalk.send(smalltalk.send(self,"_position",[]),"__plus",[smalltalk.send(aString,"_size",[])])]);
5361
- smalltalk.send(self,"_setStreamSize_",[smalltalk.send(smalltalk.send(self,"_streamSize",[]),"_max_",[smalltalk.send(self,"_position",[])])]);
5362
- return self},
5426
+ return smalltalk.withContext(function($ctx1) {
5427
+ _st(self)._position_(_st(_st(self)._position()).__plus(_st(aString)._size()));
5428
+ _st(self)._setStreamSize_(_st(_st(self)._streamSize())._max_(_st(self)._position()));
5429
+ return self}, function($ctx1) {$ctx1.fill(self,"nextPutAll:",{aString:aString}, smalltalk.StringStream)})},
5363
5430
  args: ["aString"],
5364
5431
  source: "nextPutAll: aString\x0a\x09self setCollection: \x0a\x09 (self collection copyFrom: 1 to: self position),\x0a\x09 aString,\x0a\x09 (self collection copyFrom: (self position + 1 + aString size) to: self collection size).\x0a\x09self position: self position + aString size.\x0a\x09self setStreamSize: (self streamSize max: self position)",
5365
5432
  messageSends: ["setCollection:", ",", "copyFrom:to:", "+", "size", "position", "collection", "position:", "setStreamSize:", "max:", "streamSize"],
@@ -5374,8 +5441,8 @@ selector: "space",
5374
5441
  category: 'writing',
5375
5442
  fn: function (){
5376
5443
  var self=this;
5377
- smalltalk.send(self,"_nextPut_",[" "]);
5378
- return self},
5444
+ return smalltalk.withContext(function($ctx1) {
5445
+ return self}, function($ctx1) {$ctx1.fill(self,"space",{}, smalltalk.StringStream)})},
5379
5446
  args: [],
5380
5447
  source: "space\x0a\x09self nextPut: ' '",
5381
5448
  messageSends: ["nextPut:"],