resin 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. data/amber/css/amber-normalize.css +73 -73
  2. data/amber/css/amber-normalize.less +1 -1
  3. data/amber/css/amber.css +106 -106
  4. data/amber/css/helios.css +242 -0
  5. data/amber/images/hsplitter.png +0 -0
  6. data/amber/images/vsplitter.png +0 -0
  7. data/amber/js/Benchfib.deploy.js +116 -38
  8. data/amber/js/Benchfib.js +120 -42
  9. data/amber/js/Canvas.deploy.js +674 -403
  10. data/amber/js/Canvas.js +682 -411
  11. data/amber/js/Compiler-AST.deploy.js +1150 -0
  12. data/amber/js/Compiler-AST.js +1591 -0
  13. data/amber/js/Compiler-Core.deploy.js +1562 -0
  14. data/amber/js/Compiler-Core.js +1972 -0
  15. data/amber/js/Compiler-Exceptions.deploy.js +114 -0
  16. data/amber/js/Compiler-Exceptions.js +161 -0
  17. data/amber/js/Compiler-IR.deploy.js +2326 -0
  18. data/amber/js/Compiler-IR.js +3146 -0
  19. data/amber/js/Compiler-Inlining.deploy.js +1147 -0
  20. data/amber/js/Compiler-Inlining.js +1514 -0
  21. data/amber/js/Compiler-Semantic.deploy.js +1207 -0
  22. data/amber/js/Compiler-Semantic.js +1628 -0
  23. data/amber/js/Compiler-Tests.deploy.js +646 -60
  24. data/amber/js/Compiler-Tests.js +843 -82
  25. data/amber/js/Compiler.deploy.js +1097 -159
  26. data/amber/js/Compiler.js +1414 -161
  27. data/amber/js/Examples.deploy.js +31 -15
  28. data/amber/js/Examples.js +33 -17
  29. data/amber/js/Helios-Announcements.deploy.js +127 -0
  30. data/amber/js/Helios-Announcements.js +157 -0
  31. data/amber/js/Helios-Browser.deploy.js +1473 -0
  32. data/amber/js/Helios-Browser.js +1953 -0
  33. data/amber/js/Helios-Commands.deploy.js +403 -0
  34. data/amber/js/Helios-Commands.js +563 -0
  35. data/amber/js/Helios-Core.deploy.js +1070 -0
  36. data/amber/js/Helios-Core.js +1445 -0
  37. data/amber/js/Helios-Environments.deploy.js +132 -0
  38. data/amber/js/Helios-Environments.js +179 -0
  39. data/amber/js/Helios-Inspector.deploy.js +855 -0
  40. data/amber/js/Helios-Inspector.js +1155 -0
  41. data/amber/js/Helios-KeyBindings.deploy.js +753 -0
  42. data/amber/js/Helios-KeyBindings.js +1023 -0
  43. data/amber/js/Helios-Layout.deploy.js +383 -0
  44. data/amber/js/Helios-Layout.js +523 -0
  45. data/amber/js/Helios-Workspace.deploy.js +799 -0
  46. data/amber/js/Helios-Workspace.js +1074 -0
  47. data/amber/js/IDE.deploy.js +2541 -1490
  48. data/amber/js/IDE.js +2721 -1660
  49. data/amber/js/Importer-Exporter.deploy.js +671 -0
  50. data/amber/js/Importer-Exporter.js +816 -0
  51. data/amber/js/Kernel-Announcements.deploy.js +137 -20
  52. data/amber/js/Kernel-Announcements.js +176 -22
  53. data/amber/js/Kernel-Classes.deploy.js +555 -168
  54. data/amber/js/Kernel-Classes.js +662 -205
  55. data/amber/js/Kernel-Collections.deploy.js +1403 -618
  56. data/amber/js/Kernel-Collections.js +1545 -690
  57. data/amber/js/Kernel-Exceptions.deploy.js +109 -45
  58. data/amber/js/Kernel-Exceptions.js +123 -49
  59. data/amber/js/Kernel-Methods.deploy.js +196 -81
  60. data/amber/js/Kernel-Methods.js +214 -89
  61. data/amber/js/Kernel-Objects.deploy.js +1542 -1117
  62. data/amber/js/Kernel-Objects.js +1593 -1148
  63. data/amber/js/Kernel-Tests.deploy.js +1725 -772
  64. data/amber/js/Kernel-Tests.js +2301 -1123
  65. data/amber/js/Kernel-Transcript.deploy.js +23 -25
  66. data/amber/js/Kernel-Transcript.js +24 -26
  67. data/amber/js/SUnit.deploy.js +204 -131
  68. data/amber/js/SUnit.js +222 -139
  69. data/amber/js/Spaces.deploy.js +240 -0
  70. data/amber/js/Spaces.js +326 -0
  71. data/amber/js/amber.js +26 -7
  72. data/amber/js/boot.js +65 -47
  73. data/amber/js/init.js +1 -1
  74. data/amber/js/lib/CodeMirror/amber.css +21 -21
  75. data/amber/js/lib/CodeMirror/codemirror.css +119 -13
  76. data/amber/js/lib/CodeMirror/codemirror.js +2219 -1220
  77. data/amber/js/lib/CodeMirror/smalltalk.js +134 -129
  78. data/amber/js/lib/bootstrap/css/bootstrap.css +5837 -0
  79. data/amber/js/lib/bootstrap/css/bootstrap.min.css +841 -0
  80. data/amber/js/lib/bootstrap/img/glyphicons-halflings-white.png +0 -0
  81. data/amber/js/lib/bootstrap/img/glyphicons-halflings.png +0 -0
  82. data/amber/js/lib/bootstrap/js/bootstrap.js +2038 -0
  83. data/amber/js/lib/bootstrap/js/bootstrap.min.js +7 -0
  84. data/amber/js/lib/jQuery/jquery-1.8.2.min.js +2 -0
  85. data/amber/js/lib/jQuery/jquery-ui-1.8.24.custom.min.js +125 -0
  86. data/amber/st/Compiler-AST.st +505 -0
  87. data/amber/st/Compiler-Core.st +835 -0
  88. data/amber/st/Compiler-Exceptions.st +87 -0
  89. data/amber/st/Compiler-IR.st +1097 -0
  90. data/amber/st/Compiler-Inlining.st +650 -0
  91. data/amber/st/Compiler-Semantic.st +558 -0
  92. data/amber/st/Compiler-Tests.st +285 -381
  93. data/amber/st/Compiler.st +725 -2
  94. data/amber/st/Helios-Announcements.st +104 -0
  95. data/amber/st/Helios-Browser.st +708 -0
  96. data/amber/st/Helios-Commands.st +223 -0
  97. data/amber/st/Helios-Core.st +532 -0
  98. data/amber/st/Helios-Environments.st +98 -0
  99. data/amber/st/Helios-Inspector.st +367 -0
  100. data/amber/st/Helios-KeyBindings.st +337 -0
  101. data/amber/st/Helios-Layout.st +199 -0
  102. data/amber/st/Helios-Workspace.st +367 -0
  103. data/amber/st/IDE.st +75 -53
  104. data/amber/st/Importer-Exporter.st +386 -0
  105. data/amber/st/Kernel-Announcements.st +92 -0
  106. data/amber/st/Kernel-Classes.st +137 -15
  107. data/amber/st/Kernel-Collections.st +137 -47
  108. data/amber/st/Kernel-Exceptions.st +14 -0
  109. data/amber/st/Kernel-Methods.st +9 -1
  110. data/amber/st/Kernel-Objects.st +29 -5
  111. data/amber/st/Kernel-Tests.st +545 -199
  112. data/amber/st/SUnit.st +10 -0
  113. data/amber/st/Spaces.st +142 -0
  114. data/lib/resin/app.rb +1 -1
  115. metadata +86 -31
  116. data/amber/js/lib/jQuery/jquery-1.4.4.min.js +0 -167
  117. data/amber/js/lib/jQuery/jquery-1.6.4.min.js +0 -4
@@ -7,11 +7,17 @@ selector: "=",
7
7
  category: 'comparing',
8
8
  fn: function (anAssociation){
9
9
  var self=this;
10
- return smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(anAssociation, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_key", []), "__eq", [smalltalk.send(anAssociation, "_key", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(self, "_value", []), "__eq", [smalltalk.send(anAssociation, "_value", [])]);})]);})]);
11
- return self;},
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
+ },
12
18
  args: ["anAssociation"],
13
19
  source: "= anAssociation\x0a\x09^self class = anAssociation class and: [\x0a\x09 self key = anAssociation key and: [\x0a\x09\x09self value = anAssociation value]]",
14
- messageSends: ["and:", "=", "class", "key", "value"],
20
+ messageSends: ["and:", "=", "value", "key", "class"],
15
21
  referencedClasses: []
16
22
  }),
17
23
  smalltalk.Association);
@@ -23,8 +29,8 @@ selector: "key",
23
29
  category: 'accessing',
24
30
  fn: function (){
25
31
  var self=this;
26
- return self['@key'];
27
- return self;},
32
+ return self["@key"];
33
+ },
28
34
  args: [],
29
35
  source: "key\x0a\x09^key",
30
36
  messageSends: [],
@@ -39,8 +45,8 @@ selector: "key:",
39
45
  category: 'accessing',
40
46
  fn: function (aKey){
41
47
  var self=this;
42
- (self['@key']=aKey);
43
- return self;},
48
+ self["@key"]=aKey;
49
+ return self},
44
50
  args: ["aKey"],
45
51
  source: "key: aKey\x0a\x09key := aKey",
46
52
  messageSends: [],
@@ -48,19 +54,39 @@ referencedClasses: []
48
54
  }),
49
55
  smalltalk.Association);
50
56
 
57
+ smalltalk.addMethod(
58
+ "_printString",
59
+ smalltalk.method({
60
+ selector: "printString",
61
+ category: 'printing',
62
+ fn: function (){
63
+ var self=this;
64
+ var $1;
65
+ $1=smalltalk.send((smalltalk.String || String),"_streamContents_",[(function(aStream){
66
+ return smalltalk.send(self,"_storeOn_",[aStream]);
67
+ })]);
68
+ return $1;
69
+ },
70
+ args: [],
71
+ 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
+ messageSends: ["streamContents:", "storeOn:"],
73
+ referencedClasses: ["String"]
74
+ }),
75
+ smalltalk.Association);
76
+
51
77
  smalltalk.addMethod(
52
78
  "_storeOn_",
53
79
  smalltalk.method({
54
80
  selector: "storeOn:",
55
- category: 'comparing',
81
+ category: 'printing',
56
82
  fn: function (aStream){
57
83
  var self=this;
58
- smalltalk.send(self['@key'], "_storeOn_", [aStream]);
59
- smalltalk.send(aStream, "_nextPutAll_", ["->"]);
60
- smalltalk.send(self['@value'], "_storeOn_", [aStream]);
61
- return self;},
84
+ smalltalk.send(self["@key"],"_storeOn_",[aStream]);
85
+ smalltalk.send(aStream,"_nextPutAll_",["->"]);
86
+ smalltalk.send(self["@value"],"_storeOn_",[aStream]);
87
+ return self},
62
88
  args: ["aStream"],
63
- source: "storeOn: aStream\x0a\x09\x22Store in the format (key->value)\x22\x0a\x0a\x09\x22aStream nextPutAll: '('.\x22\x0a\x09key storeOn: aStream.\x0a\x09aStream nextPutAll: '->'.\x0a\x09value storeOn: aStream.\x0a\x09\x22aStream nextPutAll: ')'\x22",
89
+ source: "storeOn: aStream\x0a\x09\x22Store in the format: key->value\x22\x0a\x0a\x09key storeOn: aStream.\x0a\x09aStream nextPutAll: '->'.\x0a\x09value storeOn: aStream.",
64
90
  messageSends: ["storeOn:", "nextPutAll:"],
65
91
  referencedClasses: []
66
92
  }),
@@ -73,8 +99,8 @@ selector: "value",
73
99
  category: 'accessing',
74
100
  fn: function (){
75
101
  var self=this;
76
- return self['@value'];
77
- return self;},
102
+ return self["@value"];
103
+ },
78
104
  args: [],
79
105
  source: "value\x0a\x09^value",
80
106
  messageSends: [],
@@ -89,8 +115,8 @@ selector: "value:",
89
115
  category: 'accessing',
90
116
  fn: function (aValue){
91
117
  var self=this;
92
- (self['@value']=aValue);
93
- return self;},
118
+ self["@value"]=aValue;
119
+ return self},
94
120
  args: ["aValue"],
95
121
  source: "value: aValue\x0a\x09value := aValue",
96
122
  messageSends: [],
@@ -104,13 +130,19 @@ smalltalk.addMethod(
104
130
  smalltalk.method({
105
131
  selector: "key:value:",
106
132
  category: 'instance creation',
107
- fn: function (aKey, aValue){
108
- var self=this;
109
- return (function($rec){smalltalk.send($rec, "_key_", [aKey]);smalltalk.send($rec, "_value_", [aValue]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
110
- return self;},
133
+ fn: function (aKey,aValue){
134
+ 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",[]);
140
+ $1=$3;
141
+ return $1;
142
+ },
111
143
  args: ["aKey", "aValue"],
112
144
  source: "key: aKey value: aValue\x0a\x09 ^self new\x0a\x09\x09key: aKey;\x0a\x09\x09value: aValue;\x0a\x09\x09yourself",
113
- messageSends: ["key:", "value:", "yourself", "new"],
145
+ messageSends: ["key:", "new", "value:", "yourself"],
114
146
  referencedClasses: []
115
147
  }),
116
148
  smalltalk.Association.klass);
@@ -124,11 +156,16 @@ selector: ",",
124
156
  category: 'copying',
125
157
  fn: function (aCollection){
126
158
  var self=this;
127
- return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
128
- return self;},
159
+ var $2,$3,$1;
160
+ $2=smalltalk.send(self,"_copy",[]);
161
+ smalltalk.send($2,"_addAll_",[aCollection]);
162
+ $3=smalltalk.send($2,"_yourself",[]);
163
+ $1=$3;
164
+ return $1;
165
+ },
129
166
  args: ["aCollection"],
130
167
  source: ", aCollection\x0a\x09^self copy \x0a\x09 addAll: aCollection; \x0a\x09 yourself",
131
- messageSends: ["addAll:", "yourself", "copy"],
168
+ messageSends: ["addAll:", "copy", "yourself"],
132
169
  referencedClasses: []
133
170
  }),
134
171
  smalltalk.Collection);
@@ -140,8 +177,8 @@ selector: "add:",
140
177
  category: 'adding/removing',
141
178
  fn: function (anObject){
142
179
  var self=this;
143
- smalltalk.send(self, "_subclassResponsibility", []);
144
- return self;},
180
+ smalltalk.send(self,"_subclassResponsibility",[]);
181
+ return self},
145
182
  args: ["anObject"],
146
183
  source: "add: anObject\x0a\x09self subclassResponsibility",
147
184
  messageSends: ["subclassResponsibility"],
@@ -156,9 +193,11 @@ selector: "addAll:",
156
193
  category: 'adding/removing',
157
194
  fn: function (aCollection){
158
195
  var self=this;
159
- smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_add_", [each]);})]);
196
+ smalltalk.send(aCollection,"_do_",[(function(each){
197
+ return smalltalk.send(self,"_add_",[each]);
198
+ })]);
160
199
  return aCollection;
161
- return self;},
200
+ },
162
201
  args: ["aCollection"],
163
202
  source: "addAll: aCollection\x0a\x09aCollection do: [:each |\x0a\x09 self add: each].\x0a\x09^aCollection",
164
203
  messageSends: ["do:", "add:"],
@@ -173,8 +212,10 @@ selector: "asArray",
173
212
  category: 'converting',
174
213
  fn: function (){
175
214
  var self=this;
176
- return smalltalk.send((smalltalk.Array || Array), "_withAll_", [self]);
177
- return self;},
215
+ var $1;
216
+ $1=smalltalk.send((smalltalk.Array || Array),"_withAll_",[self]);
217
+ return $1;
218
+ },
178
219
  args: [],
179
220
  source: "asArray\x0a\x09^Array withAll: self",
180
221
  messageSends: ["withAll:"],
@@ -189,11 +230,15 @@ selector: "asJSON",
189
230
  category: 'converting',
190
231
  fn: function (){
191
232
  var self=this;
192
- return smalltalk.send(smalltalk.send(self, "_asArray", []), "_collect_", [(function(each){return smalltalk.send(each, "_asJSON", []);})]);
193
- return self;},
233
+ var $1;
234
+ $1=smalltalk.send(smalltalk.send(self,"_asArray",[]),"_collect_",[(function(each){
235
+ return smalltalk.send(each,"_asJSON",[]);
236
+ })]);
237
+ return $1;
238
+ },
194
239
  args: [],
195
240
  source: "asJSON\x0a\x09^self asArray collect: [:each | each asJSON]",
196
- messageSends: ["collect:", "asArray", "asJSON"],
241
+ messageSends: ["collect:", "asJSON", "asArray"],
197
242
  referencedClasses: []
198
243
  }),
199
244
  smalltalk.Collection);
@@ -205,8 +250,10 @@ selector: "asOrderedCollection",
205
250
  category: 'converting',
206
251
  fn: function (){
207
252
  var self=this;
208
- return smalltalk.send(self, "_asArray", []);
209
- return self;},
253
+ var $1;
254
+ $1=smalltalk.send(self,"_asArray",[]);
255
+ return $1;
256
+ },
210
257
  args: [],
211
258
  source: "asOrderedCollection\x0a\x09^self asArray",
212
259
  messageSends: ["asArray"],
@@ -221,8 +268,10 @@ selector: "asSet",
221
268
  category: 'converting',
222
269
  fn: function (){
223
270
  var self=this;
224
- return smalltalk.send((smalltalk.Set || Set), "_withAll_", [self]);
225
- return self;},
271
+ var $1;
272
+ $1=smalltalk.send((smalltalk.Set || Set),"_withAll_",[self]);
273
+ return $1;
274
+ },
226
275
  args: [],
227
276
  source: "asSet\x0a\x09^Set withAll: self",
228
277
  messageSends: ["withAll:"],
@@ -237,14 +286,18 @@ selector: "collect:",
237
286
  category: 'enumerating',
238
287
  fn: function (aBlock){
239
288
  var self=this;
240
- var newCollection=nil;
241
- (newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
242
- smalltalk.send(self, "_do_", [(function(each){return smalltalk.send(newCollection, "_add_", [smalltalk.send(aBlock, "_value_", [each])]);})]);
243
- return newCollection;
244
- return self;},
289
+ var $1;
290
+ 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 $1;
297
+ },
245
298
  args: ["aBlock"],
246
- source: "collect: aBlock\x0a\x09| newCollection |\x0a\x09newCollection := self class new.\x0a\x09self do: [:each |\x0a\x09 newCollection add: (aBlock value: each)].\x0a\x09^newCollection",
247
- messageSends: ["new", "class", "do:", "add:", "value:"],
299
+ 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
+ messageSends: ["writeStream", "new", "class", "do:", "nextPut:", "value:", "contents"],
248
301
  referencedClasses: []
249
302
  }),
250
303
  smalltalk.Collection);
@@ -256,11 +309,16 @@ selector: "copyWith:",
256
309
  category: 'copying',
257
310
  fn: function (anObject){
258
311
  var self=this;
259
- return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
260
- return self;},
312
+ var $2,$3,$1;
313
+ $2=smalltalk.send(self,"_copy",[]);
314
+ smalltalk.send($2,"_add_",[anObject]);
315
+ $3=smalltalk.send($2,"_yourself",[]);
316
+ $1=$3;
317
+ return $1;
318
+ },
261
319
  args: ["anObject"],
262
320
  source: "copyWith: anObject\x0a\x09^self copy add: anObject; yourself",
263
- messageSends: ["add:", "yourself", "copy"],
321
+ messageSends: ["add:", "copy", "yourself"],
264
322
  referencedClasses: []
265
323
  }),
266
324
  smalltalk.Collection);
@@ -272,11 +330,16 @@ selector: "copyWithAll:",
272
330
  category: 'copying',
273
331
  fn: function (aCollection){
274
332
  var self=this;
275
- return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
276
- return self;},
333
+ var $2,$3,$1;
334
+ $2=smalltalk.send(self,"_copy",[]);
335
+ smalltalk.send($2,"_addAll_",[aCollection]);
336
+ $3=smalltalk.send($2,"_yourself",[]);
337
+ $1=$3;
338
+ return $1;
339
+ },
277
340
  args: ["aCollection"],
278
341
  source: "copyWithAll: aCollection\x0a\x09^self copy addAll: aCollection; yourself",
279
- messageSends: ["addAll:", "yourself", "copy"],
342
+ messageSends: ["addAll:", "copy", "yourself"],
280
343
  referencedClasses: []
281
344
  }),
282
345
  smalltalk.Collection);
@@ -288,8 +351,12 @@ selector: "copyWithoutAll:",
288
351
  category: 'copying',
289
352
  fn: function (aCollection){
290
353
  var self=this;
291
- return smalltalk.send(self, "_reject_", [(function(each){return smalltalk.send(aCollection, "_includes_", [each]);})]);
292
- return self;},
354
+ var $1;
355
+ $1=smalltalk.send(self,"_reject_",[(function(each){
356
+ return smalltalk.send(aCollection,"_includes_",[each]);
357
+ })]);
358
+ return $1;
359
+ },
293
360
  args: ["aCollection"],
294
361
  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]",
295
362
  messageSends: ["reject:", "includes:"],
@@ -304,8 +371,12 @@ selector: "detect:",
304
371
  category: 'enumerating',
305
372
  fn: function (aBlock){
306
373
  var self=this;
307
- return smalltalk.send(self, "_detect_ifNone_", [aBlock, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
308
- return self;},
374
+ var $1;
375
+ $1=smalltalk.send(self,"_detect_ifNone_",[aBlock,(function(){
376
+ return smalltalk.send(self,"_errorNotFound",[]);
377
+ })]);
378
+ return $1;
379
+ },
309
380
  args: ["aBlock"],
310
381
  source: "detect: aBlock\x0a\x09^self detect: aBlock ifNone: [self errorNotFound]",
311
382
  messageSends: ["detect:ifNone:", "errorNotFound"],
@@ -318,7 +389,7 @@ smalltalk.addMethod(
318
389
  smalltalk.method({
319
390
  selector: "detect:ifNone:",
320
391
  category: 'enumerating',
321
- fn: function (aBlock, anotherBlock){
392
+ fn: function (aBlock,anotherBlock){
322
393
  var self=this;
323
394
 
324
395
  for(var i = 0; i < self.length; i++)
@@ -326,7 +397,8 @@ var self=this;
326
397
  return self[i];
327
398
  return anotherBlock();
328
399
  ;
329
- return self;},
400
+ ;
401
+ return self},
330
402
  args: ["aBlock", "anotherBlock"],
331
403
  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>",
332
404
  messageSends: [],
@@ -342,7 +414,8 @@ category: 'enumerating',
342
414
  fn: function (aBlock){
343
415
  var self=this;
344
416
  for(var i=0;i<self.length;i++){aBlock(self[i]);};
345
- return self;},
417
+ ;
418
+ return self},
346
419
  args: ["aBlock"],
347
420
  source: "do: aBlock\x0a\x09<for(var i=0;i<self.length;i++){aBlock(self[i]);}>",
348
421
  messageSends: [],
@@ -355,12 +428,20 @@ smalltalk.addMethod(
355
428
  smalltalk.method({
356
429
  selector: "do:separatedBy:",
357
430
  category: 'enumerating',
358
- fn: function (aBlock, anotherBlock){
359
- var self=this;
360
- var first=nil;
361
- (first=true);
362
- smalltalk.send(self, "_do_", [(function(each){((($receiver = first).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (first=false);})() : (function(){return smalltalk.send(anotherBlock, "_value", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (first=false);}), (function(){return smalltalk.send(anotherBlock, "_value", []);})]));return smalltalk.send(aBlock, "_value_", [each]);})]);
363
- return self;},
431
+ fn: function (aBlock,anotherBlock){
432
+ var self=this;
433
+ var first;
434
+ first=true;
435
+ smalltalk.send(self,"_do_",[(function(each){
436
+ if(smalltalk.assert(first)){
437
+ first=false;
438
+ first;
439
+ } else {
440
+ smalltalk.send(anotherBlock,"_value",[]);
441
+ };
442
+ return smalltalk.send(aBlock,"_value_",[each]);
443
+ })]);
444
+ return self},
364
445
  args: ["aBlock", "anotherBlock"],
365
446
  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]",
366
447
  messageSends: ["do:", "ifTrue:ifFalse:", "value", "value:"],
@@ -375,8 +456,8 @@ selector: "errorNotFound",
375
456
  category: 'error handling',
376
457
  fn: function (){
377
458
  var self=this;
378
- smalltalk.send(self, "_error_", ["Object is not in the collection"]);
379
- return self;},
459
+ smalltalk.send(self,"_error_",["Object is not in the collection"]);
460
+ return self},
380
461
  args: [],
381
462
  source: "errorNotFound\x0a\x09self error: 'Object is not in the collection'",
382
463
  messageSends: ["error:"],
@@ -391,11 +472,18 @@ selector: "ifEmpty:",
391
472
  category: 'testing',
392
473
  fn: function (aBlock){
393
474
  var self=this;
394
- return ((($receiver = smalltalk.send(self, "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(aBlock, "_value", []);})() : (function(){return self;})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(aBlock, "_value", []);}), (function(){return self;})]));
395
- return self;},
475
+ var $2,$1;
476
+ $2=smalltalk.send(self,"_isEmpty",[]);
477
+ if(smalltalk.assert($2)){
478
+ $1=smalltalk.send(aBlock,"_value",[]);
479
+ } else {
480
+ $1=self;
481
+ };
482
+ return $1;
483
+ },
396
484
  args: ["aBlock"],
397
485
  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 ]",
398
- messageSends: ["ifTrue:ifFalse:", "isEmpty", "value"],
486
+ messageSends: ["ifTrue:ifFalse:", "value", "isEmpty"],
399
487
  referencedClasses: []
400
488
  }),
401
489
  smalltalk.Collection);
@@ -407,8 +495,10 @@ selector: "ifNotEmpty:",
407
495
  category: 'testing',
408
496
  fn: function (aBlock){
409
497
  var self=this;
410
- smalltalk.send(smalltalk.send(self, "_notEmpty", []), "_ifTrue_", [aBlock]);
411
- return self;},
498
+ var $1;
499
+ $1=smalltalk.send(self,"_notEmpty",[]);
500
+ smalltalk.send($1,"_ifTrue_",[aBlock]);
501
+ return self},
412
502
  args: ["aBlock"],
413
503
  source: "ifNotEmpty: aBlock\x0a\x09self notEmpty ifTrue: aBlock.",
414
504
  messageSends: ["ifTrue:", "notEmpty"],
@@ -430,7 +520,8 @@ var self=this;
430
520
  }
431
521
  return false
432
522
  ;
433
- return self;},
523
+ ;
524
+ return self},
434
525
  args: ["anObject"],
435
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>",
436
527
  messageSends: [],
@@ -443,13 +534,16 @@ smalltalk.addMethod(
443
534
  smalltalk.method({
444
535
  selector: "inject:into:",
445
536
  category: 'enumerating',
446
- fn: function (anObject, aBlock){
537
+ fn: function (anObject,aBlock){
447
538
  var self=this;
448
- var result=nil;
449
- (result=anObject);
450
- smalltalk.send(self, "_do_", [(function(each){return (result=smalltalk.send(aBlock, "_value_value_", [result, each]));})]);
539
+ var result;
540
+ result=anObject;
541
+ smalltalk.send(self,"_do_",[(function(each){
542
+ result=smalltalk.send(aBlock,"_value_value_",[result,each]);
451
543
  return result;
452
- return self;},
544
+ })]);
545
+ return result;
546
+ },
453
547
  args: ["anObject", "aBlock"],
454
548
  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",
455
549
  messageSends: ["do:", "value:value:"],
@@ -457,6 +551,36 @@ referencedClasses: []
457
551
  }),
458
552
  smalltalk.Collection);
459
553
 
554
+ smalltalk.addMethod(
555
+ "_intersection_",
556
+ smalltalk.method({
557
+ selector: "intersection:",
558
+ category: 'enumerating',
559
+ fn: function (aCollection){
560
+ 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
+ };
573
+ })]);
574
+ $2=smalltalk.send(smalltalk.send(self,"_class",[]),"_withAll_",[smalltalk.send(outputSet,"_asArray",[])]);
575
+ return $2;
576
+ },
577
+ args: ["aCollection"],
578
+ 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
+ messageSends: ["asSet", "new", "do:", "ifTrue:", "add:", "and:", "not", "includes:", "withAll:", "asArray", "class"],
580
+ referencedClasses: ["Set"]
581
+ }),
582
+ smalltalk.Collection);
583
+
460
584
  smalltalk.addMethod(
461
585
  "_isEmpty",
462
586
  smalltalk.method({
@@ -464,8 +588,10 @@ selector: "isEmpty",
464
588
  category: 'testing',
465
589
  fn: function (){
466
590
  var self=this;
467
- return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [(0)]);
468
- return self;},
591
+ var $1;
592
+ $1=smalltalk.send(smalltalk.send(self,"_size",[]),"__eq",[(0)]);
593
+ return $1;
594
+ },
469
595
  args: [],
470
596
  source: "isEmpty\x0a\x09^self size = 0",
471
597
  messageSends: ["=", "size"],
@@ -480,8 +606,10 @@ selector: "notEmpty",
480
606
  category: 'testing',
481
607
  fn: function (){
482
608
  var self=this;
483
- return smalltalk.send(smalltalk.send(self, "_isEmpty", []), "_not", []);
484
- return self;},
609
+ var $1;
610
+ $1=smalltalk.send(smalltalk.send(self,"_isEmpty",[]),"_not",[]);
611
+ return $1;
612
+ },
485
613
  args: [],
486
614
  source: "notEmpty\x0a\x09^self isEmpty not",
487
615
  messageSends: ["not", "isEmpty"],
@@ -489,6 +617,58 @@ referencedClasses: []
489
617
  }),
490
618
  smalltalk.Collection);
491
619
 
620
+ smalltalk.addMethod(
621
+ "_occurrencesOf_",
622
+ smalltalk.method({
623
+ selector: "occurrencesOf:",
624
+ category: 'accessing',
625
+ fn: function (anObject){
626
+ var self=this;
627
+ var $1;
628
+ var tally;
629
+ 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)]);
634
+ return tally;
635
+ };
636
+ })]);
637
+ return tally;
638
+ },
639
+ args: ["anObject"],
640
+ 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
+ messageSends: ["do:", "ifTrue:", "+", "="],
642
+ referencedClasses: []
643
+ }),
644
+ smalltalk.Collection);
645
+
646
+ smalltalk.addMethod(
647
+ "_printString",
648
+ smalltalk.method({
649
+ selector: "printString",
650
+ category: 'printing',
651
+ fn: function (){
652
+ 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
+ },
665
+ args: [],
666
+ 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
+ messageSends: ["streamContents:", "nextPutAll:", ",", "printString", "do:separatedBy:"],
668
+ referencedClasses: ["String"]
669
+ }),
670
+ smalltalk.Collection);
671
+
492
672
  smalltalk.addMethod(
493
673
  "_readStream",
494
674
  smalltalk.method({
@@ -496,8 +676,10 @@ selector: "readStream",
496
676
  category: 'accessing',
497
677
  fn: function (){
498
678
  var self=this;
499
- return smalltalk.send(self, "_stream", []);
500
- return self;},
679
+ var $1;
680
+ $1=smalltalk.send(self,"_stream",[]);
681
+ return $1;
682
+ },
501
683
  args: [],
502
684
  source: "readStream\x0a\x09^self stream",
503
685
  messageSends: ["stream"],
@@ -512,8 +694,12 @@ selector: "reject:",
512
694
  category: 'enumerating',
513
695
  fn: function (aBlock){
514
696
  var self=this;
515
- return smalltalk.send(self, "_select_", [(function(each){return smalltalk.send(smalltalk.send(aBlock, "_value_", [each]), "__eq", [false]);})]);
516
- return self;},
697
+ var $1;
698
+ $1=smalltalk.send(self,"_select_",[(function(each){
699
+ return smalltalk.send(smalltalk.send(aBlock,"_value_",[each]),"__eq",[false]);
700
+ })]);
701
+ return $1;
702
+ },
517
703
  args: ["aBlock"],
518
704
  source: "reject: aBlock\x0a\x09^self select: [:each | (aBlock value: each) = false]",
519
705
  messageSends: ["select:", "=", "value:"],
@@ -528,8 +714,12 @@ selector: "remove:",
528
714
  category: 'adding/removing',
529
715
  fn: function (anObject){
530
716
  var self=this;
531
- return smalltalk.send(self, "_remove_ifAbsent_", [anObject, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
532
- return self;},
717
+ var $1;
718
+ $1=smalltalk.send(self,"_remove_ifAbsent_",[anObject,(function(){
719
+ return smalltalk.send(self,"_errorNotFound",[]);
720
+ })]);
721
+ return $1;
722
+ },
533
723
  args: ["anObject"],
534
724
  source: "remove: anObject\x0a ^self remove: anObject ifAbsent: [self errorNotFound]",
535
725
  messageSends: ["remove:ifAbsent:", "errorNotFound"],
@@ -542,10 +732,10 @@ smalltalk.addMethod(
542
732
  smalltalk.method({
543
733
  selector: "remove:ifAbsent:",
544
734
  category: 'adding/removing',
545
- fn: function (anObject, aBlock){
735
+ fn: function (anObject,aBlock){
546
736
  var self=this;
547
- smalltalk.send(self, "_subclassResponsibility", []);
548
- return self;},
737
+ smalltalk.send(self,"_subclassResponsibility",[]);
738
+ return self},
549
739
  args: ["anObject", "aBlock"],
550
740
  source: "remove: anObject ifAbsent: aBlock\x0a self subclassResponsibility",
551
741
  messageSends: ["subclassResponsibility"],
@@ -560,14 +750,21 @@ selector: "select:",
560
750
  category: 'enumerating',
561
751
  fn: function (aBlock){
562
752
  var self=this;
563
- var stream=nil;
564
- (stream=smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_new", []), "_writeStream", []));
565
- smalltalk.send(self, "_do_", [(function(each){return ((($receiver = smalltalk.send(aBlock, "_value_", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(stream, "_nextPut_", [each]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(stream, "_nextPut_", [each]);})]));})]);
566
- return smalltalk.send(stream, "_contents", []);
567
- return self;},
753
+ var $1,$2;
754
+ 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]);
760
+ };
761
+ })]);
762
+ $2=smalltalk.send(stream,"_contents",[]);
763
+ return $2;
764
+ },
568
765
  args: ["aBlock"],
569
766
  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",
570
- messageSends: ["writeStream", "new", "class", "do:", "ifTrue:", "value:", "nextPut:", "contents"],
767
+ messageSends: ["writeStream", "new", "class", "do:", "ifTrue:", "nextPut:", "value:", "contents"],
571
768
  referencedClasses: []
572
769
  }),
573
770
  smalltalk.Collection);
@@ -579,8 +776,8 @@ selector: "size",
579
776
  category: 'accessing',
580
777
  fn: function (){
581
778
  var self=this;
582
- smalltalk.send(self, "_subclassResponsibility", []);
583
- return self;},
779
+ smalltalk.send(self,"_subclassResponsibility",[]);
780
+ return self},
584
781
  args: [],
585
782
  source: "size\x0a\x09self subclassResponsibility",
586
783
  messageSends: ["subclassResponsibility"],
@@ -595,8 +792,10 @@ selector: "stream",
595
792
  category: 'accessing',
596
793
  fn: function (){
597
794
  var self=this;
598
- return smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [self]);
599
- return self;},
795
+ var $1;
796
+ $1=smalltalk.send(smalltalk.send(self,"_streamClass",[]),"_on_",[self]);
797
+ return $1;
798
+ },
600
799
  args: [],
601
800
  source: "stream\x0a\x09^self streamClass on: self",
602
801
  messageSends: ["on:", "streamClass"],
@@ -611,8 +810,10 @@ selector: "streamClass",
611
810
  category: 'accessing',
612
811
  fn: function (){
613
812
  var self=this;
614
- return smalltalk.send(smalltalk.send(self, "_class", []), "_streamClass", []);
615
- return self;},
813
+ var $1;
814
+ $1=smalltalk.send(smalltalk.send(self,"_class",[]),"_streamClass",[]);
815
+ return $1;
816
+ },
616
817
  args: [],
617
818
  source: "streamClass\x0a\x09^self class streamClass",
618
819
  messageSends: ["streamClass", "class"],
@@ -627,8 +828,10 @@ selector: "writeStream",
627
828
  category: 'accessing',
628
829
  fn: function (){
629
830
  var self=this;
630
- return smalltalk.send(self, "_stream", []);
631
- return self;},
831
+ var $1;
832
+ $1=smalltalk.send(self,"_stream",[]);
833
+ return $1;
834
+ },
632
835
  args: [],
633
836
  source: "writeStream\x0a\x09^self stream",
634
837
  messageSends: ["stream"],
@@ -644,8 +847,10 @@ selector: "new:",
644
847
  category: 'instance creation',
645
848
  fn: function (anInteger){
646
849
  var self=this;
647
- return smalltalk.send(self, "_new", []);
648
- return self;},
850
+ var $1;
851
+ $1=smalltalk.send(self,"_new",[]);
852
+ return $1;
853
+ },
649
854
  args: ["anInteger"],
650
855
  source: "new: anInteger\x0a\x09^self new",
651
856
  messageSends: ["new"],
@@ -661,7 +866,7 @@ category: 'accessing',
661
866
  fn: function (){
662
867
  var self=this;
663
868
  return (smalltalk.Stream || Stream);
664
- return self;},
869
+ },
665
870
  args: [],
666
871
  source: "streamClass\x0a\x09 ^Stream",
667
872
  messageSends: [],
@@ -676,11 +881,16 @@ selector: "with:",
676
881
  category: 'instance creation',
677
882
  fn: function (anObject){
678
883
  var self=this;
679
- return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
680
- return self;},
884
+ var $2,$3,$1;
885
+ $2=smalltalk.send(self,"_new",[]);
886
+ smalltalk.send($2,"_add_",[anObject]);
887
+ $3=smalltalk.send($2,"_yourself",[]);
888
+ $1=$3;
889
+ return $1;
890
+ },
681
891
  args: ["anObject"],
682
892
  source: "with: anObject\x0a\x09 ^self new\x0a\x09\x09add: anObject;\x0a\x09\x09yourself",
683
- messageSends: ["add:", "yourself", "new"],
893
+ messageSends: ["add:", "new", "yourself"],
684
894
  referencedClasses: []
685
895
  }),
686
896
  smalltalk.Collection.klass);
@@ -690,13 +900,19 @@ smalltalk.addMethod(
690
900
  smalltalk.method({
691
901
  selector: "with:with:",
692
902
  category: 'instance creation',
693
- fn: function (anObject, anotherObject){
694
- var self=this;
695
- return (function($rec){smalltalk.send($rec, "_add_", [anObject]);smalltalk.send($rec, "_add_", [anotherObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
696
- return self;},
903
+ fn: function (anObject,anotherObject){
904
+ 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",[]);
910
+ $1=$3;
911
+ return $1;
912
+ },
697
913
  args: ["anObject", "anotherObject"],
698
914
  source: "with: anObject with: anotherObject\x0a\x09 ^self new\x0a\x09\x09add: anObject;\x0a\x09\x09add: anotherObject;\x0a\x09\x09yourself",
699
- messageSends: ["add:", "yourself", "new"],
915
+ messageSends: ["add:", "new", "yourself"],
700
916
  referencedClasses: []
701
917
  }),
702
918
  smalltalk.Collection.klass);
@@ -706,13 +922,20 @@ smalltalk.addMethod(
706
922
  smalltalk.method({
707
923
  selector: "with:with:with:",
708
924
  category: 'instance creation',
709
- fn: function (firstObject, secondObject, thirdObject){
710
- var self=this;
711
- return (function($rec){smalltalk.send($rec, "_add_", [firstObject]);smalltalk.send($rec, "_add_", [secondObject]);smalltalk.send($rec, "_add_", [thirdObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
712
- return self;},
925
+ fn: function (firstObject,secondObject,thirdObject){
926
+ 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",[]);
933
+ $1=$3;
934
+ return $1;
935
+ },
713
936
  args: ["firstObject", "secondObject", "thirdObject"],
714
937
  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",
715
- messageSends: ["add:", "yourself", "new"],
938
+ messageSends: ["add:", "new", "yourself"],
716
939
  referencedClasses: []
717
940
  }),
718
941
  smalltalk.Collection.klass);
@@ -724,11 +947,16 @@ selector: "withAll:",
724
947
  category: 'instance creation',
725
948
  fn: function (aCollection){
726
949
  var self=this;
727
- return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
728
- return self;},
950
+ var $2,$3,$1;
951
+ $2=smalltalk.send(self,"_new",[]);
952
+ smalltalk.send($2,"_addAll_",[aCollection]);
953
+ $3=smalltalk.send($2,"_yourself",[]);
954
+ $1=$3;
955
+ return $1;
956
+ },
729
957
  args: ["aCollection"],
730
958
  source: "withAll: aCollection\x0a\x09 ^self new\x0a\x09\x09addAll: aCollection;\x0a\x09\x09yourself",
731
- messageSends: ["addAll:", "yourself", "new"],
959
+ messageSends: ["addAll:", "new", "yourself"],
732
960
  referencedClasses: []
733
961
  }),
734
962
  smalltalk.Collection.klass);
@@ -743,8 +971,8 @@ selector: ",",
743
971
  category: 'copying',
744
972
  fn: function (aCollection){
745
973
  var self=this;
746
- smalltalk.send(self, "_shouldNotImplement", []);
747
- return self;},
974
+ smalltalk.send(self,"_shouldNotImplement",[]);
975
+ return self},
748
976
  args: ["aCollection"],
749
977
  source: ", aCollection\x0a\x09self shouldNotImplement",
750
978
  messageSends: ["shouldNotImplement"],
@@ -759,12 +987,18 @@ selector: "=",
759
987
  category: 'comparing',
760
988
  fn: function (aHashedCollection){
761
989
  var self=this;
762
- var $early={};
763
- try{((($receiver = smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aHashedCollection, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw $early=[false]})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw $early=[false]})();})]));
764
- ((($receiver = smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [smalltalk.send(aHashedCollection, "_size", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw $early=[false]})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw $early=[false]})();})]));
765
- return smalltalk.send(smalltalk.send(self, "_associations", []), "__eq", [smalltalk.send(aHashedCollection, "_associations", [])]);
766
- return self;
767
- } catch(e) {if(e===$early)return e[0]; throw e}},
990
+ var $1,$2,$3;
991
+ $1=smalltalk.send(smalltalk.send(self,"_class",[]),"__eq",[smalltalk.send(aHashedCollection,"_class",[])]);
992
+ if(! smalltalk.assert($1)){
993
+ return false;
994
+ };
995
+ $2=smalltalk.send(smalltalk.send(self,"_size",[]),"__eq",[smalltalk.send(aHashedCollection,"_size",[])]);
996
+ if(! smalltalk.assert($2)){
997
+ return false;
998
+ };
999
+ $3=smalltalk.send(smalltalk.send(self,"_associations",[]),"__eq",[smalltalk.send(aHashedCollection,"_associations",[])]);
1000
+ return $3;
1001
+ },
768
1002
  args: ["aHashedCollection"],
769
1003
  source: "= aHashedCollection\x0a\x09self class = aHashedCollection class ifFalse: [^false].\x0a\x09self size = aHashedCollection size ifFalse: [^false].\x0a\x09^self associations = aHashedCollection associations",
770
1004
  messageSends: ["ifFalse:", "=", "class", "size", "associations"],
@@ -779,8 +1013,8 @@ selector: "add:",
779
1013
  category: 'adding/removing',
780
1014
  fn: function (anAssociation){
781
1015
  var self=this;
782
- smalltalk.send(self, "_at_put_", [smalltalk.send(anAssociation, "_key", []), smalltalk.send(anAssociation, "_value", [])]);
783
- return self;},
1016
+ smalltalk.send(self,"_at_put_",[smalltalk.send(anAssociation,"_key",[]),smalltalk.send(anAssociation,"_value",[])]);
1017
+ return self},
784
1018
  args: ["anAssociation"],
785
1019
  source: "add: anAssociation\x0a\x09self at: anAssociation key put: anAssociation value",
786
1020
  messageSends: ["at:put:", "key", "value"],
@@ -795,9 +1029,9 @@ selector: "addAll:",
795
1029
  category: 'adding/removing',
796
1030
  fn: function (aHashedCollection){
797
1031
  var self=this;
798
- smalltalk.send(self, "_addAll_", [smalltalk.send(aHashedCollection, "_associations", [])], smalltalk.HashedCollection.superclass || nil);
1032
+ smalltalk.send(self,"_addAll_",[smalltalk.send(aHashedCollection,"_associations",[])],smalltalk.Collection);
799
1033
  return aHashedCollection;
800
- return self;},
1034
+ },
801
1035
  args: ["aHashedCollection"],
802
1036
  source: "addAll: aHashedCollection\x0a\x09super addAll: aHashedCollection associations.\x0a\x09^aHashedCollection",
803
1037
  messageSends: ["addAll:", "associations"],
@@ -812,8 +1046,10 @@ selector: "asDictionary",
812
1046
  category: 'converting',
813
1047
  fn: function (){
814
1048
  var self=this;
815
- return smalltalk.send((smalltalk.Dictionary || Dictionary), "_fromPairs_", [smalltalk.send(self, "_associations", [])]);
816
- return self;},
1049
+ var $1;
1050
+ $1=smalltalk.send((smalltalk.Dictionary || Dictionary),"_fromPairs_",[smalltalk.send(self,"_associations",[])]);
1051
+ return $1;
1052
+ },
817
1053
  args: [],
818
1054
  source: "asDictionary\x0a\x09^Dictionary fromPairs: self associations",
819
1055
  messageSends: ["fromPairs:", "associations"],
@@ -828,11 +1064,13 @@ selector: "asJSON",
828
1064
  category: 'converting',
829
1065
  fn: function (){
830
1066
  var self=this;
831
- var c=nil;
832
- (c=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
833
- smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return smalltalk.send(c, "_at_put_", [key, smalltalk.send(value, "_asJSON", [])]);})]);
1067
+ 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
+ })]);
834
1072
  return c;
835
- return self;},
1073
+ },
836
1074
  args: [],
837
1075
  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",
838
1076
  messageSends: ["new", "class", "keysAndValuesDo:", "at:put:", "asJSON"],
@@ -847,14 +1085,16 @@ selector: "associations",
847
1085
  category: 'accessing',
848
1086
  fn: function (){
849
1087
  var self=this;
850
- var associations=nil;
851
- (associations=[]);
852
- smalltalk.send(smalltalk.send(self, "_keys", []), "_do_", [(function(each){return smalltalk.send(associations, "_add_", [smalltalk.send((smalltalk.Association || Association), "_key_value_", [each, smalltalk.send(self, "_at_", [each])])]);})]);
1088
+ var associations;
1089
+ 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
+ })]);
853
1093
  return associations;
854
- return self;},
1094
+ },
855
1095
  args: [],
856
1096
  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",
857
- messageSends: ["do:", "keys", "add:", "key:value:", "at:"],
1097
+ messageSends: ["do:", "add:", "key:value:", "at:", "keys"],
858
1098
  referencedClasses: ["Association"]
859
1099
  }),
860
1100
  smalltalk.HashedCollection);
@@ -866,8 +1106,8 @@ selector: "associationsDo:",
866
1106
  category: 'enumerating',
867
1107
  fn: function (aBlock){
868
1108
  var self=this;
869
- smalltalk.send(smalltalk.send(self, "_associations", []), "_do_", [aBlock]);
870
- return self;},
1109
+ smalltalk.send(smalltalk.send(self,"_associations",[]),"_do_",[aBlock]);
1110
+ return self},
871
1111
  args: ["aBlock"],
872
1112
  source: "associationsDo: aBlock\x0a\x09self associations do: aBlock",
873
1113
  messageSends: ["do:", "associations"],
@@ -882,8 +1122,12 @@ selector: "at:",
882
1122
  category: 'accessing',
883
1123
  fn: function (aKey){
884
1124
  var self=this;
885
- return smalltalk.send(self, "_at_ifAbsent_", [aKey, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
886
- return self;},
1125
+ var $1;
1126
+ $1=smalltalk.send(self,"_at_ifAbsent_",[aKey,(function(){
1127
+ return smalltalk.send(self,"_errorNotFound",[]);
1128
+ })]);
1129
+ return $1;
1130
+ },
887
1131
  args: ["aKey"],
888
1132
  source: "at: aKey\x0a\x09^self at: aKey ifAbsent: [self errorNotFound]",
889
1133
  messageSends: ["at:ifAbsent:", "errorNotFound"],
@@ -896,13 +1140,18 @@ smalltalk.addMethod(
896
1140
  smalltalk.method({
897
1141
  selector: "at:ifAbsent:",
898
1142
  category: 'accessing',
899
- fn: function (aKey, aBlock){
900
- var self=this;
901
- return smalltalk.send(smalltalk.send(self, "_includesKey_", [aKey]), "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_basicAt_", [aKey]);}), aBlock]);
902
- return self;},
1143
+ fn: function (aKey,aBlock){
1144
+ 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]);
1150
+ return $1;
1151
+ },
903
1152
  args: ["aKey", "aBlock"],
904
1153
  source: "at: aKey ifAbsent: aBlock\x0a\x09^(self includesKey: aKey)\x0a\x09\x09ifTrue: [self basicAt: aKey]\x0a\x09\x09ifFalse: aBlock",
905
- messageSends: ["ifTrue:ifFalse:", "includesKey:", "basicAt:"],
1154
+ messageSends: ["ifTrue:ifFalse:", "basicAt:", "includesKey:"],
906
1155
  referencedClasses: []
907
1156
  }),
908
1157
  smalltalk.HashedCollection);
@@ -912,10 +1161,14 @@ smalltalk.addMethod(
912
1161
  smalltalk.method({
913
1162
  selector: "at:ifAbsentPut:",
914
1163
  category: 'accessing',
915
- fn: function (aKey, aBlock){
916
- var self=this;
917
- return smalltalk.send(self, "_at_ifAbsent_", [aKey, (function(){return smalltalk.send(self, "_at_put_", [aKey, smalltalk.send(aBlock, "_value", [])]);})]);
918
- return self;},
1164
+ fn: function (aKey,aBlock){
1165
+ 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
+ })]);
1170
+ return $1;
1171
+ },
919
1172
  args: ["aKey", "aBlock"],
920
1173
  source: "at: aKey ifAbsentPut: aBlock\x0a\x09^self at: aKey ifAbsent: [\x0a\x09 self at: aKey put: aBlock value]",
921
1174
  messageSends: ["at:ifAbsent:", "at:put:", "value"],
@@ -928,13 +1181,20 @@ smalltalk.addMethod(
928
1181
  smalltalk.method({
929
1182
  selector: "at:ifPresent:",
930
1183
  category: 'accessing',
931
- fn: function (aKey, aBlock){
932
- var self=this;
933
- return (($receiver = smalltalk.send(self, "_basicAt_", [aKey])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_at_", [aKey])]);})() : nil;
934
- return self;},
1184
+ fn: function (aKey,aBlock){
1185
+ var self=this;
1186
+ var $2,$1;
1187
+ $2=smalltalk.send(self,"_includesKey_",[aKey]);
1188
+ if(smalltalk.assert($2)){
1189
+ $1=smalltalk.send(aBlock,"_value_",[smalltalk.send(self,"_at_",[aKey])]);
1190
+ } else {
1191
+ $1=nil;
1192
+ };
1193
+ return $1;
1194
+ },
935
1195
  args: ["aKey", "aBlock"],
936
- source: "at: aKey ifPresent: aBlock\x0a\x09^(self basicAt: aKey) ifNotNil: [aBlock value: (self at: aKey)]",
937
- messageSends: ["ifNotNil:", "basicAt:", "value:", "at:"],
1196
+ 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
+ messageSends: ["ifTrue:ifFalse:", "value:", "at:", "includesKey:"],
938
1198
  referencedClasses: []
939
1199
  }),
940
1200
  smalltalk.HashedCollection);
@@ -944,13 +1204,18 @@ smalltalk.addMethod(
944
1204
  smalltalk.method({
945
1205
  selector: "at:ifPresent:ifAbsent:",
946
1206
  category: 'accessing',
947
- fn: function (aKey, aBlock, anotherBlock){
948
- var self=this;
949
- return smalltalk.send(smalltalk.send(self, "_basicAt_", [aKey]), "_ifNil_ifNotNil_", [anotherBlock, (function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_at_", [aKey])]);})]);
950
- return self;},
1207
+ fn: function (aKey,aBlock,anotherBlock){
1208
+ 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]);
1214
+ return $1;
1215
+ },
951
1216
  args: ["aKey", "aBlock", "anotherBlock"],
952
- source: "at: aKey ifPresent: aBlock ifAbsent: anotherBlock\x0a\x09^(self basicAt: aKey)\x0a\x09 ifNil: anotherBlock\x0a\x09 ifNotNil: [aBlock value: (self at: aKey)]",
953
- messageSends: ["ifNil:ifNotNil:", "basicAt:", "value:", "at:"],
1217
+ 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
+ messageSends: ["ifTrue:ifFalse:", "value:", "at:", "includesKey:"],
954
1219
  referencedClasses: []
955
1220
  }),
956
1221
  smalltalk.HashedCollection);
@@ -960,10 +1225,12 @@ smalltalk.addMethod(
960
1225
  smalltalk.method({
961
1226
  selector: "at:put:",
962
1227
  category: 'accessing',
963
- fn: function (aKey, aValue){
1228
+ fn: function (aKey,aValue){
964
1229
  var self=this;
965
- return smalltalk.send(self, "_basicAt_put_", [aKey, aValue]);
966
- return self;},
1230
+ var $1;
1231
+ $1=smalltalk.send(self,"_basicAt_put_",[aKey,aValue]);
1232
+ return $1;
1233
+ },
967
1234
  args: ["aKey", "aValue"],
968
1235
  source: "at: aKey put: aValue\x0a\x09^self basicAt: aKey put: aValue",
969
1236
  messageSends: ["basicAt:put:"],
@@ -978,11 +1245,13 @@ selector: "collect:",
978
1245
  category: 'enumerating',
979
1246
  fn: function (aBlock){
980
1247
  var self=this;
981
- var newDict=nil;
982
- (newDict=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
983
- smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return smalltalk.send(newDict, "_at_put_", [key, smalltalk.send(aBlock, "_value_", [value])]);})]);
1248
+ 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
+ })]);
984
1253
  return newDict;
985
- return self;},
1254
+ },
986
1255
  args: ["aBlock"],
987
1256
  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",
988
1257
  messageSends: ["new", "class", "keysAndValuesDo:", "at:put:", "value:"],
@@ -995,10 +1264,10 @@ smalltalk.addMethod(
995
1264
  smalltalk.method({
996
1265
  selector: "copyFrom:to:",
997
1266
  category: 'copying',
998
- fn: function (anIndex, anotherIndex){
1267
+ fn: function (anIndex,anotherIndex){
999
1268
  var self=this;
1000
- smalltalk.send(self, "_shouldNotImplement", []);
1001
- return self;},
1269
+ smalltalk.send(self,"_shouldNotImplement",[]);
1270
+ return self},
1002
1271
  args: ["anIndex", "anotherIndex"],
1003
1272
  source: "copyFrom: anIndex to: anotherIndex\x0a\x09self shouldNotImplement",
1004
1273
  messageSends: ["shouldNotImplement"],
@@ -1013,11 +1282,13 @@ selector: "deepCopy",
1013
1282
  category: 'copying',
1014
1283
  fn: function (){
1015
1284
  var self=this;
1016
- var copy=nil;
1017
- (copy=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
1018
- smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(copy, "_at_put_", [smalltalk.send(each, "_key", []), smalltalk.send(smalltalk.send(each, "_value", []), "_deepCopy", [])]);})]);
1285
+ 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
+ })]);
1019
1290
  return copy;
1020
- return self;},
1291
+ },
1021
1292
  args: [],
1022
1293
  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",
1023
1294
  messageSends: ["new", "class", "associationsDo:", "at:put:", "key", "deepCopy", "value"],
@@ -1030,10 +1301,12 @@ smalltalk.addMethod(
1030
1301
  smalltalk.method({
1031
1302
  selector: "detect:ifNone:",
1032
1303
  category: 'enumerating',
1033
- fn: function (aBlock, anotherBlock){
1304
+ fn: function (aBlock,anotherBlock){
1034
1305
  var self=this;
1035
- return smalltalk.send(smalltalk.send(self, "_values", []), "_detect_ifNone_", [aBlock, anotherBlock]);
1036
- return self;},
1306
+ var $1;
1307
+ $1=smalltalk.send(smalltalk.send(self,"_values",[]),"_detect_ifNone_",[aBlock,anotherBlock]);
1308
+ return $1;
1309
+ },
1037
1310
  args: ["aBlock", "anotherBlock"],
1038
1311
  source: "detect: aBlock ifNone: anotherBlock\x0a\x09^self values detect: aBlock ifNone: anotherBlock",
1039
1312
  messageSends: ["detect:ifNone:", "values"],
@@ -1048,8 +1321,8 @@ selector: "do:",
1048
1321
  category: 'enumerating',
1049
1322
  fn: function (aBlock){
1050
1323
  var self=this;
1051
- smalltalk.send(smalltalk.send(self, "_values", []), "_do_", [aBlock]);
1052
- return self;},
1324
+ smalltalk.send(smalltalk.send(self,"_values",[]),"_do_",[aBlock]);
1325
+ return self},
1053
1326
  args: ["aBlock"],
1054
1327
  source: "do: aBlock\x0a\x09self values do: aBlock",
1055
1328
  messageSends: ["do:", "values"],
@@ -1064,8 +1337,10 @@ selector: "includes:",
1064
1337
  category: 'enumerating',
1065
1338
  fn: function (anObject){
1066
1339
  var self=this;
1067
- return smalltalk.send(smalltalk.send(self, "_values", []), "_includes_", [anObject]);
1068
- return self;},
1340
+ var $1;
1341
+ $1=smalltalk.send(smalltalk.send(self,"_values",[]),"_includes_",[anObject]);
1342
+ return $1;
1343
+ },
1069
1344
  args: ["anObject"],
1070
1345
  source: "includes: anObject\x0a\x09^self values includes: anObject",
1071
1346
  messageSends: ["includes:", "values"],
@@ -1081,7 +1356,8 @@ category: 'testing',
1081
1356
  fn: function (aKey){
1082
1357
  var self=this;
1083
1358
  return self.hasOwnProperty(aKey);
1084
- return self;},
1359
+ ;
1360
+ return self},
1085
1361
  args: ["aKey"],
1086
1362
  source: "includesKey: aKey\x0a\x09<return self.hasOwnProperty(aKey)>",
1087
1363
  messageSends: [],
@@ -1106,7 +1382,8 @@ var self=this;
1106
1382
  };
1107
1383
  return keys;
1108
1384
  ;
1109
- return self;},
1385
+ ;
1386
+ return self},
1110
1387
  args: [],
1111
1388
  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>",
1112
1389
  messageSends: [],
@@ -1121,8 +1398,10 @@ selector: "keysAndValuesDo:",
1121
1398
  category: 'enumerating',
1122
1399
  fn: function (aBlock){
1123
1400
  var self=this;
1124
- smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(aBlock, "_value_value_", [smalltalk.send(each, "_key", []), smalltalk.send(each, "_value", [])]);})]);
1125
- return self;},
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},
1126
1405
  args: ["aBlock"],
1127
1406
  source: "keysAndValuesDo: aBlock\x0a\x09self associationsDo: [:each |\x0a\x09 aBlock value: each key value: each value]",
1128
1407
  messageSends: ["associationsDo:", "value:value:", "key", "value"],
@@ -1137,11 +1416,21 @@ selector: "printString",
1137
1416
  category: 'printing',
1138
1417
  fn: function (){
1139
1418
  var self=this;
1140
- return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(aStream){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_printString", [], smalltalk.HashedCollection.superclass || nil)]);return smalltalk.send($rec, "_nextPutAll_", ["("]);})(aStream);smalltalk.send(smalltalk.send(self, "_associations", []), "_do_separatedBy_", [(function(anAssociation){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(anAssociation, "_key", []), "_printString", [])]);smalltalk.send($rec, "_nextPutAll_", [" -> "]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(anAssociation, "_value", []), "_printString", [])]);})(aStream);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [" , "]);})]);return smalltalk.send(aStream, "_nextPutAll_", [")"]);})]);
1141
- return self;},
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
+ },
1142
1431
  args: [],
1143
- source: "printString\x0a\x09^String streamContents: [:aStream| \x0a\x09\x09aStream \x0a\x09\x09\x09nextPutAll: super printString;\x0a\x09\x09\x09nextPutAll: '('.\x0a\x09\x09\x09\x09self associations \x0a\x09\x09\x09\x09\x09do: [:anAssociation| \x0a\x09\x09\x09\x09\x09\x09aStream \x0a\x09\x09\x09\x09\x09\x09\x09nextPutAll: anAssociation key printString;\x0a\x09\x09\x09\x09\x09\x09\x09\x09nextPutAll: ' -> ';\x0a\x09\x09\x09\x09\x09\x09\x09\x09nextPutAll: anAssociation value printString]\x0a\x09\x09\x09\x09\x09\x09\x09separatedBy: [aStream nextPutAll: ' , '].\x0a\x09\x09\x09\x09\x09\x09aStream nextPutAll: ')']",
1144
- messageSends: ["streamContents:", "nextPutAll:", "printString", "do:separatedBy:", "associations", "key", "value"],
1432
+ 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
+ messageSends: ["streamContents:", "nextPutAll:", ",", "name", "class", "do:separatedBy:", "storeOn:", "associations"],
1145
1434
  referencedClasses: ["String"]
1146
1435
  }),
1147
1436
  smalltalk.HashedCollection);
@@ -1151,10 +1440,12 @@ smalltalk.addMethod(
1151
1440
  smalltalk.method({
1152
1441
  selector: "remove:ifAbsent:",
1153
1442
  category: 'adding/removing',
1154
- fn: function (aKey, aBlock){
1443
+ fn: function (aKey,aBlock){
1155
1444
  var self=this;
1156
- return smalltalk.send(self, "_removeKey_ifAbsent_", [aKey, aBlock]);
1157
- return self;},
1445
+ var $1;
1446
+ $1=smalltalk.send(self,"_removeKey_ifAbsent_",[aKey,aBlock]);
1447
+ return $1;
1448
+ },
1158
1449
  args: ["aKey", "aBlock"],
1159
1450
  source: "remove: aKey ifAbsent: aBlock\x0a ^self removeKey: aKey ifAbsent: aBlock",
1160
1451
  messageSends: ["removeKey:ifAbsent:"],
@@ -1169,8 +1460,10 @@ selector: "removeKey:",
1169
1460
  category: 'adding/removing',
1170
1461
  fn: function (aKey){
1171
1462
  var self=this;
1172
- return smalltalk.send(self, "_remove_", [aKey]);
1173
- return self;},
1463
+ var $1;
1464
+ $1=smalltalk.send(self,"_remove_",[aKey]);
1465
+ return $1;
1466
+ },
1174
1467
  args: ["aKey"],
1175
1468
  source: "removeKey: aKey\x0a ^self remove: aKey",
1176
1469
  messageSends: ["remove:"],
@@ -1183,13 +1476,20 @@ smalltalk.addMethod(
1183
1476
  smalltalk.method({
1184
1477
  selector: "removeKey:ifAbsent:",
1185
1478
  category: 'adding/removing',
1186
- fn: function (aKey, aBlock){
1187
- var self=this;
1188
- return ((($receiver = smalltalk.send(self, "_includesKey_", [aKey])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(aBlock, "_value", []);})() : (function(){return smalltalk.send(self, "_basicDelete_", [aKey]);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(aBlock, "_value", []);}), (function(){return smalltalk.send(self, "_basicDelete_", [aKey]);})]));
1189
- return self;},
1479
+ fn: function (aKey,aBlock){
1480
+ var self=this;
1481
+ var $2,$1;
1482
+ $2=smalltalk.send(self,"_includesKey_",[aKey]);
1483
+ if(smalltalk.assert($2)){
1484
+ $1=smalltalk.send(self,"_basicDelete_",[aKey]);
1485
+ } else {
1486
+ $1=smalltalk.send(aBlock,"_value",[]);
1487
+ };
1488
+ return $1;
1489
+ },
1190
1490
  args: ["aKey", "aBlock"],
1191
1491
  source: "removeKey: aKey ifAbsent: aBlock\x0a\x09^(self includesKey: aKey) \x0a\x09\x09ifFalse: [aBlock value]\x0a\x09\x09ifTrue: [self basicDelete: aKey]",
1192
- messageSends: ["ifFalse:ifTrue:", "includesKey:", "value", "basicDelete:"],
1492
+ messageSends: ["ifFalse:ifTrue:", "value", "basicDelete:", "includesKey:"],
1193
1493
  referencedClasses: []
1194
1494
  }),
1195
1495
  smalltalk.HashedCollection);
@@ -1201,14 +1501,20 @@ selector: "select:",
1201
1501
  category: 'enumerating',
1202
1502
  fn: function (aBlock){
1203
1503
  var self=this;
1204
- var newDict=nil;
1205
- (newDict=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
1206
- smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return ((($receiver = smalltalk.send(aBlock, "_value_", [value])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(newDict, "_at_put_", [key, value]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(newDict, "_at_put_", [key, value]);})]));})]);
1504
+ var $1;
1505
+ 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]);
1511
+ };
1512
+ })]);
1207
1513
  return newDict;
1208
- return self;},
1514
+ },
1209
1515
  args: ["aBlock"],
1210
1516
  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",
1211
- messageSends: ["new", "class", "keysAndValuesDo:", "ifTrue:", "value:", "at:put:"],
1517
+ messageSends: ["new", "class", "keysAndValuesDo:", "ifTrue:", "at:put:", "value:"],
1212
1518
  referencedClasses: []
1213
1519
  }),
1214
1520
  smalltalk.HashedCollection);
@@ -1220,11 +1526,13 @@ selector: "shallowCopy",
1220
1526
  category: 'copying',
1221
1527
  fn: function (){
1222
1528
  var self=this;
1223
- var copy=nil;
1224
- (copy=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
1225
- smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(copy, "_at_put_", [smalltalk.send(each, "_key", []), smalltalk.send(each, "_value", [])]);})]);
1529
+ 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
+ })]);
1226
1534
  return copy;
1227
- return self;},
1535
+ },
1228
1536
  args: [],
1229
1537
  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",
1230
1538
  messageSends: ["new", "class", "associationsDo:", "at:put:", "key", "value"],
@@ -1239,8 +1547,10 @@ selector: "size",
1239
1547
  category: 'accessing',
1240
1548
  fn: function (){
1241
1549
  var self=this;
1242
- return smalltalk.send(smalltalk.send(self, "_keys", []), "_size", []);
1243
- return self;},
1550
+ var $1;
1551
+ $1=smalltalk.send(smalltalk.send(self,"_keys",[]),"_size",[]);
1552
+ return $1;
1553
+ },
1244
1554
  args: [],
1245
1555
  source: "size\x0a\x09^self keys size",
1246
1556
  messageSends: ["size", "keys"],
@@ -1255,13 +1565,17 @@ selector: "storeOn:",
1255
1565
  category: 'printing',
1256
1566
  fn: function (aStream){
1257
1567
  var self=this;
1258
- smalltalk.send(aStream, "_nextPutAll_", ["#{"]);
1259
- smalltalk.send(smalltalk.send(self, "_associations", []), "_do_separatedBy_", [(function(each){return smalltalk.send(each, "_storeOn_", [aStream]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [". "]);})]);
1260
- smalltalk.send(aStream, "_nextPutAll_", ["}"]);
1261
- return self;},
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},
1262
1576
  args: ["aStream"],
1263
1577
  source: "storeOn: aStream\x0a\x09aStream nextPutAll: '#{'.\x0a\x09self associations\x0a\x09\x09do: [:each | each storeOn: aStream]\x0a\x09\x09separatedBy: [ aStream nextPutAll: '. '].\x0a\x09aStream nextPutAll: '}'",
1264
- messageSends: ["nextPutAll:", "do:separatedBy:", "associations", "storeOn:"],
1578
+ messageSends: ["nextPutAll:", "do:separatedBy:", "storeOn:", "associations"],
1265
1579
  referencedClasses: []
1266
1580
  }),
1267
1581
  smalltalk.HashedCollection);
@@ -1273,11 +1587,15 @@ selector: "values",
1273
1587
  category: 'accessing',
1274
1588
  fn: function (){
1275
1589
  var self=this;
1276
- return smalltalk.send(smalltalk.send(self, "_keys", []), "_collect_", [(function(each){return smalltalk.send(self, "_at_", [each]);})]);
1277
- return self;},
1590
+ var $1;
1591
+ $1=smalltalk.send(smalltalk.send(self,"_keys",[]),"_collect_",[(function(each){
1592
+ return smalltalk.send(self,"_at_",[each]);
1593
+ })]);
1594
+ return $1;
1595
+ },
1278
1596
  args: [],
1279
1597
  source: "values\x0a\x09^self keys collect: [:each | self at: each]",
1280
- messageSends: ["collect:", "keys", "at:"],
1598
+ messageSends: ["collect:", "at:", "keys"],
1281
1599
  referencedClasses: []
1282
1600
  }),
1283
1601
  smalltalk.HashedCollection);
@@ -1290,11 +1608,13 @@ selector: "fromPairs:",
1290
1608
  category: 'instance creation',
1291
1609
  fn: function (aCollection){
1292
1610
  var self=this;
1293
- var dict=nil;
1294
- (dict=smalltalk.send(self, "_new", []));
1295
- smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(dict, "_add_", [each]);})]);
1611
+ var dict;
1612
+ dict=smalltalk.send(self,"_new",[]);
1613
+ smalltalk.send(aCollection,"_do_",[(function(each){
1614
+ return smalltalk.send(dict,"_add_",[each]);
1615
+ })]);
1296
1616
  return dict;
1297
- return self;},
1617
+ },
1298
1618
  args: ["aCollection"],
1299
1619
  source: "fromPairs: aCollection\x0a\x09| dict |\x0a\x09dict := self new.\x0a\x09aCollection do: [:each | dict add: each].\x0a\x09^dict",
1300
1620
  messageSends: ["new", "do:", "add:"],
@@ -1311,8 +1631,10 @@ selector: "asHashedCollection",
1311
1631
  category: 'converting',
1312
1632
  fn: function (){
1313
1633
  var self=this;
1314
- return smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_fromPairs_", [smalltalk.send(self, "_associations", [])]);
1315
- return self;},
1634
+ var $1;
1635
+ $1=smalltalk.send((smalltalk.HashedCollection || HashedCollection),"_fromPairs_",[smalltalk.send(self,"_associations",[])]);
1636
+ return $1;
1637
+ },
1316
1638
  args: [],
1317
1639
  source: "asHashedCollection\x0a\x09^HashedCollection fromPairs: self associations",
1318
1640
  messageSends: ["fromPairs:", "associations"],
@@ -1327,8 +1649,10 @@ selector: "asJSON",
1327
1649
  category: 'converting',
1328
1650
  fn: function (){
1329
1651
  var self=this;
1330
- return smalltalk.send(smalltalk.send(self, "_asHashedCollection", []), "_asJSON", []);
1331
- return self;},
1652
+ var $1;
1653
+ $1=smalltalk.send(smalltalk.send(self,"_asHashedCollection",[]),"_asJSON",[]);
1654
+ return $1;
1655
+ },
1332
1656
  args: [],
1333
1657
  source: "asJSON\x0a\x09^self asHashedCollection asJSON",
1334
1658
  messageSends: ["asJSON", "asHashedCollection"],
@@ -1341,7 +1665,7 @@ smalltalk.addMethod(
1341
1665
  smalltalk.method({
1342
1666
  selector: "at:ifAbsent:",
1343
1667
  category: 'accessing',
1344
- fn: function (aKey, aBlock){
1668
+ fn: function (aKey,aBlock){
1345
1669
  var self=this;
1346
1670
 
1347
1671
  var index;
@@ -1354,7 +1678,8 @@ var self=this;
1354
1678
  return self['@values'][index];
1355
1679
  }
1356
1680
  ;
1357
- return self;},
1681
+ ;
1682
+ return self},
1358
1683
  args: ["aKey", "aBlock"],
1359
1684
  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>",
1360
1685
  messageSends: [],
@@ -1367,7 +1692,7 @@ smalltalk.addMethod(
1367
1692
  smalltalk.method({
1368
1693
  selector: "at:put:",
1369
1694
  category: 'accessing',
1370
- fn: function (aKey, aValue){
1695
+ fn: function (aKey,aValue){
1371
1696
  var self=this;
1372
1697
 
1373
1698
  var index = self['@keys'].indexOf(aKey);
@@ -1380,7 +1705,8 @@ var self=this;
1380
1705
 
1381
1706
  return aValue;
1382
1707
  ;
1383
- return self;},
1708
+ ;
1709
+ return self},
1384
1710
  args: ["aKey", "aValue"],
1385
1711
  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>",
1386
1712
  messageSends: [],
@@ -1395,8 +1721,10 @@ selector: "includesKey:",
1395
1721
  category: 'testing',
1396
1722
  fn: function (aKey){
1397
1723
  var self=this;
1398
- return smalltalk.send(self['@keys'], "_includes_", [aKey]);
1399
- return self;},
1724
+ var $1;
1725
+ $1=smalltalk.send(self["@keys"],"_includes_",[aKey]);
1726
+ return $1;
1727
+ },
1400
1728
  args: ["aKey"],
1401
1729
  source: "includesKey: aKey\x0a\x09^keys includes: aKey",
1402
1730
  messageSends: ["includes:"],
@@ -1411,10 +1739,10 @@ selector: "initialize",
1411
1739
  category: 'initialization',
1412
1740
  fn: function (){
1413
1741
  var self=this;
1414
- smalltalk.send(self, "_initialize", [], smalltalk.Dictionary.superclass || nil);
1415
- (self['@keys']=[]);
1416
- (self['@values']=[]);
1417
- return self;},
1742
+ smalltalk.send(self,"_initialize",[],smalltalk.HashedCollection);
1743
+ self["@keys"]=[];
1744
+ self["@values"]=[];
1745
+ return self},
1418
1746
  args: [],
1419
1747
  source: "initialize\x0a\x09super initialize.\x0a\x09keys := #().\x0a\x09values := #()",
1420
1748
  messageSends: ["initialize"],
@@ -1422,6 +1750,28 @@ referencedClasses: []
1422
1750
  }),
1423
1751
  smalltalk.Dictionary);
1424
1752
 
1753
+ smalltalk.addMethod(
1754
+ "_keyAtValue_",
1755
+ smalltalk.method({
1756
+ selector: "keyAtValue:",
1757
+ category: 'accessing',
1758
+ fn: function (anObject){
1759
+ 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",[]);
1766
+ return $1;
1767
+ },
1768
+ args: ["anObject"],
1769
+ source: "keyAtValue: anObject\x0a\x0a\x09^ (self associations \x0a \x09detect:[:k :v| v == anObject] \x0a \x09ifNone:[self error: 'Not found']) key",
1770
+ messageSends: ["key", "detect:ifNone:", "==", "error:", "associations"],
1771
+ referencedClasses: []
1772
+ }),
1773
+ smalltalk.Dictionary);
1774
+
1425
1775
  smalltalk.addMethod(
1426
1776
  "_keys",
1427
1777
  smalltalk.method({
@@ -1429,8 +1779,10 @@ selector: "keys",
1429
1779
  category: 'accessing',
1430
1780
  fn: function (){
1431
1781
  var self=this;
1432
- return smalltalk.send(self['@keys'], "_copy", []);
1433
- return self;},
1782
+ var $1;
1783
+ $1=smalltalk.send(self["@keys"],"_copy",[]);
1784
+ return $1;
1785
+ },
1434
1786
  args: [],
1435
1787
  source: "keys\x0a\x09^keys copy",
1436
1788
  messageSends: ["copy"],
@@ -1443,7 +1795,7 @@ smalltalk.addMethod(
1443
1795
  smalltalk.method({
1444
1796
  selector: "removeKey:ifAbsent:",
1445
1797
  category: 'adding/removing',
1446
- fn: function (aKey, aBlock){
1798
+ fn: function (aKey,aBlock){
1447
1799
  var self=this;
1448
1800
 
1449
1801
  var index = self['@keys'].indexOf(aKey);
@@ -1456,7 +1808,8 @@ var self=this;
1456
1808
  return value[0];
1457
1809
  };
1458
1810
  ;
1459
- return self;},
1811
+ ;
1812
+ return self},
1460
1813
  args: ["aKey", "aBlock"],
1461
1814
  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 >",
1462
1815
  messageSends: [],
@@ -1464,6 +1817,24 @@ referencedClasses: []
1464
1817
  }),
1465
1818
  smalltalk.Dictionary);
1466
1819
 
1820
+ smalltalk.addMethod(
1821
+ "_valueAt_",
1822
+ smalltalk.method({
1823
+ selector: "valueAt:",
1824
+ category: 'accessing',
1825
+ fn: function (anObject){
1826
+ var self=this;
1827
+ var $1;
1828
+ $1=smalltalk.send(self,"_associationsDo_",[(2)]);
1829
+ return $1;
1830
+ },
1831
+ args: ["anObject"],
1832
+ source: "valueAt: anObject\x0a\x0a\x09^ self associationsDo:2",
1833
+ messageSends: ["associationsDo:"],
1834
+ referencedClasses: []
1835
+ }),
1836
+ smalltalk.Dictionary);
1837
+
1467
1838
  smalltalk.addMethod(
1468
1839
  "_values",
1469
1840
  smalltalk.method({
@@ -1471,8 +1842,10 @@ selector: "values",
1471
1842
  category: 'accessing',
1472
1843
  fn: function (){
1473
1844
  var self=this;
1474
- return smalltalk.send(self['@values'], "_copy", []);
1475
- return self;},
1845
+ var $1;
1846
+ $1=smalltalk.send(self["@values"],"_copy",[]);
1847
+ return $1;
1848
+ },
1476
1849
  args: [],
1477
1850
  source: "values\x0a\x09^values copy",
1478
1851
  messageSends: ["copy"],
@@ -1490,15 +1863,28 @@ selector: "=",
1490
1863
  category: 'comparing',
1491
1864
  fn: function (aCollection){
1492
1865
  var self=this;
1866
+ var $1,$2;
1493
1867
  var $early={};
1494
- try{((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aCollection, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [smalltalk.send(aCollection, "_size", [])]);})])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw $early=[false]})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw $early=[false]})();})]));
1495
- smalltalk.send(self, "_withIndexDo_", [(function(each, i){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_at_", [i]), "__eq", [each])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw $early=[false]})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw $early=[false]})();})]));})]);
1868
+ 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
+ })]);
1872
+ if(! smalltalk.assert($1)){
1873
+ return false;
1874
+ };
1875
+ smalltalk.send(self,"_withIndexDo_",[(function(each,i){
1876
+ $2=smalltalk.send(smalltalk.send(aCollection,"_at_",[i]),"__eq",[each]);
1877
+ if(! smalltalk.assert($2)){
1878
+ throw $early=[false];
1879
+ };
1880
+ })]);
1496
1881
  return true;
1497
- return self;
1498
- } catch(e) {if(e===$early)return e[0]; throw e}},
1882
+ }
1883
+ catch(e) {if(e===$early)return e[0]; throw e}
1884
+ },
1499
1885
  args: ["aCollection"],
1500
1886
  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",
1501
- messageSends: ["ifFalse:", "and:", "=", "class", "size", "withIndexDo:", "at:"],
1887
+ messageSends: ["ifFalse:", "and:", "=", "size", "class", "withIndexDo:", "at:"],
1502
1888
  referencedClasses: []
1503
1889
  }),
1504
1890
  smalltalk.SequenceableCollection);
@@ -1510,8 +1896,8 @@ selector: "addLast:",
1510
1896
  category: 'adding',
1511
1897
  fn: function (anObject){
1512
1898
  var self=this;
1513
- smalltalk.send(self, "_add_", [anObject]);
1514
- return self;},
1899
+ smalltalk.send(self,"_add_",[anObject]);
1900
+ return self},
1515
1901
  args: ["anObject"],
1516
1902
  source: "addLast: anObject\x0a\x09self add: anObject",
1517
1903
  messageSends: ["add:"],
@@ -1526,8 +1912,10 @@ selector: "allButFirst",
1526
1912
  category: 'accessing',
1527
1913
  fn: function (){
1528
1914
  var self=this;
1529
- return smalltalk.send(self, "_copyFrom_to_", [(2), smalltalk.send(self, "_size", [])]);
1530
- return self;},
1915
+ var $1;
1916
+ $1=smalltalk.send(self,"_copyFrom_to_",[(2),smalltalk.send(self,"_size",[])]);
1917
+ return $1;
1918
+ },
1531
1919
  args: [],
1532
1920
  source: "allButFirst\x0a\x09^self copyFrom: 2 to: self size",
1533
1921
  messageSends: ["copyFrom:to:", "size"],
@@ -1542,8 +1930,10 @@ selector: "allButLast",
1542
1930
  category: 'accessing',
1543
1931
  fn: function (){
1544
1932
  var self=this;
1545
- return smalltalk.send(self, "_copyFrom_to_", [(1), ((($receiver = smalltalk.send(self, "_size", [])).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]))]);
1546
- return self;},
1933
+ var $1;
1934
+ $1=smalltalk.send(self,"_copyFrom_to_",[(1),smalltalk.send(smalltalk.send(self,"_size",[]),"__minus",[(1)])]);
1935
+ return $1;
1936
+ },
1547
1937
  args: [],
1548
1938
  source: "allButLast\x0a\x09^self copyFrom: 1 to: self size - 1",
1549
1939
  messageSends: ["copyFrom:to:", "-", "size"],
@@ -1558,8 +1948,12 @@ selector: "at:",
1558
1948
  category: 'accessing',
1559
1949
  fn: function (anIndex){
1560
1950
  var self=this;
1561
- return smalltalk.send(self, "_at_ifAbsent_", [anIndex, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
1562
- return self;},
1951
+ var $1;
1952
+ $1=smalltalk.send(self,"_at_ifAbsent_",[anIndex,(function(){
1953
+ return smalltalk.send(self,"_errorNotFound",[]);
1954
+ })]);
1955
+ return $1;
1956
+ },
1563
1957
  args: ["anIndex"],
1564
1958
  source: "at: anIndex\x0a\x09^self at: anIndex ifAbsent: [\x0a\x09 self errorNotFound]",
1565
1959
  messageSends: ["at:ifAbsent:", "errorNotFound"],
@@ -1572,10 +1966,10 @@ smalltalk.addMethod(
1572
1966
  smalltalk.method({
1573
1967
  selector: "at:ifAbsent:",
1574
1968
  category: 'accessing',
1575
- fn: function (anIndex, aBlock){
1969
+ fn: function (anIndex,aBlock){
1576
1970
  var self=this;
1577
- smalltalk.send(self, "_subclassResponsibility", []);
1578
- return self;},
1971
+ smalltalk.send(self,"_subclassResponsibility",[]);
1972
+ return self},
1579
1973
  args: ["anIndex", "aBlock"],
1580
1974
  source: "at: anIndex ifAbsent: aBlock\x0a\x09self subclassResponsibility",
1581
1975
  messageSends: ["subclassResponsibility"],
@@ -1588,10 +1982,10 @@ smalltalk.addMethod(
1588
1982
  smalltalk.method({
1589
1983
  selector: "at:put:",
1590
1984
  category: 'accessing',
1591
- fn: function (anIndex, anObject){
1985
+ fn: function (anIndex,anObject){
1592
1986
  var self=this;
1593
- smalltalk.send(self, "_subclassResponsibility", []);
1594
- return self;},
1987
+ smalltalk.send(self,"_subclassResponsibility",[]);
1988
+ return self},
1595
1989
  args: ["anIndex", "anObject"],
1596
1990
  source: "at: anIndex put: anObject\x0a\x09self subclassResponsibility",
1597
1991
  messageSends: ["subclassResponsibility"],
@@ -1606,8 +2000,10 @@ selector: "atRandom",
1606
2000
  category: 'accessing',
1607
2001
  fn: function (){
1608
2002
  var self=this;
1609
- return smalltalk.send(self, "_at_", [smalltalk.send(smalltalk.send(self, "_size", []), "_atRandom", [])]);
1610
- return self;},
2003
+ var $1;
2004
+ $1=smalltalk.send(self,"_at_",[smalltalk.send(smalltalk.send(self,"_size",[]),"_atRandom",[])]);
2005
+ return $1;
2006
+ },
1611
2007
  args: [],
1612
2008
  source: "atRandom\x0a\x09^ self at: self size atRandom",
1613
2009
  messageSends: ["at:", "atRandom", "size"],
@@ -1620,18 +2016,20 @@ smalltalk.addMethod(
1620
2016
  smalltalk.method({
1621
2017
  selector: "copyFrom:to:",
1622
2018
  category: 'copying',
1623
- fn: function (anIndex, anotherIndex){
1624
- var self=this;
1625
- var range=nil;
1626
- var newCollection=nil;
1627
- (range=smalltalk.send(anIndex, "_to_", [anotherIndex]));
1628
- (newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new_", [smalltalk.send(range, "_size", [])]));
1629
- smalltalk.send(range, "_withIndexDo_", [(function(each, i){return smalltalk.send(newCollection, "_at_put_", [i, smalltalk.send(self, "_at_", [each])]);})]);
2019
+ fn: function (anIndex,anotherIndex){
2020
+ 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
+ })]);
1630
2028
  return newCollection;
1631
- return self;},
2029
+ },
1632
2030
  args: ["anIndex", "anotherIndex"],
1633
2031
  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",
1634
- messageSends: ["to:", "new:", "class", "size", "withIndexDo:", "at:put:", "at:"],
2032
+ messageSends: ["to:", "new:", "size", "class", "withIndexDo:", "at:put:", "at:"],
1635
2033
  referencedClasses: []
1636
2034
  }),
1637
2035
  smalltalk.SequenceableCollection);
@@ -1643,14 +2041,16 @@ selector: "deepCopy",
1643
2041
  category: 'copying',
1644
2042
  fn: function (){
1645
2043
  var self=this;
1646
- var newCollection=nil;
1647
- (newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new_", [smalltalk.send(self, "_size", [])]));
1648
- smalltalk.send(self, "_withIndexDo_", [(function(each, index){return smalltalk.send(newCollection, "_at_put_", [index, smalltalk.send(each, "_deepCopy", [])]);})]);
2044
+ 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
+ })]);
1649
2049
  return newCollection;
1650
- return self;},
2050
+ },
1651
2051
  args: [],
1652
2052
  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",
1653
- messageSends: ["new:", "class", "size", "withIndexDo:", "at:put:", "deepCopy"],
2053
+ messageSends: ["new:", "size", "class", "withIndexDo:", "at:put:", "deepCopy"],
1654
2054
  referencedClasses: []
1655
2055
  }),
1656
2056
  smalltalk.SequenceableCollection);
@@ -1662,8 +2062,10 @@ selector: "first",
1662
2062
  category: 'accessing',
1663
2063
  fn: function (){
1664
2064
  var self=this;
1665
- return smalltalk.send(self, "_at_", [(1)]);
1666
- return self;},
2065
+ var $1;
2066
+ $1=smalltalk.send(self,"_at_",[(1)]);
2067
+ return $1;
2068
+ },
1667
2069
  args: [],
1668
2070
  source: "first\x0a\x09^self at: 1",
1669
2071
  messageSends: ["at:"],
@@ -1678,8 +2080,10 @@ selector: "first:",
1678
2080
  category: 'accessing',
1679
2081
  fn: function (n){
1680
2082
  var self=this;
1681
- return smalltalk.send(self, "_copyFrom_to_", [(1), n]);
1682
- return self;},
2083
+ var $1;
2084
+ $1=smalltalk.send(self,"_copyFrom_to_",[(1),n]);
2085
+ return $1;
2086
+ },
1683
2087
  args: ["n"],
1684
2088
  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",
1685
2089
  messageSends: ["copyFrom:to:"],
@@ -1694,8 +2098,10 @@ selector: "fourth",
1694
2098
  category: 'accessing',
1695
2099
  fn: function (){
1696
2100
  var self=this;
1697
- return smalltalk.send(self, "_at_", [(4)]);
1698
- return self;},
2101
+ var $1;
2102
+ $1=smalltalk.send(self,"_at_",[(4)]);
2103
+ return $1;
2104
+ },
1699
2105
  args: [],
1700
2106
  source: "fourth\x0a\x09^self at: 4",
1701
2107
  messageSends: ["at:"],
@@ -1710,8 +2116,12 @@ selector: "indexOf:",
1710
2116
  category: 'accessing',
1711
2117
  fn: function (anObject){
1712
2118
  var self=this;
1713
- return smalltalk.send(self, "_indexOf_ifAbsent_", [anObject, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
1714
- return self;},
2119
+ var $1;
2120
+ $1=smalltalk.send(self,"_indexOf_ifAbsent_",[anObject,(function(){
2121
+ return smalltalk.send(self,"_errorNotFound",[]);
2122
+ })]);
2123
+ return $1;
2124
+ },
1715
2125
  args: ["anObject"],
1716
2126
  source: "indexOf: anObject\x0a\x09^self indexOf: anObject ifAbsent: [self errorNotFound]",
1717
2127
  messageSends: ["indexOf:ifAbsent:", "errorNotFound"],
@@ -1724,17 +2134,18 @@ smalltalk.addMethod(
1724
2134
  smalltalk.method({
1725
2135
  selector: "indexOf:ifAbsent:",
1726
2136
  category: 'accessing',
1727
- fn: function (anObject, aBlock){
2137
+ fn: function (anObject,aBlock){
1728
2138
  var self=this;
1729
2139
 
1730
- for(var i=0;i<self.length;i++){
1731
- if(self[i].__eq(anObject)) {return i+1}
1732
- }
2140
+ for(var i=0;i<self.length;i++) {
2141
+ if(smalltalk.send(self[i], '__eq', [anObject])) {return i+1}
2142
+ };
1733
2143
  return aBlock();
1734
2144
  ;
1735
- return self;},
2145
+ ;
2146
+ return self},
1736
2147
  args: ["anObject", "aBlock"],
1737
- 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>",
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>",
1738
2149
  messageSends: [],
1739
2150
  referencedClasses: []
1740
2151
  }),
@@ -1745,10 +2156,14 @@ smalltalk.addMethod(
1745
2156
  smalltalk.method({
1746
2157
  selector: "indexOf:startingAt:",
1747
2158
  category: 'accessing',
1748
- fn: function (anObject, start){
1749
- var self=this;
1750
- return smalltalk.send(self, "_indexOf_startingAt_ifAbsent_", [anObject, start, (function(){return (0);})]);
1751
- return self;},
2159
+ fn: function (anObject,start){
2160
+ var self=this;
2161
+ var $1;
2162
+ $1=smalltalk.send(self,"_indexOf_startingAt_ifAbsent_",[anObject,start,(function(){
2163
+ return (0);
2164
+ })]);
2165
+ return $1;
2166
+ },
1752
2167
  args: ["anObject", "start"],
1753
2168
  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]",
1754
2169
  messageSends: ["indexOf:startingAt:ifAbsent:"],
@@ -1761,7 +2176,7 @@ smalltalk.addMethod(
1761
2176
  smalltalk.method({
1762
2177
  selector: "indexOf:startingAt:ifAbsent:",
1763
2178
  category: 'accessing',
1764
- fn: function (anObject, start, aBlock){
2179
+ fn: function (anObject,start,aBlock){
1765
2180
  var self=this;
1766
2181
 
1767
2182
  for(var i=start-1;i<self.length;i++){
@@ -1769,7 +2184,8 @@ var self=this;
1769
2184
  }
1770
2185
  return aBlock();
1771
2186
  ;
1772
- return self;},
2187
+ ;
2188
+ return self},
1773
2189
  args: ["anObject", "start", "aBlock"],
1774
2190
  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>",
1775
2191
  messageSends: [],
@@ -1784,8 +2200,10 @@ selector: "last",
1784
2200
  category: 'accessing',
1785
2201
  fn: function (){
1786
2202
  var self=this;
1787
- return smalltalk.send(self, "_at_", [smalltalk.send(self, "_size", [])]);
1788
- return self;},
2203
+ var $1;
2204
+ $1=smalltalk.send(self,"_at_",[smalltalk.send(self,"_size",[])]);
2205
+ return $1;
2206
+ },
1789
2207
  args: [],
1790
2208
  source: "last\x0a\x09^self at: self size",
1791
2209
  messageSends: ["at:", "size"],
@@ -1793,27 +2211,6 @@ referencedClasses: []
1793
2211
  }),
1794
2212
  smalltalk.SequenceableCollection);
1795
2213
 
1796
- smalltalk.addMethod(
1797
- "_printString",
1798
- smalltalk.method({
1799
- selector: "printString",
1800
- category: 'printing',
1801
- fn: function (){
1802
- var self=this;
1803
- var str=nil;
1804
- (str=smalltalk.send("", "_writeStream", []));
1805
- smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.SequenceableCollection.superclass || nil), "__comma", [" ("])]);
1806
- smalltalk.send(self, "_do_separatedBy_", [(function(each){return smalltalk.send(str, "_nextPutAll_", [smalltalk.send(each, "_printString", [])]);}), (function(){return smalltalk.send(str, "_nextPutAll_", [" "]);})]);
1807
- smalltalk.send(str, "_nextPutAll_", [")"]);
1808
- return smalltalk.send(str, "_contents", []);
1809
- return self;},
1810
- args: [],
1811
- source: "printString\x0a\x09| str |\x0a\x09str := '' writeStream.\x0a\x09str nextPutAll: super printString, ' ('.\x0a\x09self \x0a\x09\x09do: [:each | str nextPutAll: each printString]\x0a\x09\x09separatedBy: [str nextPutAll: ' '].\x0a\x09str nextPutAll: ')'.\x0a\x09^str contents",
1812
- messageSends: ["writeStream", "nextPutAll:", ",", "printString", "do:separatedBy:", "contents"],
1813
- referencedClasses: []
1814
- }),
1815
- smalltalk.SequenceableCollection);
1816
-
1817
2214
  smalltalk.addMethod(
1818
2215
  "_removeLast",
1819
2216
  smalltalk.method({
@@ -1821,8 +2218,8 @@ selector: "removeLast",
1821
2218
  category: 'adding',
1822
2219
  fn: function (){
1823
2220
  var self=this;
1824
- smalltalk.send(self, "_remove_", [smalltalk.send(self, "_last", [])]);
1825
- return self;},
2221
+ smalltalk.send(self,"_remove_",[smalltalk.send(self,"_last",[])]);
2222
+ return self},
1826
2223
  args: [],
1827
2224
  source: "removeLast\x0a\x09self remove: self last",
1828
2225
  messageSends: ["remove:", "last"],
@@ -1837,8 +2234,8 @@ selector: "reversed",
1837
2234
  category: 'converting',
1838
2235
  fn: function (){
1839
2236
  var self=this;
1840
- smalltalk.send(self, "_subclassResponsibility", []);
1841
- return self;},
2237
+ smalltalk.send(self,"_subclassResponsibility",[]);
2238
+ return self},
1842
2239
  args: [],
1843
2240
  source: "reversed\x0a\x09self subclassResponsibility",
1844
2241
  messageSends: ["subclassResponsibility"],
@@ -1853,8 +2250,10 @@ selector: "second",
1853
2250
  category: 'accessing',
1854
2251
  fn: function (){
1855
2252
  var self=this;
1856
- return smalltalk.send(self, "_at_", [(2)]);
1857
- return self;},
2253
+ var $1;
2254
+ $1=smalltalk.send(self,"_at_",[(2)]);
2255
+ return $1;
2256
+ },
1858
2257
  args: [],
1859
2258
  source: "second\x0a\x09^self at: 2",
1860
2259
  messageSends: ["at:"],
@@ -1869,14 +2268,16 @@ selector: "shallowCopy",
1869
2268
  category: 'copying',
1870
2269
  fn: function (){
1871
2270
  var self=this;
1872
- var newCollection=nil;
1873
- (newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new_", [smalltalk.send(self, "_size", [])]));
1874
- smalltalk.send(self, "_withIndexDo_", [(function(each, index){return smalltalk.send(newCollection, "_at_put_", [index, each]);})]);
2271
+ 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
+ })]);
1875
2276
  return newCollection;
1876
- return self;},
2277
+ },
1877
2278
  args: [],
1878
2279
  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",
1879
- messageSends: ["new:", "class", "size", "withIndexDo:", "at:put:"],
2280
+ messageSends: ["new:", "size", "class", "withIndexDo:", "at:put:"],
1880
2281
  referencedClasses: []
1881
2282
  }),
1882
2283
  smalltalk.SequenceableCollection);
@@ -1888,8 +2289,10 @@ selector: "third",
1888
2289
  category: 'accessing',
1889
2290
  fn: function (){
1890
2291
  var self=this;
1891
- return smalltalk.send(self, "_at_", [(3)]);
1892
- return self;},
2292
+ var $1;
2293
+ $1=smalltalk.send(self,"_at_",[(3)]);
2294
+ return $1;
2295
+ },
1893
2296
  args: [],
1894
2297
  source: "third\x0a\x09^self at: 3",
1895
2298
  messageSends: ["at:"],
@@ -1905,7 +2308,8 @@ category: 'enumerating',
1905
2308
  fn: function (aBlock){
1906
2309
  var self=this;
1907
2310
  for(var i=0;i<self.length;i++){aBlock(self[i], i+1);};
1908
- return self;},
2311
+ ;
2312
+ return self},
1909
2313
  args: ["aBlock"],
1910
2314
  source: "withIndexDo: aBlock\x0a\x09<for(var i=0;i<self.length;i++){aBlock(self[i], i+1);}>",
1911
2315
  messageSends: [],
@@ -1924,7 +2328,8 @@ category: 'adding/removing',
1924
2328
  fn: function (anObject){
1925
2329
  var self=this;
1926
2330
  self.push(anObject); return anObject;;
1927
- return self;},
2331
+ ;
2332
+ return self},
1928
2333
  args: ["anObject"],
1929
2334
  source: "add: anObject\x0a\x09<self.push(anObject); return anObject;>",
1930
2335
  messageSends: [],
@@ -1939,8 +2344,12 @@ selector: "asJavascript",
1939
2344
  category: 'converting',
1940
2345
  fn: function (){
1941
2346
  var self=this;
1942
- return smalltalk.send(smalltalk.send("[", "__comma", [smalltalk.send(smalltalk.send(self, "_collect_", [(function(each){return smalltalk.send(each, "_asJavascript", []);})]), "_join_", [", "])]), "__comma", ["]"]);
1943
- return self;},
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",["]"]);
2351
+ return $1;
2352
+ },
1944
2353
  args: [],
1945
2354
  source: "asJavascript\x0a\x09^'[', ((self collect: [:each | each asJavascript]) join: ', '), ']'",
1946
2355
  messageSends: [",", "join:", "collect:", "asJavascript"],
@@ -1953,13 +2362,14 @@ smalltalk.addMethod(
1953
2362
  smalltalk.method({
1954
2363
  selector: "at:ifAbsent:",
1955
2364
  category: 'accessing',
1956
- fn: function (anIndex, aBlock){
2365
+ fn: function (anIndex,aBlock){
1957
2366
  var self=this;
1958
2367
 
1959
2368
  if((anIndex < 1) || (self.length < anIndex)) {return aBlock()};
1960
2369
  return self[anIndex - 1];
1961
2370
  ;
1962
- return self;},
2371
+ ;
2372
+ return self},
1963
2373
  args: ["anIndex", "aBlock"],
1964
2374
  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>",
1965
2375
  messageSends: [],
@@ -1972,10 +2382,11 @@ smalltalk.addMethod(
1972
2382
  smalltalk.method({
1973
2383
  selector: "at:put:",
1974
2384
  category: 'accessing',
1975
- fn: function (anIndex, anObject){
2385
+ fn: function (anIndex,anObject){
1976
2386
  var self=this;
1977
2387
  return self[anIndex - 1] = anObject;
1978
- return self;},
2388
+ ;
2389
+ return self},
1979
2390
  args: ["anIndex", "anObject"],
1980
2391
  source: "at: anIndex put: anObject\x0a\x09<return self[anIndex - 1] = anObject>",
1981
2392
  messageSends: [],
@@ -1991,7 +2402,8 @@ category: 'enumerating',
1991
2402
  fn: function (aString){
1992
2403
  var self=this;
1993
2404
  return self.join(aString);
1994
- return self;},
2405
+ ;
2406
+ return self},
1995
2407
  args: ["aString"],
1996
2408
  source: "join: aString\x0a\x09<return self.join(aString)>",
1997
2409
  messageSends: [],
@@ -2000,24 +2412,26 @@ referencedClasses: []
2000
2412
  smalltalk.Array);
2001
2413
 
2002
2414
  smalltalk.addMethod(
2003
- "_remove_",
2415
+ "_remove_ifAbsent_",
2004
2416
  smalltalk.method({
2005
- selector: "remove:",
2417
+ selector: "remove:ifAbsent:",
2006
2418
  category: 'adding/removing',
2007
- fn: function (anObject){
2419
+ fn: function (anObject,aBlock){
2008
2420
  var self=this;
2009
2421
 
2010
2422
  for(var i=0;i<self.length;i++) {
2011
2423
  if(self[i] == anObject) {
2012
2424
  self.splice(i,1);
2013
- break;
2425
+ return self;
2014
2426
  }
2015
2427
  }
2016
2428
  ;
2017
- return self;},
2018
- args: ["anObject"],
2019
- source: "remove: anObject\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\x09break;\x0a\x09\x09\x09}\x0a\x09\x09}\x0a\x09>",
2020
- messageSends: [],
2429
+ ;
2430
+ smalltalk.send(aBlock,"_value",[]);
2431
+ return self},
2432
+ 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"],
2021
2435
  referencedClasses: []
2022
2436
  }),
2023
2437
  smalltalk.Array);
@@ -2027,10 +2441,11 @@ smalltalk.addMethod(
2027
2441
  smalltalk.method({
2028
2442
  selector: "removeFrom:to:",
2029
2443
  category: 'adding/removing',
2030
- fn: function (aNumber, anotherNumber){
2444
+ fn: function (aNumber,anotherNumber){
2031
2445
  var self=this;
2032
2446
  self.splice(aNumber - 1,anotherNumber - 1);
2033
- return self;},
2447
+ ;
2448
+ return self},
2034
2449
  args: ["aNumber", "anotherNumber"],
2035
2450
  source: "removeFrom: aNumber to: anotherNumber\x0a\x09<self.splice(aNumber - 1,anotherNumber - 1)>",
2036
2451
  messageSends: [],
@@ -2046,7 +2461,8 @@ category: 'converting',
2046
2461
  fn: function (){
2047
2462
  var self=this;
2048
2463
  return self._copy().reverse();
2049
- return self;},
2464
+ ;
2465
+ return self},
2050
2466
  args: [],
2051
2467
  source: "reversed\x0a\x09<return self._copy().reverse()>",
2052
2468
  messageSends: [],
@@ -2062,7 +2478,8 @@ category: 'accessing',
2062
2478
  fn: function (){
2063
2479
  var self=this;
2064
2480
  return self.length;
2065
- return self;},
2481
+ ;
2482
+ return self},
2066
2483
  args: [],
2067
2484
  source: "size\x0a\x09<return self.length>",
2068
2485
  messageSends: [],
@@ -2077,8 +2494,10 @@ selector: "sort",
2077
2494
  category: 'enumerating',
2078
2495
  fn: function (){
2079
2496
  var self=this;
2080
- return smalltalk.send(self, "_basicPerform_", ["sort"]);
2081
- return self;},
2497
+ var $1;
2498
+ $1=smalltalk.send(self,"_basicPerform_",["sort"]);
2499
+ return $1;
2500
+ },
2082
2501
  args: [],
2083
2502
  source: "sort\x0a ^self basicPerform: 'sort'",
2084
2503
  messageSends: ["basicPerform:"],
@@ -2098,7 +2517,8 @@ var self=this;
2098
2517
  if(aBlock(a,b)) {return -1} else {return 1}
2099
2518
  })
2100
2519
  ;
2101
- return self;},
2520
+ ;
2521
+ return self},
2102
2522
  args: ["aBlock"],
2103
2523
  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>",
2104
2524
  messageSends: [],
@@ -2113,8 +2533,10 @@ selector: "sorted",
2113
2533
  category: 'enumerating',
2114
2534
  fn: function (){
2115
2535
  var self=this;
2116
- return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort", []);
2117
- return self;},
2536
+ var $1;
2537
+ $1=smalltalk.send(smalltalk.send(self,"_copy",[]),"_sort",[]);
2538
+ return $1;
2539
+ },
2118
2540
  args: [],
2119
2541
  source: "sorted\x0a\x09^self copy sort",
2120
2542
  messageSends: ["sort", "copy"],
@@ -2129,8 +2551,10 @@ selector: "sorted:",
2129
2551
  category: 'enumerating',
2130
2552
  fn: function (aBlock){
2131
2553
  var self=this;
2132
- return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort_", [aBlock]);
2133
- return self;},
2554
+ var $1;
2555
+ $1=smalltalk.send(smalltalk.send(self,"_copy",[]),"_sort_",[aBlock]);
2556
+ return $1;
2557
+ },
2134
2558
  args: ["aBlock"],
2135
2559
  source: "sorted: aBlock\x0a\x09^self copy sort: aBlock",
2136
2560
  messageSends: ["sort:", "copy"],
@@ -2147,7 +2571,8 @@ category: 'instance creation',
2147
2571
  fn: function (anInteger){
2148
2572
  var self=this;
2149
2573
  return new Array(anInteger);
2150
- return self;},
2574
+ ;
2575
+ return self},
2151
2576
  args: ["anInteger"],
2152
2577
  source: "new: anInteger\x0a\x09<return new Array(anInteger)>",
2153
2578
  messageSends: [],
@@ -2162,11 +2587,16 @@ selector: "with:",
2162
2587
  category: 'instance creation',
2163
2588
  fn: function (anObject){
2164
2589
  var self=this;
2165
- return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(1)]));
2166
- return self;},
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",[]);
2594
+ $1=$3;
2595
+ return $1;
2596
+ },
2167
2597
  args: ["anObject"],
2168
2598
  source: "with: anObject\x0a\x09 ^(self new: 1)\x0a\x09\x09at: 1 put: anObject;\x0a\x09\x09yourself",
2169
- messageSends: ["at:put:", "yourself", "new:"],
2599
+ messageSends: ["at:put:", "new:", "yourself"],
2170
2600
  referencedClasses: []
2171
2601
  }),
2172
2602
  smalltalk.Array.klass);
@@ -2176,13 +2606,19 @@ smalltalk.addMethod(
2176
2606
  smalltalk.method({
2177
2607
  selector: "with:with:",
2178
2608
  category: 'instance creation',
2179
- fn: function (anObject, anObject2){
2180
- var self=this;
2181
- return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);smalltalk.send($rec, "_at_put_", [(2), anObject2]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(2)]));
2182
- return self;},
2609
+ fn: function (anObject,anObject2){
2610
+ 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",[]);
2616
+ $1=$3;
2617
+ return $1;
2618
+ },
2183
2619
  args: ["anObject", "anObject2"],
2184
2620
  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",
2185
- messageSends: ["at:put:", "yourself", "new:"],
2621
+ messageSends: ["at:put:", "new:", "yourself"],
2186
2622
  referencedClasses: []
2187
2623
  }),
2188
2624
  smalltalk.Array.klass);
@@ -2192,13 +2628,20 @@ smalltalk.addMethod(
2192
2628
  smalltalk.method({
2193
2629
  selector: "with:with:with:",
2194
2630
  category: 'instance creation',
2195
- fn: function (anObject, anObject2, anObject3){
2196
- var self=this;
2197
- return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);smalltalk.send($rec, "_at_put_", [(2), anObject2]);smalltalk.send($rec, "_at_put_", [(3), anObject3]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(3)]));
2198
- return self;},
2631
+ fn: function (anObject,anObject2,anObject3){
2632
+ 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",[]);
2639
+ $1=$3;
2640
+ return $1;
2641
+ },
2199
2642
  args: ["anObject", "anObject2", "anObject3"],
2200
2643
  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",
2201
- messageSends: ["at:put:", "yourself", "new:"],
2644
+ messageSends: ["at:put:", "new:", "yourself"],
2202
2645
  referencedClasses: []
2203
2646
  }),
2204
2647
  smalltalk.Array.klass);
@@ -2210,14 +2653,20 @@ selector: "withAll:",
2210
2653
  category: 'instance creation',
2211
2654
  fn: function (aCollection){
2212
2655
  var self=this;
2213
- var instance=nil;
2214
- (instance=smalltalk.send(self, "_new_", [smalltalk.send(aCollection, "_size", [])]));
2215
- smalltalk.send(aCollection, "_withIndexDo_", [(function(each, index){return smalltalk.send(instance, "_at_put_", [index, each]);})]);
2656
+ var instance;
2657
+ var index;
2658
+ 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)]);
2663
+ return index;
2664
+ })]);
2216
2665
  return instance;
2217
- return self;},
2666
+ },
2218
2667
  args: ["aCollection"],
2219
- source: "withAll: aCollection\x0a\x09| instance |\x0a\x09instance := self new: aCollection size.\x0a\x09aCollection withIndexDo: [:each :index |\x0a\x09\x09instance at: index put: each].\x0a\x09^instance",
2220
- messageSends: ["new:", "size", "withIndexDo:", "at:put:"],
2668
+ 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
+ messageSends: ["new:", "size", "do:", "at:put:", "+"],
2221
2670
  referencedClasses: []
2222
2671
  }),
2223
2672
  smalltalk.Array.klass);
@@ -2231,8 +2680,10 @@ selector: ",",
2231
2680
  category: 'copying',
2232
2681
  fn: function (aString){
2233
2682
  var self=this;
2234
- return smalltalk.send(smalltalk.send(self, "_asString", []), "__comma", [smalltalk.send(aString, "_asString", [])]);
2235
- return self;},
2683
+ var $1;
2684
+ $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"__comma",[smalltalk.send(aString,"_asString",[])]);
2685
+ return $1;
2686
+ },
2236
2687
  args: ["aString"],
2237
2688
  source: ", aString\x0a\x09^self asString, aString asString",
2238
2689
  messageSends: [",", "asString"],
@@ -2247,8 +2698,8 @@ selector: "add:",
2247
2698
  category: 'adding',
2248
2699
  fn: function (anObject){
2249
2700
  var self=this;
2250
- smalltalk.send(self, "_errorReadOnly", []);
2251
- return self;},
2701
+ smalltalk.send(self,"_errorReadOnly",[]);
2702
+ return self},
2252
2703
  args: ["anObject"],
2253
2704
  source: "add: anObject\x0a\x09self errorReadOnly",
2254
2705
  messageSends: ["errorReadOnly"],
@@ -2263,11 +2714,13 @@ selector: "asLowercase",
2263
2714
  category: 'converting',
2264
2715
  fn: function (){
2265
2716
  var self=this;
2266
- return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [smalltalk.send(smalltalk.send(self, "_asString", []), "_asLowercase", [])]);
2267
- return self;},
2717
+ var $1;
2718
+ $1=smalltalk.send(smalltalk.send(self,"_class",[]),"_fromString_",[smalltalk.send(smalltalk.send(self,"_asString",[]),"_asLowercase",[])]);
2719
+ return $1;
2720
+ },
2268
2721
  args: [],
2269
2722
  source: "asLowercase\x0a\x09^self class fromString: self asString asLowercase",
2270
- messageSends: ["fromString:", "class", "asLowercase", "asString"],
2723
+ messageSends: ["fromString:", "asLowercase", "asString", "class"],
2271
2724
  referencedClasses: []
2272
2725
  }),
2273
2726
  smalltalk.CharacterArray);
@@ -2279,8 +2732,10 @@ selector: "asNumber",
2279
2732
  category: 'converting',
2280
2733
  fn: function (){
2281
2734
  var self=this;
2282
- return smalltalk.send(smalltalk.send(self, "_asString", []), "_asNumber", []);
2283
- return self;},
2735
+ var $1;
2736
+ $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"_asNumber",[]);
2737
+ return $1;
2738
+ },
2284
2739
  args: [],
2285
2740
  source: "asNumber\x0a\x09^self asString asNumber",
2286
2741
  messageSends: ["asNumber", "asString"],
@@ -2295,8 +2750,10 @@ selector: "asString",
2295
2750
  category: 'converting',
2296
2751
  fn: function (){
2297
2752
  var self=this;
2298
- return smalltalk.send(self, "_subclassResponsibility", []);
2299
- return self;},
2753
+ var $1;
2754
+ $1=smalltalk.send(self,"_subclassResponsibility",[]);
2755
+ return $1;
2756
+ },
2300
2757
  args: [],
2301
2758
  source: "asString\x0a\x09^self subclassResponsibility",
2302
2759
  messageSends: ["subclassResponsibility"],
@@ -2311,8 +2768,10 @@ selector: "asSymbol",
2311
2768
  category: 'converting',
2312
2769
  fn: function (){
2313
2770
  var self=this;
2314
- return smalltalk.send(self, "_subclassResponsibility", []);
2315
- return self;},
2771
+ var $1;
2772
+ $1=smalltalk.send(self,"_subclassResponsibility",[]);
2773
+ return $1;
2774
+ },
2316
2775
  args: [],
2317
2776
  source: "asSymbol\x0a\x09^self subclassResponsibility",
2318
2777
  messageSends: ["subclassResponsibility"],
@@ -2327,11 +2786,13 @@ selector: "asUppercase",
2327
2786
  category: 'converting',
2328
2787
  fn: function (){
2329
2788
  var self=this;
2330
- return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [smalltalk.send(smalltalk.send(self, "_asString", []), "_asUppercase", [])]);
2331
- return self;},
2789
+ var $1;
2790
+ $1=smalltalk.send(smalltalk.send(self,"_class",[]),"_fromString_",[smalltalk.send(smalltalk.send(self,"_asString",[]),"_asUppercase",[])]);
2791
+ return $1;
2792
+ },
2332
2793
  args: [],
2333
2794
  source: "asUppercase\x0a\x09^self class fromString: self asString asUppercase",
2334
- messageSends: ["fromString:", "class", "asUppercase", "asString"],
2795
+ messageSends: ["fromString:", "asUppercase", "asString", "class"],
2335
2796
  referencedClasses: []
2336
2797
  }),
2337
2798
  smalltalk.CharacterArray);
@@ -2341,10 +2802,10 @@ smalltalk.addMethod(
2341
2802
  smalltalk.method({
2342
2803
  selector: "at:put:",
2343
2804
  category: 'accessing',
2344
- fn: function (anIndex, anObject){
2805
+ fn: function (anIndex,anObject){
2345
2806
  var self=this;
2346
- smalltalk.send(self, "_errorReadOnly", []);
2347
- return self;},
2807
+ smalltalk.send(self,"_errorReadOnly",[]);
2808
+ return self},
2348
2809
  args: ["anIndex", "anObject"],
2349
2810
  source: "at: anIndex put: anObject\x0a\x09self errorReadOnly",
2350
2811
  messageSends: ["errorReadOnly"],
@@ -2359,8 +2820,8 @@ selector: "errorReadOnly",
2359
2820
  category: 'error handling',
2360
2821
  fn: function (){
2361
2822
  var self=this;
2362
- smalltalk.send(self, "_error_", ["Object is read-only"]);
2363
- return self;},
2823
+ smalltalk.send(self,"_error_",["Object is read-only"]);
2824
+ return self},
2364
2825
  args: [],
2365
2826
  source: "errorReadOnly\x0a\x09self error: 'Object is read-only'",
2366
2827
  messageSends: ["error:"],
@@ -2375,8 +2836,10 @@ selector: "printString",
2375
2836
  category: 'printing',
2376
2837
  fn: function (){
2377
2838
  var self=this;
2378
- return smalltalk.send(smalltalk.send(self, "_asString", []), "_printString", []);
2379
- return self;},
2839
+ var $1;
2840
+ $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"_printString",[]);
2841
+ return $1;
2842
+ },
2380
2843
  args: [],
2381
2844
  source: "printString\x0a\x09^self asString printString",
2382
2845
  messageSends: ["printString", "asString"],
@@ -2391,8 +2854,8 @@ selector: "remove:",
2391
2854
  category: 'adding',
2392
2855
  fn: function (anObject){
2393
2856
  var self=this;
2394
- smalltalk.send(self, "_errorReadOnly", []);
2395
- return self;},
2857
+ smalltalk.send(self,"_errorReadOnly",[]);
2858
+ return self},
2396
2859
  args: ["anObject"],
2397
2860
  source: "remove: anObject\x0a\x09self errorReadOnly",
2398
2861
  messageSends: ["errorReadOnly"],
@@ -2408,8 +2871,8 @@ selector: "fromString:",
2408
2871
  category: 'instance creation',
2409
2872
  fn: function (aString){
2410
2873
  var self=this;
2411
- smalltalk.send(self, "_subclassResponsibility", []);
2412
- return self;},
2874
+ smalltalk.send(self,"_subclassResponsibility",[]);
2875
+ return self},
2413
2876
  args: ["aString"],
2414
2877
  source: "fromString: aString\x0a\x09self subclassResponsibility",
2415
2878
  messageSends: ["subclassResponsibility"],
@@ -2427,7 +2890,8 @@ category: 'copying',
2427
2890
  fn: function (aString){
2428
2891
  var self=this;
2429
2892
  return self + aString;
2430
- return self;},
2893
+ ;
2894
+ return self},
2431
2895
  args: ["aString"],
2432
2896
  source: ", aString\x0a\x09<return self + aString>",
2433
2897
  messageSends: [],
@@ -2443,7 +2907,8 @@ category: 'comparing',
2443
2907
  fn: function (aString){
2444
2908
  var self=this;
2445
2909
  return String(self) < aString._asString();
2446
- return self;},
2910
+ ;
2911
+ return self},
2447
2912
  args: ["aString"],
2448
2913
  source: "< aString\x0a\x09<return String(self) < aString._asString()>",
2449
2914
  messageSends: [],
@@ -2459,7 +2924,8 @@ category: 'comparing',
2459
2924
  fn: function (aString){
2460
2925
  var self=this;
2461
2926
  return String(self) <= aString._asString();
2462
- return self;},
2927
+ ;
2928
+ return self},
2463
2929
  args: ["aString"],
2464
2930
  source: "<= aString\x0a\x09<return String(self) <= aString._asString()>",
2465
2931
  messageSends: [],
@@ -2474,11 +2940,14 @@ selector: "=",
2474
2940
  category: 'comparing',
2475
2941
  fn: function (aString){
2476
2942
  var self=this;
2477
- var $early={};
2478
- try{((($receiver = smalltalk.send(smalltalk.send(aString, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw $early=[false]})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw $early=[false]})();})]));
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
+ };
2479
2948
  return String(self) === String(aString);
2480
- return self;
2481
- } catch(e) {if(e===$early)return e[0]; throw e}},
2949
+ ;
2950
+ return self},
2482
2951
  args: ["aString"],
2483
2952
  source: "= aString\x0a\x09aString class = self class ifFalse: [^false].\x0a\x09<return String(self) === String(aString)>",
2484
2953
  messageSends: ["ifFalse:", "=", "class"],
@@ -2493,8 +2962,10 @@ selector: "==",
2493
2962
  category: 'comparing',
2494
2963
  fn: function (aString){
2495
2964
  var self=this;
2496
- return smalltalk.send(self, "__eq", [aString]);
2497
- return self;},
2965
+ var $1;
2966
+ $1=smalltalk.send(self,"__eq",[aString]);
2967
+ return $1;
2968
+ },
2498
2969
  args: ["aString"],
2499
2970
  source: "== aString\x0a\x09^self = aString",
2500
2971
  messageSends: ["="],
@@ -2510,7 +2981,8 @@ category: 'comparing',
2510
2981
  fn: function (aString){
2511
2982
  var self=this;
2512
2983
  return String(self) > aString._asString();
2513
- return self;},
2984
+ ;
2985
+ return self},
2514
2986
  args: ["aString"],
2515
2987
  source: "> aString\x0a\x09<return String(self) >> aString._asString()>",
2516
2988
  messageSends: [],
@@ -2526,7 +2998,8 @@ category: 'comparing',
2526
2998
  fn: function (aString){
2527
2999
  var self=this;
2528
3000
  return String(self) >= aString._asString();
2529
- return self;},
3001
+ ;
3002
+ return self},
2530
3003
  args: ["aString"],
2531
3004
  source: ">= aString\x0a\x09<return String(self) >>= aString._asString()>",
2532
3005
  messageSends: [],
@@ -2542,7 +3015,7 @@ category: 'converting',
2542
3015
  fn: function (){
2543
3016
  var self=this;
2544
3017
  return self;
2545
- return self;},
3018
+ },
2546
3019
  args: [],
2547
3020
  source: "asJSON\x0a\x09^self",
2548
3021
  messageSends: [],
@@ -2557,8 +3030,10 @@ selector: "asJavaScriptSelector",
2557
3030
  category: 'converting',
2558
3031
  fn: function (){
2559
3032
  var self=this;
2560
- return smalltalk.send(smalltalk.send(smalltalk.send(self, "_asSelector", []), "_replace_with_", ["^_", ""]), "_replace_with_", ["_.*", ""]);
2561
- return self;},
3033
+ var $1;
3034
+ $1=smalltalk.send(smalltalk.send(smalltalk.send(self,"_asSelector",[]),"_replace_with_",["^_",""]),"_replace_with_",["_.*",""]);
3035
+ return $1;
3036
+ },
2562
3037
  args: [],
2563
3038
  source: "asJavaScriptSelector\x0a\x09^(self asSelector replace: '^_' with: '') replace: '_.*' with: ''.",
2564
3039
  messageSends: ["replace:with:", "asSelector"],
@@ -2579,7 +3054,8 @@ var self=this;
2579
3054
  else
2580
3055
  return "\"" + self + "\"";
2581
3056
  ;
2582
- return self;},
3057
+ ;
3058
+ return self},
2583
3059
  args: [],
2584
3060
  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>",
2585
3061
  messageSends: [],
@@ -2595,7 +3071,8 @@ category: 'converting',
2595
3071
  fn: function (){
2596
3072
  var self=this;
2597
3073
  return self.toLowerCase();
2598
- return self;},
3074
+ ;
3075
+ return self},
2599
3076
  args: [],
2600
3077
  source: "asLowercase\x0a\x09<return self.toLowerCase()>",
2601
3078
  messageSends: [],
@@ -2611,7 +3088,8 @@ category: 'converting',
2611
3088
  fn: function (){
2612
3089
  var self=this;
2613
3090
  return Number(self);
2614
- return self;},
3091
+ ;
3092
+ return self},
2615
3093
  args: [],
2616
3094
  source: "asNumber\x0a\x09<return Number(self)>",
2617
3095
  messageSends: [],
@@ -2626,20 +3104,20 @@ selector: "asSelector",
2626
3104
  category: 'converting',
2627
3105
  fn: function (){
2628
3106
  var self=this;
2629
- var selector=nil;
2630
- (selector=smalltalk.send("_", "__comma", [self]));
2631
- (selector=smalltalk.send(selector, "_replace_with_", [":", "_"]));
2632
- (selector=smalltalk.send(selector, "_replace_with_", ["[+]", "_plus"]));
2633
- (selector=smalltalk.send(selector, "_replace_with_", ["-", "_minus"]));
2634
- (selector=smalltalk.send(selector, "_replace_with_", ["[*]", "_star"]));
2635
- (selector=smalltalk.send(selector, "_replace_with_", ["[/]", "_slash"]));
2636
- (selector=smalltalk.send(selector, "_replace_with_", [">", "_gt"]));
2637
- (selector=smalltalk.send(selector, "_replace_with_", ["<", "_lt"]));
2638
- (selector=smalltalk.send(selector, "_replace_with_", ["=", "_eq"]));
2639
- (selector=smalltalk.send(selector, "_replace_with_", [",", "_comma"]));
2640
- (selector=smalltalk.send(selector, "_replace_with_", ["[@]", "_at"]));
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"]);
2641
3119
  return selector;
2642
- return self;},
3120
+ },
2643
3121
  args: [],
2644
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",
2645
3123
  messageSends: [",", "replace:with:"],
@@ -2655,7 +3133,7 @@ category: 'converting',
2655
3133
  fn: function (){
2656
3134
  var self=this;
2657
3135
  return self;
2658
- return self;},
3136
+ },
2659
3137
  args: [],
2660
3138
  source: "asString\x0a\x09^self",
2661
3139
  messageSends: [],
@@ -2670,8 +3148,10 @@ selector: "asSymbol",
2670
3148
  category: 'converting',
2671
3149
  fn: function (){
2672
3150
  var self=this;
2673
- return smalltalk.send((smalltalk.Symbol || Symbol), "_lookup_", [self]);
2674
- return self;},
3151
+ var $1;
3152
+ $1=smalltalk.send((smalltalk.Symbol || Symbol),"_lookup_",[self]);
3153
+ return $1;
3154
+ },
2675
3155
  args: [],
2676
3156
  source: "asSymbol\x0a\x09^Symbol lookup: self",
2677
3157
  messageSends: ["lookup:"],
@@ -2687,7 +3167,8 @@ category: 'converting',
2687
3167
  fn: function (){
2688
3168
  var self=this;
2689
3169
  return self.toUpperCase();
2690
- return self;},
3170
+ ;
3171
+ return self},
2691
3172
  args: [],
2692
3173
  source: "asUppercase\x0a\x09<return self.toUpperCase()>",
2693
3174
  messageSends: [],
@@ -2703,7 +3184,8 @@ category: 'accessing',
2703
3184
  fn: function (){
2704
3185
  var self=this;
2705
3186
  return self.charCodeAt(0);;
2706
- return self;},
3187
+ ;
3188
+ return self},
2707
3189
  args: [],
2708
3190
  source: "asciiValue\x0a\x09<return self.charCodeAt(0);>",
2709
3191
  messageSends: [],
@@ -2716,12 +3198,13 @@ smalltalk.addMethod(
2716
3198
  smalltalk.method({
2717
3199
  selector: "at:ifAbsent:",
2718
3200
  category: 'accessing',
2719
- fn: function (anIndex, aBlock){
3201
+ fn: function (anIndex,aBlock){
2720
3202
  var self=this;
2721
- return self[anIndex - 1] || aBlock();
2722
- return self;},
3203
+ return String(self).charAt(anIndex - 1) || aBlock();
3204
+ ;
3205
+ return self},
2723
3206
  args: ["anIndex", "aBlock"],
2724
- source: "at: anIndex ifAbsent: aBlock\x0a\x09<return self[anIndex - 1] || aBlock()>",
3207
+ source: "at: anIndex ifAbsent: aBlock\x0a\x09<return String(self).charAt(anIndex - 1) || aBlock()>",
2725
3208
  messageSends: [],
2726
3209
  referencedClasses: []
2727
3210
  }),
@@ -2732,10 +3215,11 @@ smalltalk.addMethod(
2732
3215
  smalltalk.method({
2733
3216
  selector: "copyFrom:to:",
2734
3217
  category: 'copying',
2735
- fn: function (anIndex, anotherIndex){
3218
+ fn: function (anIndex,anotherIndex){
2736
3219
  var self=this;
2737
3220
  return self.substring(anIndex - 1, anotherIndex);
2738
- return self;},
3221
+ ;
3222
+ return self},
2739
3223
  args: ["anIndex", "anotherIndex"],
2740
3224
  source: "copyFrom: anIndex to: anotherIndex\x0a\x09<return self.substring(anIndex - 1, anotherIndex)>",
2741
3225
  messageSends: [],
@@ -2750,8 +3234,10 @@ selector: "deepCopy",
2750
3234
  category: 'copying',
2751
3235
  fn: function (){
2752
3236
  var self=this;
2753
- return smalltalk.send(self, "_shallowCopy", []);
2754
- return self;},
3237
+ var $1;
3238
+ $1=smalltalk.send(self,"_shallowCopy",[]);
3239
+ return $1;
3240
+ },
2755
3241
  args: [],
2756
3242
  source: "deepCopy\x0a\x09^self shallowCopy",
2757
3243
  messageSends: ["shallowCopy"],
@@ -2759,6 +3245,23 @@ referencedClasses: []
2759
3245
  }),
2760
3246
  smalltalk.String);
2761
3247
 
3248
+ smalltalk.addMethod(
3249
+ "_do_",
3250
+ smalltalk.method({
3251
+ selector: "do:",
3252
+ category: 'enumerating',
3253
+ fn: function (aBlock){
3254
+ var self=this;
3255
+ for(var i=0;i<self.length;i++){aBlock(self.charAt(i));};
3256
+ ;
3257
+ return self},
3258
+ args: ["aBlock"],
3259
+ source: "do: aBlock\x0a\x09<for(var i=0;i<self.length;i++){aBlock(self.charAt(i));}>",
3260
+ messageSends: [],
3261
+ referencedClasses: []
3262
+ }),
3263
+ smalltalk.String);
3264
+
2762
3265
  smalltalk.addMethod(
2763
3266
  "_escaped",
2764
3267
  smalltalk.method({
@@ -2767,7 +3270,8 @@ category: 'accessing',
2767
3270
  fn: function (){
2768
3271
  var self=this;
2769
3272
  return escape(self);
2770
- return self;},
3273
+ ;
3274
+ return self},
2771
3275
  args: [],
2772
3276
  source: "escaped\x0a\x09<return escape(self)>",
2773
3277
  messageSends: [],
@@ -2783,7 +3287,8 @@ category: 'testing',
2783
3287
  fn: function (subString){
2784
3288
  var self=this;
2785
3289
  return self.indexOf(subString) != -1 ;
2786
- return self;},
3290
+ ;
3291
+ return self},
2787
3292
  args: ["subString"],
2788
3293
  source: "includesSubString: subString\x0a\x09< return self.indexOf(subString) != -1 >",
2789
3294
  messageSends: [],
@@ -2799,7 +3304,7 @@ category: 'testing',
2799
3304
  fn: function (){
2800
3305
  var self=this;
2801
3306
  return true;
2802
- return self;},
3307
+ },
2803
3308
  args: [],
2804
3309
  source: "isString\x0a\x09^true",
2805
3310
  messageSends: [],
@@ -2814,8 +3319,16 @@ selector: "join:",
2814
3319
  category: 'split join',
2815
3320
  fn: function (aCollection){
2816
3321
  var self=this;
2817
- return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){return smalltalk.send(aCollection, "_do_separatedBy_", [(function(each){return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(each, "_asString", [])]);}), (function(){return smalltalk.send(stream, "_nextPutAll_", [self]);})]);})]);
2818
- return self;},
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
+ })]);
3330
+ return $1;
3331
+ },
2819
3332
  args: ["aCollection"],
2820
3333
  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]]",
2821
3334
  messageSends: ["streamContents:", "do:separatedBy:", "nextPutAll:", "asString"],
@@ -2830,25 +3343,67 @@ selector: "lineIndicesDo:",
2830
3343
  category: 'split join',
2831
3344
  fn: function (aBlock){
2832
3345
  var self=this;
3346
+ var $1,$2,$3;
2833
3347
  var $early={};
2834
- try{var cr=nil;
2835
- var lf=nil;
2836
- var start=nil;
2837
- var sz=nil;
2838
- var nextLF=nil;
2839
- var nextCR=nil;
2840
- (start=(1));
2841
- (sz=smalltalk.send(self, "_size", []));
2842
- (cr=smalltalk.send((smalltalk.String || String), "_cr", []));
2843
- (nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, (1)]));
2844
- (lf=smalltalk.send((smalltalk.String || String), "_lf", []));
2845
- (nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, (1)]));
2846
- (function(){while((function(){return ((($receiver = start).klass === smalltalk.Number) ? $receiver <=sz : smalltalk.send($receiver, "__lt_eq", [sz]));})()) {(function(){((($receiver = smalltalk.send(smalltalk.send(nextLF, "__eq", [(0)]), "_and_", [(function(){return smalltalk.send(nextCR, "__eq", [(0)]);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, sz, sz]);return (function(){throw $early=[self]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, sz, sz]);return (function(){throw $early=[self]})();})]));return ((($receiver = smalltalk.send(smalltalk.send(nextCR, "__eq", [(0)]), "_or_", [(function(){return smalltalk.send((0) < nextLF, "_and_", [(function(){return ((($receiver = nextLF).klass === smalltalk.Number) ? $receiver <nextCR : smalltalk.send($receiver, "__lt", [nextCR]));})]);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextLF).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);(start=(1) + nextLF);return (nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]));})() : (function(){return ((($receiver = smalltalk.send((1) + nextCR, "__eq", [nextLF])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);(start=(1) + nextLF);(nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));return (nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]));})() : (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);(start=(1) + nextCR);return (nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);(start=(1) + nextLF);(nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));return (nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]));}), (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);(start=(1) + nextCR);return (nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextLF).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);(start=(1) + nextLF);return (nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]));}), (function(){return ((($receiver = smalltalk.send((1) + nextCR, "__eq", [nextLF])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);(start=(1) + nextLF);(nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));return (nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]));})() : (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);(start=(1) + nextCR);return (nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);(start=(1) + nextLF);(nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));return (nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]));}), (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);(start=(1) + nextCR);return (nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));})]));})]));})()}})();
2847
- return self;
2848
- } catch(e) {if(e===$early)return e[0]; throw e}},
3348
+ try {
3349
+ var cr;
3350
+ var lf;
3351
+ var start;
3352
+ var sz;
3353
+ var nextLF;
3354
+ var nextCR;
3355
+ 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];
3370
+ };
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]);
3379
+ start;
3380
+ nextLF=smalltalk.send(self,"_indexOf_startingAt_",[lf,start]);
3381
+ 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]);
3387
+ start;
3388
+ nextCR=smalltalk.send(self,"_indexOf_startingAt_",[cr,start]);
3389
+ nextCR;
3390
+ nextLF=smalltalk.send(self,"_indexOf_startingAt_",[lf,start]);
3391
+ return nextLF;
3392
+ } else {
3393
+ smalltalk.send(aBlock,"_value_value_value_",[start,smalltalk.send(nextCR,"__minus",[(1)]),nextCR]);
3394
+ start=smalltalk.send((1),"__plus",[nextCR]);
3395
+ start;
3396
+ nextCR=smalltalk.send(self,"_indexOf_startingAt_",[cr,start]);
3397
+ return nextCR;
3398
+ };
3399
+ };
3400
+ })]);
3401
+ return self}
3402
+ catch(e) {if(e===$early)return e[0]; throw e}
3403
+ },
2849
3404
  args: ["aBlock"],
2850
3405
  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 ]]]",
2851
- messageSends: ["size", "cr", "indexOf:startingAt:", "lf", "whileTrue:", "<=", "ifTrue:", "and:", "=", "value:value:value:", "ifTrue:ifFalse:", "or:", "<", "-", "+"],
3406
+ messageSends: ["size", "cr", "indexOf:startingAt:", "lf", "whileTrue:", "ifTrue:", "value:value:value:", "and:", "=", "ifTrue:ifFalse:", "-", "+", "or:", "<", "<="],
2852
3407
  referencedClasses: ["String"]
2853
3408
  }),
2854
3409
  smalltalk.String);
@@ -2860,16 +3415,26 @@ selector: "lineNumber:",
2860
3415
  category: 'split join',
2861
3416
  fn: function (anIndex){
2862
3417
  var self=this;
3418
+ var $1,$2;
2863
3419
  var $early={};
2864
- try{var lineCount=nil;
2865
- (lineCount=(0));
2866
- smalltalk.send(self, "_lineIndicesDo_", [(function(start, endWithoutDelimiters, end){return ((($receiver = smalltalk.send((lineCount=((($receiver = lineCount).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))), "__eq", [anIndex])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){throw $early=[smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function(){throw $early=[smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])]})();})]));})]);
3420
+ try {
3421
+ var lineCount;
3422
+ 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];
3429
+ };
3430
+ })]);
2867
3431
  return nil;
2868
- return self;
2869
- } catch(e) {if(e===$early)return e[0]; throw e}},
3432
+ }
3433
+ catch(e) {if(e===$early)return e[0]; throw e}
3434
+ },
2870
3435
  args: ["anIndex"],
2871
3436
  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",
2872
- messageSends: ["lineIndicesDo:", "ifTrue:", "=", "+", "copyFrom:to:"],
3437
+ messageSends: ["lineIndicesDo:", "ifTrue:", "copyFrom:to:", "=", "+"],
2873
3438
  referencedClasses: []
2874
3439
  }),
2875
3440
  smalltalk.String);
@@ -2881,11 +3446,13 @@ selector: "lines",
2881
3446
  category: 'split join',
2882
3447
  fn: function (){
2883
3448
  var self=this;
2884
- var lines=nil;
2885
- (lines=smalltalk.send((smalltalk.Array || Array), "_new", []));
2886
- smalltalk.send(self, "_linesDo_", [(function(aLine){return smalltalk.send(lines, "_add_", [aLine]);})]);
3449
+ 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
+ })]);
2887
3454
  return lines;
2888
- return self;},
3455
+ },
2889
3456
  args: [],
2890
3457
  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",
2891
3458
  messageSends: ["new", "linesDo:", "add:"],
@@ -2900,8 +3467,10 @@ selector: "linesDo:",
2900
3467
  category: 'split join',
2901
3468
  fn: function (aBlock){
2902
3469
  var self=this;
2903
- smalltalk.send(self, "_lineIndicesDo_", [(function(start, endWithoutDelimiters, end){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])]);})]);
2904
- return self;},
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},
2905
3474
  args: ["aBlock"],
2906
3475
  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)]",
2907
3476
  messageSends: ["lineIndicesDo:", "value:", "copyFrom:to:"],
@@ -2917,7 +3486,8 @@ category: 'regular expressions',
2917
3486
  fn: function (aRegexp){
2918
3487
  var self=this;
2919
3488
  return self.search(aRegexp) != -1;
2920
- return self;},
3489
+ ;
3490
+ return self},
2921
3491
  args: ["aRegexp"],
2922
3492
  source: "match: aRegexp\x0a\x09<return self.search(aRegexp) != -1>",
2923
3493
  messageSends: [],
@@ -2933,7 +3503,8 @@ category: 'regular expressions',
2933
3503
  fn: function (aRegularExpression){
2934
3504
  var self=this;
2935
3505
  return self.match(aRegularExpression);
2936
- return self;},
3506
+ ;
3507
+ return self},
2937
3508
  args: ["aRegularExpression"],
2938
3509
  source: "matchesOf: aRegularExpression\x0a <return self.match(aRegularExpression)>",
2939
3510
  messageSends: [],
@@ -2949,7 +3520,8 @@ category: 'printing',
2949
3520
  fn: function (){
2950
3521
  var self=this;
2951
3522
  console.log(self);
2952
- return self;},
3523
+ ;
3524
+ return self},
2953
3525
  args: [],
2954
3526
  source: "printNl\x0a\x09<console.log(self)>",
2955
3527
  messageSends: [],
@@ -2964,8 +3536,10 @@ selector: "printString",
2964
3536
  category: 'printing',
2965
3537
  fn: function (){
2966
3538
  var self=this;
2967
- return smalltalk.send(smalltalk.send("'", "__comma", [self]), "__comma", ["'"]);
2968
- return self;},
3539
+ var $1;
3540
+ $1=smalltalk.send(smalltalk.send("'","__comma",[self]),"__comma",["'"]);
3541
+ return $1;
3542
+ },
2969
3543
  args: [],
2970
3544
  source: "printString\x0a\x09^'''', self, ''''",
2971
3545
  messageSends: [","],
@@ -2978,10 +3552,12 @@ smalltalk.addMethod(
2978
3552
  smalltalk.method({
2979
3553
  selector: "replace:with:",
2980
3554
  category: 'regular expressions',
2981
- fn: function (aString, anotherString){
3555
+ fn: function (aString,anotherString){
2982
3556
  var self=this;
2983
- return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [aString, "g"]), anotherString]);
2984
- return self;},
3557
+ var $1;
3558
+ $1=smalltalk.send(self,"_replaceRegexp_with_",[smalltalk.send((smalltalk.RegularExpression || RegularExpression),"_fromString_flag_",[aString,"g"]),anotherString]);
3559
+ return $1;
3560
+ },
2985
3561
  args: ["aString", "anotherString"],
2986
3562
  source: "replace: aString with: anotherString\x0a\x09^self replaceRegexp: (RegularExpression fromString: aString flag: 'g') with: anotherString",
2987
3563
  messageSends: ["replaceRegexp:with:", "fromString:flag:"],
@@ -2994,10 +3570,11 @@ smalltalk.addMethod(
2994
3570
  smalltalk.method({
2995
3571
  selector: "replaceRegexp:with:",
2996
3572
  category: 'regular expressions',
2997
- fn: function (aRegexp, aString){
3573
+ fn: function (aRegexp,aString){
2998
3574
  var self=this;
2999
3575
  return self.replace(aRegexp, aString);
3000
- return self;},
3576
+ ;
3577
+ return self},
3001
3578
  args: ["aRegexp", "aString"],
3002
3579
  source: "replaceRegexp: aRegexp with: aString\x0a\x09<return self.replace(aRegexp, aString)>",
3003
3580
  messageSends: [],
@@ -3013,7 +3590,8 @@ category: 'converting',
3013
3590
  fn: function (){
3014
3591
  var self=this;
3015
3592
  return self.split("").reverse().join("");
3016
- return self;},
3593
+ ;
3594
+ return self},
3017
3595
  args: [],
3018
3596
  source: "reversed\x0a\x09<return self.split(\x22\x22).reverse().join(\x22\x22)>",
3019
3597
  messageSends: [],
@@ -3028,8 +3606,10 @@ selector: "shallowCopy",
3028
3606
  category: 'copying',
3029
3607
  fn: function (){
3030
3608
  var self=this;
3031
- return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [self]);
3032
- return self;},
3609
+ var $1;
3610
+ $1=smalltalk.send(smalltalk.send(self,"_class",[]),"_fromString_",[self]);
3611
+ return $1;
3612
+ },
3033
3613
  args: [],
3034
3614
  source: "shallowCopy\x0a\x09^self class fromString: self",
3035
3615
  messageSends: ["fromString:", "class"],
@@ -3045,7 +3625,8 @@ category: 'accessing',
3045
3625
  fn: function (){
3046
3626
  var self=this;
3047
3627
  return self.length;
3048
- return self;},
3628
+ ;
3629
+ return self},
3049
3630
  args: [],
3050
3631
  source: "size\x0a\x09<return self.length>",
3051
3632
  messageSends: [],
@@ -3061,7 +3642,8 @@ category: 'converting',
3061
3642
  fn: function (aString){
3062
3643
  var self=this;
3063
3644
  return self.split(aString);
3064
- return self;},
3645
+ ;
3646
+ return self},
3065
3647
  args: ["aString"],
3066
3648
  source: "tokenize: aString\x0a\x09<return self.split(aString)>",
3067
3649
  messageSends: [],
@@ -3076,8 +3658,10 @@ selector: "trimBoth",
3076
3658
  category: 'regular expressions',
3077
3659
  fn: function (){
3078
3660
  var self=this;
3079
- return smalltalk.send(self, "_trimBoth_", ["\x5cs"]);
3080
- return self;},
3661
+ var $1;
3662
+ $1=smalltalk.send(self,"_trimBoth_",["\x5cs"]);
3663
+ return $1;
3664
+ },
3081
3665
  args: [],
3082
3666
  source: "trimBoth\x0a\x09^self trimBoth: '\x5cs'",
3083
3667
  messageSends: ["trimBoth:"],
@@ -3092,8 +3676,10 @@ selector: "trimBoth:",
3092
3676
  category: 'regular expressions',
3093
3677
  fn: function (separators){
3094
3678
  var self=this;
3095
- return smalltalk.send(smalltalk.send(self, "_trimLeft_", [separators]), "_trimRight_", [separators]);
3096
- return self;},
3679
+ var $1;
3680
+ $1=smalltalk.send(smalltalk.send(self,"_trimLeft_",[separators]),"_trimRight_",[separators]);
3681
+ return $1;
3682
+ },
3097
3683
  args: ["separators"],
3098
3684
  source: "trimBoth: separators\x0a\x0a\x09^(self trimLeft: separators) trimRight: separators",
3099
3685
  messageSends: ["trimRight:", "trimLeft:"],
@@ -3108,8 +3694,10 @@ selector: "trimLeft",
3108
3694
  category: 'regular expressions',
3109
3695
  fn: function (){
3110
3696
  var self=this;
3111
- return smalltalk.send(self, "_trimLeft_", ["\x5cs"]);
3112
- return self;},
3697
+ var $1;
3698
+ $1=smalltalk.send(self,"_trimLeft_",["\x5cs"]);
3699
+ return $1;
3700
+ },
3113
3701
  args: [],
3114
3702
  source: "trimLeft\x0a\x09^self trimLeft: '\x5cs'",
3115
3703
  messageSends: ["trimLeft:"],
@@ -3124,8 +3712,10 @@ selector: "trimLeft:",
3124
3712
  category: 'regular expressions',
3125
3713
  fn: function (separators){
3126
3714
  var self=this;
3127
- return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [smalltalk.send(smalltalk.send("^[", "__comma", [separators]), "__comma", ["]+"]), "g"]), ""]);
3128
- return self;},
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"]),""]);
3717
+ return $1;
3718
+ },
3129
3719
  args: ["separators"],
3130
3720
  source: "trimLeft: separators\x0a\x0a\x09^self replaceRegexp: (RegularExpression fromString: '^[', separators, ']+' flag: 'g') with: ''",
3131
3721
  messageSends: ["replaceRegexp:with:", "fromString:flag:", ","],
@@ -3140,8 +3730,10 @@ selector: "trimRight",
3140
3730
  category: 'regular expressions',
3141
3731
  fn: function (){
3142
3732
  var self=this;
3143
- return smalltalk.send(self, "_trimRight_", ["\x5cs"]);
3144
- return self;},
3733
+ var $1;
3734
+ $1=smalltalk.send(self,"_trimRight_",["\x5cs"]);
3735
+ return $1;
3736
+ },
3145
3737
  args: [],
3146
3738
  source: "trimRight\x0a\x09^self trimRight: '\x5cs'",
3147
3739
  messageSends: ["trimRight:"],
@@ -3156,8 +3748,10 @@ selector: "trimRight:",
3156
3748
  category: 'regular expressions',
3157
3749
  fn: function (separators){
3158
3750
  var self=this;
3159
- return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [smalltalk.send(smalltalk.send("[", "__comma", [separators]), "__comma", ["]+$"]), "g"]), ""]);
3160
- return self;},
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"]),""]);
3753
+ return $1;
3754
+ },
3161
3755
  args: ["separators"],
3162
3756
  source: "trimRight: separators\x0a\x0a\x09^self replaceRegexp: (RegularExpression fromString: '[', separators, ']+$' flag: 'g') with: ''",
3163
3757
  messageSends: ["replaceRegexp:with:", "fromString:flag:", ","],
@@ -3173,7 +3767,8 @@ category: 'accessing',
3173
3767
  fn: function (){
3174
3768
  var self=this;
3175
3769
  return unescape(self);
3176
- return self;},
3770
+ ;
3771
+ return self},
3177
3772
  args: [],
3178
3773
  source: "unescaped\x0a\x09<return unescape(self)>",
3179
3774
  messageSends: [],
@@ -3181,6 +3776,23 @@ referencedClasses: []
3181
3776
  }),
3182
3777
  smalltalk.String);
3183
3778
 
3779
+ smalltalk.addMethod(
3780
+ "_withIndexDo_",
3781
+ smalltalk.method({
3782
+ selector: "withIndexDo:",
3783
+ category: 'enumerating',
3784
+ fn: function (aBlock){
3785
+ var self=this;
3786
+ for(var i=0;i<self.length;i++){aBlock(self.charAt(i), i+1);};
3787
+ ;
3788
+ return self},
3789
+ args: ["aBlock"],
3790
+ source: "withIndexDo: aBlock\x0a\x09<for(var i=0;i<self.length;i++){aBlock(self.charAt(i), i+1);}>",
3791
+ messageSends: [],
3792
+ referencedClasses: []
3793
+ }),
3794
+ smalltalk.String);
3795
+
3184
3796
 
3185
3797
  smalltalk.addMethod(
3186
3798
  "_cr",
@@ -3190,7 +3802,8 @@ category: 'accessing',
3190
3802
  fn: function (){
3191
3803
  var self=this;
3192
3804
  return '\r';
3193
- return self;},
3805
+ ;
3806
+ return self},
3194
3807
  args: [],
3195
3808
  source: "cr\x0a\x09<return '\x5cr'>",
3196
3809
  messageSends: [],
@@ -3206,7 +3819,8 @@ category: 'accessing',
3206
3819
  fn: function (){
3207
3820
  var self=this;
3208
3821
  return '\r\n';
3209
- return self;},
3822
+ ;
3823
+ return self},
3210
3824
  args: [],
3211
3825
  source: "crlf\x0a\x09<return '\x5cr\x5cn'>",
3212
3826
  messageSends: [],
@@ -3214,6 +3828,23 @@ referencedClasses: []
3214
3828
  }),
3215
3829
  smalltalk.String.klass);
3216
3830
 
3831
+ smalltalk.addMethod(
3832
+ "_fromCharCode_",
3833
+ smalltalk.method({
3834
+ selector: "fromCharCode:",
3835
+ category: 'instance creation',
3836
+ fn: function (anInteger){
3837
+ var self=this;
3838
+ return String.fromCharCode(anInteger);
3839
+ ;
3840
+ return self},
3841
+ args: ["anInteger"],
3842
+ source: "fromCharCode: anInteger\x0a\x09<return String.fromCharCode(anInteger)>",
3843
+ messageSends: [],
3844
+ referencedClasses: []
3845
+ }),
3846
+ smalltalk.String.klass);
3847
+
3217
3848
  smalltalk.addMethod(
3218
3849
  "_fromString_",
3219
3850
  smalltalk.method({
@@ -3222,7 +3853,8 @@ category: 'instance creation',
3222
3853
  fn: function (aString){
3223
3854
  var self=this;
3224
3855
  return new self.fn(aString);
3225
- return self;},
3856
+ ;
3857
+ return self},
3226
3858
  args: ["aString"],
3227
3859
  source: "fromString: aString\x0a\x09 <return new self.fn(aString)>",
3228
3860
  messageSends: [],
@@ -3238,7 +3870,8 @@ category: 'accessing',
3238
3870
  fn: function (){
3239
3871
  var self=this;
3240
3872
  return '\n';
3241
- return self;},
3873
+ ;
3874
+ return self},
3242
3875
  args: [],
3243
3876
  source: "lf\x0a\x09<return '\x5cn'>",
3244
3877
  messageSends: [],
@@ -3254,7 +3887,8 @@ category: 'accessing',
3254
3887
  fn: function (){
3255
3888
  var self=this;
3256
3889
  return ' ';
3257
- return self;},
3890
+ ;
3891
+ return self},
3258
3892
  args: [],
3259
3893
  source: "space\x0a\x09<return ' '>",
3260
3894
  messageSends: [],
@@ -3270,7 +3904,7 @@ category: 'accessing',
3270
3904
  fn: function (){
3271
3905
  var self=this;
3272
3906
  return (smalltalk.StringStream || StringStream);
3273
- return self;},
3907
+ },
3274
3908
  args: [],
3275
3909
  source: "streamClass\x0a\x09 ^StringStream",
3276
3910
  messageSends: [],
@@ -3285,14 +3919,16 @@ selector: "streamContents:",
3285
3919
  category: 'instance creation',
3286
3920
  fn: function (blockWithArg){
3287
3921
  var self=this;
3288
- var stream=nil;
3289
- (stream=smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [smalltalk.send((smalltalk.String || String), "_new", [])]));
3290
- smalltalk.send(blockWithArg, "_value_", [stream]);
3291
- return smalltalk.send(stream, "_contents", []);
3292
- return self;},
3922
+ var $1;
3923
+ 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",[]);
3927
+ return $1;
3928
+ },
3293
3929
  args: ["blockWithArg"],
3294
3930
  source: "streamContents: blockWithArg\x0a\x09|stream|\x0a\x09stream := (self streamClass on: String new).\x0a\x09blockWithArg value: stream.\x0a\x09^ stream contents",
3295
- messageSends: ["on:", "streamClass", "new", "value:", "contents"],
3931
+ messageSends: ["on:", "new", "streamClass", "value:", "contents"],
3296
3932
  referencedClasses: ["String"]
3297
3933
  }),
3298
3934
  smalltalk.String.klass);
@@ -3305,7 +3941,8 @@ category: 'accessing',
3305
3941
  fn: function (){
3306
3942
  var self=this;
3307
3943
  return '\t';
3308
- return self;},
3944
+ ;
3945
+ return self},
3309
3946
  args: [],
3310
3947
  source: "tab\x0a\x09<return '\x5ct'>",
3311
3948
  messageSends: [],
@@ -3321,7 +3958,8 @@ category: 'instance creation',
3321
3958
  fn: function (aUTFCharCode){
3322
3959
  var self=this;
3323
3960
  return String.fromCharCode(aUTFCharCode);;
3324
- return self;},
3961
+ ;
3962
+ return self},
3325
3963
  args: ["aUTFCharCode"],
3326
3964
  source: "value: aUTFCharCode\x0a\x0a\x09<return String.fromCharCode(aUTFCharCode);>",
3327
3965
  messageSends: [],
@@ -3338,8 +3976,10 @@ selector: "<",
3338
3976
  category: 'comparing',
3339
3977
  fn: function (aSymbol){
3340
3978
  var self=this;
3341
- return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver <smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__lt", [smalltalk.send(aSymbol, "_asString", [])]));
3342
- return self;},
3979
+ var $1;
3980
+ $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"__lt",[smalltalk.send(aSymbol,"_asString",[])]);
3981
+ return $1;
3982
+ },
3343
3983
  args: ["aSymbol"],
3344
3984
  source: "< aSymbol\x0a\x09^self asString < aSymbol asString",
3345
3985
  messageSends: ["<", "asString"],
@@ -3354,8 +3994,10 @@ selector: "<=",
3354
3994
  category: 'comparing',
3355
3995
  fn: function (aSymbol){
3356
3996
  var self=this;
3357
- return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver <=smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__lt_eq", [smalltalk.send(aSymbol, "_asString", [])]));
3358
- return self;},
3997
+ var $1;
3998
+ $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"__lt_eq",[smalltalk.send(aSymbol,"_asString",[])]);
3999
+ return $1;
4000
+ },
3359
4001
  args: ["aSymbol"],
3360
4002
  source: "<= aSymbol\x0a\x09^self asString <= aSymbol asString",
3361
4003
  messageSends: ["<=", "asString"],
@@ -3370,11 +4012,14 @@ selector: "=",
3370
4012
  category: 'comparing',
3371
4013
  fn: function (aSymbol){
3372
4014
  var self=this;
3373
- var $early={};
3374
- try{((($receiver = smalltalk.send(smalltalk.send(aSymbol, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw $early=[false]})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw $early=[false]})();})]));
3375
- return smalltalk.send(smalltalk.send(self, "_asString", []), "__eq", [smalltalk.send(aSymbol, "_asString", [])]);
3376
- return self;
3377
- } catch(e) {if(e===$early)return e[0]; throw e}},
4015
+ var $1,$2;
4016
+ $1=smalltalk.send(smalltalk.send(aSymbol,"_class",[]),"__eq",[smalltalk.send(self,"_class",[])]);
4017
+ if(! smalltalk.assert($1)){
4018
+ return false;
4019
+ };
4020
+ $2=smalltalk.send(smalltalk.send(self,"_asString",[]),"__eq",[smalltalk.send(aSymbol,"_asString",[])]);
4021
+ return $2;
4022
+ },
3378
4023
  args: ["aSymbol"],
3379
4024
  source: "= aSymbol\x0a\x09aSymbol class = self class ifFalse: [^false].\x0a\x09^self asString = aSymbol asString",
3380
4025
  messageSends: ["ifFalse:", "=", "class", "asString"],
@@ -3389,8 +4034,10 @@ selector: ">",
3389
4034
  category: 'comparing',
3390
4035
  fn: function (aSymbol){
3391
4036
  var self=this;
3392
- return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver >smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__gt", [smalltalk.send(aSymbol, "_asString", [])]));
3393
- return self;},
4037
+ var $1;
4038
+ $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"__gt",[smalltalk.send(aSymbol,"_asString",[])]);
4039
+ return $1;
4040
+ },
3394
4041
  args: ["aSymbol"],
3395
4042
  source: "> aSymbol\x0a\x09^self asString > aSymbol asString",
3396
4043
  messageSends: [">", "asString"],
@@ -3405,8 +4052,10 @@ selector: ">=",
3405
4052
  category: 'comparing',
3406
4053
  fn: function (aSymbol){
3407
4054
  var self=this;
3408
- return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver >=smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__gt_eq", [smalltalk.send(aSymbol, "_asString", [])]));
3409
- return self;},
4055
+ var $1;
4056
+ $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"__gt_eq",[smalltalk.send(aSymbol,"_asString",[])]);
4057
+ return $1;
4058
+ },
3410
4059
  args: ["aSymbol"],
3411
4060
  source: ">= aSymbol\x0a\x09^self asString >= aSymbol asString",
3412
4061
  messageSends: [">=", "asString"],
@@ -3421,8 +4070,10 @@ selector: "asJSON",
3421
4070
  category: 'converting',
3422
4071
  fn: function (){
3423
4072
  var self=this;
3424
- return smalltalk.send(smalltalk.send(self, "_asString", []), "_asJSON", []);
3425
- return self;},
4073
+ var $1;
4074
+ $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"_asJSON",[]);
4075
+ return $1;
4076
+ },
3426
4077
  args: [],
3427
4078
  source: "asJSON\x0a\x09^self asString asJSON",
3428
4079
  messageSends: ["asJSON", "asString"],
@@ -3437,8 +4088,10 @@ selector: "asJavascript",
3437
4088
  category: 'converting',
3438
4089
  fn: function (){
3439
4090
  var self=this;
3440
- return smalltalk.send(smalltalk.send("smalltalk.symbolFor(\x22", "__comma", [smalltalk.send(self, "_asString", [])]), "__comma", ["\x22)"]);
3441
- return self;},
4091
+ var $1;
4092
+ $1=smalltalk.send(smalltalk.send("smalltalk.symbolFor(\x22","__comma",[smalltalk.send(self,"_asString",[])]),"__comma",["\x22)"]);
4093
+ return $1;
4094
+ },
3442
4095
  args: [],
3443
4096
  source: "asJavascript\x0a\x09^'smalltalk.symbolFor(\x22', self asString, '\x22)'",
3444
4097
  messageSends: [",", "asString"],
@@ -3453,8 +4106,10 @@ selector: "asSelector",
3453
4106
  category: 'converting',
3454
4107
  fn: function (){
3455
4108
  var self=this;
3456
- return smalltalk.send(smalltalk.send(self, "_asString", []), "_asSelector", []);
3457
- return self;},
4109
+ var $1;
4110
+ $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"_asSelector",[]);
4111
+ return $1;
4112
+ },
3458
4113
  args: [],
3459
4114
  source: "asSelector\x0a\x09^self asString asSelector",
3460
4115
  messageSends: ["asSelector", "asString"],
@@ -3470,7 +4125,8 @@ category: 'converting',
3470
4125
  fn: function (){
3471
4126
  var self=this;
3472
4127
  return self.value;
3473
- return self;},
4128
+ ;
4129
+ return self},
3474
4130
  args: [],
3475
4131
  source: "asString\x0a\x09<return self.value>",
3476
4132
  messageSends: [],
@@ -3486,7 +4142,7 @@ category: 'converting',
3486
4142
  fn: function (){
3487
4143
  var self=this;
3488
4144
  return self;
3489
- return self;},
4145
+ },
3490
4146
  args: [],
3491
4147
  source: "asSymbol\x0a\x09^self",
3492
4148
  messageSends: [],
@@ -3499,10 +4155,12 @@ smalltalk.addMethod(
3499
4155
  smalltalk.method({
3500
4156
  selector: "at:ifAbsent:",
3501
4157
  category: 'accessing',
3502
- fn: function (anIndex, aBlock){
4158
+ fn: function (anIndex,aBlock){
3503
4159
  var self=this;
3504
- return smalltalk.send(smalltalk.send(self, "_asString", []), "_at_ifAbsent_", [anIndex, aBlock]);
3505
- return self;},
4160
+ var $1;
4161
+ $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"_at_ifAbsent_",[anIndex,aBlock]);
4162
+ return $1;
4163
+ },
3506
4164
  args: ["anIndex", "aBlock"],
3507
4165
  source: "at: anIndex ifAbsent: aBlock\x0a\x09^self asString at: anIndex ifAbsent: aBlock",
3508
4166
  messageSends: ["at:ifAbsent:", "asString"],
@@ -3510,18 +4168,38 @@ referencedClasses: []
3510
4168
  }),
3511
4169
  smalltalk.Symbol);
3512
4170
 
4171
+ smalltalk.addMethod(
4172
+ "_collect_",
4173
+ smalltalk.method({
4174
+ selector: "collect:",
4175
+ category: 'enumerating',
4176
+ fn: function (aBlock){
4177
+ var self=this;
4178
+ var $1;
4179
+ $1=smalltalk.send(smalltalk.send(smalltalk.send(self,"_asString",[]),"_collect_",[aBlock]),"_asSymbol",[]);
4180
+ return $1;
4181
+ },
4182
+ args: ["aBlock"],
4183
+ source: "collect: aBlock\x0a\x09^ (self asString collect: aBlock) asSymbol",
4184
+ messageSends: ["asSymbol", "collect:", "asString"],
4185
+ referencedClasses: []
4186
+ }),
4187
+ smalltalk.Symbol);
4188
+
3513
4189
  smalltalk.addMethod(
3514
4190
  "_copyFrom_to_",
3515
4191
  smalltalk.method({
3516
4192
  selector: "copyFrom:to:",
3517
4193
  category: 'copying',
3518
- fn: function (anIndex, anotherIndex){
4194
+ fn: function (anIndex,anotherIndex){
3519
4195
  var self=this;
3520
- return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [smalltalk.send(smalltalk.send(self, "_asString", []), "_copyFrom_to_", [anIndex, anotherIndex])]);
3521
- return self;},
4196
+ var $1;
4197
+ $1=smalltalk.send(smalltalk.send(self,"_class",[]),"_fromString_",[smalltalk.send(smalltalk.send(self,"_asString",[]),"_copyFrom_to_",[anIndex,anotherIndex])]);
4198
+ return $1;
4199
+ },
3522
4200
  args: ["anIndex", "anotherIndex"],
3523
4201
  source: "copyFrom: anIndex to: anotherIndex\x0a\x09^self class fromString: (self asString copyFrom: anIndex to: anotherIndex)",
3524
- messageSends: ["fromString:", "class", "copyFrom:to:", "asString"],
4202
+ messageSends: ["fromString:", "copyFrom:to:", "asString", "class"],
3525
4203
  referencedClasses: []
3526
4204
  }),
3527
4205
  smalltalk.Symbol);
@@ -3534,7 +4212,7 @@ category: 'copying',
3534
4212
  fn: function (){
3535
4213
  var self=this;
3536
4214
  return self;
3537
- return self;},
4215
+ },
3538
4216
  args: [],
3539
4217
  source: "deepCopy\x0a\x09^self",
3540
4218
  messageSends: [],
@@ -3542,6 +4220,40 @@ referencedClasses: []
3542
4220
  }),
3543
4221
  smalltalk.Symbol);
3544
4222
 
4223
+ smalltalk.addMethod(
4224
+ "_detect_",
4225
+ smalltalk.method({
4226
+ selector: "detect:",
4227
+ category: 'enumerating',
4228
+ fn: function (aBlock){
4229
+ var self=this;
4230
+ var $1;
4231
+ $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"_detect_",[aBlock]);
4232
+ return $1;
4233
+ },
4234
+ args: ["aBlock"],
4235
+ source: "detect: aBlock\x0a\x09^ self asString detect: aBlock",
4236
+ messageSends: ["detect:", "asString"],
4237
+ referencedClasses: []
4238
+ }),
4239
+ smalltalk.Symbol);
4240
+
4241
+ smalltalk.addMethod(
4242
+ "_do_",
4243
+ smalltalk.method({
4244
+ selector: "do:",
4245
+ category: 'enumerating',
4246
+ fn: function (aBlock){
4247
+ var self=this;
4248
+ smalltalk.send(smalltalk.send(self,"_asString",[]),"_do_",[aBlock]);
4249
+ return self},
4250
+ args: ["aBlock"],
4251
+ source: "do: aBlock\x0a\x09self asString do: aBlock",
4252
+ messageSends: ["do:", "asString"],
4253
+ referencedClasses: []
4254
+ }),
4255
+ smalltalk.Symbol);
4256
+
3545
4257
  smalltalk.addMethod(
3546
4258
  "_isSymbol",
3547
4259
  smalltalk.method({
@@ -3550,7 +4262,7 @@ category: 'printing',
3550
4262
  fn: function (){
3551
4263
  var self=this;
3552
4264
  return true;
3553
- return self;},
4265
+ },
3554
4266
  args: [],
3555
4267
  source: "isSymbol\x0a\x09^true",
3556
4268
  messageSends: [],
@@ -3565,8 +4277,10 @@ selector: "printString",
3565
4277
  category: 'printing',
3566
4278
  fn: function (){
3567
4279
  var self=this;
3568
- return smalltalk.send("#", "__comma", [smalltalk.send(self, "_asString", [])]);
3569
- return self;},
4280
+ var $1;
4281
+ $1=smalltalk.send("#","__comma",[smalltalk.send(self,"_asString",[])]);
4282
+ return $1;
4283
+ },
3570
4284
  args: [],
3571
4285
  source: "printString\x0a\x09^'#', self asString",
3572
4286
  messageSends: [",", "asString"],
@@ -3574,6 +4288,24 @@ referencedClasses: []
3574
4288
  }),
3575
4289
  smalltalk.Symbol);
3576
4290
 
4291
+ smalltalk.addMethod(
4292
+ "_select_",
4293
+ smalltalk.method({
4294
+ selector: "select:",
4295
+ category: 'enumerating',
4296
+ fn: function (aBlock){
4297
+ var self=this;
4298
+ var $1;
4299
+ $1=smalltalk.send(smalltalk.send(smalltalk.send(self,"_asString",[]),"_select_",[aBlock]),"_asSymbol",[]);
4300
+ return $1;
4301
+ },
4302
+ args: ["aBlock"],
4303
+ source: "select: aBlock\x0a\x09^ (self asString select: aBlock) asSymbol",
4304
+ messageSends: ["asSymbol", "select:", "asString"],
4305
+ referencedClasses: []
4306
+ }),
4307
+ smalltalk.Symbol);
4308
+
3577
4309
  smalltalk.addMethod(
3578
4310
  "_shallowCopy",
3579
4311
  smalltalk.method({
@@ -3582,7 +4314,7 @@ category: 'copying',
3582
4314
  fn: function (){
3583
4315
  var self=this;
3584
4316
  return self;
3585
- return self;},
4317
+ },
3586
4318
  args: [],
3587
4319
  source: "shallowCopy\x0a\x09^self",
3588
4320
  messageSends: [],
@@ -3597,8 +4329,10 @@ selector: "size",
3597
4329
  category: 'accessing',
3598
4330
  fn: function (){
3599
4331
  var self=this;
3600
- return smalltalk.send(smalltalk.send(self, "_asString", []), "_size", []);
3601
- return self;},
4332
+ var $1;
4333
+ $1=smalltalk.send(smalltalk.send(self,"_asString",[]),"_size",[]);
4334
+ return $1;
4335
+ },
3602
4336
  args: [],
3603
4337
  source: "size\x0a\x09^self asString size",
3604
4338
  messageSends: ["size", "asString"],
@@ -3606,6 +4340,40 @@ referencedClasses: []
3606
4340
  }),
3607
4341
  smalltalk.Symbol);
3608
4342
 
4343
+ smalltalk.addMethod(
4344
+ "_value_",
4345
+ smalltalk.method({
4346
+ selector: "value:",
4347
+ category: 'evaluating',
4348
+ fn: function (anObject){
4349
+ var self=this;
4350
+ var $1;
4351
+ $1=smalltalk.send(anObject,"_perform_",[self]);
4352
+ return $1;
4353
+ },
4354
+ args: ["anObject"],
4355
+ source: "value: anObject \x0a\x09^anObject perform: self",
4356
+ messageSends: ["perform:"],
4357
+ referencedClasses: []
4358
+ }),
4359
+ smalltalk.Symbol);
4360
+
4361
+ smalltalk.addMethod(
4362
+ "_withIndexDo_",
4363
+ smalltalk.method({
4364
+ selector: "withIndexDo:",
4365
+ category: 'enumerating',
4366
+ fn: function (aBlock){
4367
+ var self=this;
4368
+ smalltalk.send(smalltalk.send(self,"_asString",[]),"_withIndexDo_",[aBlock]);
4369
+ return self},
4370
+ args: ["aBlock"],
4371
+ source: "withIndexDo: aBlock\x0a\x09self asString withIndexDo: aBlock",
4372
+ messageSends: ["withIndexDo:", "asString"],
4373
+ referencedClasses: []
4374
+ }),
4375
+ smalltalk.Symbol);
4376
+
3609
4377
 
3610
4378
  smalltalk.addMethod(
3611
4379
  "_basicNew",
@@ -3614,8 +4382,8 @@ selector: "basicNew",
3614
4382
  category: 'instance creation',
3615
4383
  fn: function (){
3616
4384
  var self=this;
3617
- smalltalk.send(self, "_shouldNotImplement", []);
3618
- return self;},
4385
+ smalltalk.send(self,"_shouldNotImplement",[]);
4386
+ return self},
3619
4387
  args: [],
3620
4388
  source: "basicNew\x0a\x09self shouldNotImplement",
3621
4389
  messageSends: ["shouldNotImplement"],
@@ -3630,8 +4398,10 @@ selector: "fromString:",
3630
4398
  category: 'instance creation',
3631
4399
  fn: function (aString){
3632
4400
  var self=this;
3633
- return smalltalk.send(self, "_lookup_", [aString]);
3634
- return self;},
4401
+ var $1;
4402
+ $1=smalltalk.send(self,"_lookup_",[aString]);
4403
+ return $1;
4404
+ },
3635
4405
  args: ["aString"],
3636
4406
  source: "fromString: aString\x0a\x09^self lookup: aString",
3637
4407
  messageSends: ["lookup:"],
@@ -3647,7 +4417,8 @@ category: 'instance creation',
3647
4417
  fn: function (aString){
3648
4418
  var self=this;
3649
4419
  return smalltalk.symbolFor(aString);;
3650
- return self;},
4420
+ ;
4421
+ return self},
3651
4422
  args: ["aString"],
3652
4423
  source: "lookup: aString\x0a\x09<return smalltalk.symbolFor(aString);>",
3653
4424
  messageSends: [],
@@ -3664,11 +4435,15 @@ selector: "=",
3664
4435
  category: 'comparing',
3665
4436
  fn: function (aCollection){
3666
4437
  var self=this;
3667
- return smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aCollection, "_class", [])]), "_and_", [(function(){return smalltalk.send(self['@elements'], "__eq", [smalltalk.send(aCollection, "_asArray", [])]);})]);
3668
- return self;},
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
+ })]);
4442
+ return $1;
4443
+ },
3669
4444
  args: ["aCollection"],
3670
4445
  source: "= aCollection\x0a\x09^self class = aCollection class and: [\x0a\x09\x09elements = aCollection asArray]",
3671
- messageSends: ["and:", "=", "class", "asArray"],
4446
+ messageSends: ["and:", "=", "asArray", "class"],
3672
4447
  referencedClasses: []
3673
4448
  }),
3674
4449
  smalltalk.Set);
@@ -3690,7 +4465,8 @@ var self=this;
3690
4465
  }
3691
4466
  if(!found) {self['@elements'].push(anObject)}
3692
4467
  ;
3693
- return self;},
4468
+ ;
4469
+ return self},
3694
4470
  args: ["anObject"],
3695
4471
  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>",
3696
4472
  messageSends: [],
@@ -3705,8 +4481,10 @@ selector: "asArray",
3705
4481
  category: 'converting',
3706
4482
  fn: function (){
3707
4483
  var self=this;
3708
- return smalltalk.send(self['@elements'], "_copy", []);
3709
- return self;},
4484
+ var $1;
4485
+ $1=smalltalk.send(self["@elements"],"_copy",[]);
4486
+ return $1;
4487
+ },
3710
4488
  args: [],
3711
4489
  source: "asArray\x0a\x09^elements copy",
3712
4490
  messageSends: ["copy"],
@@ -3719,10 +4497,12 @@ smalltalk.addMethod(
3719
4497
  smalltalk.method({
3720
4498
  selector: "detect:ifNone:",
3721
4499
  category: 'enumerating',
3722
- fn: function (aBlock, anotherBlock){
4500
+ fn: function (aBlock,anotherBlock){
3723
4501
  var self=this;
3724
- return smalltalk.send(self['@elements'], "_detect_ifNone_", [aBlock, anotherBlock]);
3725
- return self;},
4502
+ var $1;
4503
+ $1=smalltalk.send(self["@elements"],"_detect_ifNone_",[aBlock,anotherBlock]);
4504
+ return $1;
4505
+ },
3726
4506
  args: ["aBlock", "anotherBlock"],
3727
4507
  source: "detect: aBlock ifNone: anotherBlock\x0a\x09^elements detect: aBlock ifNone: anotherBlock",
3728
4508
  messageSends: ["detect:ifNone:"],
@@ -3737,8 +4517,8 @@ selector: "do:",
3737
4517
  category: 'enumerating',
3738
4518
  fn: function (aBlock){
3739
4519
  var self=this;
3740
- smalltalk.send(self['@elements'], "_do_", [aBlock]);
3741
- return self;},
4520
+ smalltalk.send(self["@elements"],"_do_",[aBlock]);
4521
+ return self},
3742
4522
  args: ["aBlock"],
3743
4523
  source: "do: aBlock\x0a\x09elements do: aBlock",
3744
4524
  messageSends: ["do:"],
@@ -3753,8 +4533,10 @@ selector: "includes:",
3753
4533
  category: 'testing',
3754
4534
  fn: function (anObject){
3755
4535
  var self=this;
3756
- return smalltalk.send(self['@elements'], "_includes_", [anObject]);
3757
- return self;},
4536
+ var $1;
4537
+ $1=smalltalk.send(self["@elements"],"_includes_",[anObject]);
4538
+ return $1;
4539
+ },
3758
4540
  args: ["anObject"],
3759
4541
  source: "includes: anObject\x0a\x09^elements includes: anObject",
3760
4542
  messageSends: ["includes:"],
@@ -3769,9 +4551,9 @@ selector: "initialize",
3769
4551
  category: 'initialization',
3770
4552
  fn: function (){
3771
4553
  var self=this;
3772
- smalltalk.send(self, "_initialize", [], smalltalk.Set.superclass || nil);
3773
- (self['@elements']=[]);
3774
- return self;},
4554
+ smalltalk.send(self,"_initialize",[],smalltalk.Collection);
4555
+ self["@elements"]=[];
4556
+ return self},
3775
4557
  args: [],
3776
4558
  source: "initialize\x0a\x09super initialize.\x0a\x09elements := #()",
3777
4559
  messageSends: ["initialize"],
@@ -3786,8 +4568,8 @@ selector: "remove:",
3786
4568
  category: 'adding/removing',
3787
4569
  fn: function (anObject){
3788
4570
  var self=this;
3789
- smalltalk.send(self['@elements'], "_remove_", [anObject]);
3790
- return self;},
4571
+ smalltalk.send(self["@elements"],"_remove_",[anObject]);
4572
+ return self},
3791
4573
  args: ["anObject"],
3792
4574
  source: "remove: anObject\x0a\x09elements remove: anObject",
3793
4575
  messageSends: ["remove:"],
@@ -3802,14 +4584,20 @@ selector: "select:",
3802
4584
  category: 'enumerating',
3803
4585
  fn: function (aBlock){
3804
4586
  var self=this;
3805
- var collection=nil;
3806
- (collection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
3807
- smalltalk.send(self, "_do_", [(function(each){return ((($receiver = smalltalk.send(aBlock, "_value_", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(collection, "_add_", [each]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(collection, "_add_", [each]);})]));})]);
4587
+ var $1;
4588
+ 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]);
4594
+ };
4595
+ })]);
3808
4596
  return collection;
3809
- return self;},
4597
+ },
3810
4598
  args: ["aBlock"],
3811
4599
  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",
3812
- messageSends: ["new", "class", "do:", "ifTrue:", "value:", "add:"],
4600
+ messageSends: ["new", "class", "do:", "ifTrue:", "add:", "value:"],
3813
4601
  referencedClasses: []
3814
4602
  }),
3815
4603
  smalltalk.Set);
@@ -3821,8 +4609,10 @@ selector: "size",
3821
4609
  category: 'accessing',
3822
4610
  fn: function (){
3823
4611
  var self=this;
3824
- return smalltalk.send(self['@elements'], "_size", []);
3825
- return self;},
4612
+ var $1;
4613
+ $1=smalltalk.send(self["@elements"],"_size",[]);
4614
+ return $1;
4615
+ },
3826
4616
  args: [],
3827
4617
  source: "size\x0a\x09^elements size",
3828
4618
  messageSends: ["size"],
@@ -3841,7 +4631,8 @@ category: 'evaluating',
3841
4631
  fn: function (aString){
3842
4632
  var self=this;
3843
4633
  return self.compile(aString);
3844
- return self;},
4634
+ ;
4635
+ return self},
3845
4636
  args: ["aString"],
3846
4637
  source: "compile: aString\x0a\x09<return self.compile(aString)>",
3847
4638
  messageSends: [],
@@ -3857,7 +4648,8 @@ category: 'evaluating',
3857
4648
  fn: function (aString){
3858
4649
  var self=this;
3859
4650
  return self.exec(aString) || nil;
3860
- return self;},
4651
+ ;
4652
+ return self},
3861
4653
  args: ["aString"],
3862
4654
  source: "exec: aString\x0a\x09<return self.exec(aString) || nil>",
3863
4655
  messageSends: [],
@@ -3873,7 +4665,8 @@ category: 'evaluating',
3873
4665
  fn: function (aString){
3874
4666
  var self=this;
3875
4667
  return self.test(aString);
3876
- return self;},
4668
+ ;
4669
+ return self},
3877
4670
  args: ["aString"],
3878
4671
  source: "test: aString\x0a\x09<return self.test(aString)>",
3879
4672
  messageSends: [],
@@ -3889,8 +4682,10 @@ selector: "fromString:",
3889
4682
  category: 'instance creation',
3890
4683
  fn: function (aString){
3891
4684
  var self=this;
3892
- return smalltalk.send(self, "_fromString_flag_", [aString, ""]);
3893
- return self;},
4685
+ var $1;
4686
+ $1=smalltalk.send(self,"_fromString_flag_",[aString,""]);
4687
+ return $1;
4688
+ },
3894
4689
  args: ["aString"],
3895
4690
  source: "fromString: aString\x0a\x09 ^self fromString: aString flag: ''",
3896
4691
  messageSends: ["fromString:flag:"],
@@ -3903,10 +4698,11 @@ smalltalk.addMethod(
3903
4698
  smalltalk.method({
3904
4699
  selector: "fromString:flag:",
3905
4700
  category: 'instance creation',
3906
- fn: function (aString, anotherString){
4701
+ fn: function (aString,anotherString){
3907
4702
  var self=this;
3908
4703
  return new RegExp(aString, anotherString);
3909
- return self;},
4704
+ ;
4705
+ return self},
3910
4706
  args: ["aString", "anotherString"],
3911
4707
  source: "fromString: aString flag: anotherString\x0a\x09<return new RegExp(aString, anotherString)>",
3912
4708
  messageSends: [],
@@ -3923,11 +4719,13 @@ selector: "atEnd",
3923
4719
  category: 'testing',
3924
4720
  fn: function (){
3925
4721
  var self=this;
3926
- return smalltalk.send(smalltalk.send(self, "_position", []), "__eq", [smalltalk.send(self, "_size", [])]);
3927
- return self;},
4722
+ var $1;
4723
+ $1=smalltalk.send(smalltalk.send(self,"_position",[]),"__eq",[smalltalk.send(self,"_size",[])]);
4724
+ return $1;
4725
+ },
3928
4726
  args: [],
3929
4727
  source: "atEnd\x0a\x09^self position = self size",
3930
- messageSends: ["=", "position", "size"],
4728
+ messageSends: ["=", "size", "position"],
3931
4729
  referencedClasses: []
3932
4730
  }),
3933
4731
  smalltalk.Stream);
@@ -3939,8 +4737,10 @@ selector: "atStart",
3939
4737
  category: 'testing',
3940
4738
  fn: function (){
3941
4739
  var self=this;
3942
- return smalltalk.send(smalltalk.send(self, "_position", []), "__eq", [(0)]);
3943
- return self;},
4740
+ var $1;
4741
+ $1=smalltalk.send(smalltalk.send(self,"_position",[]),"__eq",[(0)]);
4742
+ return $1;
4743
+ },
3944
4744
  args: [],
3945
4745
  source: "atStart\x0a\x09^self position = 0",
3946
4746
  messageSends: ["=", "position"],
@@ -3955,8 +4755,7 @@ selector: "close",
3955
4755
  category: 'actions',
3956
4756
  fn: function (){
3957
4757
  var self=this;
3958
-
3959
- return self;},
4758
+ return self},
3960
4759
  args: [],
3961
4760
  source: "close",
3962
4761
  messageSends: [],
@@ -3971,8 +4770,8 @@ selector: "collection",
3971
4770
  category: 'accessing',
3972
4771
  fn: function (){
3973
4772
  var self=this;
3974
- return self['@collection'];
3975
- return self;},
4773
+ return self["@collection"];
4774
+ },
3976
4775
  args: [],
3977
4776
  source: "collection\x0a\x09^collection",
3978
4777
  messageSends: [],
@@ -3987,11 +4786,13 @@ selector: "contents",
3987
4786
  category: 'accessing',
3988
4787
  fn: function (){
3989
4788
  var self=this;
3990
- return smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [(1), smalltalk.send(self, "_streamSize", [])]);
3991
- return self;},
4789
+ var $1;
4790
+ $1=smalltalk.send(smalltalk.send(self,"_collection",[]),"_copyFrom_to_",[(1),smalltalk.send(self,"_streamSize",[])]);
4791
+ return $1;
4792
+ },
3992
4793
  args: [],
3993
4794
  source: "contents\x0a\x09^self collection\x0a\x09 copyFrom: 1 \x0a\x09 to: self streamSize",
3994
- messageSends: ["copyFrom:to:", "collection", "streamSize"],
4795
+ messageSends: ["copyFrom:to:", "streamSize", "collection"],
3995
4796
  referencedClasses: []
3996
4797
  }),
3997
4798
  smalltalk.Stream);
@@ -4003,11 +4804,15 @@ selector: "do:",
4003
4804
  category: 'enumerating',
4004
4805
  fn: function (aBlock){
4005
4806
  var self=this;
4006
- (function(){while(!(function(){return smalltalk.send(self, "_atEnd", []);})()) {(function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_next", [])]);})()}})();
4007
- return self;},
4807
+ smalltalk.send((function(){
4808
+ return smalltalk.send(self,"_atEnd",[]);
4809
+ }),"_whileFalse_",[(function(){
4810
+ return smalltalk.send(aBlock,"_value_",[smalltalk.send(self,"_next",[])]);
4811
+ })]);
4812
+ return self},
4008
4813
  args: ["aBlock"],
4009
4814
  source: "do: aBlock\x0a\x09[self atEnd] whileFalse: [aBlock value: self next]",
4010
- messageSends: ["whileFalse:", "atEnd", "value:", "next"],
4815
+ messageSends: ["whileFalse:", "value:", "next", "atEnd"],
4011
4816
  referencedClasses: []
4012
4817
  }),
4013
4818
  smalltalk.Stream);
@@ -4019,8 +4824,7 @@ selector: "flush",
4019
4824
  category: 'actions',
4020
4825
  fn: function (){
4021
4826
  var self=this;
4022
-
4023
- return self;},
4827
+ return self},
4024
4828
  args: [],
4025
4829
  source: "flush",
4026
4830
  messageSends: [],
@@ -4035,8 +4839,10 @@ selector: "isEmpty",
4035
4839
  category: 'testing',
4036
4840
  fn: function (){
4037
4841
  var self=this;
4038
- return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [(0)]);
4039
- return self;},
4842
+ var $1;
4843
+ $1=smalltalk.send(smalltalk.send(self,"_size",[]),"__eq",[(0)]);
4844
+ return $1;
4845
+ },
4040
4846
  args: [],
4041
4847
  source: "isEmpty\x0a\x09^self size = 0",
4042
4848
  messageSends: ["=", "size"],
@@ -4051,11 +4857,19 @@ selector: "next",
4051
4857
  category: 'reading',
4052
4858
  fn: function (){
4053
4859
  var self=this;
4054
- return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return nil;})() : (function(){smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);return smalltalk.send(self['@collection'], "_at_", [smalltalk.send(self, "_position", [])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return nil;}), (function(){smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);return smalltalk.send(self['@collection'], "_at_", [smalltalk.send(self, "_position", [])]);})]));
4055
- return self;},
4860
+ var $2,$1;
4861
+ $2=smalltalk.send(self,"_atEnd",[]);
4862
+ if(smalltalk.assert($2)){
4863
+ $1=nil;
4864
+ } else {
4865
+ smalltalk.send(self,"_position_",[smalltalk.send(smalltalk.send(self,"_position",[]),"__plus",[(1)])]);
4866
+ $1=smalltalk.send(self["@collection"],"_at_",[smalltalk.send(self,"_position",[])]);
4867
+ };
4868
+ return $1;
4869
+ },
4056
4870
  args: [],
4057
4871
  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]",
4058
- messageSends: ["ifTrue:ifFalse:", "atEnd", "position:", "+", "position", "at:"],
4872
+ messageSends: ["ifTrue:ifFalse:", "position:", "+", "position", "at:", "atEnd"],
4059
4873
  referencedClasses: []
4060
4874
  }),
4061
4875
  smalltalk.Stream);
@@ -4067,14 +4881,20 @@ selector: "next:",
4067
4881
  category: 'reading',
4068
4882
  fn: function (anInteger){
4069
4883
  var self=this;
4070
- var tempCollection=nil;
4071
- (tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_class", []), "_new", []));
4072
- smalltalk.send(anInteger, "_timesRepeat_", [(function(){return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(tempCollection, "_add_", [smalltalk.send(self, "_next", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(tempCollection, "_add_", [smalltalk.send(self, "_next", [])]);})]));})]);
4884
+ var $1;
4885
+ var tempCollection;
4886
+ tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self,"_collection",[]),"_class",[]),"_new",[]);
4887
+ smalltalk.send(anInteger,"_timesRepeat_",[(function(){
4888
+ $1=smalltalk.send(self,"_atEnd",[]);
4889
+ if(! smalltalk.assert($1)){
4890
+ return smalltalk.send(tempCollection,"_add_",[smalltalk.send(self,"_next",[])]);
4891
+ };
4892
+ })]);
4073
4893
  return tempCollection;
4074
- return self;},
4894
+ },
4075
4895
  args: ["anInteger"],
4076
4896
  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",
4077
- messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", "add:", "next"],
4897
+ messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "add:", "next", "atEnd"],
4078
4898
  referencedClasses: []
4079
4899
  }),
4080
4900
  smalltalk.Stream);
@@ -4086,10 +4906,10 @@ selector: "nextPut:",
4086
4906
  category: 'writing',
4087
4907
  fn: function (anObject){
4088
4908
  var self=this;
4089
- smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);
4090
- smalltalk.send(smalltalk.send(self, "_collection", []), "_at_put_", [smalltalk.send(self, "_position", []), anObject]);
4091
- smalltalk.send(self, "_setStreamSize_", [smalltalk.send(smalltalk.send(self, "_streamSize", []), "_max_", [smalltalk.send(self, "_position", [])])]);
4092
- return self;},
4909
+ smalltalk.send(self,"_position_",[smalltalk.send(smalltalk.send(self,"_position",[]),"__plus",[(1)])]);
4910
+ smalltalk.send(smalltalk.send(self,"_collection",[]),"_at_put_",[smalltalk.send(self,"_position",[]),anObject]);
4911
+ smalltalk.send(self,"_setStreamSize_",[smalltalk.send(smalltalk.send(self,"_streamSize",[]),"_max_",[smalltalk.send(self,"_position",[])])]);
4912
+ return self},
4093
4913
  args: ["anObject"],
4094
4914
  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)",
4095
4915
  messageSends: ["position:", "+", "position", "at:put:", "collection", "setStreamSize:", "max:", "streamSize"],
@@ -4104,8 +4924,10 @@ selector: "nextPutAll:",
4104
4924
  category: 'writing',
4105
4925
  fn: function (aCollection){
4106
4926
  var self=this;
4107
- smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_nextPut_", [each]);})]);
4108
- return self;},
4927
+ smalltalk.send(aCollection,"_do_",[(function(each){
4928
+ return smalltalk.send(self,"_nextPut_",[each]);
4929
+ })]);
4930
+ return self},
4109
4931
  args: ["aCollection"],
4110
4932
  source: "nextPutAll: aCollection\x0a\x09aCollection do: [:each |\x0a\x09 self nextPut: each]",
4111
4933
  messageSends: ["do:", "nextPut:"],
@@ -4120,11 +4942,16 @@ selector: "peek",
4120
4942
  category: 'reading',
4121
4943
  fn: function (){
4122
4944
  var self=this;
4123
- return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_collection", []), "_at_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(self, "_collection", []), "_at_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);})]));
4124
- return self;},
4945
+ var $2,$1;
4946
+ $2=smalltalk.send(self,"_atEnd",[]);
4947
+ if(! smalltalk.assert($2)){
4948
+ $1=smalltalk.send(smalltalk.send(self,"_collection",[]),"_at_",[smalltalk.send(smalltalk.send(self,"_position",[]),"__plus",[(1)])]);
4949
+ };
4950
+ return $1;
4951
+ },
4125
4952
  args: [],
4126
4953
  source: "peek\x0a\x09^self atEnd ifFalse: [\x0a\x09 self collection at: self position + 1]",
4127
- messageSends: ["ifFalse:", "atEnd", "at:", "collection", "+", "position"],
4954
+ messageSends: ["ifFalse:", "at:", "+", "position", "collection", "atEnd"],
4128
4955
  referencedClasses: []
4129
4956
  }),
4130
4957
  smalltalk.Stream);
@@ -4136,8 +4963,15 @@ selector: "position",
4136
4963
  category: 'accessing',
4137
4964
  fn: function (){
4138
4965
  var self=this;
4139
- return (($receiver = self['@position']) == nil || $receiver == undefined) ? (function(){return (self['@position']=(0));})() : $receiver;
4140
- return self;},
4966
+ var $1;
4967
+ if(($receiver = self["@position"]) == nil || $receiver == undefined){
4968
+ self["@position"]=(0);
4969
+ $1=self["@position"];
4970
+ } else {
4971
+ $1=self["@position"];
4972
+ };
4973
+ return $1;
4974
+ },
4141
4975
  args: [],
4142
4976
  source: "position\x0a\x09^position ifNil: [position := 0]",
4143
4977
  messageSends: ["ifNil:"],
@@ -4152,8 +4986,8 @@ selector: "position:",
4152
4986
  category: 'accessing',
4153
4987
  fn: function (anInteger){
4154
4988
  var self=this;
4155
- (self['@position']=anInteger);
4156
- return self;},
4989
+ self["@position"]=anInteger;
4990
+ return self},
4157
4991
  args: ["anInteger"],
4158
4992
  source: "position: anInteger\x0a\x09position := anInteger",
4159
4993
  messageSends: [],
@@ -4168,8 +5002,8 @@ selector: "reset",
4168
5002
  category: 'actions',
4169
5003
  fn: function (){
4170
5004
  var self=this;
4171
- smalltalk.send(self, "_position_", [(0)]);
4172
- return self;},
5005
+ smalltalk.send(self,"_position_",[(0)]);
5006
+ return self},
4173
5007
  args: [],
4174
5008
  source: "reset\x0a\x09self position: 0",
4175
5009
  messageSends: ["position:"],
@@ -4184,9 +5018,9 @@ selector: "resetContents",
4184
5018
  category: 'actions',
4185
5019
  fn: function (){
4186
5020
  var self=this;
4187
- smalltalk.send(self, "_reset", []);
4188
- smalltalk.send(self, "_setStreamSize_", [(0)]);
4189
- return self;},
5021
+ smalltalk.send(self,"_reset",[]);
5022
+ smalltalk.send(self,"_setStreamSize_",[(0)]);
5023
+ return self},
4190
5024
  args: [],
4191
5025
  source: "resetContents\x0a\x09self reset.\x0a\x09self setStreamSize: 0",
4192
5026
  messageSends: ["reset", "setStreamSize:"],
@@ -4201,8 +5035,8 @@ selector: "setCollection:",
4201
5035
  category: 'accessing',
4202
5036
  fn: function (aCollection){
4203
5037
  var self=this;
4204
- (self['@collection']=aCollection);
4205
- return self;},
5038
+ self["@collection"]=aCollection;
5039
+ return self},
4206
5040
  args: ["aCollection"],
4207
5041
  source: "setCollection: aCollection\x0a\x09collection := aCollection",
4208
5042
  messageSends: [],
@@ -4217,8 +5051,8 @@ selector: "setStreamSize:",
4217
5051
  category: 'accessing',
4218
5052
  fn: function (anInteger){
4219
5053
  var self=this;
4220
- (self['@streamSize']=anInteger);
4221
- return self;},
5054
+ self["@streamSize"]=anInteger;
5055
+ return self},
4222
5056
  args: ["anInteger"],
4223
5057
  source: "setStreamSize: anInteger\x0a\x09streamSize := anInteger",
4224
5058
  messageSends: [],
@@ -4233,8 +5067,8 @@ selector: "setToEnd",
4233
5067
  category: 'positioning',
4234
5068
  fn: function (){
4235
5069
  var self=this;
4236
- smalltalk.send(self, "_position_", [smalltalk.send(self, "_size", [])]);
4237
- return self;},
5070
+ smalltalk.send(self,"_position_",[smalltalk.send(self,"_size",[])]);
5071
+ return self},
4238
5072
  args: [],
4239
5073
  source: "setToEnd\x0a\x09self position: self size",
4240
5074
  messageSends: ["position:", "size"],
@@ -4249,8 +5083,10 @@ selector: "size",
4249
5083
  category: 'accessing',
4250
5084
  fn: function (){
4251
5085
  var self=this;
4252
- return smalltalk.send(self, "_streamSize", []);
4253
- return self;},
5086
+ var $1;
5087
+ $1=smalltalk.send(self,"_streamSize",[]);
5088
+ return $1;
5089
+ },
4254
5090
  args: [],
4255
5091
  source: "size\x0a\x09^self streamSize",
4256
5092
  messageSends: ["streamSize"],
@@ -4265,11 +5101,11 @@ selector: "skip:",
4265
5101
  category: 'positioning',
4266
5102
  fn: function (anInteger){
4267
5103
  var self=this;
4268
- smalltalk.send(self, "_position_", [smalltalk.send(((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +anInteger : smalltalk.send($receiver, "__plus", [anInteger])), "_min_max_", [smalltalk.send(self, "_size", []), (0)])]);
4269
- return self;},
5104
+ smalltalk.send(self,"_position_",[smalltalk.send(smalltalk.send(smalltalk.send(self,"_position",[]),"__plus",[anInteger]),"_min_max_",[smalltalk.send(self,"_size",[]),(0)])]);
5105
+ return self},
4270
5106
  args: ["anInteger"],
4271
5107
  source: "skip: anInteger\x0a\x09self position: ((self position + anInteger) min: self size max: 0)",
4272
- messageSends: ["position:", "min:max:", "+", "position", "size"],
5108
+ messageSends: ["position:", "min:max:", "size", "+", "position"],
4273
5109
  referencedClasses: []
4274
5110
  }),
4275
5111
  smalltalk.Stream);
@@ -4281,8 +5117,8 @@ selector: "streamSize",
4281
5117
  category: 'accessing',
4282
5118
  fn: function (){
4283
5119
  var self=this;
4284
- return self['@streamSize'];
4285
- return self;},
5120
+ return self["@streamSize"];
5121
+ },
4286
5122
  args: [],
4287
5123
  source: "streamSize\x0a\x09^streamSize",
4288
5124
  messageSends: [],
@@ -4298,11 +5134,17 @@ selector: "on:",
4298
5134
  category: 'instance creation',
4299
5135
  fn: function (aCollection){
4300
5136
  var self=this;
4301
- return (function($rec){smalltalk.send($rec, "_setCollection_", [aCollection]);smalltalk.send($rec, "_setStreamSize_", [smalltalk.send(aCollection, "_size", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
4302
- return self;},
5137
+ var $2,$3,$1;
5138
+ $2=smalltalk.send(self,"_new",[]);
5139
+ smalltalk.send($2,"_setCollection_",[aCollection]);
5140
+ smalltalk.send($2,"_setStreamSize_",[smalltalk.send(aCollection,"_size",[])]);
5141
+ $3=smalltalk.send($2,"_yourself",[]);
5142
+ $1=$3;
5143
+ return $1;
5144
+ },
4303
5145
  args: ["aCollection"],
4304
5146
  source: "on: aCollection\x0a\x09 ^self new \x0a\x09\x09setCollection: aCollection;\x0a\x09\x09setStreamSize: aCollection size;\x0a\x09\x09yourself",
4305
- messageSends: ["setCollection:", "setStreamSize:", "size", "yourself", "new"],
5147
+ messageSends: ["setCollection:", "new", "setStreamSize:", "size", "yourself"],
4306
5148
  referencedClasses: []
4307
5149
  }),
4308
5150
  smalltalk.Stream.klass);
@@ -4316,8 +5158,10 @@ selector: "cr",
4316
5158
  category: 'writing',
4317
5159
  fn: function (){
4318
5160
  var self=this;
4319
- return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_cr", [])]);
4320
- return self;},
5161
+ var $1;
5162
+ $1=smalltalk.send(self,"_nextPutAll_",[smalltalk.send((smalltalk.String || String),"_cr",[])]);
5163
+ return $1;
5164
+ },
4321
5165
  args: [],
4322
5166
  source: "cr\x0a\x09^self nextPutAll: String cr",
4323
5167
  messageSends: ["nextPutAll:", "cr"],
@@ -4332,8 +5176,10 @@ selector: "crlf",
4332
5176
  category: 'writing',
4333
5177
  fn: function (){
4334
5178
  var self=this;
4335
- return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_crlf", [])]);
4336
- return self;},
5179
+ var $1;
5180
+ $1=smalltalk.send(self,"_nextPutAll_",[smalltalk.send((smalltalk.String || String),"_crlf",[])]);
5181
+ return $1;
5182
+ },
4337
5183
  args: [],
4338
5184
  source: "crlf\x0a\x09^self nextPutAll: String crlf",
4339
5185
  messageSends: ["nextPutAll:", "crlf"],
@@ -4348,8 +5194,10 @@ selector: "lf",
4348
5194
  category: 'writing',
4349
5195
  fn: function (){
4350
5196
  var self=this;
4351
- return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_lf", [])]);
4352
- return self;},
5197
+ var $1;
5198
+ $1=smalltalk.send(self,"_nextPutAll_",[smalltalk.send((smalltalk.String || String),"_lf",[])]);
5199
+ return $1;
5200
+ },
4353
5201
  args: [],
4354
5202
  source: "lf\x0a\x09^self nextPutAll: String lf",
4355
5203
  messageSends: ["nextPutAll:", "lf"],
@@ -4364,14 +5212,21 @@ selector: "next:",
4364
5212
  category: 'reading',
4365
5213
  fn: function (anInteger){
4366
5214
  var self=this;
4367
- var tempCollection=nil;
4368
- (tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_class", []), "_new", []));
4369
- smalltalk.send(anInteger, "_timesRepeat_", [(function(){return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (tempCollection=smalltalk.send(tempCollection, "__comma", [smalltalk.send(self, "_next", [])]));})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (tempCollection=smalltalk.send(tempCollection, "__comma", [smalltalk.send(self, "_next", [])]));})]));})]);
5215
+ var $1;
5216
+ var tempCollection;
5217
+ tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self,"_collection",[]),"_class",[]),"_new",[]);
5218
+ smalltalk.send(anInteger,"_timesRepeat_",[(function(){
5219
+ $1=smalltalk.send(self,"_atEnd",[]);
5220
+ if(! smalltalk.assert($1)){
5221
+ tempCollection=smalltalk.send(tempCollection,"__comma",[smalltalk.send(self,"_next",[])]);
5222
+ return tempCollection;
5223
+ };
5224
+ })]);
4370
5225
  return tempCollection;
4371
- return self;},
5226
+ },
4372
5227
  args: ["anInteger"],
4373
5228
  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",
4374
- messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", ",", "next"],
5229
+ messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", ",", "next", "atEnd"],
4375
5230
  referencedClasses: []
4376
5231
  }),
4377
5232
  smalltalk.StringStream);
@@ -4383,8 +5238,8 @@ selector: "nextPut:",
4383
5238
  category: 'writing',
4384
5239
  fn: function (aString){
4385
5240
  var self=this;
4386
- smalltalk.send(self, "_nextPutAll_", [aString]);
4387
- return self;},
5241
+ smalltalk.send(self,"_nextPutAll_",[aString]);
5242
+ return self},
4388
5243
  args: ["aString"],
4389
5244
  source: "nextPut: aString\x0a\x09self nextPutAll: aString",
4390
5245
  messageSends: ["nextPutAll:"],
@@ -4399,13 +5254,13 @@ selector: "nextPutAll:",
4399
5254
  category: 'writing',
4400
5255
  fn: function (aString){
4401
5256
  var self=this;
4402
- 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_", [((($receiver = ((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))).klass === smalltalk.Number) ? $receiver +smalltalk.send(aString, "_size", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(aString, "_size", [])])), smalltalk.send(smalltalk.send(self, "_collection", []), "_size", [])])])]);
4403
- smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(aString, "_size", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(aString, "_size", [])]))]);
4404
- smalltalk.send(self, "_setStreamSize_", [smalltalk.send(smalltalk.send(self, "_streamSize", []), "_max_", [smalltalk.send(self, "_position", [])])]);
4405
- return self;},
5257
+ 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",[])])])]);
5258
+ smalltalk.send(self,"_position_",[smalltalk.send(smalltalk.send(self,"_position",[]),"__plus",[smalltalk.send(aString,"_size",[])])]);
5259
+ smalltalk.send(self,"_setStreamSize_",[smalltalk.send(smalltalk.send(self,"_streamSize",[]),"_max_",[smalltalk.send(self,"_position",[])])]);
5260
+ return self},
4406
5261
  args: ["aString"],
4407
5262
  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)",
4408
- messageSends: ["setCollection:", ",", "copyFrom:to:", "collection", "position", "+", "size", "position:", "setStreamSize:", "max:", "streamSize"],
5263
+ messageSends: ["setCollection:", ",", "copyFrom:to:", "+", "size", "position", "collection", "position:", "setStreamSize:", "max:", "streamSize"],
4409
5264
  referencedClasses: []
4410
5265
  }),
4411
5266
  smalltalk.StringStream);
@@ -4417,8 +5272,8 @@ selector: "space",
4417
5272
  category: 'writing',
4418
5273
  fn: function (){
4419
5274
  var self=this;
4420
- smalltalk.send(self, "_nextPut_", [" "]);
4421
- return self;},
5275
+ smalltalk.send(self,"_nextPut_",[" "]);
5276
+ return self},
4422
5277
  args: [],
4423
5278
  source: "space\x0a\x09self nextPut: ' '",
4424
5279
  messageSends: ["nextPut:"],