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
@@ -6,10 +6,12 @@ smalltalk.addMethod(
6
6
  smalltalk.method({
7
7
  selector: "->",
8
8
  category: 'converting',
9
- fn: function (anObject){
10
- var self=this;
11
- return smalltalk.send((smalltalk.Association || Association), "_key_value_", [self, anObject]);
12
- return self;},
9
+ fn: function (anObject) {
10
+ var self = this;
11
+ var $1;
12
+ $1 = smalltalk.send(smalltalk.Association || Association, "_key_value_", [self, anObject]);
13
+ return $1;
14
+ },
13
15
  args: ["anObject"],
14
16
  source: "-> anObject\x0a\x09^Association key: self value: anObject",
15
17
  messageSends: ["key:value:"],
@@ -22,10 +24,12 @@ smalltalk.addMethod(
22
24
  smalltalk.method({
23
25
  selector: "=",
24
26
  category: 'comparing',
25
- fn: function (anObject){
26
- var self=this;
27
- return smalltalk.send(self, "__eq_eq", [anObject]);
28
- return self;},
27
+ fn: function (anObject) {
28
+ var self = this;
29
+ var $1;
30
+ $1 = smalltalk.send(self, "__eq_eq", [anObject]);
31
+ return $1;
32
+ },
29
33
  args: ["anObject"],
30
34
  source: "= anObject\x0a\x09^self == anObject",
31
35
  messageSends: ["=="],
@@ -38,10 +42,12 @@ smalltalk.addMethod(
38
42
  smalltalk.method({
39
43
  selector: "==",
40
44
  category: 'comparing',
41
- fn: function (anObject){
42
- var self=this;
43
- return smalltalk.send(smalltalk.send(self, "_identityHash", []), "__eq", [smalltalk.send(anObject, "_identityHash", [])]);
44
- return self;},
45
+ fn: function (anObject) {
46
+ var self = this;
47
+ var $1;
48
+ $1 = smalltalk.send(smalltalk.send(self, "_identityHash", []), "__eq", [smalltalk.send(anObject, "_identityHash", [])]);
49
+ return $1;
50
+ },
45
51
  args: ["anObject"],
46
52
  source: "== anObject\x0a\x09^self identityHash = anObject identityHash",
47
53
  messageSends: ["=", "identityHash"],
@@ -54,16 +60,16 @@ smalltalk.addMethod(
54
60
  smalltalk.method({
55
61
  selector: "asJSON",
56
62
  category: 'converting',
57
- fn: function (){
58
- var self=this;
59
- var variables=nil;
60
- (variables=smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_new", []));
61
- smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_allInstanceVariableNames", []), "_do_", [(function(each){return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(smalltalk.send(self, "_instVarAt_", [each]), "_asJSON", [])]);})]);
62
- return variables;
63
- return self;},
63
+ fn: function () {
64
+ var self = this;
65
+ var variables;
66
+ variables = smalltalk.send(smalltalk.HashedCollection || HashedCollection, "_new", []);
67
+ smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_allInstanceVariableNames", []), "_do_", [function (each) {return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(smalltalk.send(self, "_instVarAt_", [each]), "_asJSON", [])]);}]);
68
+ return variables;
69
+ },
64
70
  args: [],
65
71
  source: "asJSON\x0a\x09| variables |\x0a\x09variables := HashedCollection new.\x0a\x09self class allInstanceVariableNames do: [:each |\x0a\x09\x09variables at: each put: (self instVarAt: each) asJSON].\x0a\x09^variables",
66
- messageSends: ["new", "do:", "allInstanceVariableNames", "class", "at:put:", "asJSON", "instVarAt:"],
72
+ messageSends: ["new", "do:", "at:put:", "asJSON", "instVarAt:", "allInstanceVariableNames", "class"],
67
73
  referencedClasses: ["HashedCollection"]
68
74
  }),
69
75
  smalltalk.Object);
@@ -73,10 +79,12 @@ smalltalk.addMethod(
73
79
  smalltalk.method({
74
80
  selector: "asJSONString",
75
81
  category: 'converting',
76
- fn: function (){
77
- var self=this;
78
- return smalltalk.send((smalltalk.JSON || JSON), "_stringify_", [smalltalk.send(self, "_asJSON", [])]);
79
- return self;},
82
+ fn: function () {
83
+ var self = this;
84
+ var $1;
85
+ $1 = smalltalk.send(smalltalk.JSON || JSON, "_stringify_", [smalltalk.send(self, "_asJSON", [])]);
86
+ return $1;
87
+ },
80
88
  args: [],
81
89
  source: "asJSONString\x0a\x09^JSON stringify: self asJSON",
82
90
  messageSends: ["stringify:", "asJSON"],
@@ -89,10 +97,12 @@ smalltalk.addMethod(
89
97
  smalltalk.method({
90
98
  selector: "asJavascript",
91
99
  category: 'converting',
92
- fn: function (){
93
- var self=this;
94
- return smalltalk.send(self, "_asString", []);
95
- return self;},
100
+ fn: function () {
101
+ var self = this;
102
+ var $1;
103
+ $1 = smalltalk.send(self, "_asString", []);
104
+ return $1;
105
+ },
96
106
  args: [],
97
107
  source: "asJavascript\x0a\x09^self asString",
98
108
  messageSends: ["asString"],
@@ -105,10 +115,12 @@ smalltalk.addMethod(
105
115
  smalltalk.method({
106
116
  selector: "asString",
107
117
  category: 'converting',
108
- fn: function (){
109
- var self=this;
110
- return smalltalk.send(self, "_printString", []);
111
- return self;},
118
+ fn: function () {
119
+ var self = this;
120
+ var $1;
121
+ $1 = smalltalk.send(self, "_printString", []);
122
+ return $1;
123
+ },
112
124
  args: [],
113
125
  source: "asString\x0a\x09^self printString",
114
126
  messageSends: ["printString"],
@@ -121,10 +133,11 @@ smalltalk.addMethod(
121
133
  smalltalk.method({
122
134
  selector: "basicAt:",
123
135
  category: 'accessing',
124
- fn: function (aString){
125
- var self=this;
126
- return self[aString];
127
- return self;},
136
+ fn: function (aString) {
137
+ var self = this;
138
+ return self[aString];
139
+ return self;
140
+ },
128
141
  args: ["aString"],
129
142
  source: "basicAt: aString\x0a\x09<return self[aString]>",
130
143
  messageSends: [],
@@ -137,10 +150,11 @@ smalltalk.addMethod(
137
150
  smalltalk.method({
138
151
  selector: "basicAt:put:",
139
152
  category: 'accessing',
140
- fn: function (aString, anObject){
141
- var self=this;
142
- return self[aString] = anObject;
143
- return self;},
153
+ fn: function (aString, anObject) {
154
+ var self = this;
155
+ return self[aString] = anObject;
156
+ return self;
157
+ },
144
158
  args: ["aString", "anObject"],
145
159
  source: "basicAt: aString put: anObject\x0a\x09<return self[aString] = anObject>",
146
160
  messageSends: [],
@@ -153,10 +167,12 @@ smalltalk.addMethod(
153
167
  smalltalk.method({
154
168
  selector: "basicDelete:",
155
169
  category: 'accessing',
156
- fn: function (aString){
157
- var self=this;
158
- delete self[aString]; return aString;
159
- return self;},
170
+ fn: function (aString) {
171
+ var self = this;
172
+ delete self[aString];
173
+ return aString;
174
+ return self;
175
+ },
160
176
  args: ["aString"],
161
177
  source: "basicDelete: aString\x0a <delete self[aString]; return aString>",
162
178
  messageSends: [],
@@ -169,10 +185,12 @@ smalltalk.addMethod(
169
185
  smalltalk.method({
170
186
  selector: "basicPerform:",
171
187
  category: 'message handling',
172
- fn: function (aSymbol){
173
- var self=this;
174
- return smalltalk.send(self, "_basicPerform_withArguments_", [aSymbol, []]);
175
- return self;},
188
+ fn: function (aSymbol) {
189
+ var self = this;
190
+ var $1;
191
+ $1 = smalltalk.send(self, "_basicPerform_withArguments_", [aSymbol, []]);
192
+ return $1;
193
+ },
176
194
  args: ["aSymbol"],
177
195
  source: "basicPerform: aSymbol \x0a\x09^self basicPerform: aSymbol withArguments: #()",
178
196
  messageSends: ["basicPerform:withArguments:"],
@@ -185,10 +203,11 @@ smalltalk.addMethod(
185
203
  smalltalk.method({
186
204
  selector: "basicPerform:withArguments:",
187
205
  category: 'message handling',
188
- fn: function (aSymbol, aCollection){
189
- var self=this;
190
- return self[aSymbol].apply(self, aCollection);;
191
- return self;},
206
+ fn: function (aSymbol, aCollection) {
207
+ var self = this;
208
+ return self[aSymbol].apply(self, aCollection);
209
+ return self;
210
+ },
192
211
  args: ["aSymbol", "aCollection"],
193
212
  source: "basicPerform: aSymbol withArguments: aCollection\x0a\x09<return self[aSymbol].apply(self, aCollection);>",
194
213
  messageSends: [],
@@ -201,10 +220,11 @@ smalltalk.addMethod(
201
220
  smalltalk.method({
202
221
  selector: "class",
203
222
  category: 'accessing',
204
- fn: function (){
205
- var self=this;
206
- return self.klass;
207
- return self;},
223
+ fn: function () {
224
+ var self = this;
225
+ return self.klass;
226
+ return self;
227
+ },
208
228
  args: [],
209
229
  source: "class\x0a\x09<return self.klass>",
210
230
  messageSends: [],
@@ -217,10 +237,12 @@ smalltalk.addMethod(
217
237
  smalltalk.method({
218
238
  selector: "copy",
219
239
  category: 'copying',
220
- fn: function (){
221
- var self=this;
222
- return smalltalk.send(smalltalk.send(self, "_shallowCopy", []), "_postCopy", []);
223
- return self;},
240
+ fn: function () {
241
+ var self = this;
242
+ var $1;
243
+ $1 = smalltalk.send(smalltalk.send(self, "_shallowCopy", []), "_postCopy", []);
244
+ return $1;
245
+ },
224
246
  args: [],
225
247
  source: "copy\x0a\x09^self shallowCopy postCopy",
226
248
  messageSends: ["postCopy", "shallowCopy"],
@@ -233,18 +255,17 @@ smalltalk.addMethod(
233
255
  smalltalk.method({
234
256
  selector: "deepCopy",
235
257
  category: 'copying',
236
- fn: function (){
237
- var self=this;
238
-
239
- var copy = self.klass._new();
240
- for(var i in self) {
241
- if(/^@.+/.test(i)) {
242
- copy[i] = self[i]._deepCopy();
243
- }
244
- }
245
- return copy;
246
- ;
247
- return self;},
258
+ fn: function () {
259
+ var self = this;
260
+ var copy = self.klass._new();
261
+ for (var i in self) {
262
+ if (/^@.+/.test(i)) {
263
+ copy[i] = self[i]._deepCopy();
264
+ }
265
+ }
266
+ return copy;
267
+ return self;
268
+ },
248
269
  args: [],
249
270
  source: "deepCopy\x0a\x09< \x0a\x09 var copy = self.klass._new();\x0a\x09 for(var i in self) {\x0a\x09\x09if(/^@.+/.test(i)) {\x0a\x09\x09 copy[i] = self[i]._deepCopy();\x0a\x09\x09}\x0a\x09 }\x0a\x09 return copy;\x0a\x09>",
250
271
  messageSends: [],
@@ -257,10 +278,11 @@ smalltalk.addMethod(
257
278
  smalltalk.method({
258
279
  selector: "deprecatedAPI",
259
280
  category: 'error handling',
260
- fn: function (){
261
- var self=this;
262
- smalltalk.send((typeof console == 'undefined' ? nil : console), "_warn_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.getThisContext()), "_home", []), "_asString", []), "__comma", [" is deprecated! (in "]), "__comma", [smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.getThisContext()), "_home", []), "_home", []), "_asString", [])]), "__comma", [")"])]);
263
- return self;},
281
+ fn: function () {
282
+ var self = this;
283
+ smalltalk.send(console, "_warn_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(thisContext, "_home", []), "_asString", []), "__comma", [" is deprecated! (in "]), "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(thisContext, "_home", []), "_home", []), "_asString", [])]), "__comma", [")"])]);
284
+ return self;
285
+ },
264
286
  args: [],
265
287
  source: "deprecatedAPI\x0a\x09\x22Just a simple way to deprecate methods.\x0a\x09#deprecatedAPI is in the 'error handling' protocol even if it doesn't throw an error,\x0a\x09but it could in the future.\x22\x0a\x09console warn: thisContext home asString, ' is deprecated! (in ', thisContext home home asString, ')'",
266
288
  messageSends: ["warn:", ",", "asString", "home"],
@@ -273,13 +295,18 @@ smalltalk.addMethod(
273
295
  smalltalk.method({
274
296
  selector: "doesNotUnderstand:",
275
297
  category: 'error handling',
276
- fn: function (aMessage){
277
- var self=this;
278
- (function($rec){smalltalk.send($rec, "_receiver_", [self]);smalltalk.send($rec, "_message_", [aMessage]);return smalltalk.send($rec, "_signal", []);})(smalltalk.send((smalltalk.MessageNotUnderstood || MessageNotUnderstood), "_new", []));
279
- return self;},
298
+ fn: function (aMessage) {
299
+ var self = this;
300
+ var $1, $2;
301
+ $1 = smalltalk.send(smalltalk.MessageNotUnderstood || MessageNotUnderstood, "_new", []);
302
+ smalltalk.send($1, "_receiver_", [self]);
303
+ smalltalk.send($1, "_message_", [aMessage]);
304
+ $2 = smalltalk.send($1, "_signal", []);
305
+ return self;
306
+ },
280
307
  args: ["aMessage"],
281
308
  source: "doesNotUnderstand: aMessage\x0a\x09MessageNotUnderstood new\x0a\x09\x09receiver: self;\x0a\x09\x09message: aMessage;\x0a\x09\x09signal",
282
- messageSends: ["receiver:", "message:", "signal", "new"],
309
+ messageSends: ["receiver:", "new", "message:", "signal"],
283
310
  referencedClasses: ["MessageNotUnderstood"]
284
311
  }),
285
312
  smalltalk.Object);
@@ -289,10 +316,11 @@ smalltalk.addMethod(
289
316
  smalltalk.method({
290
317
  selector: "error:",
291
318
  category: 'error handling',
292
- fn: function (aString){
293
- var self=this;
294
- smalltalk.send((smalltalk.Error || Error), "_signal_", [aString]);
295
- return self;},
319
+ fn: function (aString) {
320
+ var self = this;
321
+ smalltalk.send(smalltalk.Error || Error, "_signal_", [aString]);
322
+ return self;
323
+ },
296
324
  args: ["aString"],
297
325
  source: "error: aString\x0a\x09Error signal: aString",
298
326
  messageSends: ["signal:"],
@@ -305,10 +333,11 @@ smalltalk.addMethod(
305
333
  smalltalk.method({
306
334
  selector: "halt",
307
335
  category: 'error handling',
308
- fn: function (){
309
- var self=this;
310
- smalltalk.send(self, "_error_", ["Halt encountered"]);
311
- return self;},
336
+ fn: function () {
337
+ var self = this;
338
+ smalltalk.send(self, "_error_", ["Halt encountered"]);
339
+ return self;
340
+ },
312
341
  args: [],
313
342
  source: "halt\x0a\x09self error: 'Halt encountered'",
314
343
  messageSends: ["error:"],
@@ -321,16 +350,17 @@ smalltalk.addMethod(
321
350
  smalltalk.method({
322
351
  selector: "identityHash",
323
352
  category: 'accessing',
324
- fn: function (){
325
- var self=this;
326
-
327
- var hash=self.identityHash;
328
- if (hash) return hash;
329
- hash=smalltalk.nextId();
330
- Object.defineProperty(self, 'identityHash', {value:hash});
331
- return hash;
332
- ;
333
- return self;},
353
+ fn: function () {
354
+ var self = this;
355
+ var hash = self.identityHash;
356
+ if (hash) {
357
+ return hash;
358
+ }
359
+ hash = smalltalk.nextId();
360
+ Object.defineProperty(self, "identityHash", {value: hash});
361
+ return hash;
362
+ return self;
363
+ },
334
364
  args: [],
335
365
  source: "identityHash\x0a\x09<\x0a\x09var hash=self.identityHash;\x0a\x09if (hash) return hash;\x0a\x09hash=smalltalk.nextId();\x0a\x09Object.defineProperty(self, 'identityHash', {value:hash});\x0a\x09return hash;\x0a\x09>",
336
366
  messageSends: [],
@@ -343,10 +373,10 @@ smalltalk.addMethod(
343
373
  smalltalk.method({
344
374
  selector: "ifNil:",
345
375
  category: 'testing',
346
- fn: function (aBlock){
347
- var self=this;
348
- return self;
349
- return self;},
376
+ fn: function (aBlock) {
377
+ var self = this;
378
+ return self;
379
+ },
350
380
  args: ["aBlock"],
351
381
  source: "ifNil: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^self",
352
382
  messageSends: [],
@@ -359,10 +389,12 @@ smalltalk.addMethod(
359
389
  smalltalk.method({
360
390
  selector: "ifNil:ifNotNil:",
361
391
  category: 'testing',
362
- fn: function (aBlock, anotherBlock){
363
- var self=this;
364
- return smalltalk.send(anotherBlock, "_value", []);
365
- return self;},
392
+ fn: function (aBlock, anotherBlock) {
393
+ var self = this;
394
+ var $1;
395
+ $1 = smalltalk.send(anotherBlock, "_value", []);
396
+ return $1;
397
+ },
366
398
  args: ["aBlock", "anotherBlock"],
367
399
  source: "ifNil: aBlock ifNotNil: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^anotherBlock value",
368
400
  messageSends: ["value"],
@@ -375,10 +407,12 @@ smalltalk.addMethod(
375
407
  smalltalk.method({
376
408
  selector: "ifNotNil:",
377
409
  category: 'testing',
378
- fn: function (aBlock){
379
- var self=this;
380
- return smalltalk.send(aBlock, "_value", []);
381
- return self;},
410
+ fn: function (aBlock) {
411
+ var self = this;
412
+ var $1;
413
+ $1 = smalltalk.send(aBlock, "_value", []);
414
+ return $1;
415
+ },
382
416
  args: ["aBlock"],
383
417
  source: "ifNotNil: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^aBlock value",
384
418
  messageSends: ["value"],
@@ -391,10 +425,12 @@ smalltalk.addMethod(
391
425
  smalltalk.method({
392
426
  selector: "ifNotNil:ifNil:",
393
427
  category: 'testing',
394
- fn: function (aBlock, anotherBlock){
395
- var self=this;
396
- return smalltalk.send(aBlock, "_value", []);
397
- return self;},
428
+ fn: function (aBlock, anotherBlock) {
429
+ var self = this;
430
+ var $1;
431
+ $1 = smalltalk.send(aBlock, "_value", []);
432
+ return $1;
433
+ },
398
434
  args: ["aBlock", "anotherBlock"],
399
435
  source: "ifNotNil: aBlock ifNil: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^aBlock value",
400
436
  messageSends: ["value"],
@@ -407,10 +443,10 @@ smalltalk.addMethod(
407
443
  smalltalk.method({
408
444
  selector: "initialize",
409
445
  category: 'initialization',
410
- fn: function (){
411
- var self=this;
412
-
413
- return self;},
446
+ fn: function () {
447
+ var self = this;
448
+ return self;
449
+ },
414
450
  args: [],
415
451
  source: "initialize",
416
452
  messageSends: [],
@@ -423,12 +459,13 @@ smalltalk.addMethod(
423
459
  smalltalk.method({
424
460
  selector: "instVarAt:",
425
461
  category: 'accessing',
426
- fn: function (aSymbol){
427
- var self=this;
428
- var varname=nil;
429
- (varname=smalltalk.send(aSymbol, "_asString", []));
430
- return self['@'+varname];
431
- return self;},
462
+ fn: function (aSymbol) {
463
+ var self = this;
464
+ var varname;
465
+ varname = smalltalk.send(aSymbol, "_asString", []);
466
+ return self["@" + varname];
467
+ return self;
468
+ },
432
469
  args: ["aSymbol"],
433
470
  source: "instVarAt: aSymbol\x0a\x09| varname |\x0a\x09varname := aSymbol asString.\x0a\x09<return self['@'+varname]>",
434
471
  messageSends: ["asString"],
@@ -441,12 +478,13 @@ smalltalk.addMethod(
441
478
  smalltalk.method({
442
479
  selector: "instVarAt:put:",
443
480
  category: 'accessing',
444
- fn: function (aSymbol, anObject){
445
- var self=this;
446
- var varname=nil;
447
- (varname=smalltalk.send(aSymbol, "_asString", []));
448
- self['@' + varname] = anObject;
449
- return self;},
481
+ fn: function (aSymbol, anObject) {
482
+ var self = this;
483
+ var varname;
484
+ varname = smalltalk.send(aSymbol, "_asString", []);
485
+ self["@" + varname] = anObject;
486
+ return self;
487
+ },
450
488
  args: ["aSymbol", "anObject"],
451
489
  source: "instVarAt: aSymbol put: anObject\x0a\x09| varname |\x0a\x09varname := aSymbol asString.\x0a\x09<self['@' + varname] = anObject>",
452
490
  messageSends: ["asString"],
@@ -459,10 +497,10 @@ smalltalk.addMethod(
459
497
  smalltalk.method({
460
498
  selector: "isClass",
461
499
  category: 'testing',
462
- fn: function (){
463
- var self=this;
464
- return false;
465
- return self;},
500
+ fn: function () {
501
+ var self = this;
502
+ return false;
503
+ },
466
504
  args: [],
467
505
  source: "isClass\x0a\x09^false",
468
506
  messageSends: [],
@@ -475,13 +513,20 @@ smalltalk.addMethod(
475
513
  smalltalk.method({
476
514
  selector: "isKindOf:",
477
515
  category: 'testing',
478
- fn: function (aClass){
479
- var self=this;
480
- return ((($receiver = smalltalk.send(self, "_isMemberOf_", [aClass])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return true;})() : (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_inheritsFrom_", [aClass]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return true;}), (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_inheritsFrom_", [aClass]);})]));
481
- return self;},
516
+ fn: function (aClass) {
517
+ var self = this;
518
+ var $2, $1;
519
+ $2 = smalltalk.send(self, "_isMemberOf_", [aClass]);
520
+ if (smalltalk.assert($2)) {
521
+ $1 = true;
522
+ } else {
523
+ $1 = smalltalk.send(smalltalk.send(self, "_class", []), "_inheritsFrom_", [aClass]);
524
+ }
525
+ return $1;
526
+ },
482
527
  args: ["aClass"],
483
528
  source: "isKindOf: aClass\x0a\x09^(self isMemberOf: aClass)\x0a\x09 ifTrue: [true]\x0a\x09 ifFalse: [self class inheritsFrom: aClass]",
484
- messageSends: ["ifTrue:ifFalse:", "isMemberOf:", "inheritsFrom:", "class"],
529
+ messageSends: ["ifTrue:ifFalse:", "inheritsFrom:", "class", "isMemberOf:"],
485
530
  referencedClasses: []
486
531
  }),
487
532
  smalltalk.Object);
@@ -491,10 +536,12 @@ smalltalk.addMethod(
491
536
  smalltalk.method({
492
537
  selector: "isMemberOf:",
493
538
  category: 'testing',
494
- fn: function (aClass){
495
- var self=this;
496
- return smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [aClass]);
497
- return self;},
539
+ fn: function (aClass) {
540
+ var self = this;
541
+ var $1;
542
+ $1 = smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [aClass]);
543
+ return $1;
544
+ },
498
545
  args: ["aClass"],
499
546
  source: "isMemberOf: aClass\x0a\x09^self class = aClass",
500
547
  messageSends: ["=", "class"],
@@ -507,10 +554,10 @@ smalltalk.addMethod(
507
554
  smalltalk.method({
508
555
  selector: "isMetaclass",
509
556
  category: 'testing',
510
- fn: function (){
511
- var self=this;
512
- return false;
513
- return self;},
557
+ fn: function () {
558
+ var self = this;
559
+ return false;
560
+ },
514
561
  args: [],
515
562
  source: "isMetaclass\x0a\x09^false",
516
563
  messageSends: [],
@@ -523,10 +570,10 @@ smalltalk.addMethod(
523
570
  smalltalk.method({
524
571
  selector: "isNil",
525
572
  category: 'testing',
526
- fn: function (){
527
- var self=this;
528
- return false;
529
- return self;},
573
+ fn: function () {
574
+ var self = this;
575
+ return false;
576
+ },
530
577
  args: [],
531
578
  source: "isNil\x0a\x09^false",
532
579
  messageSends: [],
@@ -539,10 +586,10 @@ smalltalk.addMethod(
539
586
  smalltalk.method({
540
587
  selector: "isNumber",
541
588
  category: 'testing',
542
- fn: function (){
543
- var self=this;
544
- return false;
545
- return self;},
589
+ fn: function () {
590
+ var self = this;
591
+ return false;
592
+ },
546
593
  args: [],
547
594
  source: "isNumber\x0a\x09^false",
548
595
  messageSends: [],
@@ -555,10 +602,10 @@ smalltalk.addMethod(
555
602
  smalltalk.method({
556
603
  selector: "isParseFailure",
557
604
  category: 'testing',
558
- fn: function (){
559
- var self=this;
560
- return false;
561
- return self;},
605
+ fn: function () {
606
+ var self = this;
607
+ return false;
608
+ },
562
609
  args: [],
563
610
  source: "isParseFailure\x0a\x09^false",
564
611
  messageSends: [],
@@ -571,10 +618,10 @@ smalltalk.addMethod(
571
618
  smalltalk.method({
572
619
  selector: "isString",
573
620
  category: 'testing',
574
- fn: function (){
575
- var self=this;
576
- return false;
577
- return self;},
621
+ fn: function () {
622
+ var self = this;
623
+ return false;
624
+ },
578
625
  args: [],
579
626
  source: "isString\x0a\x09^false",
580
627
  messageSends: [],
@@ -587,10 +634,10 @@ smalltalk.addMethod(
587
634
  smalltalk.method({
588
635
  selector: "isSymbol",
589
636
  category: 'testing',
590
- fn: function (){
591
- var self=this;
592
- return false;
593
- return self;},
637
+ fn: function () {
638
+ var self = this;
639
+ return false;
640
+ },
594
641
  args: [],
595
642
  source: "isSymbol\x0a\x09^false",
596
643
  messageSends: [],
@@ -603,12 +650,12 @@ smalltalk.addMethod(
603
650
  smalltalk.method({
604
651
  selector: "log:block:",
605
652
  category: 'printing',
606
- fn: function (aString, aBlock){
607
- var self=this;
608
- var result=nil;
609
- smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [smalltalk.send(smalltalk.send(aString, "__comma", [" time: "]), "__comma", [smalltalk.send(smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [(function(){return (result=smalltalk.send(aBlock, "_value", []));})]), "_printString", [])])]);
610
- return result;
611
- return self;},
653
+ fn: function (aString, aBlock) {
654
+ var self = this;
655
+ var result;
656
+ smalltalk.send(console, "_log_", [smalltalk.send(smalltalk.send(aString, "__comma", [" time: "]), "__comma", [smalltalk.send(smalltalk.send(smalltalk.Date || Date, "_millisecondsToRun_", [function () {result = smalltalk.send(aBlock, "_value", []);return result;}]), "_printString", [])])]);
657
+ return result;
658
+ },
612
659
  args: ["aString", "aBlock"],
613
660
  source: "log: aString block: aBlock\x0a\x0a\x09| result |\x0a\x09console log: aString, ' time: ', (Date millisecondsToRun: [result := aBlock value]) printString.\x0a\x09^result",
614
661
  messageSends: ["log:", ",", "printString", "millisecondsToRun:", "value"],
@@ -621,10 +668,12 @@ smalltalk.addMethod(
621
668
  smalltalk.method({
622
669
  selector: "notNil",
623
670
  category: 'testing',
624
- fn: function (){
625
- var self=this;
626
- return smalltalk.send(smalltalk.send(self, "_isNil", []), "_not", []);
627
- return self;},
671
+ fn: function () {
672
+ var self = this;
673
+ var $1;
674
+ $1 = smalltalk.send(smalltalk.send(self, "_isNil", []), "_not", []);
675
+ return $1;
676
+ },
628
677
  args: [],
629
678
  source: "notNil\x0a\x09^self isNil not",
630
679
  messageSends: ["not", "isNil"],
@@ -637,10 +686,12 @@ smalltalk.addMethod(
637
686
  smalltalk.method({
638
687
  selector: "perform:",
639
688
  category: 'message handling',
640
- fn: function (aSymbol){
641
- var self=this;
642
- return smalltalk.send(self, "_perform_withArguments_", [aSymbol, []]);
643
- return self;},
689
+ fn: function (aSymbol) {
690
+ var self = this;
691
+ var $1;
692
+ $1 = smalltalk.send(self, "_perform_withArguments_", [aSymbol, []]);
693
+ return $1;
694
+ },
644
695
  args: ["aSymbol"],
645
696
  source: "perform: aSymbol\x0a\x09^self perform: aSymbol withArguments: #()",
646
697
  messageSends: ["perform:withArguments:"],
@@ -653,12 +704,13 @@ smalltalk.addMethod(
653
704
  smalltalk.method({
654
705
  selector: "perform:withArguments:",
655
706
  category: 'message handling',
656
- fn: function (aSymbol, aCollection){
657
- var self=this;
658
- var selector=nil;
659
- (selector=smalltalk.send(aSymbol, "_asSelector", []));
660
- return smalltalk.send(self, selector, aCollection);
661
- return self;},
707
+ fn: function (aSymbol, aCollection) {
708
+ var self = this;
709
+ var selector;
710
+ selector = smalltalk.send(aSymbol, "_asSelector", []);
711
+ return smalltalk.send(self, selector, aCollection);
712
+ return self;
713
+ },
662
714
  args: ["aSymbol", "aCollection"],
663
715
  source: "perform: aSymbol withArguments: aCollection\x0a\x09| selector |\x0a\x09selector := aSymbol asSelector.\x0a\x09<return smalltalk.send(self, selector, aCollection)>",
664
716
  messageSends: ["asSelector"],
@@ -671,10 +723,10 @@ smalltalk.addMethod(
671
723
  smalltalk.method({
672
724
  selector: "postCopy",
673
725
  category: 'copying',
674
- fn: function (){
675
- var self=this;
676
-
677
- return self;},
726
+ fn: function () {
727
+ var self = this;
728
+ return self;
729
+ },
678
730
  args: [],
679
731
  source: "postCopy",
680
732
  messageSends: [],
@@ -687,10 +739,11 @@ smalltalk.addMethod(
687
739
  smalltalk.method({
688
740
  selector: "printNl",
689
741
  category: 'printing',
690
- fn: function (){
691
- var self=this;
692
- console.log(self);
693
- return self;},
742
+ fn: function () {
743
+ var self = this;
744
+ console.log(self);
745
+ return self;
746
+ },
694
747
  args: [],
695
748
  source: "printNl\x0a\x09<console.log(self)>",
696
749
  messageSends: [],
@@ -703,10 +756,12 @@ smalltalk.addMethod(
703
756
  smalltalk.method({
704
757
  selector: "printString",
705
758
  category: 'printing',
706
- fn: function (){
707
- var self=this;
708
- return smalltalk.send("a ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])]);
709
- return self;},
759
+ fn: function () {
760
+ var self = this;
761
+ var $1;
762
+ $1 = smalltalk.send("a ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])]);
763
+ return $1;
764
+ },
710
765
  args: [],
711
766
  source: "printString\x0a\x09^'a ', self class name",
712
767
  messageSends: [",", "name", "class"],
@@ -719,10 +774,12 @@ smalltalk.addMethod(
719
774
  smalltalk.method({
720
775
  selector: "respondsTo:",
721
776
  category: 'testing',
722
- fn: function (aSelector){
723
- var self=this;
724
- return smalltalk.send(smalltalk.send(self, "_class", []), "_canUnderstand_", [aSelector]);
725
- return self;},
777
+ fn: function (aSelector) {
778
+ var self = this;
779
+ var $1;
780
+ $1 = smalltalk.send(smalltalk.send(self, "_class", []), "_canUnderstand_", [aSelector]);
781
+ return $1;
782
+ },
726
783
  args: ["aSelector"],
727
784
  source: "respondsTo: aSelector\x0a\x09^self class canUnderstand: aSelector",
728
785
  messageSends: ["canUnderstand:", "class"],
@@ -735,18 +792,17 @@ smalltalk.addMethod(
735
792
  smalltalk.method({
736
793
  selector: "shallowCopy",
737
794
  category: 'copying',
738
- fn: function (){
739
- var self=this;
740
-
741
- var copy = self.klass._new();
742
- for(var i in self) {
743
- if(/^@.+/.test(i)) {
744
- copy[i] = self[i];
745
- }
746
- }
747
- return copy;
748
- ;
749
- return self;},
795
+ fn: function () {
796
+ var self = this;
797
+ var copy = self.klass._new();
798
+ for (var i in self) {
799
+ if (/^@.+/.test(i)) {
800
+ copy[i] = self[i];
801
+ }
802
+ }
803
+ return copy;
804
+ return self;
805
+ },
750
806
  args: [],
751
807
  source: "shallowCopy\x0a\x09<\x0a\x09 var copy = self.klass._new();\x0a\x09 for(var i in self) {\x0a\x09\x09if(/^@.+/.test(i)) {\x0a\x09\x09 copy[i] = self[i];\x0a\x09\x09}\x0a\x09 }\x0a\x09 return copy;\x0a\x09>",
752
808
  messageSends: [],
@@ -759,10 +815,11 @@ smalltalk.addMethod(
759
815
  smalltalk.method({
760
816
  selector: "shouldNotImplement",
761
817
  category: 'error handling',
762
- fn: function (){
763
- var self=this;
764
- smalltalk.send(self, "_error_", [smalltalk.send("This method should not be implemented in ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])])]);
765
- return self;},
818
+ fn: function () {
819
+ var self = this;
820
+ smalltalk.send(self, "_error_", [smalltalk.send("This method should not be implemented in ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])])]);
821
+ return self;
822
+ },
766
823
  args: [],
767
824
  source: "shouldNotImplement\x0a\x09self error: 'This method should not be implemented in ', self class name",
768
825
  messageSends: ["error:", ",", "name", "class"],
@@ -775,10 +832,11 @@ smalltalk.addMethod(
775
832
  smalltalk.method({
776
833
  selector: "size",
777
834
  category: 'accessing',
778
- fn: function (){
779
- var self=this;
780
- smalltalk.send(self, "_error_", ["Object not indexable"]);
781
- return self;},
835
+ fn: function () {
836
+ var self = this;
837
+ smalltalk.send(self, "_error_", ["Object not indexable"]);
838
+ return self;
839
+ },
782
840
  args: [],
783
841
  source: "size\x0a\x09self error: 'Object not indexable'",
784
842
  messageSends: ["error:"],
@@ -791,10 +849,11 @@ smalltalk.addMethod(
791
849
  smalltalk.method({
792
850
  selector: "storeOn:",
793
851
  category: 'printing',
794
- fn: function (aStream){
795
- var self=this;
796
- smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(self, "_printString", [])]);
797
- return self;},
852
+ fn: function (aStream) {
853
+ var self = this;
854
+ smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(self, "_printString", [])]);
855
+ return self;
856
+ },
798
857
  args: ["aStream"],
799
858
  source: "storeOn: aStream\x0a\x09aStream nextPutAll: self printString",
800
859
  messageSends: ["nextPutAll:", "printString"],
@@ -807,10 +866,12 @@ smalltalk.addMethod(
807
866
  smalltalk.method({
808
867
  selector: "storeString",
809
868
  category: 'printing',
810
- fn: function (){
811
- var self=this;
812
- return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(s){return smalltalk.send(self, "_storeOn_", [s]);})]);
813
- return self;},
869
+ fn: function () {
870
+ var self = this;
871
+ var $1;
872
+ $1 = smalltalk.send(smalltalk.String || String, "_streamContents_", [function (s) {return smalltalk.send(self, "_storeOn_", [s]);}]);
873
+ return $1;
874
+ },
814
875
  args: [],
815
876
  source: "storeString\x0a\x09\x22Answer a String representation of the receiver from which the receiver \x0a\x09can be reconstructed.\x22\x0a\x0a\x09^ String streamContents: [:s | self storeOn: s]",
816
877
  messageSends: ["streamContents:", "storeOn:"],
@@ -823,10 +884,11 @@ smalltalk.addMethod(
823
884
  smalltalk.method({
824
885
  selector: "subclassResponsibility",
825
886
  category: 'error handling',
826
- fn: function (){
827
- var self=this;
828
- smalltalk.send(self, "_error_", ["This method is a responsibility of a subclass"]);
829
- return self;},
887
+ fn: function () {
888
+ var self = this;
889
+ smalltalk.send(self, "_error_", ["This method is a responsibility of a subclass"]);
890
+ return self;
891
+ },
830
892
  args: [],
831
893
  source: "subclassResponsibility\x0a\x09self error: 'This method is a responsibility of a subclass'",
832
894
  messageSends: ["error:"],
@@ -834,16 +896,38 @@ referencedClasses: []
834
896
  }),
835
897
  smalltalk.Object);
836
898
 
899
+ smalltalk.addMethod(
900
+ "_throw_",
901
+ smalltalk.method({
902
+ selector: "throw:",
903
+ category: 'error handling',
904
+ fn: function (anObject) {
905
+ var self = this;
906
+ throw anObject;
907
+ return self;
908
+ },
909
+ args: ["anObject"],
910
+ source: "throw: anObject\x0a\x09< throw anObject >",
911
+ messageSends: [],
912
+ referencedClasses: []
913
+ }),
914
+ smalltalk.Object);
915
+
837
916
  smalltalk.addMethod(
838
917
  "_try_catch_",
839
918
  smalltalk.method({
840
919
  selector: "try:catch:",
841
920
  category: 'error handling',
842
- fn: function (aBlock, anotherBlock){
843
- var self=this;
844
- try{result = aBlock()} catch(e) {result = anotherBlock(e)};
845
- return result;;
846
- return self;},
921
+ fn: function (aBlock, anotherBlock) {
922
+ var self = this;
923
+ try {
924
+ result = aBlock();
925
+ } catch (e) {
926
+ result = anotherBlock(e);
927
+ }
928
+ return result;
929
+ return self;
930
+ },
847
931
  args: ["aBlock", "anotherBlock"],
848
932
  source: "try: aBlock catch: anotherBlock\x0a\x09<try{result = aBlock()} catch(e) {result = anotherBlock(e)};\x0a\x09return result;>",
849
933
  messageSends: [],
@@ -851,15 +935,31 @@ referencedClasses: []
851
935
  }),
852
936
  smalltalk.Object);
853
937
 
938
+ smalltalk.addMethod(
939
+ "_value",
940
+ smalltalk.method({
941
+ selector: "value",
942
+ category: 'accessing',
943
+ fn: function () {
944
+ var self = this;
945
+ return self;
946
+ },
947
+ args: [],
948
+ source: "value\x0a\x09^ self",
949
+ messageSends: [],
950
+ referencedClasses: []
951
+ }),
952
+ smalltalk.Object);
953
+
854
954
  smalltalk.addMethod(
855
955
  "_yourself",
856
956
  smalltalk.method({
857
957
  selector: "yourself",
858
958
  category: 'accessing',
859
- fn: function (){
860
- var self=this;
861
- return self;
862
- return self;},
959
+ fn: function () {
960
+ var self = this;
961
+ return self;
962
+ },
863
963
  args: [],
864
964
  source: "yourself\x0a\x09^self",
865
965
  messageSends: [],
@@ -872,10 +972,12 @@ smalltalk.addMethod(
872
972
  smalltalk.method({
873
973
  selector: "~=",
874
974
  category: 'comparing',
875
- fn: function (anObject){
876
- var self=this;
877
- return smalltalk.send(smalltalk.send(self, "__eq", [anObject]), "__eq", [false]);
878
- return self;},
975
+ fn: function (anObject) {
976
+ var self = this;
977
+ var $1;
978
+ $1 = smalltalk.send(smalltalk.send(self, "__eq", [anObject]), "__eq", [false]);
979
+ return $1;
980
+ },
879
981
  args: ["anObject"],
880
982
  source: "~= anObject\x0a\x09^(self = anObject) = false",
881
983
  messageSends: ["="],
@@ -888,10 +990,12 @@ smalltalk.addMethod(
888
990
  smalltalk.method({
889
991
  selector: "~~",
890
992
  category: 'comparing',
891
- fn: function (anObject){
892
- var self=this;
893
- return smalltalk.send(smalltalk.send(self, "__eq_eq", [anObject]), "__eq", [false]);
894
- return self;},
993
+ fn: function (anObject) {
994
+ var self = this;
995
+ var $1;
996
+ $1 = smalltalk.send(smalltalk.send(self, "__eq_eq", [anObject]), "__eq", [false]);
997
+ return $1;
998
+ },
895
999
  args: ["anObject"],
896
1000
  source: "~~ anObject\x0a\x09^(self == anObject) = false",
897
1001
  messageSends: ["=", "=="],
@@ -905,10 +1009,10 @@ smalltalk.addMethod(
905
1009
  smalltalk.method({
906
1010
  selector: "initialize",
907
1011
  category: 'initialization',
908
- fn: function (){
909
- var self=this;
910
-
911
- return self;},
1012
+ fn: function () {
1013
+ var self = this;
1014
+ return self;
1015
+ },
912
1016
  args: [],
913
1017
  source: "initialize\x0a\x09\x22no op\x22",
914
1018
  messageSends: [],
@@ -924,16 +1028,15 @@ smalltalk.addMethod(
924
1028
  smalltalk.method({
925
1029
  selector: "&",
926
1030
  category: 'controlling',
927
- fn: function (aBoolean){
928
- var self=this;
929
-
930
- if(self == true) {
931
- return aBoolean;
932
- } else {
933
- return false;
934
- }
935
- ;
936
- return self;},
1031
+ fn: function (aBoolean) {
1032
+ var self = this;
1033
+ if (self == true) {
1034
+ return aBoolean;
1035
+ } else {
1036
+ return false;
1037
+ }
1038
+ return self;
1039
+ },
937
1040
  args: ["aBoolean"],
938
1041
  source: "& aBoolean\x0a\x09<\x0a\x09 if(self == true) {\x0a\x09\x09return aBoolean;\x0a\x09 } else {\x0a\x09\x09return false;\x0a\x09 }\x0a\x09>",
939
1042
  messageSends: [],
@@ -946,13 +1049,16 @@ smalltalk.addMethod(
946
1049
  smalltalk.method({
947
1050
  selector: "=",
948
1051
  category: 'comparing',
949
- fn: function (aBoolean){
950
- var self=this;
951
- var $early={};
952
- try{((($receiver = smalltalk.send(smalltalk.send(aBoolean, "_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]})();})]));
953
- return Boolean(self == true) == aBoolean;
954
- return self;
955
- } catch(e) {if(e===$early)return e[0]; throw e}},
1052
+ fn: function (aBoolean) {
1053
+ var self = this;
1054
+ var $1;
1055
+ $1 = smalltalk.send(smalltalk.send(aBoolean, "_class", []), "__eq", [smalltalk.send(self, "_class", [])]);
1056
+ if (!smalltalk.assert($1)) {
1057
+ return false;
1058
+ }
1059
+ return Boolean(self == true) == aBoolean;
1060
+ return self;
1061
+ },
956
1062
  args: ["aBoolean"],
957
1063
  source: "= aBoolean\x0a\x09aBoolean class = self class ifFalse: [^false].\x0a\x09<return Boolean(self == true) == aBoolean>",
958
1064
  messageSends: ["ifFalse:", "=", "class"],
@@ -965,10 +1071,12 @@ smalltalk.addMethod(
965
1071
  smalltalk.method({
966
1072
  selector: "==",
967
1073
  category: 'comparing',
968
- fn: function (aBoolean){
969
- var self=this;
970
- return smalltalk.send(self, "__eq", [aBoolean]);
971
- return self;},
1074
+ fn: function (aBoolean) {
1075
+ var self = this;
1076
+ var $1;
1077
+ $1 = smalltalk.send(self, "__eq", [aBoolean]);
1078
+ return $1;
1079
+ },
972
1080
  args: ["aBoolean"],
973
1081
  source: "== aBoolean\x0a\x09^self = aBoolean",
974
1082
  messageSends: ["="],
@@ -981,10 +1089,13 @@ smalltalk.addMethod(
981
1089
  smalltalk.method({
982
1090
  selector: "and:",
983
1091
  category: 'controlling',
984
- fn: function (aBlock){
985
- var self=this;
986
- return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [aBlock, (function(){return false;})]);
987
- return self;},
1092
+ fn: function (aBlock) {
1093
+ var self = this;
1094
+ var $2, $1;
1095
+ $2 = smalltalk.send(self, "__eq", [true]);
1096
+ $1 = smalltalk.send($2, "_ifTrue_ifFalse_", [aBlock, function () {return false;}]);
1097
+ return $1;
1098
+ },
988
1099
  args: ["aBlock"],
989
1100
  source: "and: aBlock\x0a\x09^self = true\x0a\x09 ifTrue: aBlock\x0a\x09 ifFalse: [false]",
990
1101
  messageSends: ["ifTrue:ifFalse:", "="],
@@ -997,10 +1108,10 @@ smalltalk.addMethod(
997
1108
  smalltalk.method({
998
1109
  selector: "asJSON",
999
1110
  category: 'converting',
1000
- fn: function (){
1001
- var self=this;
1002
- return self;
1003
- return self;},
1111
+ fn: function () {
1112
+ var self = this;
1113
+ return self;
1114
+ },
1004
1115
  args: [],
1005
1116
  source: "asJSON\x0a\x09^self",
1006
1117
  messageSends: [],
@@ -1013,10 +1124,10 @@ smalltalk.addMethod(
1013
1124
  smalltalk.method({
1014
1125
  selector: "deepCopy",
1015
1126
  category: 'copying',
1016
- fn: function (){
1017
- var self=this;
1018
- return self;
1019
- return self;},
1127
+ fn: function () {
1128
+ var self = this;
1129
+ return self;
1130
+ },
1020
1131
  args: [],
1021
1132
  source: "deepCopy\x0a\x09^self",
1022
1133
  messageSends: [],
@@ -1029,10 +1140,12 @@ smalltalk.addMethod(
1029
1140
  smalltalk.method({
1030
1141
  selector: "ifFalse:",
1031
1142
  category: 'controlling',
1032
- fn: function (aBlock){
1033
- var self=this;
1034
- return smalltalk.send(self, "_ifTrue_ifFalse_", [(function(){return nil;}), aBlock]);
1035
- return self;},
1143
+ fn: function (aBlock) {
1144
+ var self = this;
1145
+ var $1;
1146
+ $1 = smalltalk.send(self, "_ifTrue_ifFalse_", [function () {}, aBlock]);
1147
+ return $1;
1148
+ },
1036
1149
  args: ["aBlock"],
1037
1150
  source: "ifFalse: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^self ifTrue: [] ifFalse: aBlock",
1038
1151
  messageSends: ["ifTrue:ifFalse:"],
@@ -1045,10 +1158,12 @@ smalltalk.addMethod(
1045
1158
  smalltalk.method({
1046
1159
  selector: "ifFalse:ifTrue:",
1047
1160
  category: 'controlling',
1048
- fn: function (aBlock, anotherBlock){
1049
- var self=this;
1050
- return smalltalk.send(self, "_ifTrue_ifFalse_", [anotherBlock, aBlock]);
1051
- return self;},
1161
+ fn: function (aBlock, anotherBlock) {
1162
+ var self = this;
1163
+ var $1;
1164
+ $1 = smalltalk.send(self, "_ifTrue_ifFalse_", [anotherBlock, aBlock]);
1165
+ return $1;
1166
+ },
1052
1167
  args: ["aBlock", "anotherBlock"],
1053
1168
  source: "ifFalse: aBlock ifTrue: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^self ifTrue: anotherBlock ifFalse: aBlock",
1054
1169
  messageSends: ["ifTrue:ifFalse:"],
@@ -1061,10 +1176,12 @@ smalltalk.addMethod(
1061
1176
  smalltalk.method({
1062
1177
  selector: "ifTrue:",
1063
1178
  category: 'controlling',
1064
- fn: function (aBlock){
1065
- var self=this;
1066
- return smalltalk.send(self, "_ifTrue_ifFalse_", [aBlock, (function(){return nil;})]);
1067
- return self;},
1179
+ fn: function (aBlock) {
1180
+ var self = this;
1181
+ var $1;
1182
+ $1 = smalltalk.send(self, "_ifTrue_ifFalse_", [aBlock, function () {}]);
1183
+ return $1;
1184
+ },
1068
1185
  args: ["aBlock"],
1069
1186
  source: "ifTrue: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^self ifTrue: aBlock ifFalse: []",
1070
1187
  messageSends: ["ifTrue:ifFalse:"],
@@ -1077,16 +1194,15 @@ smalltalk.addMethod(
1077
1194
  smalltalk.method({
1078
1195
  selector: "ifTrue:ifFalse:",
1079
1196
  category: 'controlling',
1080
- fn: function (aBlock, anotherBlock){
1081
- var self=this;
1082
-
1083
- if(self == true) {
1084
- return aBlock();
1085
- } else {
1086
- return anotherBlock();
1087
- }
1088
- ;
1089
- return self;},
1197
+ fn: function (aBlock, anotherBlock) {
1198
+ var self = this;
1199
+ if (self == true) {
1200
+ return aBlock();
1201
+ } else {
1202
+ return anotherBlock();
1203
+ }
1204
+ return self;
1205
+ },
1090
1206
  args: ["aBlock", "anotherBlock"],
1091
1207
  source: "ifTrue: aBlock ifFalse: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09<\x0a\x09 if(self == true) {\x0a\x09\x09return aBlock();\x0a\x09 } else {\x0a\x09\x09return anotherBlock();\x0a\x09 }\x0a\x09>",
1092
1208
  messageSends: [],
@@ -1099,10 +1215,12 @@ smalltalk.addMethod(
1099
1215
  smalltalk.method({
1100
1216
  selector: "not",
1101
1217
  category: 'controlling',
1102
- fn: function (){
1103
- var self=this;
1104
- return smalltalk.send(self, "__eq", [false]);
1105
- return self;},
1218
+ fn: function () {
1219
+ var self = this;
1220
+ var $1;
1221
+ $1 = smalltalk.send(self, "__eq", [false]);
1222
+ return $1;
1223
+ },
1106
1224
  args: [],
1107
1225
  source: "not\x0a\x09^self = false",
1108
1226
  messageSends: ["="],
@@ -1115,10 +1233,13 @@ smalltalk.addMethod(
1115
1233
  smalltalk.method({
1116
1234
  selector: "or:",
1117
1235
  category: 'controlling',
1118
- fn: function (aBlock){
1119
- var self=this;
1120
- return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [(function(){return true;}), aBlock]);
1121
- return self;},
1236
+ fn: function (aBlock) {
1237
+ var self = this;
1238
+ var $2, $1;
1239
+ $2 = smalltalk.send(self, "__eq", [true]);
1240
+ $1 = smalltalk.send($2, "_ifTrue_ifFalse_", [function () {return true;}, aBlock]);
1241
+ return $1;
1242
+ },
1122
1243
  args: ["aBlock"],
1123
1244
  source: "or: aBlock\x0a\x09^self = true\x0a\x09 ifTrue: [true]\x0a\x09 ifFalse: aBlock",
1124
1245
  messageSends: ["ifTrue:ifFalse:", "="],
@@ -1131,10 +1252,11 @@ smalltalk.addMethod(
1131
1252
  smalltalk.method({
1132
1253
  selector: "printString",
1133
1254
  category: 'printing',
1134
- fn: function (){
1135
- var self=this;
1136
- return self.toString();
1137
- return self;},
1255
+ fn: function () {
1256
+ var self = this;
1257
+ return self.toString();
1258
+ return self;
1259
+ },
1138
1260
  args: [],
1139
1261
  source: "printString\x0a\x09<return self.toString()>",
1140
1262
  messageSends: [],
@@ -1147,10 +1269,10 @@ smalltalk.addMethod(
1147
1269
  smalltalk.method({
1148
1270
  selector: "shallowCopy",
1149
1271
  category: 'copying',
1150
- fn: function (){
1151
- var self=this;
1152
- return self;
1153
- return self;},
1272
+ fn: function () {
1273
+ var self = this;
1274
+ return self;
1275
+ },
1154
1276
  args: [],
1155
1277
  source: "shallowCopy\x0a\x09^self",
1156
1278
  messageSends: [],
@@ -1163,16 +1285,15 @@ smalltalk.addMethod(
1163
1285
  smalltalk.method({
1164
1286
  selector: "|",
1165
1287
  category: 'controlling',
1166
- fn: function (aBoolean){
1167
- var self=this;
1168
-
1169
- if(self == true) {
1170
- return true;
1171
- } else {
1172
- return aBoolean;
1173
- }
1174
- ;
1175
- return self;},
1288
+ fn: function (aBoolean) {
1289
+ var self = this;
1290
+ if (self == true) {
1291
+ return true;
1292
+ } else {
1293
+ return aBoolean;
1294
+ }
1295
+ return self;
1296
+ },
1176
1297
  args: ["aBoolean"],
1177
1298
  source: "| aBoolean\x0a\x09<\x0a\x09 if(self == true) {\x0a\x09\x09return true;\x0a\x09 } else {\x0a\x09\x09return aBoolean;\x0a\x09 }\x0a\x09>",
1178
1299
  messageSends: [],
@@ -1189,10 +1310,11 @@ smalltalk.addMethod(
1189
1310
  smalltalk.method({
1190
1311
  selector: "+",
1191
1312
  category: 'arithmetic',
1192
- fn: function (aDate){
1193
- var self=this;
1194
- return self + aDate;
1195
- return self;},
1313
+ fn: function (aDate) {
1314
+ var self = this;
1315
+ return self + aDate;
1316
+ return self;
1317
+ },
1196
1318
  args: ["aDate"],
1197
1319
  source: "+ aDate\x0a\x09<return self + aDate>",
1198
1320
  messageSends: [],
@@ -1205,10 +1327,11 @@ smalltalk.addMethod(
1205
1327
  smalltalk.method({
1206
1328
  selector: "-",
1207
1329
  category: 'arithmetic',
1208
- fn: function (aDate){
1209
- var self=this;
1210
- return self - aDate;
1211
- return self;},
1330
+ fn: function (aDate) {
1331
+ var self = this;
1332
+ return self - aDate;
1333
+ return self;
1334
+ },
1212
1335
  args: ["aDate"],
1213
1336
  source: "- aDate\x0a\x09<return self - aDate>",
1214
1337
  messageSends: [],
@@ -1221,10 +1344,11 @@ smalltalk.addMethod(
1221
1344
  smalltalk.method({
1222
1345
  selector: "<",
1223
1346
  category: 'comparing',
1224
- fn: function (aDate){
1225
- var self=this;
1226
- return self < aDate;
1227
- return self;},
1347
+ fn: function (aDate) {
1348
+ var self = this;
1349
+ return self < aDate;
1350
+ return self;
1351
+ },
1228
1352
  args: ["aDate"],
1229
1353
  source: "< aDate\x0a\x09<return self < aDate>",
1230
1354
  messageSends: [],
@@ -1237,10 +1361,11 @@ smalltalk.addMethod(
1237
1361
  smalltalk.method({
1238
1362
  selector: "<=",
1239
1363
  category: 'comparing',
1240
- fn: function (aDate){
1241
- var self=this;
1242
- return self <= aDate;
1243
- return self;},
1364
+ fn: function (aDate) {
1365
+ var self = this;
1366
+ return self <= aDate;
1367
+ return self;
1368
+ },
1244
1369
  args: ["aDate"],
1245
1370
  source: "<= aDate\x0a\x09<return self <= aDate>",
1246
1371
  messageSends: [],
@@ -1253,10 +1378,11 @@ smalltalk.addMethod(
1253
1378
  smalltalk.method({
1254
1379
  selector: ">",
1255
1380
  category: 'comparing',
1256
- fn: function (aDate){
1257
- var self=this;
1258
- return self > aDate;
1259
- return self;},
1381
+ fn: function (aDate) {
1382
+ var self = this;
1383
+ return self > aDate;
1384
+ return self;
1385
+ },
1260
1386
  args: ["aDate"],
1261
1387
  source: "> aDate\x0a\x09<return self >> aDate>",
1262
1388
  messageSends: [],
@@ -1269,10 +1395,11 @@ smalltalk.addMethod(
1269
1395
  smalltalk.method({
1270
1396
  selector: ">=",
1271
1397
  category: 'comparing',
1272
- fn: function (aDate){
1273
- var self=this;
1274
- return self >= aDate;
1275
- return self;},
1398
+ fn: function (aDate) {
1399
+ var self = this;
1400
+ return self >= aDate;
1401
+ return self;
1402
+ },
1276
1403
  args: ["aDate"],
1277
1404
  source: ">= aDate\x0a\x09<return self >>= aDate>",
1278
1405
  messageSends: [],
@@ -1285,10 +1412,11 @@ smalltalk.addMethod(
1285
1412
  smalltalk.method({
1286
1413
  selector: "asDateString",
1287
1414
  category: 'converting',
1288
- fn: function (){
1289
- var self=this;
1290
- return self.toDateString();
1291
- return self;},
1415
+ fn: function () {
1416
+ var self = this;
1417
+ return self.toDateString();
1418
+ return self;
1419
+ },
1292
1420
  args: [],
1293
1421
  source: "asDateString\x0a\x09<return self.toDateString()>",
1294
1422
  messageSends: [],
@@ -1301,10 +1429,11 @@ smalltalk.addMethod(
1301
1429
  smalltalk.method({
1302
1430
  selector: "asLocaleString",
1303
1431
  category: 'converting',
1304
- fn: function (){
1305
- var self=this;
1306
- return self.toLocaleString();
1307
- return self;},
1432
+ fn: function () {
1433
+ var self = this;
1434
+ return self.toLocaleString();
1435
+ return self;
1436
+ },
1308
1437
  args: [],
1309
1438
  source: "asLocaleString\x0a\x09<return self.toLocaleString()>",
1310
1439
  messageSends: [],
@@ -1317,10 +1446,12 @@ smalltalk.addMethod(
1317
1446
  smalltalk.method({
1318
1447
  selector: "asMilliseconds",
1319
1448
  category: 'converting',
1320
- fn: function (){
1321
- var self=this;
1322
- return smalltalk.send(self, "_time", []);
1323
- return self;},
1449
+ fn: function () {
1450
+ var self = this;
1451
+ var $1;
1452
+ $1 = smalltalk.send(self, "_time", []);
1453
+ return $1;
1454
+ },
1324
1455
  args: [],
1325
1456
  source: "asMilliseconds\x0a\x09^self time",
1326
1457
  messageSends: ["time"],
@@ -1333,10 +1464,12 @@ smalltalk.addMethod(
1333
1464
  smalltalk.method({
1334
1465
  selector: "asNumber",
1335
1466
  category: 'converting',
1336
- fn: function (){
1337
- var self=this;
1338
- return smalltalk.send(self, "_asMilliseconds", []);
1339
- return self;},
1467
+ fn: function () {
1468
+ var self = this;
1469
+ var $1;
1470
+ $1 = smalltalk.send(self, "_asMilliseconds", []);
1471
+ return $1;
1472
+ },
1340
1473
  args: [],
1341
1474
  source: "asNumber\x0a\x09^self asMilliseconds",
1342
1475
  messageSends: ["asMilliseconds"],
@@ -1349,10 +1482,11 @@ smalltalk.addMethod(
1349
1482
  smalltalk.method({
1350
1483
  selector: "asString",
1351
1484
  category: 'converting',
1352
- fn: function (){
1353
- var self=this;
1354
- return self.toString();
1355
- return self;},
1485
+ fn: function () {
1486
+ var self = this;
1487
+ return self.toString();
1488
+ return self;
1489
+ },
1356
1490
  args: [],
1357
1491
  source: "asString\x0a\x09<return self.toString()>",
1358
1492
  messageSends: [],
@@ -1365,10 +1499,11 @@ smalltalk.addMethod(
1365
1499
  smalltalk.method({
1366
1500
  selector: "asTimeString",
1367
1501
  category: 'converting',
1368
- fn: function (){
1369
- var self=this;
1370
- return self.toTimeString();
1371
- return self;},
1502
+ fn: function () {
1503
+ var self = this;
1504
+ return self.toTimeString();
1505
+ return self;
1506
+ },
1372
1507
  args: [],
1373
1508
  source: "asTimeString\x0a\x09<return self.toTimeString()>",
1374
1509
  messageSends: [],
@@ -1381,10 +1516,12 @@ smalltalk.addMethod(
1381
1516
  smalltalk.method({
1382
1517
  selector: "day",
1383
1518
  category: 'accessing',
1384
- fn: function (){
1385
- var self=this;
1386
- return smalltalk.send(self, "_dayOfWeek", []);
1387
- return self;},
1519
+ fn: function () {
1520
+ var self = this;
1521
+ var $1;
1522
+ $1 = smalltalk.send(self, "_dayOfWeek", []);
1523
+ return $1;
1524
+ },
1388
1525
  args: [],
1389
1526
  source: "day\x0a\x09^self dayOfWeek",
1390
1527
  messageSends: ["dayOfWeek"],
@@ -1397,10 +1534,11 @@ smalltalk.addMethod(
1397
1534
  smalltalk.method({
1398
1535
  selector: "day:",
1399
1536
  category: 'accessing',
1400
- fn: function (aNumber){
1401
- var self=this;
1402
- smalltalk.send(self, "_dayOfWeek_", [aNumber]);
1403
- return self;},
1537
+ fn: function (aNumber) {
1538
+ var self = this;
1539
+ smalltalk.send(self, "_dayOfWeek_", [aNumber]);
1540
+ return self;
1541
+ },
1404
1542
  args: ["aNumber"],
1405
1543
  source: "day: aNumber\x0a\x09self dayOfWeek: aNumber",
1406
1544
  messageSends: ["dayOfWeek:"],
@@ -1413,10 +1551,11 @@ smalltalk.addMethod(
1413
1551
  smalltalk.method({
1414
1552
  selector: "dayOfMonth",
1415
1553
  category: 'accessing',
1416
- fn: function (){
1417
- var self=this;
1418
- return self.getDate();
1419
- return self;},
1554
+ fn: function () {
1555
+ var self = this;
1556
+ return self.getDate();
1557
+ return self;
1558
+ },
1420
1559
  args: [],
1421
1560
  source: "dayOfMonth\x0a\x09<return self.getDate()>",
1422
1561
  messageSends: [],
@@ -1429,10 +1568,11 @@ smalltalk.addMethod(
1429
1568
  smalltalk.method({
1430
1569
  selector: "dayOfMonth:",
1431
1570
  category: 'accessing',
1432
- fn: function (aNumber){
1433
- var self=this;
1434
- self.setDate(aNumber);
1435
- return self;},
1571
+ fn: function (aNumber) {
1572
+ var self = this;
1573
+ self.setDate(aNumber);
1574
+ return self;
1575
+ },
1436
1576
  args: ["aNumber"],
1437
1577
  source: "dayOfMonth: aNumber\x0a\x09<self.setDate(aNumber)>",
1438
1578
  messageSends: [],
@@ -1445,10 +1585,11 @@ smalltalk.addMethod(
1445
1585
  smalltalk.method({
1446
1586
  selector: "dayOfWeek",
1447
1587
  category: 'accessing',
1448
- fn: function (){
1449
- var self=this;
1450
- return self.getDay() + 1;
1451
- return self;},
1588
+ fn: function () {
1589
+ var self = this;
1590
+ return self.getDay() + 1;
1591
+ return self;
1592
+ },
1452
1593
  args: [],
1453
1594
  source: "dayOfWeek\x0a\x09<return self.getDay() + 1>",
1454
1595
  messageSends: [],
@@ -1461,10 +1602,11 @@ smalltalk.addMethod(
1461
1602
  smalltalk.method({
1462
1603
  selector: "dayOfWeek:",
1463
1604
  category: 'accessing',
1464
- fn: function (aNumber){
1465
- var self=this;
1466
- return self.setDay(aNumber - 1);
1467
- return self;},
1605
+ fn: function (aNumber) {
1606
+ var self = this;
1607
+ return self.setDay(aNumber - 1);
1608
+ return self;
1609
+ },
1468
1610
  args: ["aNumber"],
1469
1611
  source: "dayOfWeek: aNumber\x0a\x09<return self.setDay(aNumber - 1)>",
1470
1612
  messageSends: [],
@@ -1477,10 +1619,11 @@ smalltalk.addMethod(
1477
1619
  smalltalk.method({
1478
1620
  selector: "hours",
1479
1621
  category: 'accessing',
1480
- fn: function (){
1481
- var self=this;
1482
- return self.getHours();
1483
- return self;},
1622
+ fn: function () {
1623
+ var self = this;
1624
+ return self.getHours();
1625
+ return self;
1626
+ },
1484
1627
  args: [],
1485
1628
  source: "hours\x0a\x09<return self.getHours()>",
1486
1629
  messageSends: [],
@@ -1493,10 +1636,11 @@ smalltalk.addMethod(
1493
1636
  smalltalk.method({
1494
1637
  selector: "hours:",
1495
1638
  category: 'accessing',
1496
- fn: function (aNumber){
1497
- var self=this;
1498
- self.setHours(aNumber);
1499
- return self;},
1639
+ fn: function (aNumber) {
1640
+ var self = this;
1641
+ self.setHours(aNumber);
1642
+ return self;
1643
+ },
1500
1644
  args: ["aNumber"],
1501
1645
  source: "hours: aNumber\x0a\x09<self.setHours(aNumber)>",
1502
1646
  messageSends: [],
@@ -1509,10 +1653,11 @@ smalltalk.addMethod(
1509
1653
  smalltalk.method({
1510
1654
  selector: "milliseconds",
1511
1655
  category: 'accessing',
1512
- fn: function (){
1513
- var self=this;
1514
- return self.getMilliseconds();
1515
- return self;},
1656
+ fn: function () {
1657
+ var self = this;
1658
+ return self.getMilliseconds();
1659
+ return self;
1660
+ },
1516
1661
  args: [],
1517
1662
  source: "milliseconds\x0a\x09<return self.getMilliseconds()>",
1518
1663
  messageSends: [],
@@ -1525,10 +1670,11 @@ smalltalk.addMethod(
1525
1670
  smalltalk.method({
1526
1671
  selector: "milliseconds:",
1527
1672
  category: 'accessing',
1528
- fn: function (aNumber){
1529
- var self=this;
1530
- self.setMilliseconds(aNumber);
1531
- return self;},
1673
+ fn: function (aNumber) {
1674
+ var self = this;
1675
+ self.setMilliseconds(aNumber);
1676
+ return self;
1677
+ },
1532
1678
  args: ["aNumber"],
1533
1679
  source: "milliseconds: aNumber\x0a\x09<self.setMilliseconds(aNumber)>",
1534
1680
  messageSends: [],
@@ -1541,10 +1687,11 @@ smalltalk.addMethod(
1541
1687
  smalltalk.method({
1542
1688
  selector: "minutes",
1543
1689
  category: 'accessing',
1544
- fn: function (){
1545
- var self=this;
1546
- return self.getMinutes();
1547
- return self;},
1690
+ fn: function () {
1691
+ var self = this;
1692
+ return self.getMinutes();
1693
+ return self;
1694
+ },
1548
1695
  args: [],
1549
1696
  source: "minutes\x0a\x09<return self.getMinutes()>",
1550
1697
  messageSends: [],
@@ -1557,10 +1704,11 @@ smalltalk.addMethod(
1557
1704
  smalltalk.method({
1558
1705
  selector: "minutes:",
1559
1706
  category: 'accessing',
1560
- fn: function (aNumber){
1561
- var self=this;
1562
- self.setMinutes(aNumber);
1563
- return self;},
1707
+ fn: function (aNumber) {
1708
+ var self = this;
1709
+ self.setMinutes(aNumber);
1710
+ return self;
1711
+ },
1564
1712
  args: ["aNumber"],
1565
1713
  source: "minutes: aNumber\x0a\x09<self.setMinutes(aNumber)>",
1566
1714
  messageSends: [],
@@ -1573,10 +1721,11 @@ smalltalk.addMethod(
1573
1721
  smalltalk.method({
1574
1722
  selector: "month",
1575
1723
  category: 'accessing',
1576
- fn: function (){
1577
- var self=this;
1578
- return self.getMonth() + 1;
1579
- return self;},
1724
+ fn: function () {
1725
+ var self = this;
1726
+ return self.getMonth() + 1;
1727
+ return self;
1728
+ },
1580
1729
  args: [],
1581
1730
  source: "month\x0a\x09<return self.getMonth() + 1>",
1582
1731
  messageSends: [],
@@ -1589,10 +1738,11 @@ smalltalk.addMethod(
1589
1738
  smalltalk.method({
1590
1739
  selector: "month:",
1591
1740
  category: 'accessing',
1592
- fn: function (aNumber){
1593
- var self=this;
1594
- self.setMonth(aNumber - 1);
1595
- return self;},
1741
+ fn: function (aNumber) {
1742
+ var self = this;
1743
+ self.setMonth(aNumber - 1);
1744
+ return self;
1745
+ },
1596
1746
  args: ["aNumber"],
1597
1747
  source: "month: aNumber\x0a\x09<self.setMonth(aNumber - 1)>",
1598
1748
  messageSends: [],
@@ -1605,10 +1755,12 @@ smalltalk.addMethod(
1605
1755
  smalltalk.method({
1606
1756
  selector: "printString",
1607
1757
  category: 'printing',
1608
- fn: function (){
1609
- var self=this;
1610
- return smalltalk.send(self, "_asString", []);
1611
- return self;},
1758
+ fn: function () {
1759
+ var self = this;
1760
+ var $1;
1761
+ $1 = smalltalk.send(self, "_asString", []);
1762
+ return $1;
1763
+ },
1612
1764
  args: [],
1613
1765
  source: "printString\x0a\x09^self asString",
1614
1766
  messageSends: ["asString"],
@@ -1621,10 +1773,11 @@ smalltalk.addMethod(
1621
1773
  smalltalk.method({
1622
1774
  selector: "seconds",
1623
1775
  category: 'accessing',
1624
- fn: function (){
1625
- var self=this;
1626
- return self.getSeconds();
1627
- return self;},
1776
+ fn: function () {
1777
+ var self = this;
1778
+ return self.getSeconds();
1779
+ return self;
1780
+ },
1628
1781
  args: [],
1629
1782
  source: "seconds\x0a\x09<return self.getSeconds()>",
1630
1783
  messageSends: [],
@@ -1637,10 +1790,11 @@ smalltalk.addMethod(
1637
1790
  smalltalk.method({
1638
1791
  selector: "seconds:",
1639
1792
  category: 'accessing',
1640
- fn: function (aNumber){
1641
- var self=this;
1642
- self.setSeconds(aNumber);
1643
- return self;},
1793
+ fn: function (aNumber) {
1794
+ var self = this;
1795
+ self.setSeconds(aNumber);
1796
+ return self;
1797
+ },
1644
1798
  args: ["aNumber"],
1645
1799
  source: "seconds: aNumber\x0a\x09<self.setSeconds(aNumber)>",
1646
1800
  messageSends: [],
@@ -1653,10 +1807,11 @@ smalltalk.addMethod(
1653
1807
  smalltalk.method({
1654
1808
  selector: "time",
1655
1809
  category: 'accessing',
1656
- fn: function (){
1657
- var self=this;
1658
- return self.getTime();
1659
- return self;},
1810
+ fn: function () {
1811
+ var self = this;
1812
+ return self.getTime();
1813
+ return self;
1814
+ },
1660
1815
  args: [],
1661
1816
  source: "time\x0a\x09<return self.getTime()>",
1662
1817
  messageSends: [],
@@ -1669,10 +1824,11 @@ smalltalk.addMethod(
1669
1824
  smalltalk.method({
1670
1825
  selector: "time:",
1671
1826
  category: 'accessing',
1672
- fn: function (aNumber){
1673
- var self=this;
1674
- self.setTime(aNumber);
1675
- return self;},
1827
+ fn: function (aNumber) {
1828
+ var self = this;
1829
+ self.setTime(aNumber);
1830
+ return self;
1831
+ },
1676
1832
  args: ["aNumber"],
1677
1833
  source: "time: aNumber\x0a\x09<self.setTime(aNumber)>",
1678
1834
  messageSends: [],
@@ -1685,10 +1841,11 @@ smalltalk.addMethod(
1685
1841
  smalltalk.method({
1686
1842
  selector: "year",
1687
1843
  category: 'accessing',
1688
- fn: function (){
1689
- var self=this;
1690
- return self.getFullYear();
1691
- return self;},
1844
+ fn: function () {
1845
+ var self = this;
1846
+ return self.getFullYear();
1847
+ return self;
1848
+ },
1692
1849
  args: [],
1693
1850
  source: "year\x0a\x09<return self.getFullYear()>",
1694
1851
  messageSends: [],
@@ -1701,10 +1858,11 @@ smalltalk.addMethod(
1701
1858
  smalltalk.method({
1702
1859
  selector: "year:",
1703
1860
  category: 'accessing',
1704
- fn: function (aNumber){
1705
- var self=this;
1706
- self.setFullYear(aNumber);
1707
- return self;},
1861
+ fn: function (aNumber) {
1862
+ var self = this;
1863
+ self.setFullYear(aNumber);
1864
+ return self;
1865
+ },
1708
1866
  args: ["aNumber"],
1709
1867
  source: "year: aNumber\x0a\x09<self.setFullYear(aNumber)>",
1710
1868
  messageSends: [],
@@ -1718,10 +1876,12 @@ smalltalk.addMethod(
1718
1876
  smalltalk.method({
1719
1877
  selector: "fromMilliseconds:",
1720
1878
  category: 'instance creation',
1721
- fn: function (aNumber){
1722
- var self=this;
1723
- return smalltalk.send(self, "_new_", [aNumber]);
1724
- return self;},
1879
+ fn: function (aNumber) {
1880
+ var self = this;
1881
+ var $1;
1882
+ $1 = smalltalk.send(self, "_new_", [aNumber]);
1883
+ return $1;
1884
+ },
1725
1885
  args: ["aNumber"],
1726
1886
  source: "fromMilliseconds: aNumber\x0a\x09^self new: aNumber",
1727
1887
  messageSends: ["new:"],
@@ -1734,10 +1894,12 @@ smalltalk.addMethod(
1734
1894
  smalltalk.method({
1735
1895
  selector: "fromSeconds:",
1736
1896
  category: 'instance creation',
1737
- fn: function (aNumber){
1738
- var self=this;
1739
- return smalltalk.send(self, "_fromMilliseconds_", [((($receiver = aNumber).klass === smalltalk.Number) ? $receiver *(1000) : smalltalk.send($receiver, "__star", [(1000)]))]);
1740
- return self;},
1897
+ fn: function (aNumber) {
1898
+ var self = this;
1899
+ var $1;
1900
+ $1 = smalltalk.send(self, "_fromMilliseconds_", [smalltalk.send(aNumber, "__star", [1000])]);
1901
+ return $1;
1902
+ },
1741
1903
  args: ["aNumber"],
1742
1904
  source: "fromSeconds: aNumber\x0a\x09^self fromMilliseconds: aNumber * 1000",
1743
1905
  messageSends: ["fromMilliseconds:", "*"],
@@ -1750,10 +1912,12 @@ smalltalk.addMethod(
1750
1912
  smalltalk.method({
1751
1913
  selector: "fromString:",
1752
1914
  category: 'instance creation',
1753
- fn: function (aString){
1754
- var self=this;
1755
- return smalltalk.send(self, "_new_", [aString]);
1756
- return self;},
1915
+ fn: function (aString) {
1916
+ var self = this;
1917
+ var $1;
1918
+ $1 = smalltalk.send(self, "_new_", [aString]);
1919
+ return $1;
1920
+ },
1757
1921
  args: ["aString"],
1758
1922
  source: "fromString: aString\x0a\x09\x22Example: Date fromString('2011/04/15 00:00:00')\x22\x0a\x09^self new: aString",
1759
1923
  messageSends: ["new:"],
@@ -1766,13 +1930,15 @@ smalltalk.addMethod(
1766
1930
  smalltalk.method({
1767
1931
  selector: "millisecondsToRun:",
1768
1932
  category: 'instance creation',
1769
- fn: function (aBlock){
1770
- var self=this;
1771
- var t=nil;
1772
- (t=smalltalk.send((smalltalk.Date || Date), "_now", []));
1773
- smalltalk.send(aBlock, "_value", []);
1774
- return ((($receiver = smalltalk.send((smalltalk.Date || Date), "_now", [])).klass === smalltalk.Number) ? $receiver -t : smalltalk.send($receiver, "__minus", [t]));
1775
- return self;},
1933
+ fn: function (aBlock) {
1934
+ var self = this;
1935
+ var $1;
1936
+ var t;
1937
+ t = smalltalk.send(smalltalk.Date || Date, "_now", []);
1938
+ smalltalk.send(aBlock, "_value", []);
1939
+ $1 = smalltalk.send(smalltalk.send(smalltalk.Date || Date, "_now", []), "__minus", [t]);
1940
+ return $1;
1941
+ },
1776
1942
  args: ["aBlock"],
1777
1943
  source: "millisecondsToRun: aBlock\x0a\x09| t |\x0a\x09t := Date now.\x0a\x09aBlock value.\x0a\x09^Date now - t",
1778
1944
  messageSends: ["now", "value", "-"],
@@ -1785,10 +1951,11 @@ smalltalk.addMethod(
1785
1951
  smalltalk.method({
1786
1952
  selector: "new:",
1787
1953
  category: 'instance creation',
1788
- fn: function (anObject){
1789
- var self=this;
1790
- return new Date(anObject);
1791
- return self;},
1954
+ fn: function (anObject) {
1955
+ var self = this;
1956
+ return new Date(anObject);
1957
+ return self;
1958
+ },
1792
1959
  args: ["anObject"],
1793
1960
  source: "new: anObject\x0a\x09<return new Date(anObject)>",
1794
1961
  messageSends: [],
@@ -1801,10 +1968,12 @@ smalltalk.addMethod(
1801
1968
  smalltalk.method({
1802
1969
  selector: "now",
1803
1970
  category: 'instance creation',
1804
- fn: function (){
1805
- var self=this;
1806
- return smalltalk.send(self, "_today", []);
1807
- return self;},
1971
+ fn: function () {
1972
+ var self = this;
1973
+ var $1;
1974
+ $1 = smalltalk.send(self, "_today", []);
1975
+ return $1;
1976
+ },
1808
1977
  args: [],
1809
1978
  source: "now\x0a\x09^self today",
1810
1979
  messageSends: ["today"],
@@ -1817,10 +1986,12 @@ smalltalk.addMethod(
1817
1986
  smalltalk.method({
1818
1987
  selector: "today",
1819
1988
  category: 'instance creation',
1820
- fn: function (){
1821
- var self=this;
1822
- return smalltalk.send(self, "_new", []);
1823
- return self;},
1989
+ fn: function () {
1990
+ var self = this;
1991
+ var $1;
1992
+ $1 = smalltalk.send(self, "_new", []);
1993
+ return $1;
1994
+ },
1824
1995
  args: [],
1825
1996
  source: "today\x0a\x09^self new",
1826
1997
  messageSends: ["new"],
@@ -1836,12 +2007,13 @@ smalltalk.addMethod(
1836
2007
  smalltalk.method({
1837
2008
  selector: "at:",
1838
2009
  category: 'accessing',
1839
- fn: function (aSymbol){
1840
- var self=this;
1841
- var attr=nil;
1842
- (attr=smalltalk.send(aSymbol, "_asString", []));
1843
- return self['@jsObject'][attr];
1844
- return self;},
2010
+ fn: function (aSymbol) {
2011
+ var self = this;
2012
+ var attr;
2013
+ attr = smalltalk.send(aSymbol, "_asString", []);
2014
+ return self['@jsObject'][attr];
2015
+ return self;
2016
+ },
1845
2017
  args: ["aSymbol"],
1846
2018
  source: "at: aSymbol\x0a\x09| attr |\x0a\x09attr := aSymbol asString.\x0a\x09<return self['@jsObject'][attr]>",
1847
2019
  messageSends: ["asString"],
@@ -1854,12 +2026,13 @@ smalltalk.addMethod(
1854
2026
  smalltalk.method({
1855
2027
  selector: "at:put:",
1856
2028
  category: 'accessing',
1857
- fn: function (aSymbol, anObject){
1858
- var self=this;
1859
- var attr=nil;
1860
- (attr=smalltalk.send(aSymbol, "_asString", []));
1861
- self['@jsObject'][attr] = anObject;
1862
- return self;},
2029
+ fn: function (aSymbol, anObject) {
2030
+ var self = this;
2031
+ var attr;
2032
+ attr = smalltalk.send(aSymbol, "_asString", []);
2033
+ self['@jsObject'][attr] = anObject;
2034
+ return self;
2035
+ },
1863
2036
  args: ["aSymbol", "anObject"],
1864
2037
  source: "at: aSymbol put: anObject\x0a\x09| attr |\x0a\x09attr := aSymbol asString.\x0a\x09<self['@jsObject'][attr] = anObject>",
1865
2038
  messageSends: ["asString"],
@@ -1872,19 +2045,22 @@ smalltalk.addMethod(
1872
2045
  smalltalk.method({
1873
2046
  selector: "doesNotUnderstand:",
1874
2047
  category: 'proxy',
1875
- fn: function (aMessage){
1876
- var self=this;
1877
- var obj=nil;
1878
- var selector=nil;
1879
- var jsSelector=nil;
1880
- var arguments=nil;
1881
- (obj=smalltalk.send(self, "_jsObject", []));
1882
- (selector=smalltalk.send(aMessage, "_selector", []));
1883
- (jsSelector=smalltalk.send(selector, "_asJavaScriptSelector", []));
1884
- (arguments=smalltalk.send(aMessage, "_arguments", []));
1885
- if(obj[jsSelector] != undefined) {return smalltalk.send(obj, jsSelector, arguments)};
1886
- smalltalk.send(self, "_doesNotUnderstand_", [aMessage], smalltalk.JSObjectProxy.superclass || nil);
1887
- return self;},
2048
+ fn: function (aMessage) {
2049
+ var self = this;
2050
+ var obj;
2051
+ var selector;
2052
+ var jsSelector;
2053
+ var arguments;
2054
+ obj = smalltalk.send(self, "_jsObject", []);
2055
+ selector = smalltalk.send(aMessage, "_selector", []);
2056
+ jsSelector = smalltalk.send(selector, "_asJavaScriptSelector", []);
2057
+ arguments = smalltalk.send(aMessage, "_arguments", []);
2058
+ if (obj[jsSelector] != undefined) {
2059
+ return smalltalk.send(obj, jsSelector, arguments);
2060
+ }
2061
+ smalltalk.send(self, "_doesNotUnderstand_", [aMessage], smalltalk.Object);
2062
+ return self;
2063
+ },
1888
2064
  args: ["aMessage"],
1889
2065
  source: "doesNotUnderstand: aMessage\x0a\x09| obj selector jsSelector arguments |\x0a\x09obj := self jsObject.\x0a\x09selector := aMessage selector.\x0a\x09jsSelector := selector asJavaScriptSelector.\x0a\x09arguments := aMessage arguments.\x0a\x09<if(obj[jsSelector] != undefined) {return smalltalk.send(obj, jsSelector, arguments)}>.\x0a\x09super doesNotUnderstand: aMessage",
1890
2066
  messageSends: ["jsObject", "selector", "asJavaScriptSelector", "arguments", "doesNotUnderstand:"],
@@ -1897,17 +2073,18 @@ smalltalk.addMethod(
1897
2073
  smalltalk.method({
1898
2074
  selector: "inspectOn:",
1899
2075
  category: 'proxy',
1900
- fn: function (anInspector){
1901
- var self=this;
1902
- var variables=nil;
1903
- (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
1904
- smalltalk.send(variables, "_at_put_", ["#self", smalltalk.send(self, "_jsObject", [])]);
1905
- smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
1906
- for(var i in self['@jsObject']) {
1907
- variables._at_put_(i, self['@jsObject'][i]);
1908
- };
1909
- smalltalk.send(anInspector, "_setVariables_", [variables]);
1910
- return self;},
2076
+ fn: function (anInspector) {
2077
+ var self = this;
2078
+ var variables;
2079
+ variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
2080
+ smalltalk.send(variables, "_at_put_", ["#self", smalltalk.send(self, "_jsObject", [])]);
2081
+ smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
2082
+ for (var i in self['@jsObject']) {
2083
+ variables._at_put_(i, self['@jsObject'][i]);
2084
+ }
2085
+ smalltalk.send(anInspector, "_setVariables_", [variables]);
2086
+ return self;
2087
+ },
1911
2088
  args: ["anInspector"],
1912
2089
  source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self jsObject.\x0a\x09anInspector setLabel: self printString.\x0a\x09<for(var i in self['@jsObject']) {\x0a\x09\x09variables._at_put_(i, self['@jsObject'][i]);\x0a\x09}>.\x0a\x09anInspector setVariables: variables",
1913
2090
  messageSends: ["new", "at:put:", "jsObject", "setLabel:", "printString", "setVariables:"],
@@ -1920,10 +2097,10 @@ smalltalk.addMethod(
1920
2097
  smalltalk.method({
1921
2098
  selector: "jsObject",
1922
2099
  category: 'accessing',
1923
- fn: function (){
1924
- var self=this;
1925
- return self['@jsObject'];
1926
- return self;},
2100
+ fn: function () {
2101
+ var self = this;
2102
+ return self['@jsObject'];
2103
+ },
1927
2104
  args: [],
1928
2105
  source: "jsObject\x0a\x09^jsObject",
1929
2106
  messageSends: [],
@@ -1936,10 +2113,11 @@ smalltalk.addMethod(
1936
2113
  smalltalk.method({
1937
2114
  selector: "jsObject:",
1938
2115
  category: 'accessing',
1939
- fn: function (aJSObject){
1940
- var self=this;
1941
- (self['@jsObject']=aJSObject);
1942
- return self;},
2116
+ fn: function (aJSObject) {
2117
+ var self = this;
2118
+ self['@jsObject'] = aJSObject;
2119
+ return self;
2120
+ },
1943
2121
  args: ["aJSObject"],
1944
2122
  source: "jsObject: aJSObject\x0a\x09jsObject := aJSObject",
1945
2123
  messageSends: [],
@@ -1952,10 +2130,12 @@ smalltalk.addMethod(
1952
2130
  smalltalk.method({
1953
2131
  selector: "printString",
1954
2132
  category: 'proxy',
1955
- fn: function (){
1956
- var self=this;
1957
- return smalltalk.send(smalltalk.send(self, "_jsObject", []), "_toString", []);
1958
- return self;},
2133
+ fn: function () {
2134
+ var self = this;
2135
+ var $1;
2136
+ $1 = smalltalk.send(smalltalk.send(self, "_jsObject", []), "_toString", []);
2137
+ return $1;
2138
+ },
1959
2139
  args: [],
1960
2140
  source: "printString\x0a\x09^self jsObject toString",
1961
2141
  messageSends: ["toString", "jsObject"],
@@ -1969,13 +2149,18 @@ smalltalk.addMethod(
1969
2149
  smalltalk.method({
1970
2150
  selector: "on:",
1971
2151
  category: 'instance creation',
1972
- fn: function (aJSObject){
1973
- var self=this;
1974
- return (function($rec){smalltalk.send($rec, "_jsObject_", [aJSObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
1975
- return self;},
2152
+ fn: function (aJSObject) {
2153
+ var self = this;
2154
+ var $2, $3, $1;
2155
+ $2 = smalltalk.send(self, "_new", []);
2156
+ smalltalk.send($2, "_jsObject_", [aJSObject]);
2157
+ $3 = smalltalk.send($2, "_yourself", []);
2158
+ $1 = $3;
2159
+ return $1;
2160
+ },
1976
2161
  args: ["aJSObject"],
1977
2162
  source: "on: aJSObject\x0a\x09^self new\x0a\x09\x09jsObject: aJSObject;\x0a\x09\x09yourself",
1978
- messageSends: ["jsObject:", "yourself", "new"],
2163
+ messageSends: ["jsObject:", "new", "yourself"],
1979
2164
  referencedClasses: []
1980
2165
  }),
1981
2166
  smalltalk.JSObjectProxy.klass);
@@ -1988,10 +2173,11 @@ smalltalk.addMethod(
1988
2173
  smalltalk.method({
1989
2174
  selector: "&",
1990
2175
  category: 'converting',
1991
- fn: function (aNumber){
1992
- var self=this;
1993
- return self & aNumber;
1994
- return self;},
2176
+ fn: function (aNumber) {
2177
+ var self = this;
2178
+ return self & aNumber;
2179
+ return self;
2180
+ },
1995
2181
  args: ["aNumber"],
1996
2182
  source: "& aNumber\x0a\x09<return self & aNumber>",
1997
2183
  messageSends: [],
@@ -2004,10 +2190,11 @@ smalltalk.addMethod(
2004
2190
  smalltalk.method({
2005
2191
  selector: "*",
2006
2192
  category: 'arithmetic',
2007
- fn: function (aNumber){
2008
- var self=this;
2009
- return self * aNumber;
2010
- return self;},
2193
+ fn: function (aNumber) {
2194
+ var self = this;
2195
+ return self * aNumber;
2196
+ return self;
2197
+ },
2011
2198
  args: ["aNumber"],
2012
2199
  source: "* aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<return self * aNumber>",
2013
2200
  messageSends: [],
@@ -2020,10 +2207,11 @@ smalltalk.addMethod(
2020
2207
  smalltalk.method({
2021
2208
  selector: "+",
2022
2209
  category: 'arithmetic',
2023
- fn: function (aNumber){
2024
- var self=this;
2025
- return self + aNumber;
2026
- return self;},
2210
+ fn: function (aNumber) {
2211
+ var self = this;
2212
+ return self + aNumber;
2213
+ return self;
2214
+ },
2027
2215
  args: ["aNumber"],
2028
2216
  source: "+ aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<return self + aNumber>",
2029
2217
  messageSends: [],
@@ -2036,10 +2224,11 @@ smalltalk.addMethod(
2036
2224
  smalltalk.method({
2037
2225
  selector: "-",
2038
2226
  category: 'arithmetic',
2039
- fn: function (aNumber){
2040
- var self=this;
2041
- return self - aNumber;
2042
- return self;},
2227
+ fn: function (aNumber) {
2228
+ var self = this;
2229
+ return self - aNumber;
2230
+ return self;
2231
+ },
2043
2232
  args: ["aNumber"],
2044
2233
  source: "- aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<return self - aNumber>",
2045
2234
  messageSends: [],
@@ -2052,10 +2241,11 @@ smalltalk.addMethod(
2052
2241
  smalltalk.method({
2053
2242
  selector: "/",
2054
2243
  category: 'arithmetic',
2055
- fn: function (aNumber){
2056
- var self=this;
2057
- return self / aNumber;
2058
- return self;},
2244
+ fn: function (aNumber) {
2245
+ var self = this;
2246
+ return self / aNumber;
2247
+ return self;
2248
+ },
2059
2249
  args: ["aNumber"],
2060
2250
  source: "/ aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<return self / aNumber>",
2061
2251
  messageSends: [],
@@ -2068,10 +2258,11 @@ smalltalk.addMethod(
2068
2258
  smalltalk.method({
2069
2259
  selector: "<",
2070
2260
  category: 'comparing',
2071
- fn: function (aNumber){
2072
- var self=this;
2073
- return self < aNumber;
2074
- return self;},
2261
+ fn: function (aNumber) {
2262
+ var self = this;
2263
+ return self < aNumber;
2264
+ return self;
2265
+ },
2075
2266
  args: ["aNumber"],
2076
2267
  source: "< aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<return self < aNumber>",
2077
2268
  messageSends: [],
@@ -2084,10 +2275,11 @@ smalltalk.addMethod(
2084
2275
  smalltalk.method({
2085
2276
  selector: "<=",
2086
2277
  category: 'comparing',
2087
- fn: function (aNumber){
2088
- var self=this;
2089
- return self <= aNumber;
2090
- return self;},
2278
+ fn: function (aNumber) {
2279
+ var self = this;
2280
+ return self <= aNumber;
2281
+ return self;
2282
+ },
2091
2283
  args: ["aNumber"],
2092
2284
  source: "<= aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<return self <= aNumber>",
2093
2285
  messageSends: [],
@@ -2100,13 +2292,16 @@ smalltalk.addMethod(
2100
2292
  smalltalk.method({
2101
2293
  selector: "=",
2102
2294
  category: 'comparing',
2103
- fn: function (aNumber){
2104
- var self=this;
2105
- var $early={};
2106
- try{((($receiver = smalltalk.send(aNumber, "_isNumber", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw $early=[false]})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw $early=[false]})();})]));
2107
- return Number(self) == aNumber;
2108
- return self;
2109
- } catch(e) {if(e===$early)return e[0]; throw e}},
2295
+ fn: function (aNumber) {
2296
+ var self = this;
2297
+ var $1;
2298
+ $1 = smalltalk.send(aNumber, "_isNumber", []);
2299
+ if (!smalltalk.assert($1)) {
2300
+ return false;
2301
+ }
2302
+ return Number(self) == aNumber;
2303
+ return self;
2304
+ },
2110
2305
  args: ["aNumber"],
2111
2306
  source: "= aNumber\x0a\x09aNumber isNumber ifFalse: [^false]. \x0a\x09<return Number(self) == aNumber>",
2112
2307
  messageSends: ["ifFalse:", "isNumber"],
@@ -2119,10 +2314,11 @@ smalltalk.addMethod(
2119
2314
  smalltalk.method({
2120
2315
  selector: ">",
2121
2316
  category: 'comparing',
2122
- fn: function (aNumber){
2123
- var self=this;
2124
- return self > aNumber;
2125
- return self;},
2317
+ fn: function (aNumber) {
2318
+ var self = this;
2319
+ return self > aNumber;
2320
+ return self;
2321
+ },
2126
2322
  args: ["aNumber"],
2127
2323
  source: "> aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<return self >> aNumber>",
2128
2324
  messageSends: [],
@@ -2135,10 +2331,11 @@ smalltalk.addMethod(
2135
2331
  smalltalk.method({
2136
2332
  selector: ">=",
2137
2333
  category: 'comparing',
2138
- fn: function (aNumber){
2139
- var self=this;
2140
- return self >= aNumber;
2141
- return self;},
2334
+ fn: function (aNumber) {
2335
+ var self = this;
2336
+ return self >= aNumber;
2337
+ return self;
2338
+ },
2142
2339
  args: ["aNumber"],
2143
2340
  source: ">= aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<return self >>= aNumber>",
2144
2341
  messageSends: [],
@@ -2151,10 +2348,12 @@ smalltalk.addMethod(
2151
2348
  smalltalk.method({
2152
2349
  selector: "@",
2153
2350
  category: 'converting',
2154
- fn: function (aNumber){
2155
- var self=this;
2156
- return smalltalk.send((smalltalk.Point || Point), "_x_y_", [self, aNumber]);
2157
- return self;},
2351
+ fn: function (aNumber) {
2352
+ var self = this;
2353
+ var $1;
2354
+ $1 = smalltalk.send(smalltalk.Point || Point, "_x_y_", [self, aNumber]);
2355
+ return $1;
2356
+ },
2158
2357
  args: ["aNumber"],
2159
2358
  source: "@ aNumber\x0a\x09^Point x: self y: aNumber",
2160
2359
  messageSends: ["x:y:"],
@@ -2167,10 +2366,11 @@ smalltalk.addMethod(
2167
2366
  smalltalk.method({
2168
2367
  selector: "\x5c\x5c",
2169
2368
  category: 'arithmetic',
2170
- fn: function (aNumber){
2171
- var self=this;
2172
- return self % aNumber;
2173
- return self;},
2369
+ fn: function (aNumber) {
2370
+ var self = this;
2371
+ return self % aNumber;
2372
+ return self;
2373
+ },
2174
2374
  args: ["aNumber"],
2175
2375
  source: "\x5c\x5c aNumber\x0a\x09<return self % aNumber>",
2176
2376
  messageSends: [],
@@ -2178,15 +2378,33 @@ referencedClasses: []
2178
2378
  }),
2179
2379
  smalltalk.Number);
2180
2380
 
2381
+ smalltalk.addMethod(
2382
+ "_abs",
2383
+ smalltalk.method({
2384
+ selector: "abs",
2385
+ category: 'arithmetic',
2386
+ fn: function () {
2387
+ var self = this;
2388
+ var $1;
2389
+ $1 = Math.abs(self);
2390
+ return $1;
2391
+ },
2392
+ args: [],
2393
+ source: "abs\x0a\x09^ <Math.abs(self);>",
2394
+ messageSends: [],
2395
+ referencedClasses: []
2396
+ }),
2397
+ smalltalk.Number);
2398
+
2181
2399
  smalltalk.addMethod(
2182
2400
  "_asJSON",
2183
2401
  smalltalk.method({
2184
2402
  selector: "asJSON",
2185
2403
  category: 'converting',
2186
- fn: function (){
2187
- var self=this;
2188
- return self;
2189
- return self;},
2404
+ fn: function () {
2405
+ var self = this;
2406
+ return self;
2407
+ },
2190
2408
  args: [],
2191
2409
  source: "asJSON\x0a\x09^self",
2192
2410
  messageSends: [],
@@ -2199,10 +2417,12 @@ smalltalk.addMethod(
2199
2417
  smalltalk.method({
2200
2418
  selector: "asJavascript",
2201
2419
  category: 'converting',
2202
- fn: function (){
2203
- var self=this;
2204
- return smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_printString", [])]), "__comma", [")"]);
2205
- return self;},
2420
+ fn: function () {
2421
+ var self = this;
2422
+ var $1;
2423
+ $1 = smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(self, "_printString", [])]), "__comma", [")"]);
2424
+ return $1;
2425
+ },
2206
2426
  args: [],
2207
2427
  source: "asJavascript\x0a\x09^'(', self printString, ')'",
2208
2428
  messageSends: [",", "printString"],
@@ -2215,10 +2435,12 @@ smalltalk.addMethod(
2215
2435
  smalltalk.method({
2216
2436
  selector: "asPoint",
2217
2437
  category: 'converting',
2218
- fn: function (){
2219
- var self=this;
2220
- return smalltalk.send((smalltalk.Point || Point), "_x_y_", [self, self]);
2221
- return self;},
2438
+ fn: function () {
2439
+ var self = this;
2440
+ var $1;
2441
+ $1 = smalltalk.send(smalltalk.Point || Point, "_x_y_", [self, self]);
2442
+ return $1;
2443
+ },
2222
2444
  args: [],
2223
2445
  source: "asPoint\x0a\x09^Point x: self y: self",
2224
2446
  messageSends: ["x:y:"],
@@ -2231,10 +2453,12 @@ smalltalk.addMethod(
2231
2453
  smalltalk.method({
2232
2454
  selector: "asString",
2233
2455
  category: 'converting',
2234
- fn: function (){
2235
- var self=this;
2236
- return smalltalk.send(self, "_printString", []);
2237
- return self;},
2456
+ fn: function () {
2457
+ var self = this;
2458
+ var $1;
2459
+ $1 = smalltalk.send(self, "_printString", []);
2460
+ return $1;
2461
+ },
2238
2462
  args: [],
2239
2463
  source: "asString\x0a\x09^self printString",
2240
2464
  messageSends: ["printString"],
@@ -2247,10 +2471,12 @@ smalltalk.addMethod(
2247
2471
  smalltalk.method({
2248
2472
  selector: "atRandom",
2249
2473
  category: 'converting',
2250
- fn: function (){
2251
- var self=this;
2252
- return ((($receiver = smalltalk.send(((($receiver = smalltalk.send(smalltalk.send((smalltalk.Random || Random), "_new", []), "_next", [])).klass === smalltalk.Number) ? $receiver *self : smalltalk.send($receiver, "__star", [self])), "_truncated", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));
2253
- return self;},
2474
+ fn: function () {
2475
+ var self = this;
2476
+ var $1;
2477
+ $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.Random || Random, "_new", []), "_next", []), "__star", [self]), "_truncated", []), "__plus", [1]);
2478
+ return $1;
2479
+ },
2254
2480
  args: [],
2255
2481
  source: "atRandom\x0a ^(Random new next * self) truncated + 1",
2256
2482
  messageSends: ["+", "truncated", "*", "next", "new"],
@@ -2263,10 +2489,11 @@ smalltalk.addMethod(
2263
2489
  smalltalk.method({
2264
2490
  selector: "clearInterval",
2265
2491
  category: 'timeouts/intervals',
2266
- fn: function (){
2267
- var self=this;
2268
- clearInterval(Number(self));
2269
- return self;},
2492
+ fn: function () {
2493
+ var self = this;
2494
+ clearInterval(Number(self));
2495
+ return self;
2496
+ },
2270
2497
  args: [],
2271
2498
  source: "clearInterval\x0a\x09<clearInterval(Number(self))>",
2272
2499
  messageSends: [],
@@ -2279,10 +2506,11 @@ smalltalk.addMethod(
2279
2506
  smalltalk.method({
2280
2507
  selector: "clearTimeout",
2281
2508
  category: 'timeouts/intervals',
2282
- fn: function (){
2283
- var self=this;
2284
- clearTimeout(Number(self));
2285
- return self;},
2509
+ fn: function () {
2510
+ var self = this;
2511
+ clearTimeout(Number(self));
2512
+ return self;
2513
+ },
2286
2514
  args: [],
2287
2515
  source: "clearTimeout\x0a\x09<clearTimeout(Number(self))>",
2288
2516
  messageSends: [],
@@ -2295,10 +2523,10 @@ smalltalk.addMethod(
2295
2523
  smalltalk.method({
2296
2524
  selector: "copy",
2297
2525
  category: 'copying',
2298
- fn: function (){
2299
- var self=this;
2300
- return self;
2301
- return self;},
2526
+ fn: function () {
2527
+ var self = this;
2528
+ return self;
2529
+ },
2302
2530
  args: [],
2303
2531
  source: "copy\x0a\x09^self",
2304
2532
  messageSends: [],
@@ -2311,10 +2539,12 @@ smalltalk.addMethod(
2311
2539
  smalltalk.method({
2312
2540
  selector: "deepCopy",
2313
2541
  category: 'copying',
2314
- fn: function (){
2315
- var self=this;
2316
- return smalltalk.send(self, "_copy", []);
2317
- return self;},
2542
+ fn: function () {
2543
+ var self = this;
2544
+ var $1;
2545
+ $1 = smalltalk.send(self, "_copy", []);
2546
+ return $1;
2547
+ },
2318
2548
  args: [],
2319
2549
  source: "deepCopy\x0a\x09^self copy",
2320
2550
  messageSends: ["copy"],
@@ -2327,10 +2557,12 @@ smalltalk.addMethod(
2327
2557
  smalltalk.method({
2328
2558
  selector: "even",
2329
2559
  category: 'testing',
2330
- fn: function (){
2331
- var self=this;
2332
- return smalltalk.send((0), "__eq", [smalltalk.send(self, "_\\\\", [(2)])]);
2333
- return self;},
2560
+ fn: function () {
2561
+ var self = this;
2562
+ var $1;
2563
+ $1 = smalltalk.send(0, "__eq", [smalltalk.send(self, "_\\\\", [2])]);
2564
+ return $1;
2565
+ },
2334
2566
  args: [],
2335
2567
  source: "even\x0a\x09^ 0 = (self \x5c\x5c 2)",
2336
2568
  messageSends: ["=", "\x5c\x5c\x5c\x5c"],
@@ -2343,10 +2575,12 @@ smalltalk.addMethod(
2343
2575
  smalltalk.method({
2344
2576
  selector: "identityHash",
2345
2577
  category: 'accessing',
2346
- fn: function (){
2347
- var self=this;
2348
- return smalltalk.send(smalltalk.send(self, "_asString", []), "__comma", ["n"]);
2349
- return self;},
2578
+ fn: function () {
2579
+ var self = this;
2580
+ var $1;
2581
+ $1 = smalltalk.send(smalltalk.send(self, "_asString", []), "__comma", ["n"]);
2582
+ return $1;
2583
+ },
2350
2584
  args: [],
2351
2585
  source: "identityHash\x0a\x09^self asString, 'n'",
2352
2586
  messageSends: [",", "asString"],
@@ -2359,10 +2593,10 @@ smalltalk.addMethod(
2359
2593
  smalltalk.method({
2360
2594
  selector: "isNumber",
2361
2595
  category: 'testing',
2362
- fn: function (){
2363
- var self=this;
2364
- return true;
2365
- return self;},
2596
+ fn: function () {
2597
+ var self = this;
2598
+ return true;
2599
+ },
2366
2600
  args: [],
2367
2601
  source: "isNumber\x0a\x09^true",
2368
2602
  messageSends: [],
@@ -2375,10 +2609,12 @@ smalltalk.addMethod(
2375
2609
  smalltalk.method({
2376
2610
  selector: "isZero",
2377
2611
  category: 'testing',
2378
- fn: function (){
2379
- var self=this;
2380
- return smalltalk.send(self, "__eq", [(0)]);
2381
- return self;},
2612
+ fn: function () {
2613
+ var self = this;
2614
+ var $1;
2615
+ $1 = smalltalk.send(self, "__eq", [0]);
2616
+ return $1;
2617
+ },
2382
2618
  args: [],
2383
2619
  source: "isZero\x0a\x09^self = 0",
2384
2620
  messageSends: ["="],
@@ -2391,10 +2627,11 @@ smalltalk.addMethod(
2391
2627
  smalltalk.method({
2392
2628
  selector: "max:",
2393
2629
  category: 'arithmetic',
2394
- fn: function (aNumber){
2395
- var self=this;
2396
- return Math.max(self, aNumber);;
2397
- return self;},
2630
+ fn: function (aNumber) {
2631
+ var self = this;
2632
+ return Math.max(self, aNumber);
2633
+ return self;
2634
+ },
2398
2635
  args: ["aNumber"],
2399
2636
  source: "max: aNumber\x0a\x09<return Math.max(self, aNumber);>",
2400
2637
  messageSends: [],
@@ -2407,10 +2644,11 @@ smalltalk.addMethod(
2407
2644
  smalltalk.method({
2408
2645
  selector: "min:",
2409
2646
  category: 'arithmetic',
2410
- fn: function (aNumber){
2411
- var self=this;
2412
- return Math.min(self, aNumber);;
2413
- return self;},
2647
+ fn: function (aNumber) {
2648
+ var self = this;
2649
+ return Math.min(self, aNumber);
2650
+ return self;
2651
+ },
2414
2652
  args: ["aNumber"],
2415
2653
  source: "min: aNumber\x0a\x09<return Math.min(self, aNumber);>",
2416
2654
  messageSends: [],
@@ -2423,10 +2661,12 @@ smalltalk.addMethod(
2423
2661
  smalltalk.method({
2424
2662
  selector: "negated",
2425
2663
  category: 'arithmetic',
2426
- fn: function (){
2427
- var self=this;
2428
- return (0) - self;
2429
- return self;},
2664
+ fn: function () {
2665
+ var self = this;
2666
+ var $1;
2667
+ $1 = smalltalk.send(0, "__minus", [self]);
2668
+ return $1;
2669
+ },
2430
2670
  args: [],
2431
2671
  source: "negated\x0a\x09^0 - self",
2432
2672
  messageSends: ["-"],
@@ -2439,10 +2679,12 @@ smalltalk.addMethod(
2439
2679
  smalltalk.method({
2440
2680
  selector: "negative",
2441
2681
  category: 'testing',
2442
- fn: function (){
2443
- var self=this;
2444
- return self < (0);
2445
- return self;},
2682
+ fn: function () {
2683
+ var self = this;
2684
+ var $1;
2685
+ $1 = smalltalk.send(self, "__lt", [0]);
2686
+ return $1;
2687
+ },
2446
2688
  args: [],
2447
2689
  source: "negative\x0a\x09\x22Answer whether the receiver is mathematically negative.\x22\x0a\x0a\x09^ self < 0",
2448
2690
  messageSends: ["<"],
@@ -2455,10 +2697,12 @@ smalltalk.addMethod(
2455
2697
  smalltalk.method({
2456
2698
  selector: "odd",
2457
2699
  category: 'testing',
2458
- fn: function (){
2459
- var self=this;
2460
- return smalltalk.send(smalltalk.send(self, "_even", []), "_not", []);
2461
- return self;},
2700
+ fn: function () {
2701
+ var self = this;
2702
+ var $1;
2703
+ $1 = smalltalk.send(smalltalk.send(self, "_even", []), "_not", []);
2704
+ return $1;
2705
+ },
2462
2706
  args: [],
2463
2707
  source: "odd\x0a\x09^ self even not",
2464
2708
  messageSends: ["not", "even"],
@@ -2471,10 +2715,12 @@ smalltalk.addMethod(
2471
2715
  smalltalk.method({
2472
2716
  selector: "positive",
2473
2717
  category: 'testing',
2474
- fn: function (){
2475
- var self=this;
2476
- return self >= (0);
2477
- return self;},
2718
+ fn: function () {
2719
+ var self = this;
2720
+ var $1;
2721
+ $1 = smalltalk.send(self, "__gt_eq", [0]);
2722
+ return $1;
2723
+ },
2478
2724
  args: [],
2479
2725
  source: "positive\x0a\x09\x22Answer whether the receiver is positive or equal to 0. (ST-80 protocol).\x22\x0a\x0a\x09^ self >= 0",
2480
2726
  messageSends: [">="],
@@ -2487,10 +2733,11 @@ smalltalk.addMethod(
2487
2733
  smalltalk.method({
2488
2734
  selector: "printShowingDecimalPlaces:",
2489
2735
  category: 'printing',
2490
- fn: function (placesDesired){
2491
- var self=this;
2492
- return self.toFixed(placesDesired);
2493
- return self;},
2736
+ fn: function (placesDesired) {
2737
+ var self = this;
2738
+ return self.toFixed(placesDesired);
2739
+ return self;
2740
+ },
2494
2741
  args: ["placesDesired"],
2495
2742
  source: "printShowingDecimalPlaces: placesDesired\x0a\x09<return self.toFixed(placesDesired)>",
2496
2743
  messageSends: [],
@@ -2503,10 +2750,11 @@ smalltalk.addMethod(
2503
2750
  smalltalk.method({
2504
2751
  selector: "printString",
2505
2752
  category: 'printing',
2506
- fn: function (){
2507
- var self=this;
2508
- return String(self);
2509
- return self;},
2753
+ fn: function () {
2754
+ var self = this;
2755
+ return String(self);
2756
+ return self;
2757
+ },
2510
2758
  args: [],
2511
2759
  source: "printString\x0a\x09<return String(self)>",
2512
2760
  messageSends: [],
@@ -2519,10 +2767,11 @@ smalltalk.addMethod(
2519
2767
  smalltalk.method({
2520
2768
  selector: "rounded",
2521
2769
  category: 'converting',
2522
- fn: function (){
2523
- var self=this;
2524
- return Math.round(self);;
2525
- return self;},
2770
+ fn: function () {
2771
+ var self = this;
2772
+ return Math.round(self);
2773
+ return self;
2774
+ },
2526
2775
  args: [],
2527
2776
  source: "rounded\x0a\x09<return Math.round(self);>",
2528
2777
  messageSends: [],
@@ -2535,10 +2784,11 @@ smalltalk.addMethod(
2535
2784
  smalltalk.method({
2536
2785
  selector: "sqrt",
2537
2786
  category: 'arithmetic',
2538
- fn: function (){
2539
- var self=this;
2540
- return Math.sqrt(self);
2541
- return self;},
2787
+ fn: function () {
2788
+ var self = this;
2789
+ return Math.sqrt(self);
2790
+ return self;
2791
+ },
2542
2792
  args: [],
2543
2793
  source: "sqrt\x0a\x09<return Math.sqrt(self)>",
2544
2794
  messageSends: [],
@@ -2551,10 +2801,12 @@ smalltalk.addMethod(
2551
2801
  smalltalk.method({
2552
2802
  selector: "squared",
2553
2803
  category: 'arithmetic',
2554
- fn: function (){
2555
- var self=this;
2556
- return self * self;
2557
- return self;},
2804
+ fn: function () {
2805
+ var self = this;
2806
+ var $1;
2807
+ $1 = smalltalk.send(self, "__star", [self]);
2808
+ return $1;
2809
+ },
2558
2810
  args: [],
2559
2811
  source: "squared\x0a\x09^self * self",
2560
2812
  messageSends: ["*"],
@@ -2567,17 +2819,18 @@ smalltalk.addMethod(
2567
2819
  smalltalk.method({
2568
2820
  selector: "timesRepeat:",
2569
2821
  category: 'enumerating',
2570
- fn: function (aBlock){
2571
- var self=this;
2572
- var integer=nil;
2573
- var count=nil;
2574
- (integer=smalltalk.send(self, "_truncated", []));
2575
- (count=(1));
2576
- (function(){while(!(function(){return ((($receiver = count).klass === smalltalk.Number) ? $receiver >self : smalltalk.send($receiver, "__gt", [self]));})()) {(function(){smalltalk.send(aBlock, "_value", []);return (count=((($receiver = count).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));})()}})();
2577
- return self;},
2822
+ fn: function (aBlock) {
2823
+ var self = this;
2824
+ var integer;
2825
+ var count;
2826
+ integer = smalltalk.send(self, "_truncated", []);
2827
+ count = 1;
2828
+ smalltalk.send(function () {return smalltalk.send(count, "__gt", [self]);}, "_whileFalse_", [function () {smalltalk.send(aBlock, "_value", []);count = smalltalk.send(count, "__plus", [1]);return count;}]);
2829
+ return self;
2830
+ },
2578
2831
  args: ["aBlock"],
2579
2832
  source: "timesRepeat: aBlock\x0a\x09| integer count |\x0a\x09integer := self truncated.\x0a\x09count := 1.\x0a\x09[count > self] whileFalse: [\x0a\x09 aBlock value.\x0a\x09 count := count + 1]",
2580
- messageSends: ["truncated", "whileFalse:", ">", "value", "+"],
2833
+ messageSends: ["truncated", "whileFalse:", "value", "+", ">"],
2581
2834
  referencedClasses: []
2582
2835
  }),
2583
2836
  smalltalk.Number);
@@ -2587,22 +2840,22 @@ smalltalk.addMethod(
2587
2840
  smalltalk.method({
2588
2841
  selector: "to:",
2589
2842
  category: 'converting',
2590
- fn: function (aNumber){
2591
- var self=this;
2592
- var array=nil;
2593
- var first=nil;
2594
- var last=nil;
2595
- var count=nil;
2596
- (first=smalltalk.send(self, "_truncated", []));
2597
- (last=((($receiver = smalltalk.send(aNumber, "_truncated", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));
2598
- (count=(1));
2599
- (array=smalltalk.send((smalltalk.Array || Array), "_new", []));
2600
- smalltalk.send(((($receiver = last).klass === smalltalk.Number) ? $receiver -first : smalltalk.send($receiver, "__minus", [first])), "_timesRepeat_", [(function(){smalltalk.send(array, "_at_put_", [count, first]);(count=((($receiver = count).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));return (first=((($receiver = first).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));})]);
2601
- return array;
2602
- return self;},
2843
+ fn: function (aNumber) {
2844
+ var self = this;
2845
+ var array;
2846
+ var first;
2847
+ var last;
2848
+ var count;
2849
+ first = smalltalk.send(self, "_truncated", []);
2850
+ last = smalltalk.send(smalltalk.send(aNumber, "_truncated", []), "__plus", [1]);
2851
+ count = 1;
2852
+ array = smalltalk.send(smalltalk.Array || Array, "_new", []);
2853
+ smalltalk.send(smalltalk.send(last, "__minus", [first]), "_timesRepeat_", [function () {smalltalk.send(array, "_at_put_", [count, first]);count = smalltalk.send(count, "__plus", [1]);count;first = smalltalk.send(first, "__plus", [1]);return first;}]);
2854
+ return array;
2855
+ },
2603
2856
  args: ["aNumber"],
2604
2857
  source: "to: aNumber\x0a\x09| array first last count |\x0a\x09first := self truncated.\x0a\x09last := aNumber truncated + 1.\x0a\x09count := 1.\x0a\x09array := Array new.\x0a\x09(last - first) timesRepeat: [\x0a\x09 array at: count put: first.\x0a\x09 count := count + 1.\x0a\x09 first := first + 1].\x0a\x09^array",
2605
- messageSends: ["truncated", "+", "new", "timesRepeat:", "-", "at:put:"],
2858
+ messageSends: ["truncated", "+", "new", "timesRepeat:", "at:put:", "-"],
2606
2859
  referencedClasses: ["Array"]
2607
2860
  }),
2608
2861
  smalltalk.Number);
@@ -2612,21 +2865,30 @@ smalltalk.addMethod(
2612
2865
  smalltalk.method({
2613
2866
  selector: "to:by:",
2614
2867
  category: 'converting',
2615
- fn: function (stop, step){
2616
- var self=this;
2617
- var array=nil;
2618
- var value=nil;
2619
- var pos=nil;
2620
- (value=self);
2621
- (array=smalltalk.send((smalltalk.Array || Array), "_new", []));
2622
- (pos=(1));
2623
- ((($receiver = smalltalk.send(step, "__eq", [(0)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_error_", ["step must be non-zero"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_error_", ["step must be non-zero"]);})]));
2624
- ((($receiver = ((($receiver = step).klass === smalltalk.Number) ? $receiver <(0) : smalltalk.send($receiver, "__lt", [(0)]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);(pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));return (value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step])));})()}})();})() : (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);(pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));return (value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step])));})()}})();})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);(pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));return (value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step])));})()}})();}), (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);(pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));return (value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step])));})()}})();})]));
2625
- return array;
2626
- return self;},
2868
+ fn: function (stop, step) {
2869
+ var self = this;
2870
+ var $1, $2;
2871
+ var array;
2872
+ var value;
2873
+ var pos;
2874
+ value = self;
2875
+ array = smalltalk.send(smalltalk.Array || Array, "_new", []);
2876
+ pos = 1;
2877
+ $1 = smalltalk.send(step, "__eq", [0]);
2878
+ if (smalltalk.assert($1)) {
2879
+ smalltalk.send(self, "_error_", ["step must be non-zero"]);
2880
+ }
2881
+ $2 = smalltalk.send(step, "__lt", [0]);
2882
+ if (smalltalk.assert($2)) {
2883
+ smalltalk.send(function () {return smalltalk.send(value, "__gt_eq", [stop]);}, "_whileTrue_", [function () {smalltalk.send(array, "_at_put_", [pos, value]);pos = smalltalk.send(pos, "__plus", [1]);pos;value = smalltalk.send(value, "__plus", [step]);return value;}]);
2884
+ } else {
2885
+ smalltalk.send(function () {return smalltalk.send(value, "__lt_eq", [stop]);}, "_whileTrue_", [function () {smalltalk.send(array, "_at_put_", [pos, value]);pos = smalltalk.send(pos, "__plus", [1]);pos;value = smalltalk.send(value, "__plus", [step]);return value;}]);
2886
+ }
2887
+ return array;
2888
+ },
2627
2889
  args: ["stop", "step"],
2628
2890
  source: "to: stop by: step\x0a\x09| array value pos |\x0a\x09value := self.\x0a\x09array := Array new.\x0a\x09pos := 1.\x0a\x09step = 0 ifTrue: [self error: 'step must be non-zero'].\x0a\x09step < 0\x0a\x09\x09ifTrue: [[ value >= stop ] whileTrue: [\x0a\x09 \x09\x09\x09array at: pos put: value.\x0a\x09 \x09\x09\x09pos := pos + 1.\x0a\x09 \x09\x09\x09value := value + step]]\x0a\x09\x09ifFalse: [[ value <= stop ] whileTrue: [\x0a\x09 \x09\x09\x09array at: pos put: value.\x0a\x09 \x09\x09\x09pos := pos + 1.\x0a\x09 \x09\x09\x09value := value + step]].\x0a\x09^array",
2629
- messageSends: ["new", "ifTrue:", "=", "error:", "ifTrue:ifFalse:", "<", "whileTrue:", ">=", "at:put:", "+", "<="],
2891
+ messageSends: ["new", "ifTrue:", "error:", "=", "ifTrue:ifFalse:", "whileTrue:", "at:put:", "+", ">=", "<=", "<"],
2630
2892
  referencedClasses: ["Array"]
2631
2893
  }),
2632
2894
  smalltalk.Number);
@@ -2636,16 +2898,26 @@ smalltalk.addMethod(
2636
2898
  smalltalk.method({
2637
2899
  selector: "to:by:do:",
2638
2900
  category: 'enumerating',
2639
- fn: function (stop, step, aBlock){
2640
- var self=this;
2641
- var value=nil;
2642
- (value=self);
2643
- ((($receiver = smalltalk.send(step, "__eq", [(0)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_error_", ["step must be non-zero"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_error_", ["step must be non-zero"]);})]));
2644
- ((($receiver = ((($receiver = step).klass === smalltalk.Number) ? $receiver <(0) : smalltalk.send($receiver, "__lt", [(0)]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return (value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step])));})()}})();})() : (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return (value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step])));})()}})();})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return (value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step])));})()}})();}), (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return (value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step])));})()}})();})]));
2645
- return self;},
2901
+ fn: function (stop, step, aBlock) {
2902
+ var self = this;
2903
+ var $1, $2;
2904
+ var value;
2905
+ value = self;
2906
+ $1 = smalltalk.send(step, "__eq", [0]);
2907
+ if (smalltalk.assert($1)) {
2908
+ smalltalk.send(self, "_error_", ["step must be non-zero"]);
2909
+ }
2910
+ $2 = smalltalk.send(step, "__lt", [0]);
2911
+ if (smalltalk.assert($2)) {
2912
+ smalltalk.send(function () {return smalltalk.send(value, "__gt_eq", [stop]);}, "_whileTrue_", [function () {smalltalk.send(aBlock, "_value_", [value]);value = smalltalk.send(value, "__plus", [step]);return value;}]);
2913
+ } else {
2914
+ smalltalk.send(function () {return smalltalk.send(value, "__lt_eq", [stop]);}, "_whileTrue_", [function () {smalltalk.send(aBlock, "_value_", [value]);value = smalltalk.send(value, "__plus", [step]);return value;}]);
2915
+ }
2916
+ return self;
2917
+ },
2646
2918
  args: ["stop", "step", "aBlock"],
2647
2919
  source: "to: stop by: step do: aBlock\x0a\x09| value |\x0a\x09value := self.\x0a\x09step = 0 ifTrue: [self error: 'step must be non-zero'].\x0a\x09step < 0\x0a\x09\x09ifTrue: [[ value >= stop ] whileTrue: [\x0a\x09 \x09\x09\x09aBlock value: value.\x0a\x09 \x09\x09\x09value := value + step]]\x0a\x09\x09ifFalse: [[ value <= stop ] whileTrue: [\x0a\x09 \x09\x09\x09aBlock value: value.\x0a\x09 \x09\x09\x09value := value + step]]",
2648
- messageSends: ["ifTrue:", "=", "error:", "ifTrue:ifFalse:", "<", "whileTrue:", ">=", "value:", "+", "<="],
2920
+ messageSends: ["ifTrue:", "error:", "=", "ifTrue:ifFalse:", "whileTrue:", "value:", "+", ">=", "<=", "<"],
2649
2921
  referencedClasses: []
2650
2922
  }),
2651
2923
  smalltalk.Number);
@@ -2655,15 +2927,16 @@ smalltalk.addMethod(
2655
2927
  smalltalk.method({
2656
2928
  selector: "to:do:",
2657
2929
  category: 'enumerating',
2658
- fn: function (stop, aBlock){
2659
- var self=this;
2660
- var nextValue=nil;
2661
- (nextValue=self);
2662
- (function(){while((function(){return ((($receiver = nextValue).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [nextValue]);return (nextValue=((($receiver = nextValue).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));})()}})();
2663
- return self;},
2930
+ fn: function (stop, aBlock) {
2931
+ var self = this;
2932
+ var nextValue;
2933
+ nextValue = self;
2934
+ smalltalk.send(function () {return smalltalk.send(nextValue, "__lt_eq", [stop]);}, "_whileTrue_", [function () {smalltalk.send(aBlock, "_value_", [nextValue]);nextValue = smalltalk.send(nextValue, "__plus", [1]);return nextValue;}]);
2935
+ return self;
2936
+ },
2664
2937
  args: ["stop", "aBlock"],
2665
2938
  source: "to: stop do: aBlock\x0a\x09\x22Evaluate aBlock for each number from self to aNumber.\x22\x0a\x09| nextValue |\x0a\x09nextValue := self.\x0a\x09[nextValue <= stop]\x0a\x09\x09whileTrue: \x0a\x09\x09\x09[aBlock value: nextValue.\x0a\x09\x09\x09nextValue := nextValue + 1]",
2666
- messageSends: ["whileTrue:", "<=", "value:", "+"],
2939
+ messageSends: ["whileTrue:", "value:", "+", "<="],
2667
2940
  referencedClasses: []
2668
2941
  }),
2669
2942
  smalltalk.Number);
@@ -2673,12 +2946,18 @@ smalltalk.addMethod(
2673
2946
  smalltalk.method({
2674
2947
  selector: "truncated",
2675
2948
  category: 'converting',
2676
- fn: function (){
2677
- var self=this;
2678
- var result=nil;
2679
- ((($receiver = self >= (0)).klass === smalltalk.Boolean) ? ($receiver ? (function(){return result = Math.floor(self);;})() : (function(){return result = (Math.floor(self * (-1)) * (-1));;})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return result = Math.floor(self);;}), (function(){return result = (Math.floor(self * (-1)) * (-1));;})]));
2680
- return result;
2681
- return self;},
2949
+ fn: function () {
2950
+ var self = this;
2951
+ var $1;
2952
+ var result;
2953
+ $1 = smalltalk.send(self, "__gt_eq", [0]);
2954
+ if (smalltalk.assert($1)) {
2955
+ result = Math.floor(self);
2956
+ } else {
2957
+ result = Math.floor(self * -1) * -1;
2958
+ }
2959
+ return result;
2960
+ },
2682
2961
  args: [],
2683
2962
  source: "truncated\x0a|result|\x0a\x0a self >= 0 \x0a ifTrue: [<result = Math.floor(self);>]\x0a ifFalse: [<result = (Math.floor(self * (-1)) * (-1));>].\x0a\x0a ^ result",
2684
2963
  messageSends: ["ifTrue:ifFalse:", ">="],
@@ -2691,10 +2970,11 @@ smalltalk.addMethod(
2691
2970
  smalltalk.method({
2692
2971
  selector: "|",
2693
2972
  category: 'converting',
2694
- fn: function (aNumber){
2695
- var self=this;
2696
- return self | aNumber;
2697
- return self;},
2973
+ fn: function (aNumber) {
2974
+ var self = this;
2975
+ return self | aNumber;
2976
+ return self;
2977
+ },
2698
2978
  args: ["aNumber"],
2699
2979
  source: "| aNumber\x0a\x09<return self | aNumber>",
2700
2980
  messageSends: [],
@@ -2708,10 +2988,11 @@ smalltalk.addMethod(
2708
2988
  smalltalk.method({
2709
2989
  selector: "pi",
2710
2990
  category: 'instance creation',
2711
- fn: function (){
2712
- var self=this;
2713
- return Math.PI;
2714
- return self;},
2991
+ fn: function () {
2992
+ var self = this;
2993
+ return Math.PI;
2994
+ return self;
2995
+ },
2715
2996
  args: [],
2716
2997
  source: "pi\x0a\x09<return Math.PI>",
2717
2998
  messageSends: [],
@@ -2727,13 +3008,15 @@ smalltalk.addMethod(
2727
3008
  smalltalk.method({
2728
3009
  selector: "classes",
2729
3010
  category: 'classes',
2730
- fn: function (){
2731
- var self=this;
2732
- return smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", []), "_select_", [(function(c){return smalltalk.send(smalltalk.send(c, "_package", []), "__eq_eq", [self]);})]);
2733
- return self;},
3011
+ fn: function () {
3012
+ var self = this;
3013
+ var $1;
3014
+ $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_classes", []), "_select_", [function (c) {return smalltalk.send(smalltalk.send(c, "_package", []), "__eq_eq", [self]);}]);
3015
+ return $1;
3016
+ },
2734
3017
  args: [],
2735
3018
  source: "classes\x0a\x09\x22We need to do a reverse scan.\x22\x0a\x09^Smalltalk current classes select: [:c | c package == self]",
2736
- messageSends: ["select:", "classes", "current", "==", "package"],
3019
+ messageSends: ["select:", "==", "package", "classes", "current"],
2737
3020
  referencedClasses: ["Smalltalk"]
2738
3021
  }),
2739
3022
  smalltalk.Package);
@@ -2743,10 +3026,17 @@ smalltalk.addMethod(
2743
3026
  smalltalk.method({
2744
3027
  selector: "commitPathJs",
2745
3028
  category: 'accessing',
2746
- fn: function (){
2747
- var self=this;
2748
- return (($receiver = self['@commitPathJs']) == nil || $receiver == undefined) ? (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_defaultCommitPathJs", []);})() : $receiver;
2749
- return self;},
3029
+ fn: function () {
3030
+ var self = this;
3031
+ var $1;
3032
+ if (($receiver = self['@commitPathJs']) == nil ||
3033
+ $receiver == undefined) {
3034
+ $1 = smalltalk.send(smalltalk.send(self, "_class", []), "_defaultCommitPathJs", []);
3035
+ } else {
3036
+ $1 = self['@commitPathJs'];
3037
+ }
3038
+ return $1;
3039
+ },
2750
3040
  args: [],
2751
3041
  source: "commitPathJs\x0a\x09^ commitPathJs ifNil: [self class defaultCommitPathJs]",
2752
3042
  messageSends: ["ifNil:", "defaultCommitPathJs", "class"],
@@ -2759,10 +3049,11 @@ smalltalk.addMethod(
2759
3049
  smalltalk.method({
2760
3050
  selector: "commitPathJs:",
2761
3051
  category: 'accessing',
2762
- fn: function (aString){
2763
- var self=this;
2764
- (self['@commitPathJs']=aString);
2765
- return self;},
3052
+ fn: function (aString) {
3053
+ var self = this;
3054
+ self['@commitPathJs'] = aString;
3055
+ return self;
3056
+ },
2766
3057
  args: ["aString"],
2767
3058
  source: "commitPathJs: aString\x0a\x09commitPathJs := aString",
2768
3059
  messageSends: [],
@@ -2775,10 +3066,17 @@ smalltalk.addMethod(
2775
3066
  smalltalk.method({
2776
3067
  selector: "commitPathSt",
2777
3068
  category: 'accessing',
2778
- fn: function (){
2779
- var self=this;
2780
- return (($receiver = self['@commitPathSt']) == nil || $receiver == undefined) ? (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_defaultCommitPathSt", []);})() : $receiver;
2781
- return self;},
3069
+ fn: function () {
3070
+ var self = this;
3071
+ var $1;
3072
+ if (($receiver = self['@commitPathSt']) == nil ||
3073
+ $receiver == undefined) {
3074
+ $1 = smalltalk.send(smalltalk.send(self, "_class", []), "_defaultCommitPathSt", []);
3075
+ } else {
3076
+ $1 = self['@commitPathSt'];
3077
+ }
3078
+ return $1;
3079
+ },
2782
3080
  args: [],
2783
3081
  source: "commitPathSt\x0a\x09^ commitPathSt ifNil: [self class defaultCommitPathSt]",
2784
3082
  messageSends: ["ifNil:", "defaultCommitPathSt", "class"],
@@ -2791,10 +3089,11 @@ smalltalk.addMethod(
2791
3089
  smalltalk.method({
2792
3090
  selector: "commitPathSt:",
2793
3091
  category: 'accessing',
2794
- fn: function (aString){
2795
- var self=this;
2796
- (self['@commitPathSt']=aString);
2797
- return self;},
3092
+ fn: function (aString) {
3093
+ var self = this;
3094
+ self['@commitPathSt'] = aString;
3095
+ return self;
3096
+ },
2798
3097
  args: ["aString"],
2799
3098
  source: "commitPathSt: aString\x0a\x09commitPathSt := aString",
2800
3099
  messageSends: [],
@@ -2807,10 +3106,12 @@ smalltalk.addMethod(
2807
3106
  smalltalk.method({
2808
3107
  selector: "dependencies",
2809
3108
  category: 'accessing',
2810
- fn: function (){
2811
- var self=this;
2812
- return smalltalk.send(self, "_propertyAt_ifAbsent_", ["dependencies", (function(){return [];})]);
2813
- return self;},
3109
+ fn: function () {
3110
+ var self = this;
3111
+ var $1;
3112
+ $1 = smalltalk.send(self, "_propertyAt_ifAbsent_", ["dependencies", function () {return [];}]);
3113
+ return $1;
3114
+ },
2814
3115
  args: [],
2815
3116
  source: "dependencies\x0a\x09^self propertyAt: 'dependencies' ifAbsent: [#()]",
2816
3117
  messageSends: ["propertyAt:ifAbsent:"],
@@ -2823,10 +3124,12 @@ smalltalk.addMethod(
2823
3124
  smalltalk.method({
2824
3125
  selector: "dependencies:",
2825
3126
  category: 'accessing',
2826
- fn: function (anArray){
2827
- var self=this;
2828
- return smalltalk.send(self, "_propertyAt_put_", ["dependencies", anArray]);
2829
- return self;},
3127
+ fn: function (anArray) {
3128
+ var self = this;
3129
+ var $1;
3130
+ $1 = smalltalk.send(self, "_propertyAt_put_", ["dependencies", anArray]);
3131
+ return $1;
3132
+ },
2830
3133
  args: ["anArray"],
2831
3134
  source: "dependencies: anArray\x0a\x09^self propertyAt: 'dependencies' put: anArray",
2832
3135
  messageSends: ["propertyAt:put:"],
@@ -2839,10 +3142,11 @@ smalltalk.addMethod(
2839
3142
  smalltalk.method({
2840
3143
  selector: "jsProperties",
2841
3144
  category: 'private',
2842
- fn: function (){
2843
- var self=this;
2844
- return self.properties;
2845
- return self;},
3145
+ fn: function () {
3146
+ var self = this;
3147
+ return self.properties;
3148
+ return self;
3149
+ },
2846
3150
  args: [],
2847
3151
  source: "jsProperties\x0a\x09<return self.properties>",
2848
3152
  messageSends: [],
@@ -2855,10 +3159,11 @@ smalltalk.addMethod(
2855
3159
  smalltalk.method({
2856
3160
  selector: "jsProperties:",
2857
3161
  category: 'private',
2858
- fn: function (aJSObject){
2859
- var self=this;
2860
- return self.properties = aJSObject;
2861
- return self;},
3162
+ fn: function (aJSObject) {
3163
+ var self = this;
3164
+ return self.properties = aJSObject;
3165
+ return self;
3166
+ },
2862
3167
  args: ["aJSObject"],
2863
3168
  source: "jsProperties: aJSObject\x0a\x09<return self.properties = aJSObject>",
2864
3169
  messageSends: [],
@@ -2871,10 +3176,11 @@ smalltalk.addMethod(
2871
3176
  smalltalk.method({
2872
3177
  selector: "name",
2873
3178
  category: 'accessing',
2874
- fn: function (){
2875
- var self=this;
2876
- return self.pkgName;
2877
- return self;},
3179
+ fn: function () {
3180
+ var self = this;
3181
+ return self.pkgName;
3182
+ return self;
3183
+ },
2878
3184
  args: [],
2879
3185
  source: "name\x0a\x09<return self.pkgName>",
2880
3186
  messageSends: [],
@@ -2887,10 +3193,11 @@ smalltalk.addMethod(
2887
3193
  smalltalk.method({
2888
3194
  selector: "name:",
2889
3195
  category: 'accessing',
2890
- fn: function (aString){
2891
- var self=this;
2892
- self.pkgName = aString;
2893
- return self;},
3196
+ fn: function (aString) {
3197
+ var self = this;
3198
+ self.pkgName = aString;
3199
+ return self;
3200
+ },
2894
3201
  args: ["aString"],
2895
3202
  source: "name: aString\x0a\x09<self.pkgName = aString>",
2896
3203
  messageSends: [],
@@ -2903,10 +3210,12 @@ smalltalk.addMethod(
2903
3210
  smalltalk.method({
2904
3211
  selector: "printString",
2905
3212
  category: 'printing',
2906
- fn: function (){
2907
- var self=this;
2908
- return smalltalk.send(self, "_name", []);
2909
- return self;},
3213
+ fn: function () {
3214
+ var self = this;
3215
+ var $1;
3216
+ $1 = smalltalk.send(self, "_name", []);
3217
+ return $1;
3218
+ },
2910
3219
  args: [],
2911
3220
  source: "printString\x0a\x09^self name",
2912
3221
  messageSends: ["name"],
@@ -2919,13 +3228,15 @@ smalltalk.addMethod(
2919
3228
  smalltalk.method({
2920
3229
  selector: "properties",
2921
3230
  category: 'accessing',
2922
- fn: function (){
2923
- var self=this;
2924
- return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_readJSObject_", [smalltalk.send(self, "_basicAt_", ["properties"])]);
2925
- return self;},
3231
+ fn: function () {
3232
+ var self = this;
3233
+ var $1;
3234
+ $1 = smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_readJSObject_", [smalltalk.send(self, "_basicAt_", ["properties"])]);
3235
+ return $1;
3236
+ },
2926
3237
  args: [],
2927
3238
  source: "properties\x0a\x09^Smalltalk current readJSObject: (self basicAt: 'properties')",
2928
- messageSends: ["readJSObject:", "current", "basicAt:"],
3239
+ messageSends: ["readJSObject:", "basicAt:", "current"],
2929
3240
  referencedClasses: ["Smalltalk"]
2930
3241
  }),
2931
3242
  smalltalk.Package);
@@ -2935,13 +3246,14 @@ smalltalk.addMethod(
2935
3246
  smalltalk.method({
2936
3247
  selector: "properties:",
2937
3248
  category: 'accessing',
2938
- fn: function (aDict){
2939
- var self=this;
2940
- var object=nil;
2941
- object = {};;
2942
- smalltalk.send(aDict, "_keysAndValuesDo_", [(function(key, value){return object[key] = value;})]);
2943
- return self.properties = object;
2944
- return self;},
3249
+ fn: function (aDict) {
3250
+ var self = this;
3251
+ var object;
3252
+ object = {};
3253
+ smalltalk.send(aDict, "_keysAndValuesDo_", [function (key, value) {return object[key] = value;}]);
3254
+ return self.properties = object;
3255
+ return self;
3256
+ },
2945
3257
  args: ["aDict"],
2946
3258
  source: "properties: aDict\x0a\x09\x22We store it as a javascript object.\x22\x0a\x09\x0a\x09| object |\x0a\x09<object = {};>.\x0a\x09aDict keysAndValuesDo: [:key :value |\x0a\x09\x09<object[key] = value>.\x0a\x09].\x0a\x09<return self.properties = object>",
2947
3259
  messageSends: ["keysAndValuesDo:"],
@@ -2954,10 +3266,11 @@ smalltalk.addMethod(
2954
3266
  smalltalk.method({
2955
3267
  selector: "propertiesAsJSON",
2956
3268
  category: 'private',
2957
- fn: function (){
2958
- var self=this;
2959
- return JSON.stringify(self.properties);
2960
- return self;},
3269
+ fn: function () {
3270
+ var self = this;
3271
+ return JSON.stringify(self.properties);
3272
+ return self;
3273
+ },
2961
3274
  args: [],
2962
3275
  source: "propertiesAsJSON\x0a\x09<return JSON.stringify(self.properties)>",
2963
3276
  messageSends: [],
@@ -2970,10 +3283,11 @@ smalltalk.addMethod(
2970
3283
  smalltalk.method({
2971
3284
  selector: "propertyAt:",
2972
3285
  category: 'properties',
2973
- fn: function (key){
2974
- var self=this;
2975
- return self.properties[key];
2976
- return self;},
3286
+ fn: function (key) {
3287
+ var self = this;
3288
+ return self.properties[key];
3289
+ return self;
3290
+ },
2977
3291
  args: ["key"],
2978
3292
  source: "propertyAt: key\x0a\x0a\x09<return self.properties[key]>",
2979
3293
  messageSends: [],
@@ -2986,13 +3300,20 @@ smalltalk.addMethod(
2986
3300
  smalltalk.method({
2987
3301
  selector: "propertyAt:ifAbsent:",
2988
3302
  category: 'properties',
2989
- fn: function (key, block){
2990
- var self=this;
2991
- return (($receiver = smalltalk.send(self, "_propertyAt_", [key])) == nil || $receiver == undefined) ? (function(){return smalltalk.send(block, "_value", []);})() : $receiver;
2992
- return self;},
3303
+ fn: function (key, block) {
3304
+ var self = this;
3305
+ var $2, $1;
3306
+ $2 = smalltalk.send(self, "_propertyAt_", [key]);
3307
+ if (($receiver = $2) == nil || $receiver == undefined) {
3308
+ $1 = smalltalk.send(block, "_value", []);
3309
+ } else {
3310
+ $1 = $2;
3311
+ }
3312
+ return $1;
3313
+ },
2993
3314
  args: ["key", "block"],
2994
3315
  source: "propertyAt: key ifAbsent: block\x0a\x0a\x09^(self propertyAt: key) ifNil: [block value]",
2995
- messageSends: ["ifNil:", "propertyAt:", "value"],
3316
+ messageSends: ["ifNil:", "value", "propertyAt:"],
2996
3317
  referencedClasses: []
2997
3318
  }),
2998
3319
  smalltalk.Package);
@@ -3002,10 +3323,11 @@ smalltalk.addMethod(
3002
3323
  smalltalk.method({
3003
3324
  selector: "propertyAt:put:",
3004
3325
  category: 'properties',
3005
- fn: function (key, value){
3006
- var self=this;
3007
- return self.properties[key] = value;
3008
- return self;},
3326
+ fn: function (key, value) {
3327
+ var self = this;
3328
+ return self.properties[key] = value;
3329
+ return self;
3330
+ },
3009
3331
  args: ["key", "value"],
3010
3332
  source: "propertyAt: key put: value\x0a\x0a\x09<return self.properties[key] = value>",
3011
3333
  messageSends: [],
@@ -3018,13 +3340,15 @@ smalltalk.addMethod(
3018
3340
  smalltalk.method({
3019
3341
  selector: "sortedClasses",
3020
3342
  category: 'classes',
3021
- fn: function (){
3022
- var self=this;
3023
- return smalltalk.send(smalltalk.send(self, "_class", []), "_sortedClasses_", [smalltalk.send(self, "_classes", [])]);
3024
- return self;},
3343
+ fn: function () {
3344
+ var self = this;
3345
+ var $1;
3346
+ $1 = smalltalk.send(smalltalk.send(self, "_class", []), "_sortedClasses_", [smalltalk.send(self, "_classes", [])]);
3347
+ return $1;
3348
+ },
3025
3349
  args: [],
3026
3350
  source: "sortedClasses\x0a\x09\x22Answer all classes in the receiver, sorted by superclass/subclasses and by class name for common subclasses (Issue #143).\x22\x0a\x0a\x09^self class sortedClasses: self classes",
3027
- messageSends: ["sortedClasses:", "class", "classes"],
3351
+ messageSends: ["sortedClasses:", "classes", "class"],
3028
3352
  referencedClasses: []
3029
3353
  }),
3030
3354
  smalltalk.Package);
@@ -3036,14 +3360,15 @@ smalltalk.addMethod(
3036
3360
  smalltalk.method({
3037
3361
  selector: "commitToLocalStorage:",
3038
3362
  category: 'loading-storing',
3039
- fn: function (aPackageName){
3040
- var self=this;
3041
- var key=nil;
3042
- var sourceCode=nil;
3043
- (key=smalltalk.send("smalltalk.packages.", "__comma", [aPackageName]));
3044
- (sourceCode=smalltalk.send(smalltalk.send((smalltalk.Exporter || Exporter), "_new", []), "_exportPackage_", [aPackageName]));
3045
- localStorage[key] = escape(sourceCode);
3046
- return self;},
3363
+ fn: function (aPackageName) {
3364
+ var self = this;
3365
+ var key;
3366
+ var sourceCode;
3367
+ key = smalltalk.send("smalltalk.packages.", "__comma", [aPackageName]);
3368
+ sourceCode = smalltalk.send(smalltalk.send(smalltalk.Exporter || Exporter, "_new", []), "_exportPackage_", [aPackageName]);
3369
+ localStorage[key] = escape(sourceCode);
3370
+ return self;
3371
+ },
3047
3372
  args: ["aPackageName"],
3048
3373
  source: "commitToLocalStorage: aPackageName\x0a\x09| key sourceCode |\x0a\x09key := 'smalltalk.packages.' , aPackageName.\x0a\x09sourceCode := Exporter new exportPackage: aPackageName.\x0a\x09<localStorage[key] = escape(sourceCode)>",
3049
3374
  messageSends: [",", "exportPackage:", "new"],
@@ -3056,10 +3381,18 @@ smalltalk.addMethod(
3056
3381
  smalltalk.method({
3057
3382
  selector: "defaultCommitPathJs",
3058
3383
  category: 'commit paths',
3059
- fn: function (){
3060
- var self=this;
3061
- return (($receiver = self['@defaultCommitPathJs']) == nil || $receiver == undefined) ? (function(){return (self['@defaultCommitPathJs']="js");})() : $receiver;
3062
- return self;},
3384
+ fn: function () {
3385
+ var self = this;
3386
+ var $1;
3387
+ if (($receiver = self['@defaultCommitPathJs']) == nil ||
3388
+ $receiver == undefined) {
3389
+ self['@defaultCommitPathJs'] = "js";
3390
+ $1 = self['@defaultCommitPathJs'];
3391
+ } else {
3392
+ $1 = self['@defaultCommitPathJs'];
3393
+ }
3394
+ return $1;
3395
+ },
3063
3396
  args: [],
3064
3397
  source: "defaultCommitPathJs\x0a\x09^ defaultCommitPathJs ifNil: [ defaultCommitPathJs := 'js']",
3065
3398
  messageSends: ["ifNil:"],
@@ -3072,10 +3405,11 @@ smalltalk.addMethod(
3072
3405
  smalltalk.method({
3073
3406
  selector: "defaultCommitPathJs:",
3074
3407
  category: 'commit paths',
3075
- fn: function (aString){
3076
- var self=this;
3077
- (self['@defaultCommitPathJs']=aString);
3078
- return self;},
3408
+ fn: function (aString) {
3409
+ var self = this;
3410
+ self['@defaultCommitPathJs'] = aString;
3411
+ return self;
3412
+ },
3079
3413
  args: ["aString"],
3080
3414
  source: "defaultCommitPathJs: aString\x0a\x09defaultCommitPathJs := aString",
3081
3415
  messageSends: [],
@@ -3088,10 +3422,18 @@ smalltalk.addMethod(
3088
3422
  smalltalk.method({
3089
3423
  selector: "defaultCommitPathSt",
3090
3424
  category: 'commit paths',
3091
- fn: function (){
3092
- var self=this;
3093
- return (($receiver = self['@defaultCommitPathSt']) == nil || $receiver == undefined) ? (function(){return (self['@defaultCommitPathSt']="st");})() : $receiver;
3094
- return self;},
3425
+ fn: function () {
3426
+ var self = this;
3427
+ var $1;
3428
+ if (($receiver = self['@defaultCommitPathSt']) == nil ||
3429
+ $receiver == undefined) {
3430
+ self['@defaultCommitPathSt'] = "st";
3431
+ $1 = self['@defaultCommitPathSt'];
3432
+ } else {
3433
+ $1 = self['@defaultCommitPathSt'];
3434
+ }
3435
+ return $1;
3436
+ },
3095
3437
  args: [],
3096
3438
  source: "defaultCommitPathSt\x0a\x09^ defaultCommitPathSt ifNil: [ defaultCommitPathSt := 'st']",
3097
3439
  messageSends: ["ifNil:"],
@@ -3104,10 +3446,11 @@ smalltalk.addMethod(
3104
3446
  smalltalk.method({
3105
3447
  selector: "defaultCommitPathSt:",
3106
3448
  category: 'commit paths',
3107
- fn: function (aString){
3108
- var self=this;
3109
- (self['@defaultCommitPathSt']=aString);
3110
- return self;},
3449
+ fn: function (aString) {
3450
+ var self = this;
3451
+ self['@defaultCommitPathSt'] = aString;
3452
+ return self;
3453
+ },
3111
3454
  args: ["aString"],
3112
3455
  source: "defaultCommitPathSt: aString\x0a\x09defaultCommitPathSt := aString",
3113
3456
  messageSends: [],
@@ -3120,10 +3463,11 @@ smalltalk.addMethod(
3120
3463
  smalltalk.method({
3121
3464
  selector: "fetch:",
3122
3465
  category: 'loading-storing',
3123
- fn: function (aPackageName){
3124
- var self=this;
3125
- smalltalk.send(self, "_fetch_prefix_", [aPackageName, smalltalk.send(smalltalk.send(self, "_defaultCommitPathJs", []), "__comma", ["/"])]);
3126
- return self;},
3466
+ fn: function (aPackageName) {
3467
+ var self = this;
3468
+ smalltalk.send(self, "_fetch_prefix_", [aPackageName, smalltalk.send(smalltalk.send(self, "_defaultCommitPathJs", []), "__comma", ["/"])]);
3469
+ return self;
3470
+ },
3127
3471
  args: ["aPackageName"],
3128
3472
  source: "fetch: aPackageName\x0a\x09self fetch: aPackageName prefix: self defaultCommitPathJs, '/'",
3129
3473
  messageSends: ["fetch:prefix:", ",", "defaultCommitPathJs"],
@@ -3136,10 +3480,11 @@ smalltalk.addMethod(
3136
3480
  smalltalk.method({
3137
3481
  selector: "fetch:prefix:",
3138
3482
  category: 'loading-storing',
3139
- fn: function (aPackageName, aPrefix){
3140
- var self=this;
3141
- smalltalk.send((typeof jQuery == 'undefined' ? nil : jQuery), "_getScript_onSuccess_", [smalltalk.send(smalltalk.send(aPrefix, "__comma", [aPackageName]), "__comma", [".js"]), (function(){return smalltalk.send((smalltalk.Package || Package), "_init_", [aPackageName]);})]);
3142
- return self;},
3483
+ fn: function (aPackageName, aPrefix) {
3484
+ var self = this;
3485
+ smalltalk.send(jQuery, "_getScript_onSuccess_", [smalltalk.send(smalltalk.send(aPrefix, "__comma", [aPackageName]), "__comma", [".js"]), function () {return smalltalk.send(smalltalk.Package || Package, "_init_", [aPackageName]);}]);
3486
+ return self;
3487
+ },
3143
3488
  args: ["aPackageName", "aPrefix"],
3144
3489
  source: "fetch: aPackageName prefix: aPrefix\x0a\x09jQuery getScript: (aPrefix , aPackageName , '.js') onSuccess: [ Package init: aPackageName ]",
3145
3490
  messageSends: ["getScript:onSuccess:", ",", "init:"],
@@ -3152,13 +3497,17 @@ smalltalk.addMethod(
3152
3497
  smalltalk.method({
3153
3498
  selector: "init:",
3154
3499
  category: 'loading-storing',
3155
- fn: function (aPackageName){
3156
- var self=this;
3157
- (function($rec){smalltalk.send($rec, "_do_", [(function(each){return smalltalk.init(each);})]);return smalltalk.send($rec, "_do_", [(function(each){return smalltalk.send(each, "_initialize", []);})]);})(smalltalk.send(smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_classes", []), "_select_", [(function(each){return each.pkg.pkgName == aPackageName;})]));
3158
- return self;},
3500
+ fn: function (aPackageName) {
3501
+ var self = this;
3502
+ var $1, $2;
3503
+ $1 = smalltalk.send(smalltalk.send(smalltalk, "_classes", []), "_select_", [function (each) {return each.pkg.pkgName == aPackageName;}]);
3504
+ smalltalk.send($1, "_do_", [function (each) {return smalltalk.init(each);}]);
3505
+ $2 = smalltalk.send($1, "_do_", [function (each) {return smalltalk.send(each, "_initialize", []);}]);
3506
+ return self;
3507
+ },
3159
3508
  args: ["aPackageName"],
3160
3509
  source: "init: aPackageName\x0a\x09(smalltalk classes select: [ :each | <each.pkg.pkgName == aPackageName> ])\x0a\x09\x09do: [ :each | <smalltalk.init(each)> ];\x0a\x09\x09do: [ :each | each initialize ]",
3161
- messageSends: ["do:", "initialize", "select:", "classes"],
3510
+ messageSends: ["do:", "select:", "classes", "initialize"],
3162
3511
  referencedClasses: []
3163
3512
  }),
3164
3513
  smalltalk.Package.klass);
@@ -3168,10 +3517,12 @@ smalltalk.addMethod(
3168
3517
  smalltalk.method({
3169
3518
  selector: "named:",
3170
3519
  category: 'not yet classified',
3171
- fn: function (aPackageName){
3172
- var self=this;
3173
- return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packageAt_", [aPackageName]);
3174
- return self;},
3520
+ fn: function (aPackageName) {
3521
+ var self = this;
3522
+ var $1;
3523
+ $1 = smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_packageAt_", [aPackageName]);
3524
+ return $1;
3525
+ },
3175
3526
  args: ["aPackageName"],
3176
3527
  source: "named: aPackageName\x0a\x0a\x09^Smalltalk current packageAt: aPackageName",
3177
3528
  messageSends: ["packageAt:", "current"],
@@ -3184,10 +3535,12 @@ smalltalk.addMethod(
3184
3535
  smalltalk.method({
3185
3536
  selector: "named:ifAbsent:",
3186
3537
  category: 'not yet classified',
3187
- fn: function (aPackageName, aBlock){
3188
- var self=this;
3189
- return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packageAt_ifAbsent_", [aPackageName, aBlock]);
3190
- return self;},
3538
+ fn: function (aPackageName, aBlock) {
3539
+ var self = this;
3540
+ var $1;
3541
+ $1 = smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_packageAt_ifAbsent_", [aPackageName, aBlock]);
3542
+ return $1;
3543
+ },
3191
3544
  args: ["aPackageName", "aBlock"],
3192
3545
  source: "named: aPackageName ifAbsent: aBlock\x0a\x0a\x09^Smalltalk current packageAt: aPackageName ifAbsent: aBlock",
3193
3546
  messageSends: ["packageAt:ifAbsent:", "current"],
@@ -3200,11 +3553,12 @@ smalltalk.addMethod(
3200
3553
  smalltalk.method({
3201
3554
  selector: "resetCommitPaths",
3202
3555
  category: 'commit paths',
3203
- fn: function (){
3204
- var self=this;
3205
- (self['@defaultCommitPathJs']=nil);
3206
- (self['@defaultCommitPathSt']=nil);
3207
- return self;},
3556
+ fn: function () {
3557
+ var self = this;
3558
+ self['@defaultCommitPathJs'] = nil;
3559
+ self['@defaultCommitPathSt'] = nil;
3560
+ return self;
3561
+ },
3208
3562
  args: [],
3209
3563
  source: "resetCommitPaths\x0a defaultCommitPathJs := nil.\x0a defaultCommitPathSt := nil.",
3210
3564
  messageSends: [],
@@ -3217,24 +3571,25 @@ smalltalk.addMethod(
3217
3571
  smalltalk.method({
3218
3572
  selector: "sortedClasses:",
3219
3573
  category: 'sorting',
3220
- fn: function (classes){
3221
- var self=this;
3222
- var children=nil;
3223
- var others=nil;
3224
- var nodes=nil;
3225
- var expandedClasses=nil;
3226
- (children=[]);
3227
- (others=[]);
3228
- smalltalk.send(classes, "_do_", [(function(each){return ((($receiver = smalltalk.send(classes, "_includes_", [smalltalk.send(each, "_superclass", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(children, "_add_", [each]);})() : (function(){return smalltalk.send(others, "_add_", [each]);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(children, "_add_", [each]);}), (function(){return smalltalk.send(others, "_add_", [each]);})]));})]);
3229
- (nodes=smalltalk.send(children, "_collect_", [(function(each){return smalltalk.send((smalltalk.ClassSorterNode || ClassSorterNode), "_on_classes_level_", [each, others, (0)]);})]));
3230
- (nodes=smalltalk.send(nodes, "_sorted_", [(function(a, b){return ((($receiver = smalltalk.send(smalltalk.send(a, "_theClass", []), "_name", [])).klass === smalltalk.Number) ? $receiver <=smalltalk.send(smalltalk.send(b, "_theClass", []), "_name", []) : smalltalk.send($receiver, "__lt_eq", [smalltalk.send(smalltalk.send(b, "_theClass", []), "_name", [])]));})]));
3231
- (expandedClasses=smalltalk.send((smalltalk.Array || Array), "_new", []));
3232
- smalltalk.send(nodes, "_do_", [(function(aNode){return smalltalk.send(aNode, "_traverseClassesWith_", [expandedClasses]);})]);
3233
- return expandedClasses;
3234
- return self;},
3574
+ fn: function (classes) {
3575
+ var self = this;
3576
+ var $1;
3577
+ var children;
3578
+ var others;
3579
+ var nodes;
3580
+ var expandedClasses;
3581
+ children = [];
3582
+ others = [];
3583
+ smalltalk.send(classes, "_do_", [function (each) {$1 = smalltalk.send(classes, "_includes_", [smalltalk.send(each, "_superclass", [])]);if (smalltalk.assert($1)) {return smalltalk.send(others, "_add_", [each]);} else {return smalltalk.send(children, "_add_", [each]);}}]);
3584
+ nodes = smalltalk.send(children, "_collect_", [function (each) {return smalltalk.send(smalltalk.ClassSorterNode || ClassSorterNode, "_on_classes_level_", [each, others, 0]);}]);
3585
+ nodes = smalltalk.send(nodes, "_sorted_", [function (a, b) {return smalltalk.send(smalltalk.send(smalltalk.send(a, "_theClass", []), "_name", []), "__lt_eq", [smalltalk.send(smalltalk.send(b, "_theClass", []), "_name", [])]);}]);
3586
+ expandedClasses = smalltalk.send(smalltalk.Array || Array, "_new", []);
3587
+ smalltalk.send(nodes, "_do_", [function (aNode) {return smalltalk.send(aNode, "_traverseClassesWith_", [expandedClasses]);}]);
3588
+ return expandedClasses;
3589
+ },
3235
3590
  args: ["classes"],
3236
3591
  source: "sortedClasses: classes\x0a\x09\x22Answer classes, sorted by superclass/subclasses and by class name for common subclasses (Issue #143)\x22\x0a\x0a\x09| children others nodes expandedClasses |\x0a\x09children := #().\x0a\x09others := #().\x0a\x09classes do: [:each |\x0a\x09\x09(classes includes: each superclass)\x0a\x09\x09\x09ifFalse: [children add: each]\x0a\x09\x09\x09ifTrue: [others add: each]].\x0a\x09nodes := children collect: [:each |\x0a\x09\x09ClassSorterNode on: each classes: others level: 0].\x0a\x09nodes := nodes sorted: [:a :b | a theClass name <= b theClass name ].\x0a\x09expandedClasses := Array new.\x0a\x09nodes do: [:aNode |\x0a\x09\x09aNode traverseClassesWith: expandedClasses].\x0a\x09^expandedClasses",
3237
- messageSends: ["do:", "ifFalse:ifTrue:", "includes:", "superclass", "add:", "collect:", "on:classes:level:", "sorted:", "<=", "name", "theClass", "new", "traverseClassesWith:"],
3592
+ messageSends: ["do:", "ifFalse:ifTrue:", "add:", "includes:", "superclass", "collect:", "on:classes:level:", "sorted:", "<=", "name", "theClass", "new", "traverseClassesWith:"],
3238
3593
  referencedClasses: ["ClassSorterNode", "Array"]
3239
3594
  }),
3240
3595
  smalltalk.Package.klass);
@@ -3247,10 +3602,12 @@ smalltalk.addMethod(
3247
3602
  smalltalk.method({
3248
3603
  selector: "*",
3249
3604
  category: 'arithmetic',
3250
- fn: function (aPoint){
3251
- var self=this;
3252
- return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver *smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__star", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver *smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__star", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
3253
- return self;},
3605
+ fn: function (aPoint) {
3606
+ var self = this;
3607
+ var $1;
3608
+ $1 = smalltalk.send(smalltalk.Point || Point, "_x_y_", [smalltalk.send(smalltalk.send(self, "_x", []), "__star", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])]), smalltalk.send(smalltalk.send(self, "_y", []), "__star", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])])]);
3609
+ return $1;
3610
+ },
3254
3611
  args: ["aPoint"],
3255
3612
  source: "* aPoint\x0a\x09^Point x: self x * aPoint asPoint x y: self y * aPoint asPoint y",
3256
3613
  messageSends: ["x:y:", "*", "x", "asPoint", "y"],
@@ -3263,10 +3620,12 @@ smalltalk.addMethod(
3263
3620
  smalltalk.method({
3264
3621
  selector: "+",
3265
3622
  category: 'arithmetic',
3266
- fn: function (aPoint){
3267
- var self=this;
3268
- return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
3269
- return self;},
3623
+ fn: function (aPoint) {
3624
+ var self = this;
3625
+ var $1;
3626
+ $1 = smalltalk.send(smalltalk.Point || Point, "_x_y_", [smalltalk.send(smalltalk.send(self, "_x", []), "__plus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])]), smalltalk.send(smalltalk.send(self, "_y", []), "__plus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])])]);
3627
+ return $1;
3628
+ },
3270
3629
  args: ["aPoint"],
3271
3630
  source: "+ aPoint\x0a\x09^Point x: self x + aPoint asPoint x y: self y + aPoint asPoint y",
3272
3631
  messageSends: ["x:y:", "+", "x", "asPoint", "y"],
@@ -3279,10 +3638,12 @@ smalltalk.addMethod(
3279
3638
  smalltalk.method({
3280
3639
  selector: "-",
3281
3640
  category: 'arithmetic',
3282
- fn: function (aPoint){
3283
- var self=this;
3284
- return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver -smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__minus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver -smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__minus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
3285
- return self;},
3641
+ fn: function (aPoint) {
3642
+ var self = this;
3643
+ var $1;
3644
+ $1 = smalltalk.send(smalltalk.Point || Point, "_x_y_", [smalltalk.send(smalltalk.send(self, "_x", []), "__minus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])]), smalltalk.send(smalltalk.send(self, "_y", []), "__minus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])])]);
3645
+ return $1;
3646
+ },
3286
3647
  args: ["aPoint"],
3287
3648
  source: "- aPoint\x0a\x09^Point x: self x - aPoint asPoint x y: self y - aPoint asPoint y",
3288
3649
  messageSends: ["x:y:", "-", "x", "asPoint", "y"],
@@ -3295,10 +3656,12 @@ smalltalk.addMethod(
3295
3656
  smalltalk.method({
3296
3657
  selector: "/",
3297
3658
  category: 'arithmetic',
3298
- fn: function (aPoint){
3299
- var self=this;
3300
- return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver /smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__slash", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver /smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__slash", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
3301
- return self;},
3659
+ fn: function (aPoint) {
3660
+ var self = this;
3661
+ var $1;
3662
+ $1 = smalltalk.send(smalltalk.Point || Point, "_x_y_", [smalltalk.send(smalltalk.send(self, "_x", []), "__slash", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])]), smalltalk.send(smalltalk.send(self, "_y", []), "__slash", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])])]);
3663
+ return $1;
3664
+ },
3302
3665
  args: ["aPoint"],
3303
3666
  source: "/ aPoint\x0a\x09^Point x: self x / aPoint asPoint x y: self y / aPoint asPoint y",
3304
3667
  messageSends: ["x:y:", "/", "x", "asPoint", "y"],
@@ -3311,13 +3674,15 @@ smalltalk.addMethod(
3311
3674
  smalltalk.method({
3312
3675
  selector: "=",
3313
3676
  category: 'arithmetic',
3314
- fn: function (aPoint){
3315
- var self=this;
3316
- return smalltalk.send(smalltalk.send(smalltalk.send(aPoint, "_class", []), "__eq", [smalltalk.send(self, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(aPoint, "_x", []), "__eq", [smalltalk.send(self, "_x", [])]), "_&", [smalltalk.send(smalltalk.send(aPoint, "_y", []), "__eq", [smalltalk.send(self, "_y", [])])]);})]);
3317
- return self;},
3677
+ fn: function (aPoint) {
3678
+ var self = this;
3679
+ var $1;
3680
+ $1 = smalltalk.send(smalltalk.send(smalltalk.send(aPoint, "_class", []), "__eq", [smalltalk.send(self, "_class", [])]), "_and_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(aPoint, "_x", []), "__eq", [smalltalk.send(self, "_x", [])]), "_&", [smalltalk.send(smalltalk.send(aPoint, "_y", []), "__eq", [smalltalk.send(self, "_y", [])])]);}]);
3681
+ return $1;
3682
+ },
3318
3683
  args: ["aPoint"],
3319
3684
  source: "= aPoint\x0a\x09^aPoint class = self class and: [\x0a\x09\x09(aPoint x = self x) & (aPoint y = self y)]",
3320
- messageSends: ["and:", "=", "class", "&", "x", "y"],
3685
+ messageSends: ["and:", "&", "=", "y", "x", "class"],
3321
3686
  referencedClasses: []
3322
3687
  }),
3323
3688
  smalltalk.Point);
@@ -3327,10 +3692,10 @@ smalltalk.addMethod(
3327
3692
  smalltalk.method({
3328
3693
  selector: "asPoint",
3329
3694
  category: 'converting',
3330
- fn: function (){
3331
- var self=this;
3332
- return self;
3333
- return self;},
3695
+ fn: function () {
3696
+ var self = this;
3697
+ return self;
3698
+ },
3334
3699
  args: [],
3335
3700
  source: "asPoint\x0a\x09^self",
3336
3701
  messageSends: [],
@@ -3343,13 +3708,15 @@ smalltalk.addMethod(
3343
3708
  smalltalk.method({
3344
3709
  selector: "printString",
3345
3710
  category: 'printing',
3346
- fn: function (){
3347
- var self=this;
3348
- return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(smalltalk.send(self['@x'], "_printString", []), "__comma", ["@"])]);((($receiver = smalltalk.send(smalltalk.send(self['@y'], "_notNil", []), "_and_", [(function(){return smalltalk.send(self['@y'], "_negative", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(stream, "_space", []);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(stream, "_space", []);})]));return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self['@y'], "_printString", [])]);})]);
3349
- return self;},
3711
+ fn: function () {
3712
+ var self = this;
3713
+ var $2, $1;
3714
+ $1 = smalltalk.send(smalltalk.String || String, "_streamContents_", [function (stream) {smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(smalltalk.send(self['@x'], "_printString", []), "__comma", ["@"])]);$2 = smalltalk.send(smalltalk.send(self['@y'], "_notNil", []), "_and_", [function () {return smalltalk.send(self['@y'], "_negative", []);}]);if (smalltalk.assert($2)) {smalltalk.send(stream, "_space", []);}return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self['@y'], "_printString", [])]);}]);
3715
+ return $1;
3716
+ },
3350
3717
  args: [],
3351
3718
  source: "printString\x0a\x09\x22Print receiver in classic x@y notation.\x22\x0a\x0a\x09^String streamContents: [:stream |\x0a\x09\x09stream nextPutAll: x printString, '@'.\x0a\x09\x09(y notNil and: [y negative])\x0a\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09\x22Avoid ambiguous @- construct\x22\x0a\x09\x09\x09\x09stream space].\x0a\x09\x09stream nextPutAll: y printString]",
3352
- messageSends: ["streamContents:", "nextPutAll:", ",", "printString", "ifTrue:", "and:", "notNil", "negative", "space"],
3719
+ messageSends: ["streamContents:", "nextPutAll:", ",", "printString", "ifTrue:", "space", "and:", "negative", "notNil"],
3353
3720
  referencedClasses: ["String"]
3354
3721
  }),
3355
3722
  smalltalk.Point);
@@ -3359,13 +3726,15 @@ smalltalk.addMethod(
3359
3726
  smalltalk.method({
3360
3727
  selector: "translateBy:",
3361
3728
  category: 'transforming',
3362
- fn: function (delta){
3363
- var self=this;
3364
- return smalltalk.send(((($receiver = smalltalk.send(delta, "_x", [])).klass === smalltalk.Number) ? $receiver +self['@x'] : smalltalk.send($receiver, "__plus", [self['@x']])), "__at", [((($receiver = smalltalk.send(delta, "_y", [])).klass === smalltalk.Number) ? $receiver +self['@y'] : smalltalk.send($receiver, "__plus", [self['@y']]))]);
3365
- return self;},
3729
+ fn: function (delta) {
3730
+ var self = this;
3731
+ var $1;
3732
+ $1 = smalltalk.send(smalltalk.send(smalltalk.send(delta, "_x", []), "__plus", [self['@x']]), "__at", [smalltalk.send(smalltalk.send(delta, "_y", []), "__plus", [self['@y']])]);
3733
+ return $1;
3734
+ },
3366
3735
  args: ["delta"],
3367
3736
  source: "translateBy: delta \x0a\x09\x22Answer a Point translated by delta (an instance of Point).\x22\x0a\x09^(delta x + x) @ (delta y + y)",
3368
- messageSends: ["@", "+", "x", "y"],
3737
+ messageSends: ["@", "+", "y", "x"],
3369
3738
  referencedClasses: []
3370
3739
  }),
3371
3740
  smalltalk.Point);
@@ -3375,10 +3744,10 @@ smalltalk.addMethod(
3375
3744
  smalltalk.method({
3376
3745
  selector: "x",
3377
3746
  category: 'accessing',
3378
- fn: function (){
3379
- var self=this;
3380
- return self['@x'];
3381
- return self;},
3747
+ fn: function () {
3748
+ var self = this;
3749
+ return self['@x'];
3750
+ },
3382
3751
  args: [],
3383
3752
  source: "x\x0a\x09^x",
3384
3753
  messageSends: [],
@@ -3391,10 +3760,11 @@ smalltalk.addMethod(
3391
3760
  smalltalk.method({
3392
3761
  selector: "x:",
3393
3762
  category: 'accessing',
3394
- fn: function (aNumber){
3395
- var self=this;
3396
- (self['@x']=aNumber);
3397
- return self;},
3763
+ fn: function (aNumber) {
3764
+ var self = this;
3765
+ self['@x'] = aNumber;
3766
+ return self;
3767
+ },
3398
3768
  args: ["aNumber"],
3399
3769
  source: "x: aNumber\x0a\x09x := aNumber",
3400
3770
  messageSends: [],
@@ -3407,10 +3777,10 @@ smalltalk.addMethod(
3407
3777
  smalltalk.method({
3408
3778
  selector: "y",
3409
3779
  category: 'accessing',
3410
- fn: function (){
3411
- var self=this;
3412
- return self['@y'];
3413
- return self;},
3780
+ fn: function () {
3781
+ var self = this;
3782
+ return self['@y'];
3783
+ },
3414
3784
  args: [],
3415
3785
  source: "y\x0a\x09^y",
3416
3786
  messageSends: [],
@@ -3423,10 +3793,11 @@ smalltalk.addMethod(
3423
3793
  smalltalk.method({
3424
3794
  selector: "y:",
3425
3795
  category: 'accessing',
3426
- fn: function (aNumber){
3427
- var self=this;
3428
- (self['@y']=aNumber);
3429
- return self;},
3796
+ fn: function (aNumber) {
3797
+ var self = this;
3798
+ self['@y'] = aNumber;
3799
+ return self;
3800
+ },
3430
3801
  args: ["aNumber"],
3431
3802
  source: "y: aNumber\x0a\x09y := aNumber",
3432
3803
  messageSends: [],
@@ -3440,13 +3811,19 @@ smalltalk.addMethod(
3440
3811
  smalltalk.method({
3441
3812
  selector: "x:y:",
3442
3813
  category: 'instance creation',
3443
- fn: function (aNumber, anotherNumber){
3444
- var self=this;
3445
- return (function($rec){smalltalk.send($rec, "_x_", [aNumber]);smalltalk.send($rec, "_y_", [anotherNumber]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
3446
- return self;},
3814
+ fn: function (aNumber, anotherNumber) {
3815
+ var self = this;
3816
+ var $2, $3, $1;
3817
+ $2 = smalltalk.send(self, "_new", []);
3818
+ smalltalk.send($2, "_x_", [aNumber]);
3819
+ smalltalk.send($2, "_y_", [anotherNumber]);
3820
+ $3 = smalltalk.send($2, "_yourself", []);
3821
+ $1 = $3;
3822
+ return $1;
3823
+ },
3447
3824
  args: ["aNumber", "anotherNumber"],
3448
3825
  source: "x: aNumber y: anotherNumber\x0a\x09^self new\x0a\x09\x09x: aNumber;\x0a\x09\x09y: anotherNumber;\x0a\x09\x09yourself",
3449
- messageSends: ["x:", "y:", "yourself", "new"],
3826
+ messageSends: ["x:", "new", "y:", "yourself"],
3450
3827
  referencedClasses: []
3451
3828
  }),
3452
3829
  smalltalk.Point.klass);
@@ -3459,10 +3836,11 @@ smalltalk.addMethod(
3459
3836
  smalltalk.method({
3460
3837
  selector: "next",
3461
3838
  category: 'accessing',
3462
- fn: function (){
3463
- var self=this;
3464
- return Math.random();
3465
- return self;},
3839
+ fn: function () {
3840
+ var self = this;
3841
+ return Math.random();
3842
+ return self;
3843
+ },
3466
3844
  args: [],
3467
3845
  source: "next\x0a\x09<return Math.random()>",
3468
3846
  messageSends: [],
@@ -3475,13 +3853,15 @@ smalltalk.addMethod(
3475
3853
  smalltalk.method({
3476
3854
  selector: "next:",
3477
3855
  category: 'accessing',
3478
- fn: function (anInteger){
3479
- var self=this;
3480
- return smalltalk.send(smalltalk.send((1), "_to_", [anInteger]), "_collect_", [(function(each){return smalltalk.send(self, "_next", []);})]);
3481
- return self;},
3856
+ fn: function (anInteger) {
3857
+ var self = this;
3858
+ var $1;
3859
+ $1 = smalltalk.send(smalltalk.send(1, "_to_", [anInteger]), "_collect_", [function (each) {return smalltalk.send(self, "_next", []);}]);
3860
+ return $1;
3861
+ },
3482
3862
  args: ["anInteger"],
3483
3863
  source: "next: anInteger\x0a ^(1 to: anInteger) collect: [:each | self next]",
3484
- messageSends: ["collect:", "to:", "next"],
3864
+ messageSends: ["collect:", "next", "to:"],
3485
3865
  referencedClasses: []
3486
3866
  }),
3487
3867
  smalltalk.Random);
@@ -3495,12 +3875,13 @@ smalltalk.addMethod(
3495
3875
  smalltalk.method({
3496
3876
  selector: "at:",
3497
3877
  category: 'accessing',
3498
- fn: function (aString){
3878
+ fn: function (aSymbol){
3499
3879
  var self=this;
3500
- return self[aString];
3501
- return self;},
3502
- args: ["aString"],
3503
- source: "at: aString\x0a\x09<return self[aString]>",
3880
+ return self[aSymbol._asString()];
3881
+ ;
3882
+ return self},
3883
+ args: ["aSymbol"],
3884
+ source: "at: aSymbol\x0a\x09<return self[aSymbol._asString()]>",
3504
3885
  messageSends: [],
3505
3886
  referencedClasses: []
3506
3887
  }),
@@ -3511,10 +3892,11 @@ smalltalk.addMethod(
3511
3892
  smalltalk.method({
3512
3893
  selector: "basicParse:",
3513
3894
  category: 'accessing',
3514
- fn: function (aString){
3515
- var self=this;
3516
- return smalltalk.parser.parse(aString);
3517
- return self;},
3895
+ fn: function (aString) {
3896
+ var self = this;
3897
+ return smalltalk.parser.parse(aString);
3898
+ return self;
3899
+ },
3518
3900
  args: ["aString"],
3519
3901
  source: "basicParse: aString\x0a\x09<return smalltalk.parser.parse(aString)>",
3520
3902
  messageSends: [],
@@ -3527,10 +3909,11 @@ smalltalk.addMethod(
3527
3909
  smalltalk.method({
3528
3910
  selector: "classes",
3529
3911
  category: 'accessing',
3530
- fn: function (){
3531
- var self=this;
3532
- return self.classes();
3533
- return self;},
3912
+ fn: function () {
3913
+ var self = this;
3914
+ return self.classes();
3915
+ return self;
3916
+ },
3534
3917
  args: [],
3535
3918
  source: "classes\x0a\x09<return self.classes()>",
3536
3919
  messageSends: [],
@@ -3543,10 +3926,11 @@ smalltalk.addMethod(
3543
3926
  smalltalk.method({
3544
3927
  selector: "createPackage:",
3545
3928
  category: 'private',
3546
- fn: function (packageName){
3547
- var self=this;
3548
- return smalltalk.addPackage(packageName, nil);
3549
- return self;},
3929
+ fn: function (packageName) {
3930
+ var self = this;
3931
+ return smalltalk.addPackage(packageName, nil);
3932
+ return self;
3933
+ },
3550
3934
  args: ["packageName"],
3551
3935
  source: "createPackage: packageName\x0a\x09\x22Create and bind a new package with given name and return it.\x22\x0a\x0a <return smalltalk.addPackage(packageName, nil)>",
3552
3936
  messageSends: [],
@@ -3559,13 +3943,14 @@ smalltalk.addMethod(
3559
3943
  smalltalk.method({
3560
3944
  selector: "createPackage:properties:",
3561
3945
  category: 'private',
3562
- fn: function (packageName, aDict){
3563
- var self=this;
3564
- var object=nil;
3565
- object = {};;
3566
- smalltalk.send(aDict, "_keysAndValuesDo_", [(function(key, value){return object[key] = value;})]);
3567
- return smalltalk.addPackage(packageName, object);
3568
- return self;},
3946
+ fn: function (packageName, aDict) {
3947
+ var self = this;
3948
+ var object;
3949
+ object = {};
3950
+ smalltalk.send(aDict, "_keysAndValuesDo_", [function (key, value) {return object[key] = value;}]);
3951
+ return smalltalk.addPackage(packageName, object);
3952
+ return self;
3953
+ },
3569
3954
  args: ["packageName", "aDict"],
3570
3955
  source: "createPackage: packageName properties: aDict\x0a\x09\x22Create and bind a new package with given name and return it.\x22\x0a\x0a\x09| object |\x0a\x09<object = {};>.\x0a\x09aDict keysAndValuesDo: [:key :value |\x0a\x09\x09<object[key] = value>.\x0a\x09].\x0a <return smalltalk.addPackage(packageName, object)>",
3571
3956
  messageSends: ["keysAndValuesDo:"],
@@ -3578,10 +3963,11 @@ smalltalk.addMethod(
3578
3963
  smalltalk.method({
3579
3964
  selector: "deletePackage:",
3580
3965
  category: 'private',
3581
- fn: function (packageName){
3582
- var self=this;
3583
- delete smalltalk.packages[packageName];
3584
- return self;},
3966
+ fn: function (packageName) {
3967
+ var self = this;
3968
+ delete smalltalk.packages[packageName];
3969
+ return self;
3970
+ },
3585
3971
  args: ["packageName"],
3586
3972
  source: "deletePackage: packageName\x0a\x09\x22Deletes a package by deleting its binding, but does not check if it contains classes etc.\x0a\x09To remove a package, use #removePackage instead.\x22\x0a\x0a <delete smalltalk.packages[packageName]>",
3587
3973
  messageSends: [],
@@ -3594,10 +3980,11 @@ smalltalk.addMethod(
3594
3980
  smalltalk.method({
3595
3981
  selector: "packageAt:",
3596
3982
  category: 'packages',
3597
- fn: function (packageName){
3598
- var self=this;
3599
- return self.packages[packageName];
3600
- return self;},
3983
+ fn: function (packageName) {
3984
+ var self = this;
3985
+ return self.packages[packageName];
3986
+ return self;
3987
+ },
3601
3988
  args: ["packageName"],
3602
3989
  source: "packageAt: packageName\x0a <return self.packages[packageName]>",
3603
3990
  messageSends: [],
@@ -3610,10 +3997,13 @@ smalltalk.addMethod(
3610
3997
  smalltalk.method({
3611
3998
  selector: "packageAt:ifAbsent:",
3612
3999
  category: 'packages',
3613
- fn: function (packageName, aBlock){
3614
- var self=this;
3615
- return smalltalk.send(smalltalk.send(self, "_packageAt_", [packageName]), "_ifNil_", [aBlock]);
3616
- return self;},
4000
+ fn: function (packageName, aBlock) {
4001
+ var self = this;
4002
+ var $2, $1;
4003
+ $2 = smalltalk.send(self, "_packageAt_", [packageName]);
4004
+ $1 = smalltalk.send($2, "_ifNil_", [aBlock]);
4005
+ return $1;
4006
+ },
3617
4007
  args: ["packageName", "aBlock"],
3618
4008
  source: "packageAt: packageName ifAbsent: aBlock\x0a ^(self packageAt: packageName) ifNil: aBlock",
3619
4009
  messageSends: ["ifNil:", "packageAt:"],
@@ -3626,10 +4016,11 @@ smalltalk.addMethod(
3626
4016
  smalltalk.method({
3627
4017
  selector: "packages",
3628
4018
  category: 'packages',
3629
- fn: function (){
3630
- var self=this;
3631
- return self.packages.all();
3632
- return self;},
4019
+ fn: function () {
4020
+ var self = this;
4021
+ return self.packages.all();
4022
+ return self;
4023
+ },
3633
4024
  args: [],
3634
4025
  source: "packages\x0a\x09\x22Return all Package instances in the system.\x22\x0a\x0a\x09<return self.packages.all()>",
3635
4026
  messageSends: [],
@@ -3642,12 +4033,12 @@ smalltalk.addMethod(
3642
4033
  smalltalk.method({
3643
4034
  selector: "parse:",
3644
4035
  category: 'accessing',
3645
- fn: function (aString){
3646
- var self=this;
3647
- var result=nil;
3648
- smalltalk.send(self, "_try_catch_", [(function(){return (result=smalltalk.send(self, "_basicParse_", [aString]));}), (function(ex){return smalltalk.send(smalltalk.send(self, "_parseError_parsing_", [ex, aString]), "_signal", []);})]);
3649
- return result;
3650
- return self;},
4036
+ fn: function (aString) {
4037
+ var self = this;
4038
+ var result;
4039
+ smalltalk.send(self, "_try_catch_", [function () {result = smalltalk.send(self, "_basicParse_", [aString]);return result;}, function (ex) {return smalltalk.send(smalltalk.send(self, "_parseError_parsing_", [ex, aString]), "_signal", []);}]);
4040
+ return result;
4041
+ },
3651
4042
  args: ["aString"],
3652
4043
  source: "parse: aString\x0a\x09| result | \x0a\x09self try: [result := self basicParse: aString] catch: [:ex | (self parseError: ex parsing: aString) signal].\x0a\x09^result",
3653
4044
  messageSends: ["try:catch:", "basicParse:", "signal", "parseError:parsing:"],
@@ -3660,28 +4051,46 @@ smalltalk.addMethod(
3660
4051
  smalltalk.method({
3661
4052
  selector: "parseError:parsing:",
3662
4053
  category: 'accessing',
3663
- fn: function (anException, aString){
3664
- var self=this;
3665
- var row=nil;
3666
- var col=nil;
3667
- var message=nil;
3668
- var lines=nil;
3669
- var badLine=nil;
3670
- var code=nil;
3671
- row = anException.line;
3672
- col = anException.column;
3673
- message = anException.message;;
3674
- (lines=smalltalk.send(aString, "_lines", []));
3675
- (badLine=smalltalk.send(lines, "_at_", [row]));
3676
- (badLine=smalltalk.send(smalltalk.send(smalltalk.send(badLine, "_copyFrom_to_", [(1), ((($receiver = col).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]))]), "__comma", [" ===>"]), "__comma", [smalltalk.send(badLine, "_copyFrom_to_", [col, smalltalk.send(badLine, "_size", [])])]));
3677
- smalltalk.send(lines, "_at_put_", [row, badLine]);
3678
- (code=smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(s){return smalltalk.send(lines, "_withIndexDo_", [(function(l, i){return smalltalk.send(s, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(i, "_asString", []), "__comma", [": "]), "__comma", [l]), "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])])]);})]);})]));
3679
- return smalltalk.send(smalltalk.send((smalltalk.Error || Error), "_new", []), "_messageText_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("Parse error on line ", "__comma", [row]), "__comma", [" column "]), "__comma", [col]), "__comma", [" : "]), "__comma", [message]), "__comma", [" Below is code with line numbers and ===> marker inserted:"]), "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])]), "__comma", [code])]);
3680
- return self;},
4054
+ fn: function (anException, aString) {
4055
+ var self = this;
4056
+ var $1;
4057
+ var row;
4058
+ var col;
4059
+ var message;
4060
+ var lines;
4061
+ var badLine;
4062
+ var code;
4063
+ row = anException.line;
4064
+ col = anException.column;
4065
+ message = anException.message;
4066
+ lines = smalltalk.send(aString, "_lines", []);
4067
+ badLine = smalltalk.send(lines, "_at_", [row]);
4068
+ badLine = smalltalk.send(smalltalk.send(smalltalk.send(badLine, "_copyFrom_to_", [1, smalltalk.send(col, "__minus", [1])]), "__comma", [" ===>"]), "__comma", [smalltalk.send(badLine, "_copyFrom_to_", [col, smalltalk.send(badLine, "_size", [])])]);
4069
+ smalltalk.send(lines, "_at_put_", [row, badLine]);
4070
+ code = smalltalk.send(smalltalk.String || String, "_streamContents_", [function (s) {return smalltalk.send(lines, "_withIndexDo_", [function (l, i) {return smalltalk.send(s, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(i, "_asString", []), "__comma", [": "]), "__comma", [l]), "__comma", [smalltalk.send(smalltalk.String || String, "_lf", [])])]);}]);}]);
4071
+ $1 = smalltalk.send(smalltalk.send(smalltalk.ParseError || ParseError, "_new", []), "_messageText_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("Parse error on line ", "__comma", [row]), "__comma", [" column "]), "__comma", [col]), "__comma", [" : "]), "__comma", [message]), "__comma", [" Below is code with line numbers and ===> marker inserted:"]), "__comma", [smalltalk.send(smalltalk.String || String, "_lf", [])]), "__comma", [code])]);
4072
+ return $1;
4073
+ },
3681
4074
  args: ["anException", "aString"],
3682
- source: "parseError: anException parsing: aString\x0a\x09| row col message lines badLine code |\x0a\x09<row = anException.line;\x0a\x09col = anException.column;\x0a\x09message = anException.message;>.\x0a\x09lines := aString lines.\x0a\x09badLine := lines at: row.\x0a\x09badLine := (badLine copyFrom: 1 to: col - 1), ' ===>', (badLine copyFrom: col to: badLine size).\x0a\x09lines at: row put: badLine.\x0a\x09code := String streamContents: [:s |\x0a lines withIndexDo: [:l :i |\x0a s nextPutAll: i asString, ': ', l, String lf]].\x0a\x09^ Error new messageText: ('Parse error on line ' , row , ' column ' , col , ' : ' , message , ' Below is code with line numbers and ===> marker inserted:' , String lf, code)",
3683
- messageSends: ["lines", "at:", ",", "copyFrom:to:", "-", "size", "at:put:", "streamContents:", "withIndexDo:", "nextPutAll:", "asString", "lf", "messageText:", "new"],
3684
- referencedClasses: ["String", "Error"]
4075
+ source: "parseError: anException parsing: aString\x0a\x09| row col message lines badLine code |\x0a\x09<row = anException.line;\x0a\x09col = anException.column;\x0a\x09message = anException.message;>.\x0a\x09lines := aString lines.\x0a\x09badLine := lines at: row.\x0a\x09badLine := (badLine copyFrom: 1 to: col - 1), ' ===>', (badLine copyFrom: col to: badLine size).\x0a\x09lines at: row put: badLine.\x0a\x09code := String streamContents: [:s |\x0a lines withIndexDo: [:l :i |\x0a s nextPutAll: i asString, ': ', l, String lf]].\x0a\x09^ ParseError new messageText: ('Parse error on line ' , row , ' column ' , col , ' : ' , message , ' Below is code with line numbers and ===> marker inserted:' , String lf, code)",
4076
+ messageSends: ["lines", "at:", ",", "copyFrom:to:", "size", "-", "at:put:", "streamContents:", "withIndexDo:", "nextPutAll:", "lf", "asString", "messageText:", "new"],
4077
+ referencedClasses: ["String", "ParseError"]
4078
+ }),
4079
+ smalltalk.Smalltalk);
4080
+
4081
+ smalltalk.addMethod(
4082
+ "_pseudoVariableNames",
4083
+ smalltalk.method({
4084
+ selector: "pseudoVariableNames",
4085
+ category: 'packages',
4086
+ fn: function (){
4087
+ var self=this;
4088
+ return ["self", "super", "nil", "true", "false", "thisContext"];
4089
+ },
4090
+ args: [],
4091
+ source: "pseudoVariableNames\x0a\x09^ #('self' 'super' 'nil' 'true' 'false' 'thisContext')",
4092
+ messageSends: [],
4093
+ referencedClasses: []
3685
4094
  }),
3686
4095
  smalltalk.Smalltalk);
3687
4096
 
@@ -3690,10 +4099,11 @@ smalltalk.addMethod(
3690
4099
  smalltalk.method({
3691
4100
  selector: "readJSObject:",
3692
4101
  category: 'accessing',
3693
- fn: function (anObject){
3694
- var self=this;
3695
- return self.readJSObject(anObject);
3696
- return self;},
4102
+ fn: function (anObject) {
4103
+ var self = this;
4104
+ return self.readJSObject(anObject);
4105
+ return self;
4106
+ },
3697
4107
  args: ["anObject"],
3698
4108
  source: "readJSObject: anObject\x0a\x09<return self.readJSObject(anObject)>",
3699
4109
  messageSends: [],
@@ -3708,15 +4118,27 @@ selector: "removeClass:",
3708
4118
  category: 'classes',
3709
4119
  fn: function (aClass){
3710
4120
  var self=this;
3711
- ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_asString", []), "__comma", [" is a Metaclass and cannot be removed!"])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_asString", []), "__comma", [" is a Metaclass and cannot be removed!"])]);})]));
3712
- smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_do_", [(function(each){return smalltalk.send(aClass, "_removeCompiledMethod_", [each]);})]);
3713
- smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_methodDictionary", []), "_values", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(aClass, "_class", []), "_removeCompiledMethod_", [each]);})]);
3714
- smalltalk.send(self, "_basicDelete_", [smalltalk.send(aClass, "_name", [])]);
3715
- return self;},
4121
+ var $1,$2,$3;
4122
+ $1=smalltalk.send(aClass,"_isMetaclass",[]);
4123
+ if(smalltalk.assert($1)){
4124
+ smalltalk.send(self,"_error_",[smalltalk.send(smalltalk.send(aClass,"_asString",[]),"__comma",[" is a Metaclass and cannot be removed!"])]);
4125
+ };
4126
+ smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_methodDictionary",[]),"_values",[]),"_do_",[(function(each){
4127
+ return smalltalk.send(aClass,"_removeCompiledMethod_",[each]);
4128
+ })]);
4129
+ smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_class",[]),"_methodDictionary",[]),"_values",[]),"_do_",[(function(each){
4130
+ return smalltalk.send(smalltalk.send(aClass,"_class",[]),"_removeCompiledMethod_",[each]);
4131
+ })]);
4132
+ smalltalk.send(self,"_basicDelete_",[smalltalk.send(aClass,"_name",[])]);
4133
+ $2=smalltalk.send((smalltalk.ClassRemoved || ClassRemoved),"_new",[]);
4134
+ smalltalk.send($2,"_theClass_",[aClass]);
4135
+ $3=smalltalk.send($2,"_yourself",[]);
4136
+ smalltalk.send(smalltalk.send((smalltalk.SystemAnnouncer || SystemAnnouncer),"_current",[]),"_announce_",[$3]);
4137
+ return self},
3716
4138
  args: ["aClass"],
3717
- source: "removeClass: aClass\x0a\x09aClass isMetaclass ifTrue: [self error: aClass asString, ' is a Metaclass and cannot be removed!'].\x0a\x09aClass methodDictionary values do: [:each |\x0a\x09\x09aClass removeCompiledMethod: each].\x0a\x09aClass class methodDictionary values do: [:each |\x0a\x09\x09aClass class removeCompiledMethod: each].\x0a\x09self basicDelete: aClass name",
3718
- messageSends: ["ifTrue:", "isMetaclass", "error:", ",", "asString", "do:", "values", "methodDictionary", "removeCompiledMethod:", "class", "basicDelete:", "name"],
3719
- referencedClasses: []
4139
+ source: "removeClass: aClass\x0a\x09aClass isMetaclass ifTrue: [self error: aClass asString, ' is a Metaclass and cannot be removed!'].\x0a \x0a\x09aClass methodDictionary values do: [:each |\x0a\x09\x09aClass removeCompiledMethod: each].\x0a \x0a\x09aClass class methodDictionary values do: [:each |\x0a\x09\x09aClass class removeCompiledMethod: each].\x0a \x0a\x09self basicDelete: aClass name.\x0a \x0a SystemAnnouncer current\x0a \x09announce: (ClassRemoved new\x0a \x09theClass: aClass;\x0a yourself)",
4140
+ messageSends: ["ifTrue:", "error:", ",", "asString", "isMetaclass", "do:", "removeCompiledMethod:", "values", "methodDictionary", "class", "basicDelete:", "name", "announce:", "theClass:", "new", "yourself", "current"],
4141
+ referencedClasses: ["ClassRemoved", "SystemAnnouncer"]
3720
4142
  }),
3721
4143
  smalltalk.Smalltalk);
3722
4144
 
@@ -3725,16 +4147,17 @@ smalltalk.addMethod(
3725
4147
  smalltalk.method({
3726
4148
  selector: "removePackage:",
3727
4149
  category: 'packages',
3728
- fn: function (packageName){
3729
- var self=this;
3730
- var pkg=nil;
3731
- (pkg=smalltalk.send(self, "_packageAt_ifAbsent_", [packageName, (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Missing package: ", "__comma", [packageName])]);})]));
3732
- smalltalk.send(smalltalk.send(pkg, "_classes", []), "_do_", [(function(each){return smalltalk.send(self, "_removeClass_", [each]);})]);
3733
- smalltalk.send(self, "_deletePackage_", [packageName]);
3734
- return self;},
4150
+ fn: function (packageName) {
4151
+ var self = this;
4152
+ var pkg;
4153
+ pkg = smalltalk.send(self, "_packageAt_ifAbsent_", [packageName, function () {return smalltalk.send(self, "_error_", [smalltalk.send("Missing package: ", "__comma", [packageName])]);}]);
4154
+ smalltalk.send(smalltalk.send(pkg, "_classes", []), "_do_", [function (each) {return smalltalk.send(self, "_removeClass_", [each]);}]);
4155
+ smalltalk.send(self, "_deletePackage_", [packageName]);
4156
+ return self;
4157
+ },
3735
4158
  args: ["packageName"],
3736
4159
  source: "removePackage: packageName\x0a\x09\x22Removes a package and all its classes.\x22\x0a\x0a\x09| pkg |\x0a\x09pkg := self packageAt: packageName ifAbsent: [self error: 'Missing package: ', packageName].\x0a\x09pkg classes do: [:each |\x0a \x09self removeClass: each].\x0a\x09self deletePackage: packageName",
3737
- messageSends: ["packageAt:ifAbsent:", "error:", ",", "do:", "classes", "removeClass:", "deletePackage:"],
4160
+ messageSends: ["packageAt:ifAbsent:", "error:", ",", "do:", "removeClass:", "classes", "deletePackage:"],
3738
4161
  referencedClasses: []
3739
4162
  }),
3740
4163
  smalltalk.Smalltalk);
@@ -3744,15 +4167,21 @@ smalltalk.addMethod(
3744
4167
  smalltalk.method({
3745
4168
  selector: "renamePackage:to:",
3746
4169
  category: 'packages',
3747
- fn: function (packageName, newName){
3748
- var self=this;
3749
- var pkg=nil;
3750
- (pkg=smalltalk.send(self, "_packageAt_ifAbsent_", [packageName, (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Missing package: ", "__comma", [packageName])]);})]));
3751
- (($receiver = smalltalk.send(self, "_packageAt_", [newName])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Already exists a package called: ", "__comma", [newName])]);})() : nil;
3752
- smalltalk.packages[newName] = smalltalk.packages[packageName];
3753
- smalltalk.send(pkg, "_name_", [newName]);
3754
- smalltalk.send(self, "_deletePackage_", [packageName]);
3755
- return self;},
4170
+ fn: function (packageName, newName) {
4171
+ var self = this;
4172
+ var $1;
4173
+ var pkg;
4174
+ pkg = smalltalk.send(self, "_packageAt_ifAbsent_", [packageName, function () {return smalltalk.send(self, "_error_", [smalltalk.send("Missing package: ", "__comma", [packageName])]);}]);
4175
+ $1 = smalltalk.send(self, "_packageAt_", [newName]);
4176
+ if (($receiver = $1) == nil || $receiver == undefined) {
4177
+ } else {
4178
+ smalltalk.send(self, "_error_", [smalltalk.send("Already exists a package called: ", "__comma", [newName])]);
4179
+ }
4180
+ smalltalk.packages[newName] = smalltalk.packages[packageName];
4181
+ smalltalk.send(pkg, "_name_", [newName]);
4182
+ smalltalk.send(self, "_deletePackage_", [packageName]);
4183
+ return self;
4184
+ },
3756
4185
  args: ["packageName", "newName"],
3757
4186
  source: "renamePackage: packageName to: newName\x0a\x09\x22Rename a package.\x22\x0a\x0a\x09| pkg |\x0a\x09pkg := self packageAt: packageName ifAbsent: [self error: 'Missing package: ', packageName].\x0a\x09(self packageAt: newName) ifNotNil: [self error: 'Already exists a package called: ', newName].\x0a\x09<smalltalk.packages[newName] = smalltalk.packages[packageName]>.\x0a\x09pkg name: newName.\x0a\x09self deletePackage: packageName.",
3758
4187
  messageSends: ["packageAt:ifAbsent:", "error:", ",", "ifNotNil:", "packageAt:", "name:", "deletePackage:"],
@@ -3765,10 +4194,11 @@ smalltalk.addMethod(
3765
4194
  smalltalk.method({
3766
4195
  selector: "reservedWords",
3767
4196
  category: 'accessing',
3768
- fn: function (){
3769
- var self=this;
3770
- return self.reservedWords;
3771
- return self;},
4197
+ fn: function () {
4198
+ var self = this;
4199
+ return self.reservedWords;
4200
+ return self;
4201
+ },
3772
4202
  args: [],
3773
4203
  source: "reservedWords\x0a\x09\x22JavaScript reserved words\x22\x0a\x09<return self.reservedWords>",
3774
4204
  messageSends: [],
@@ -3781,14 +4211,15 @@ smalltalk.addMethod(
3781
4211
  smalltalk.method({
3782
4212
  selector: "send:to:arguments:",
3783
4213
  category: 'accessing',
3784
- fn: function (aSelector, anObject, aCollection){
3785
- var self=this;
3786
- var selector=nil;
3787
- (selector=smalltalk.send(smalltalk.send(aSelector, "_asString", []), "_asSelector", []));
3788
- self.send(anObject, selector, aCollection);
3789
- return self;},
4214
+ fn: function (aSelector, anObject, aCollection) {
4215
+ var self = this;
4216
+ var selector;
4217
+ selector = smalltalk.send(smalltalk.send(aSelector, "_asString", []), "_asSelector", []);
4218
+ return self.send(anObject, selector, aCollection);
4219
+ return self;
4220
+ },
3790
4221
  args: ["aSelector", "anObject", "aCollection"],
3791
- source: "send: aSelector to: anObject arguments: aCollection\x0a\x09| selector |\x0a\x09selector := aSelector asString asSelector.\x0a\x09<self.send(anObject, selector, aCollection)>",
4222
+ source: "send: aSelector to: anObject arguments: aCollection\x0a\x09| selector |\x0a\x09selector := aSelector asString asSelector.\x0a\x09<return self.send(anObject, selector, aCollection)>",
3792
4223
  messageSends: ["asSelector", "asString"],
3793
4224
  referencedClasses: []
3794
4225
  }),
@@ -3801,10 +4232,11 @@ smalltalk.addMethod(
3801
4232
  smalltalk.method({
3802
4233
  selector: "current",
3803
4234
  category: 'accessing',
3804
- fn: function (){
3805
- var self=this;
3806
- return smalltalk;
3807
- return self;},
4235
+ fn: function () {
4236
+ var self = this;
4237
+ return smalltalk;
4238
+ return self;
4239
+ },
3808
4240
  args: [],
3809
4241
  source: "current\x0a\x09<return smalltalk>",
3810
4242
  messageSends: [],
@@ -3820,10 +4252,10 @@ smalltalk.addMethod(
3820
4252
  smalltalk.method({
3821
4253
  selector: "asJSON",
3822
4254
  category: 'converting',
3823
- fn: function (){
3824
- var self=this;
3825
- return (typeof null == 'undefined' ? nil : null);
3826
- return self;},
4255
+ fn: function () {
4256
+ var self = this;
4257
+ return null;
4258
+ },
3827
4259
  args: [],
3828
4260
  source: "asJSON\x0a\x09^null",
3829
4261
  messageSends: [],
@@ -3836,10 +4268,10 @@ smalltalk.addMethod(
3836
4268
  smalltalk.method({
3837
4269
  selector: "deepCopy",
3838
4270
  category: 'copying',
3839
- fn: function (){
3840
- var self=this;
3841
- return self;
3842
- return self;},
4271
+ fn: function () {
4272
+ var self = this;
4273
+ return self;
4274
+ },
3843
4275
  args: [],
3844
4276
  source: "deepCopy\x0a\x09^self",
3845
4277
  messageSends: [],
@@ -3852,10 +4284,12 @@ smalltalk.addMethod(
3852
4284
  smalltalk.method({
3853
4285
  selector: "ifNil:",
3854
4286
  category: 'testing',
3855
- fn: function (aBlock){
3856
- var self=this;
3857
- return smalltalk.send(self, "_ifNil_ifNotNil_", [aBlock, (function(){return nil;})]);
3858
- return self;},
4287
+ fn: function (aBlock) {
4288
+ var self = this;
4289
+ var $1;
4290
+ $1 = smalltalk.send(self, "_ifNil_ifNotNil_", [aBlock, function () {}]);
4291
+ return $1;
4292
+ },
3859
4293
  args: ["aBlock"],
3860
4294
  source: "ifNil: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^self ifNil: aBlock ifNotNil: []",
3861
4295
  messageSends: ["ifNil:ifNotNil:"],
@@ -3868,10 +4302,12 @@ smalltalk.addMethod(
3868
4302
  smalltalk.method({
3869
4303
  selector: "ifNil:ifNotNil:",
3870
4304
  category: 'testing',
3871
- fn: function (aBlock, anotherBlock){
3872
- var self=this;
3873
- return smalltalk.send(aBlock, "_value", []);
3874
- return self;},
4305
+ fn: function (aBlock, anotherBlock) {
4306
+ var self = this;
4307
+ var $1;
4308
+ $1 = smalltalk.send(aBlock, "_value", []);
4309
+ return $1;
4310
+ },
3875
4311
  args: ["aBlock", "anotherBlock"],
3876
4312
  source: "ifNil: aBlock ifNotNil: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^aBlock value",
3877
4313
  messageSends: ["value"],
@@ -3884,10 +4320,10 @@ smalltalk.addMethod(
3884
4320
  smalltalk.method({
3885
4321
  selector: "ifNotNil:",
3886
4322
  category: 'testing',
3887
- fn: function (aBlock){
3888
- var self=this;
3889
- return self;
3890
- return self;},
4323
+ fn: function (aBlock) {
4324
+ var self = this;
4325
+ return self;
4326
+ },
3891
4327
  args: ["aBlock"],
3892
4328
  source: "ifNotNil: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^self",
3893
4329
  messageSends: [],
@@ -3900,10 +4336,12 @@ smalltalk.addMethod(
3900
4336
  smalltalk.method({
3901
4337
  selector: "ifNotNil:ifNil:",
3902
4338
  category: 'testing',
3903
- fn: function (aBlock, anotherBlock){
3904
- var self=this;
3905
- return smalltalk.send(anotherBlock, "_value", []);
3906
- return self;},
4339
+ fn: function (aBlock, anotherBlock) {
4340
+ var self = this;
4341
+ var $1;
4342
+ $1 = smalltalk.send(anotherBlock, "_value", []);
4343
+ return $1;
4344
+ },
3907
4345
  args: ["aBlock", "anotherBlock"],
3908
4346
  source: "ifNotNil: aBlock ifNil: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^anotherBlock value",
3909
4347
  messageSends: ["value"],
@@ -3916,10 +4354,10 @@ smalltalk.addMethod(
3916
4354
  smalltalk.method({
3917
4355
  selector: "isNil",
3918
4356
  category: 'testing',
3919
- fn: function (){
3920
- var self=this;
3921
- return true;
3922
- return self;},
4357
+ fn: function () {
4358
+ var self = this;
4359
+ return true;
4360
+ },
3923
4361
  args: [],
3924
4362
  source: "isNil\x0a\x09^true",
3925
4363
  messageSends: [],
@@ -3932,10 +4370,10 @@ smalltalk.addMethod(
3932
4370
  smalltalk.method({
3933
4371
  selector: "notNil",
3934
4372
  category: 'testing',
3935
- fn: function (){
3936
- var self=this;
3937
- return false;
3938
- return self;},
4373
+ fn: function () {
4374
+ var self = this;
4375
+ return false;
4376
+ },
3939
4377
  args: [],
3940
4378
  source: "notNil\x0a\x09^false",
3941
4379
  messageSends: [],
@@ -3948,10 +4386,10 @@ smalltalk.addMethod(
3948
4386
  smalltalk.method({
3949
4387
  selector: "printString",
3950
4388
  category: 'printing',
3951
- fn: function (){
3952
- var self=this;
3953
- return "nil";
3954
- return self;},
4389
+ fn: function () {
4390
+ var self = this;
4391
+ return "nil";
4392
+ },
3955
4393
  args: [],
3956
4394
  source: "printString\x0a ^'nil'",
3957
4395
  messageSends: [],
@@ -3964,10 +4402,10 @@ smalltalk.addMethod(
3964
4402
  smalltalk.method({
3965
4403
  selector: "shallowCopy",
3966
4404
  category: 'copying',
3967
- fn: function (){
3968
- var self=this;
3969
- return self;
3970
- return self;},
4405
+ fn: function () {
4406
+ var self = this;
4407
+ return self;
4408
+ },
3971
4409
  args: [],
3972
4410
  source: "shallowCopy\x0a\x09^self",
3973
4411
  messageSends: [],
@@ -3980,10 +4418,12 @@ smalltalk.addMethod(
3980
4418
  smalltalk.method({
3981
4419
  selector: "subclass:instanceVariableNames:",
3982
4420
  category: 'class creation',
3983
- fn: function (aString, anotherString){
3984
- var self=this;
3985
- return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
3986
- return self;},
4421
+ fn: function (aString, anotherString) {
4422
+ var self = this;
4423
+ var $1;
4424
+ $1 = smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
4425
+ return $1;
4426
+ },
3987
4427
  args: ["aString", "anotherString"],
3988
4428
  source: "subclass: aString instanceVariableNames: anotherString\x0a\x09^self subclass: aString instanceVariableNames: anotherString package: nil",
3989
4429
  messageSends: ["subclass:instanceVariableNames:package:"],
@@ -3996,11 +4436,13 @@ smalltalk.addMethod(
3996
4436
  smalltalk.method({
3997
4437
  selector: "subclass:instanceVariableNames:category:",
3998
4438
  category: 'class creation',
3999
- fn: function (aString, aString2, aString3){
4000
- var self=this;
4001
- smalltalk.send(self, "_deprecatedAPI", []);
4002
- return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
4003
- return self;},
4439
+ fn: function (aString, aString2, aString3) {
4440
+ var self = this;
4441
+ var $1;
4442
+ smalltalk.send(self, "_deprecatedAPI", []);
4443
+ $1 = smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
4444
+ return $1;
4445
+ },
4004
4446
  args: ["aString", "aString2", "aString3"],
4005
4447
  source: "subclass: aString instanceVariableNames: aString2 category: aString3\x0a\x09\x22Kept for compatibility.\x22\x0a\x09self deprecatedAPI.\x0a\x09^self subclass: aString instanceVariableNames: aString2 package: aString3",
4006
4448
  messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"],
@@ -4013,10 +4455,12 @@ smalltalk.addMethod(
4013
4455
  smalltalk.method({
4014
4456
  selector: "subclass:instanceVariableNames:package:",
4015
4457
  category: 'class creation',
4016
- fn: function (aString, aString2, aString3){
4017
- var self=this;
4018
- return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, aString, aString2, aString3]);
4019
- return self;},
4458
+ fn: function (aString, aString2, aString3) {
4459
+ var self = this;
4460
+ var $1;
4461
+ $1 = smalltalk.send(smalltalk.send(smalltalk.ClassBuilder || ClassBuilder, "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, aString, aString2, aString3]);
4462
+ return $1;
4463
+ },
4020
4464
  args: ["aString", "aString2", "aString3"],
4021
4465
  source: "subclass: aString instanceVariableNames: aString2 package: aString3\x0a\x09^ClassBuilder new\x0a\x09 superclass: self subclass: aString instanceVariableNames: aString2 package: aString3",
4022
4466
  messageSends: ["superclass:subclass:instanceVariableNames:package:", "new"],
@@ -4030,10 +4474,11 @@ smalltalk.addMethod(
4030
4474
  smalltalk.method({
4031
4475
  selector: "new",
4032
4476
  category: 'instance creation',
4033
- fn: function (){
4034
- var self=this;
4035
- smalltalk.send(self, "_error_", ["You cannot create new instances of UndefinedObject. Use nil"]);
4036
- return self;},
4477
+ fn: function () {
4478
+ var self = this;
4479
+ smalltalk.send(self, "_error_", ["You cannot create new instances of UndefinedObject. Use nil"]);
4480
+ return self;
4481
+ },
4037
4482
  args: [],
4038
4483
  source: "new\x0a\x09 self error: 'You cannot create new instances of UndefinedObject. Use nil'",
4039
4484
  messageSends: ["error:"],