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,8 +6,15 @@ smalltalk.method({
6
6
  selector: "addCompiledMethod:",
7
7
  fn: function (aMethod){
8
8
  var self=this;
9
+ var $1,$2;
9
10
  smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self);
10
- return self;}
11
+ ;
12
+ $1=smalltalk.send((smalltalk.MethodAdded || MethodAdded),"_new",[]);
13
+ smalltalk.send($1,"_theClass_",[self]);
14
+ smalltalk.send($1,"_method_",[aMethod]);
15
+ $2=smalltalk.send($1,"_yourself",[]);
16
+ smalltalk.send(smalltalk.send((smalltalk.SystemAnnouncer || SystemAnnouncer),"_current",[]),"_announce_",[$2]);
17
+ return self}
11
18
  }),
12
19
  smalltalk.Behavior);
13
20
 
@@ -17,11 +24,17 @@ smalltalk.method({
17
24
  selector: "allInstanceVariableNames",
18
25
  fn: function (){
19
26
  var self=this;
20
- var result=nil;
21
- (result=smalltalk.send(smalltalk.send(self, "_instanceVariableNames", []), "_copy", []));
22
- (($receiver = smalltalk.send(self, "_superclass", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(result, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allInstanceVariableNames", [])]);})() : nil;
27
+ var $1;
28
+ var result;
29
+ result=smalltalk.send(smalltalk.send(self,"_instanceVariableNames",[]),"_copy",[]);
30
+ $1=smalltalk.send(self,"_superclass",[]);
31
+ if(($receiver = $1) == nil || $receiver == undefined){
32
+ $1;
33
+ } else {
34
+ smalltalk.send(result,"_addAll_",[smalltalk.send(smalltalk.send(self,"_superclass",[]),"_allInstanceVariableNames",[])]);
35
+ };
23
36
  return result;
24
- return self;}
37
+ }
25
38
  }),
26
39
  smalltalk.Behavior);
27
40
 
@@ -31,11 +44,35 @@ smalltalk.method({
31
44
  selector: "allSubclasses",
32
45
  fn: function (){
33
46
  var self=this;
34
- var result=nil;
35
- (result=smalltalk.send(self, "_subclasses", []));
36
- smalltalk.send(smalltalk.send(self, "_subclasses", []), "_do_", [(function(each){return smalltalk.send(result, "_addAll_", [smalltalk.send(each, "_allSubclasses", [])]);})]);
47
+ var result;
48
+ result=smalltalk.send(self,"_subclasses",[]);
49
+ smalltalk.send(smalltalk.send(self,"_subclasses",[]),"_do_",[(function(each){
50
+ return smalltalk.send(result,"_addAll_",[smalltalk.send(each,"_allSubclasses",[])]);
51
+ })]);
37
52
  return result;
38
- return self;}
53
+ }
54
+ }),
55
+ smalltalk.Behavior);
56
+
57
+ smalltalk.addMethod(
58
+ "_allSuperclasses",
59
+ smalltalk.method({
60
+ selector: "allSuperclasses",
61
+ fn: function (){
62
+ var self=this;
63
+ var $1,$3,$4,$2;
64
+ $1=smalltalk.send(self,"_superclass",[]);
65
+ if(($receiver = $1) == nil || $receiver == undefined){
66
+ return [];
67
+ } else {
68
+ $1;
69
+ };
70
+ $3=smalltalk.send((smalltalk.OrderedCollection || OrderedCollection),"_with_",[smalltalk.send(self,"_superclass",[])]);
71
+ smalltalk.send($3,"_addAll_",[smalltalk.send(smalltalk.send(self,"_superclass",[]),"_allSuperclasses",[])]);
72
+ $4=smalltalk.send($3,"_yourself",[]);
73
+ $2=$4;
74
+ return $2;
75
+ }
39
76
  }),
40
77
  smalltalk.Behavior);
41
78
 
@@ -46,7 +83,8 @@ selector: "basicNew",
46
83
  fn: function (){
47
84
  var self=this;
48
85
  return new self.fn();
49
- return self;}
86
+ ;
87
+ return self}
50
88
  }),
51
89
  smalltalk.Behavior);
52
90
 
@@ -56,8 +94,14 @@ smalltalk.method({
56
94
  selector: "canUnderstand:",
57
95
  fn: function (aSelector){
58
96
  var self=this;
59
- return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_keys", []), "_includes_", [smalltalk.send(aSelector, "_asString", [])]), "_or_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_superclass", []), "_notNil", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(self, "_superclass", []), "_canUnderstand_", [aSelector]);})]);})]);
60
- return self;}
97
+ var $1;
98
+ $1=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self,"_methodDictionary",[]),"_keys",[]),"_includes_",[smalltalk.send(aSelector,"_asString",[])]),"_or_",[(function(){
99
+ return smalltalk.send(smalltalk.send(smalltalk.send(self,"_superclass",[]),"_notNil",[]),"_and_",[(function(){
100
+ return smalltalk.send(smalltalk.send(self,"_superclass",[]),"_canUnderstand_",[aSelector]);
101
+ })]);
102
+ })]);
103
+ return $1;
104
+ }
61
105
  }),
62
106
  smalltalk.Behavior);
63
107
 
@@ -67,8 +111,15 @@ smalltalk.method({
67
111
  selector: "comment",
68
112
  fn: function (){
69
113
  var self=this;
70
- return (($receiver = smalltalk.send(self, "_basicAt_", ["comment"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
71
- return self;}
114
+ var $2,$1;
115
+ $2=smalltalk.send(self,"_basicAt_",["comment"]);
116
+ if(($receiver = $2) == nil || $receiver == undefined){
117
+ $1="";
118
+ } else {
119
+ $1=$2;
120
+ };
121
+ return $1;
122
+ }
72
123
  }),
73
124
  smalltalk.Behavior);
74
125
 
@@ -78,8 +129,13 @@ smalltalk.method({
78
129
  selector: "comment:",
79
130
  fn: function (aString){
80
131
  var self=this;
81
- smalltalk.send(self, "_basicAt_put_", ["comment", aString]);
82
- return self;}
132
+ var $1,$2;
133
+ smalltalk.send(self,"_basicAt_put_",["comment",aString]);
134
+ $1=smalltalk.send((smalltalk.ClassCommentChanged || ClassCommentChanged),"_new",[]);
135
+ smalltalk.send($1,"_theClass_",[self]);
136
+ $2=smalltalk.send($1,"_yourself",[]);
137
+ smalltalk.send(smalltalk.send((smalltalk.SystemAnnouncer || SystemAnnouncer),"_current",[]),"_announce_",[$2]);
138
+ return self}
83
139
  }),
84
140
  smalltalk.Behavior);
85
141
 
@@ -89,8 +145,13 @@ smalltalk.method({
89
145
  selector: "commentStamp",
90
146
  fn: function (){
91
147
  var self=this;
92
- return (function($rec){smalltalk.send($rec, "_class_", [self]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCommentReader || ClassCommentReader), "_new", []));
93
- return self;}
148
+ var $2,$3,$1;
149
+ $2=smalltalk.send((smalltalk.ClassCommentReader || ClassCommentReader),"_new",[]);
150
+ smalltalk.send($2,"_class_",[self]);
151
+ $3=smalltalk.send($2,"_yourself",[]);
152
+ $1=$3;
153
+ return $1;
154
+ }
94
155
  }),
95
156
  smalltalk.Behavior);
96
157
 
@@ -98,10 +159,12 @@ smalltalk.addMethod(
98
159
  "_commentStamp_prior_",
99
160
  smalltalk.method({
100
161
  selector: "commentStamp:prior:",
101
- fn: function (aStamp, prior){
162
+ fn: function (aStamp,prior){
102
163
  var self=this;
103
- return smalltalk.send(self, "_commentStamp", []);
104
- return self;}
164
+ var $1;
165
+ $1=smalltalk.send(self,"_commentStamp",[]);
166
+ return $1;
167
+ }
105
168
  }),
106
169
  smalltalk.Behavior);
107
170
 
@@ -111,8 +174,8 @@ smalltalk.method({
111
174
  selector: "compile:",
112
175
  fn: function (aString){
113
176
  var self=this;
114
- smalltalk.send(self, "_compile_category_", [aString, ""]);
115
- return self;}
177
+ smalltalk.send(self,"_compile_category_",[aString,""]);
178
+ return self}
116
179
  }),
117
180
  smalltalk.Behavior);
118
181
 
@@ -120,10 +183,21 @@ smalltalk.addMethod(
120
183
  "_compile_category_",
121
184
  smalltalk.method({
122
185
  selector: "compile:category:",
123
- fn: function (aString, anotherString){
186
+ fn: function (aString,anotherString){
187
+ var self=this;
188
+ smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler),"_new",[]),"_install_forClass_category_",[aString,self,anotherString]);
189
+ return self}
190
+ }),
191
+ smalltalk.Behavior);
192
+
193
+ smalltalk.addMethod(
194
+ "_definition",
195
+ smalltalk.method({
196
+ selector: "definition",
197
+ fn: function (){
124
198
  var self=this;
125
- (function($rec){smalltalk.send($rec, "_install_forClass_category_", [aString, self, anotherString]);return smalltalk.send($rec, "_setupClass_", [self]);})(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []));
126
- return self;}
199
+ return "";
200
+ }
127
201
  }),
128
202
  smalltalk.Behavior);
129
203
 
@@ -133,8 +207,10 @@ smalltalk.method({
133
207
  selector: "inheritsFrom:",
134
208
  fn: function (aClass){
135
209
  var self=this;
136
- return smalltalk.send(smalltalk.send(aClass, "_allSubclasses", []), "_includes_", [self]);
137
- return self;}
210
+ var $1;
211
+ $1=smalltalk.send(smalltalk.send(aClass,"_allSubclasses",[]),"_includes_",[self]);
212
+ return $1;
213
+ }
138
214
  }),
139
215
  smalltalk.Behavior);
140
216
 
@@ -145,7 +221,8 @@ selector: "instanceVariableNames",
145
221
  fn: function (){
146
222
  var self=this;
147
223
  return self.iVarNames;
148
- return self;}
224
+ ;
225
+ return self}
149
226
  }),
150
227
  smalltalk.Behavior);
151
228
 
@@ -153,10 +230,11 @@ smalltalk.addMethod(
153
230
  "_methodAt_",
154
231
  smalltalk.method({
155
232
  selector: "methodAt:",
156
- fn: function (aString){
233
+ fn: function (aSymbol){
157
234
  var self=this;
158
- return smalltalk.methods(self)[aString];
159
- return self;}
235
+ return smalltalk.methods(self)[aSymbol._asString()];
236
+ ;
237
+ return self}
160
238
  }),
161
239
  smalltalk.Behavior);
162
240
 
@@ -174,7 +252,21 @@ var dict = smalltalk.HashedCollection._new();
174
252
  }
175
253
  };
176
254
  return dict;
177
- return self;}
255
+ ;
256
+ return self}
257
+ }),
258
+ smalltalk.Behavior);
259
+
260
+ smalltalk.addMethod(
261
+ "_methods",
262
+ smalltalk.method({
263
+ selector: "methods",
264
+ fn: function (){
265
+ var self=this;
266
+ var $1;
267
+ $1=smalltalk.send(smalltalk.send(self,"_methodDictionary",[]),"_values",[]);
268
+ return $1;
269
+ }
178
270
  }),
179
271
  smalltalk.Behavior);
180
272
 
@@ -184,8 +276,13 @@ smalltalk.method({
184
276
  selector: "methodsFor:",
185
277
  fn: function (aString){
186
278
  var self=this;
187
- return (function($rec){smalltalk.send($rec, "_class_category_", [self, aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCategoryReader || ClassCategoryReader), "_new", []));
188
- return self;}
279
+ var $2,$3,$1;
280
+ $2=smalltalk.send((smalltalk.ClassCategoryReader || ClassCategoryReader),"_new",[]);
281
+ smalltalk.send($2,"_class_category_",[self,aString]);
282
+ $3=smalltalk.send($2,"_yourself",[]);
283
+ $1=$3;
284
+ return $1;
285
+ }
189
286
  }),
190
287
  smalltalk.Behavior);
191
288
 
@@ -193,10 +290,27 @@ smalltalk.addMethod(
193
290
  "_methodsFor_stamp_",
194
291
  smalltalk.method({
195
292
  selector: "methodsFor:stamp:",
196
- fn: function (aString, aStamp){
293
+ fn: function (aString,aStamp){
197
294
  var self=this;
198
- return smalltalk.send(self, "_methodsFor_", [aString]);
199
- return self;}
295
+ var $1;
296
+ $1=smalltalk.send(self,"_methodsFor_",[aString]);
297
+ return $1;
298
+ }
299
+ }),
300
+ smalltalk.Behavior);
301
+
302
+ smalltalk.addMethod(
303
+ "_methodsInProtocol_",
304
+ smalltalk.method({
305
+ selector: "methodsInProtocol:",
306
+ fn: function (aString){
307
+ var self=this;
308
+ var $1;
309
+ $1=smalltalk.send(smalltalk.send(smalltalk.send(self,"_methodDictionary",[]),"_values",[]),"_select_",[(function(each){
310
+ return smalltalk.send(smalltalk.send(each,"_protocol",[]),"__eq",[aString]);
311
+ })]);
312
+ return $1;
313
+ }
200
314
  }),
201
315
  smalltalk.Behavior);
202
316
 
@@ -207,7 +321,8 @@ selector: "name",
207
321
  fn: function (){
208
322
  var self=this;
209
323
  return self.className || nil;
210
- return self;}
324
+ ;
325
+ return self}
211
326
  }),
212
327
  smalltalk.Behavior);
213
328
 
@@ -217,8 +332,10 @@ smalltalk.method({
217
332
  selector: "new",
218
333
  fn: function (){
219
334
  var self=this;
220
- return smalltalk.send(smalltalk.send(self, "_basicNew", []), "_initialize", []);
221
- return self;}
335
+ var $1;
336
+ $1=smalltalk.send(smalltalk.send(self,"_basicNew",[]),"_initialize",[]);
337
+ return $1;
338
+ }
222
339
  }),
223
340
  smalltalk.Behavior);
224
341
 
@@ -228,11 +345,18 @@ smalltalk.method({
228
345
  selector: "protocols",
229
346
  fn: function (){
230
347
  var self=this;
231
- var protocols=nil;
232
- (protocols=smalltalk.send((smalltalk.Array || Array), "_new", []));
233
- smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_do_", [(function(each){return ((($receiver = smalltalk.send(protocols, "_includes_", [smalltalk.send(each, "_category", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(protocols, "_add_", [smalltalk.send(each, "_category", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(protocols, "_add_", [smalltalk.send(each, "_category", [])]);})]));})]);
234
- return smalltalk.send(protocols, "_sort", []);
235
- return self;}
348
+ var $1,$2;
349
+ var protocols;
350
+ protocols=smalltalk.send((smalltalk.Array || Array),"_new",[]);
351
+ smalltalk.send(smalltalk.send(self,"_methodDictionary",[]),"_do_",[(function(each){
352
+ $1=smalltalk.send(protocols,"_includes_",[smalltalk.send(each,"_category",[])]);
353
+ if(! smalltalk.assert($1)){
354
+ return smalltalk.send(protocols,"_add_",[smalltalk.send(each,"_category",[])]);
355
+ };
356
+ })]);
357
+ $2=smalltalk.send(protocols,"_sort",[]);
358
+ return $2;
359
+ }
236
360
  }),
237
361
  smalltalk.Behavior);
238
362
 
@@ -242,11 +366,17 @@ smalltalk.method({
242
366
  selector: "protocolsDo:",
243
367
  fn: function (aBlock){
244
368
  var self=this;
245
- var methodsByCategory=nil;
246
- (methodsByCategory=smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_new", []));
247
- smalltalk.send(smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_values", []), "_do_", [(function(m){return smalltalk.send(smalltalk.send(methodsByCategory, "_at_ifAbsentPut_", [smalltalk.send(m, "_category", []), (function(){return smalltalk.send((smalltalk.Array || Array), "_new", []);})]), "_add_", [m]);})]);
248
- smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [(function(category){return smalltalk.send(aBlock, "_value_value_", [category, smalltalk.send(methodsByCategory, "_at_", [category])]);})]);
249
- return self;}
369
+ var methodsByCategory;
370
+ methodsByCategory=smalltalk.send((smalltalk.HashedCollection || HashedCollection),"_new",[]);
371
+ smalltalk.send(smalltalk.send(smalltalk.send(self,"_methodDictionary",[]),"_values",[]),"_do_",[(function(m){
372
+ return smalltalk.send(smalltalk.send(methodsByCategory,"_at_ifAbsentPut_",[smalltalk.send(m,"_category",[]),(function(){
373
+ return smalltalk.send((smalltalk.Array || Array),"_new",[]);
374
+ })]),"_add_",[m]);
375
+ })]);
376
+ smalltalk.send(smalltalk.send(self,"_protocols",[]),"_do_",[(function(category){
377
+ return smalltalk.send(aBlock,"_value_value_",[category,smalltalk.send(methodsByCategory,"_at_",[category])]);
378
+ })]);
379
+ return self}
250
380
  }),
251
381
  smalltalk.Behavior);
252
382
 
@@ -257,7 +387,8 @@ selector: "prototype",
257
387
  fn: function (){
258
388
  var self=this;
259
389
  return self.fn.prototype;
260
- return self;}
390
+ ;
391
+ return self}
261
392
  }),
262
393
  smalltalk.Behavior);
263
394
 
@@ -267,10 +398,30 @@ smalltalk.method({
267
398
  selector: "removeCompiledMethod:",
268
399
  fn: function (aMethod){
269
400
  var self=this;
401
+ var $1,$2;
270
402
  delete self.fn.prototype[aMethod.selector._asSelector()];
271
403
  delete self.fn.prototype.methods[aMethod.selector];
272
404
  smalltalk.init(self);;
273
- return self;}
405
+ ;
406
+ $1=smalltalk.send((smalltalk.MethodRemoved || MethodRemoved),"_new",[]);
407
+ smalltalk.send($1,"_theClass_",[self]);
408
+ smalltalk.send($1,"_method_",[aMethod]);
409
+ $2=smalltalk.send($1,"_yourself",[]);
410
+ smalltalk.send(smalltalk.send((smalltalk.SystemAnnouncer || SystemAnnouncer),"_current",[]),"_announce_",[$2]);
411
+ return self}
412
+ }),
413
+ smalltalk.Behavior);
414
+
415
+ smalltalk.addMethod(
416
+ "_selectors",
417
+ smalltalk.method({
418
+ selector: "selectors",
419
+ fn: function (){
420
+ var self=this;
421
+ var $1;
422
+ $1=smalltalk.send(smalltalk.send(self,"_methodDictionary",[]),"_keys",[]);
423
+ return $1;
424
+ }
274
425
  }),
275
426
  smalltalk.Behavior);
276
427
 
@@ -281,7 +432,8 @@ selector: "subclasses",
281
432
  fn: function (){
282
433
  var self=this;
283
434
  return smalltalk.subclasses(self);
284
- return self;}
435
+ ;
436
+ return self}
285
437
  }),
286
438
  smalltalk.Behavior);
287
439
 
@@ -292,7 +444,32 @@ selector: "superclass",
292
444
  fn: function (){
293
445
  var self=this;
294
446
  return self.superclass || nil;
295
- return self;}
447
+ ;
448
+ return self}
449
+ }),
450
+ smalltalk.Behavior);
451
+
452
+ smalltalk.addMethod(
453
+ "_theMetaClass",
454
+ smalltalk.method({
455
+ selector: "theMetaClass",
456
+ fn: function (){
457
+ var self=this;
458
+ var $1;
459
+ $1=smalltalk.send(self,"_class",[]);
460
+ return $1;
461
+ }
462
+ }),
463
+ smalltalk.Behavior);
464
+
465
+ smalltalk.addMethod(
466
+ "_theNonMetaClass",
467
+ smalltalk.method({
468
+ selector: "theNonMetaClass",
469
+ fn: function (){
470
+ var self=this;
471
+ return self;
472
+ }
296
473
  }),
297
474
  smalltalk.Behavior);
298
475
 
@@ -302,22 +479,77 @@ smalltalk.method({
302
479
  selector: "withAllSubclasses",
303
480
  fn: function (){
304
481
  var self=this;
305
- return (function($rec){smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_allSubclasses", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Array || Array), "_with_", [self]));
306
- return self;}
482
+ var $2,$3,$1;
483
+ $2=smalltalk.send((smalltalk.Array || Array),"_with_",[self]);
484
+ smalltalk.send($2,"_addAll_",[smalltalk.send(self,"_allSubclasses",[])]);
485
+ $3=smalltalk.send($2,"_yourself",[]);
486
+ $1=$3;
487
+ return $1;
488
+ }
307
489
  }),
308
490
  smalltalk.Behavior);
309
491
 
310
492
 
311
493
 
312
494
  smalltalk.addClass('Class', smalltalk.Behavior, [], 'Kernel-Classes');
495
+ smalltalk.addMethod(
496
+ "_asJavascript",
497
+ smalltalk.method({
498
+ selector: "asJavascript",
499
+ fn: function (){
500
+ var self=this;
501
+ var $1;
502
+ $1=smalltalk.send("smalltalk.","__comma",[smalltalk.send(self,"_name",[])]);
503
+ return $1;
504
+ }
505
+ }),
506
+ smalltalk.Class);
507
+
313
508
  smalltalk.addMethod(
314
509
  "_category",
315
510
  smalltalk.method({
316
511
  selector: "category",
317
512
  fn: function (){
318
513
  var self=this;
319
- return (($receiver = smalltalk.send(self, "_package", [])) == nil || $receiver == undefined) ? (function(){return "Unclassified";})() : (function(){return smalltalk.send(smalltalk.send(self, "_package", []), "_name", []);})();
320
- return self;}
514
+ var $2,$1;
515
+ $2=smalltalk.send(self,"_package",[]);
516
+ if(($receiver = $2) == nil || $receiver == undefined){
517
+ $1="Unclassified";
518
+ } else {
519
+ $1=smalltalk.send(smalltalk.send(self,"_package",[]),"_name",[]);
520
+ };
521
+ return $1;
522
+ }
523
+ }),
524
+ smalltalk.Class);
525
+
526
+ smalltalk.addMethod(
527
+ "_definition",
528
+ smalltalk.method({
529
+ selector: "definition",
530
+ fn: function (){
531
+ var self=this;
532
+ var $2,$3,$1;
533
+ $1=smalltalk.send((smalltalk.String || String),"_streamContents_",[(function(stream){
534
+ smalltalk.send(stream,"_nextPutAll_",[smalltalk.send(smalltalk.send(self,"_superclass",[]),"_asString",[])]);
535
+ smalltalk.send(stream,"_nextPutAll_",[" subclass: #"]);
536
+ smalltalk.send(stream,"_nextPutAll_",[smalltalk.send(self,"_name",[])]);
537
+ smalltalk.send(stream,"_nextPutAll_",[smalltalk.send(smalltalk.send((smalltalk.String || String),"_lf",[]),"__comma",[smalltalk.send((smalltalk.String || String),"_tab",[])])]);
538
+ $2=smalltalk.send(stream,"_nextPutAll_",["instanceVariableNames: '"]);
539
+ $2;
540
+ smalltalk.send(smalltalk.send(self,"_instanceVariableNames",[]),"_do_separatedBy_",[(function(each){
541
+ return smalltalk.send(stream,"_nextPutAll_",[each]);
542
+ }),(function(){
543
+ return smalltalk.send(stream,"_nextPutAll_",[" "]);
544
+ })]);
545
+ smalltalk.send(stream,"_nextPutAll_",[smalltalk.send(smalltalk.send("'","__comma",[smalltalk.send((smalltalk.String || String),"_lf",[])]),"__comma",[smalltalk.send((smalltalk.String || String),"_tab",[])])]);
546
+ smalltalk.send(stream,"_nextPutAll_",["package: '"]);
547
+ smalltalk.send(stream,"_nextPutAll_",[smalltalk.send(self,"_category",[])]);
548
+ $3=smalltalk.send(stream,"_nextPutAll_",["'"]);
549
+ return $3;
550
+ })]);
551
+ return $1;
552
+ }
321
553
  }),
322
554
  smalltalk.Class);
323
555
 
@@ -328,7 +560,7 @@ selector: "isClass",
328
560
  fn: function (){
329
561
  var self=this;
330
562
  return true;
331
- return self;}
563
+ }
332
564
  }),
333
565
  smalltalk.Class);
334
566
 
@@ -339,7 +571,8 @@ selector: "package",
339
571
  fn: function (){
340
572
  var self=this;
341
573
  return self.pkg;
342
- return self;}
574
+ ;
575
+ return self}
343
576
  }),
344
577
  smalltalk.Class);
345
578
 
@@ -350,7 +583,8 @@ selector: "package:",
350
583
  fn: function (aPackage){
351
584
  var self=this;
352
585
  self.pkg = aPackage;
353
- return self;}
586
+ ;
587
+ return self}
354
588
  }),
355
589
  smalltalk.Class);
356
590
 
@@ -360,8 +594,10 @@ smalltalk.method({
360
594
  selector: "printString",
361
595
  fn: function (){
362
596
  var self=this;
363
- return smalltalk.send(self, "_name", []);
364
- return self;}
597
+ var $1;
598
+ $1=smalltalk.send(self,"_name",[]);
599
+ return $1;
600
+ }
365
601
  }),
366
602
  smalltalk.Class);
367
603
 
@@ -371,12 +607,8 @@ smalltalk.method({
371
607
  selector: "rename:",
372
608
  fn: function (aString){
373
609
  var self=this;
374
-
375
- smalltalk[aString] = self;
376
- delete smalltalk[self.className];
377
- self.className = aString;
378
- ;
379
- return self;}
610
+ smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder),"_new",[]),"_renameClass_to_",[self,aString]);
611
+ return self}
380
612
  }),
381
613
  smalltalk.Class);
382
614
 
@@ -384,10 +616,12 @@ smalltalk.addMethod(
384
616
  "_subclass_instanceVariableNames_",
385
617
  smalltalk.method({
386
618
  selector: "subclass:instanceVariableNames:",
387
- fn: function (aString, anotherString){
619
+ fn: function (aString,anotherString){
388
620
  var self=this;
389
- return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
390
- return self;}
621
+ var $1;
622
+ $1=smalltalk.send(self,"_subclass_instanceVariableNames_package_",[aString,anotherString,nil]);
623
+ return $1;
624
+ }
391
625
  }),
392
626
  smalltalk.Class);
393
627
 
@@ -395,11 +629,13 @@ smalltalk.addMethod(
395
629
  "_subclass_instanceVariableNames_category_",
396
630
  smalltalk.method({
397
631
  selector: "subclass:instanceVariableNames:category:",
398
- fn: function (aString, aString2, aString3){
632
+ fn: function (aString,aString2,aString3){
399
633
  var self=this;
400
- smalltalk.send(self, "_deprecatedAPI", []);
401
- return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
402
- return self;}
634
+ var $1;
635
+ smalltalk.send(self,"_deprecatedAPI",[]);
636
+ $1=smalltalk.send(self,"_subclass_instanceVariableNames_package_",[aString,aString2,aString3]);
637
+ return $1;
638
+ }
403
639
  }),
404
640
  smalltalk.Class);
405
641
 
@@ -407,10 +643,12 @@ smalltalk.addMethod(
407
643
  "_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_",
408
644
  smalltalk.method({
409
645
  selector: "subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:",
410
- fn: function (aString, aString2, classVars, pools, aString3){
646
+ fn: function (aString,aString2,classVars,pools,aString3){
411
647
  var self=this;
412
- return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
413
- return self;}
648
+ var $1;
649
+ $1=smalltalk.send(self,"_subclass_instanceVariableNames_package_",[aString,aString2,aString3]);
650
+ return $1;
651
+ }
414
652
  }),
415
653
  smalltalk.Class);
416
654
 
@@ -418,16 +656,55 @@ smalltalk.addMethod(
418
656
  "_subclass_instanceVariableNames_package_",
419
657
  smalltalk.method({
420
658
  selector: "subclass:instanceVariableNames:package:",
421
- fn: function (aString, aString2, aString3){
659
+ fn: function (aString,aString2,aString3){
422
660
  var self=this;
423
- return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, smalltalk.send(aString, "_asString", []), aString2, aString3]);
424
- return self;}
661
+ var $1;
662
+ $1=smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder),"_new",[]),"_superclass_subclass_instanceVariableNames_package_",[self,smalltalk.send(aString,"_asString",[]),aString2,aString3]);
663
+ return $1;
664
+ }
425
665
  }),
426
666
  smalltalk.Class);
427
667
 
428
668
 
429
669
 
430
670
  smalltalk.addClass('Metaclass', smalltalk.Behavior, [], 'Kernel-Classes');
671
+ smalltalk.addMethod(
672
+ "_asJavascript",
673
+ smalltalk.method({
674
+ selector: "asJavascript",
675
+ fn: function (){
676
+ var self=this;
677
+ var $1;
678
+ $1=smalltalk.send(smalltalk.send("smalltalk.","__comma",[smalltalk.send(smalltalk.send(self,"_instanceClass",[]),"_name",[])]),"__comma",[".klass"]);
679
+ return $1;
680
+ }
681
+ }),
682
+ smalltalk.Metaclass);
683
+
684
+ smalltalk.addMethod(
685
+ "_definition",
686
+ smalltalk.method({
687
+ selector: "definition",
688
+ fn: function (){
689
+ var self=this;
690
+ var $2,$1;
691
+ $1=smalltalk.send((smalltalk.String || String),"_streamContents_",[(function(stream){
692
+ smalltalk.send(stream,"_nextPutAll_",[smalltalk.send(self,"_asString",[])]);
693
+ smalltalk.send(stream,"_nextPutAll_",[" class "]);
694
+ $2=smalltalk.send(stream,"_nextPutAll_",["instanceVariableNames: '"]);
695
+ $2;
696
+ smalltalk.send(smalltalk.send(self,"_instanceVariableNames",[]),"_do_separatedBy_",[(function(each){
697
+ return smalltalk.send(stream,"_nextPutAll_",[each]);
698
+ }),(function(){
699
+ return smalltalk.send(stream,"_nextPutAll_",[" "]);
700
+ })]);
701
+ return smalltalk.send(stream,"_nextPutAll_",["'"]);
702
+ })]);
703
+ return $1;
704
+ }
705
+ }),
706
+ smalltalk.Metaclass);
707
+
431
708
  smalltalk.addMethod(
432
709
  "_instanceClass",
433
710
  smalltalk.method({
@@ -435,7 +712,8 @@ selector: "instanceClass",
435
712
  fn: function (){
436
713
  var self=this;
437
714
  return self.instanceClass;
438
- return self;}
715
+ ;
716
+ return self}
439
717
  }),
440
718
  smalltalk.Metaclass);
441
719
 
@@ -445,8 +723,8 @@ smalltalk.method({
445
723
  selector: "instanceVariableNames:",
446
724
  fn: function (aCollection){
447
725
  var self=this;
448
- smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_class_instanceVariableNames_", [self, aCollection]);
449
- return self;}
726
+ smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder),"_new",[]),"_class_instanceVariableNames_",[self,aCollection]);
727
+ return self}
450
728
  }),
451
729
  smalltalk.Metaclass);
452
730
 
@@ -457,7 +735,7 @@ selector: "isMetaclass",
457
735
  fn: function (){
458
736
  var self=this;
459
737
  return true;
460
- return self;}
738
+ }
461
739
  }),
462
740
  smalltalk.Metaclass);
463
741
 
@@ -467,8 +745,34 @@ smalltalk.method({
467
745
  selector: "printString",
468
746
  fn: function (){
469
747
  var self=this;
470
- return smalltalk.send(smalltalk.send(smalltalk.send(self, "_instanceClass", []), "_name", []), "__comma", [" class"]);
471
- return self;}
748
+ var $1;
749
+ $1=smalltalk.send(smalltalk.send(smalltalk.send(self,"_instanceClass",[]),"_name",[]),"__comma",[" class"]);
750
+ return $1;
751
+ }
752
+ }),
753
+ smalltalk.Metaclass);
754
+
755
+ smalltalk.addMethod(
756
+ "_theMetaClass",
757
+ smalltalk.method({
758
+ selector: "theMetaClass",
759
+ fn: function (){
760
+ var self=this;
761
+ return self;
762
+ }
763
+ }),
764
+ smalltalk.Metaclass);
765
+
766
+ smalltalk.addMethod(
767
+ "_theNonMetaClass",
768
+ smalltalk.method({
769
+ selector: "theNonMetaClass",
770
+ fn: function (){
771
+ var self=this;
772
+ var $1;
773
+ $1=smalltalk.send(self,"_instanceClass",[]);
774
+ return $1;
775
+ }
472
776
  }),
473
777
  smalltalk.Metaclass);
474
778
 
@@ -479,11 +783,12 @@ smalltalk.addMethod(
479
783
  "_addSubclassOf_named_instanceVariableNames_",
480
784
  smalltalk.method({
481
785
  selector: "addSubclassOf:named:instanceVariableNames:",
482
- fn: function (aClass, aString, aCollection){
786
+ fn: function (aClass,aString,aCollection){
483
787
  var self=this;
484
788
  smalltalk.addClass(aString, aClass, aCollection);
485
789
  return smalltalk[aString];
486
- return self;}
790
+ ;
791
+ return self}
487
792
  }),
488
793
  smalltalk.ClassBuilder);
489
794
 
@@ -491,11 +796,12 @@ smalltalk.addMethod(
491
796
  "_addSubclassOf_named_instanceVariableNames_package_",
492
797
  smalltalk.method({
493
798
  selector: "addSubclassOf:named:instanceVariableNames:package:",
494
- fn: function (aClass, aString, aCollection, packageName){
799
+ fn: function (aClass,aString,aCollection,packageName){
495
800
  var self=this;
496
801
  smalltalk.addClass(aString, aClass, aCollection, packageName);
497
802
  return smalltalk[aString];
498
- return self;}
803
+ ;
804
+ return self}
499
805
  }),
500
806
  smalltalk.ClassBuilder);
501
807
 
@@ -503,12 +809,20 @@ smalltalk.addMethod(
503
809
  "_class_instanceVariableNames_",
504
810
  smalltalk.method({
505
811
  selector: "class:instanceVariableNames:",
506
- fn: function (aClass, aString){
507
- var self=this;
508
- ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_name", []), "__comma", [" is not a metaclass"])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_name", []), "__comma", [" is not a metaclass"])]);})]));
509
- smalltalk.send(aClass, "_basicAt_put_", ["iVarNames", smalltalk.send(self, "_instanceVariableNamesFor_", [aString])]);
510
- smalltalk.send(self, "_setupClass_", [aClass]);
511
- return self;}
812
+ fn: function (aClass,aString){
813
+ var self=this;
814
+ var $1,$2,$3;
815
+ $1=smalltalk.send(aClass,"_isMetaclass",[]);
816
+ if(! smalltalk.assert($1)){
817
+ smalltalk.send(self,"_error_",[smalltalk.send(smalltalk.send(aClass,"_name",[]),"__comma",[" is not a metaclass"])]);
818
+ };
819
+ smalltalk.send(aClass,"_basicAt_put_",["iVarNames",smalltalk.send(self,"_instanceVariableNamesFor_",[aString])]);
820
+ $2=smalltalk.send((smalltalk.ClassDefinitionChanged || ClassDefinitionChanged),"_new",[]);
821
+ smalltalk.send($2,"_theClass_",[aClass]);
822
+ $3=smalltalk.send($2,"_yourself",[]);
823
+ smalltalk.send(smalltalk.send((smalltalk.SystemAnnouncer || SystemAnnouncer),"_current",[]),"_announce_",[$3]);
824
+ smalltalk.send(self,"_setupClass_",[aClass]);
825
+ return self}
512
826
  }),
513
827
  smalltalk.ClassBuilder);
514
828
 
@@ -516,16 +830,20 @@ smalltalk.addMethod(
516
830
  "_copyClass_named_",
517
831
  smalltalk.method({
518
832
  selector: "copyClass:named:",
519
- fn: function (aClass, aString){
520
- var self=this;
521
- var newClass=nil;
522
- (newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [smalltalk.send(aClass, "_superclass", []), aString, smalltalk.send(aClass, "_instanceVariableNames", []), smalltalk.send(smalltalk.send(aClass, "_package", []), "_name", [])]));
523
- smalltalk.send(self, "_setupClass_", [newClass]);
524
- smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_install_forClass_category_", [smalltalk.send(each, "_source", []), newClass, smalltalk.send(each, "_category", [])]);})]);
525
- smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_methodDictionary", []), "_values", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_install_forClass_category_", [smalltalk.send(each, "_source", []), smalltalk.send(newClass, "_class", []), smalltalk.send(each, "_category", [])]);})]);
526
- smalltalk.send(self, "_setupClass_", [newClass]);
833
+ fn: function (aClass,aString){
834
+ var self=this;
835
+ var newClass;
836
+ newClass=smalltalk.send(self,"_addSubclassOf_named_instanceVariableNames_package_",[smalltalk.send(aClass,"_superclass",[]),aString,smalltalk.send(aClass,"_instanceVariableNames",[]),smalltalk.send(smalltalk.send(aClass,"_package",[]),"_name",[])]);
837
+ smalltalk.send(self,"_setupClass_",[newClass]);
838
+ smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_methodDictionary",[]),"_values",[]),"_do_",[(function(each){
839
+ return smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler),"_new",[]),"_install_forClass_category_",[smalltalk.send(each,"_source",[]),newClass,smalltalk.send(each,"_category",[])]);
840
+ })]);
841
+ smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_class",[]),"_methodDictionary",[]),"_values",[]),"_do_",[(function(each){
842
+ return smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler),"_new",[]),"_install_forClass_category_",[smalltalk.send(each,"_source",[]),smalltalk.send(newClass,"_class",[]),smalltalk.send(each,"_category",[])]);
843
+ })]);
844
+ smalltalk.send(self,"_setupClass_",[newClass]);
527
845
  return newClass;
528
- return self;}
846
+ }
529
847
  }),
530
848
  smalltalk.ClassBuilder);
531
849
 
@@ -535,8 +853,33 @@ smalltalk.method({
535
853
  selector: "instanceVariableNamesFor:",
536
854
  fn: function (aString){
537
855
  var self=this;
538
- return smalltalk.send(smalltalk.send(aString, "_tokenize_", [" "]), "_reject_", [(function(each){return smalltalk.send(each, "_isEmpty", []);})]);
539
- return self;}
856
+ var $1;
857
+ $1=smalltalk.send(smalltalk.send(aString,"_tokenize_",[" "]),"_reject_",[(function(each){
858
+ return smalltalk.send(each,"_isEmpty",[]);
859
+ })]);
860
+ return $1;
861
+ }
862
+ }),
863
+ smalltalk.ClassBuilder);
864
+
865
+ smalltalk.addMethod(
866
+ "_renameClass_to_",
867
+ smalltalk.method({
868
+ selector: "renameClass:to:",
869
+ fn: function (aClass,aString){
870
+ var self=this;
871
+ var $1,$2;
872
+
873
+ smalltalk[aString] = aClass;
874
+ delete smalltalk[aClass.className];
875
+ aClass.className = aString;
876
+ ;
877
+ ;
878
+ $1=smalltalk.send((smalltalk.ClassRenamed || ClassRenamed),"_new",[]);
879
+ smalltalk.send($1,"_theClass_",[aClass]);
880
+ $2=smalltalk.send($1,"_yourself",[]);
881
+ smalltalk.send(smalltalk.send((smalltalk.SystemAnnouncer || SystemAnnouncer),"_current",[]),"_announce_",[$2]);
882
+ return self}
540
883
  }),
541
884
  smalltalk.ClassBuilder);
542
885
 
@@ -547,7 +890,8 @@ selector: "setupClass:",
547
890
  fn: function (aClass){
548
891
  var self=this;
549
892
  smalltalk.init(aClass);;
550
- return self;}
893
+ ;
894
+ return self}
551
895
  }),
552
896
  smalltalk.ClassBuilder);
553
897
 
@@ -555,10 +899,12 @@ smalltalk.addMethod(
555
899
  "_superclass_subclass_",
556
900
  smalltalk.method({
557
901
  selector: "superclass:subclass:",
558
- fn: function (aClass, aString){
902
+ fn: function (aClass,aString){
559
903
  var self=this;
560
- return smalltalk.send(self, "_superclass_subclass_instanceVariableNames_package_", [aClass, aString, "", nil]);
561
- return self;}
904
+ var $1;
905
+ $1=smalltalk.send(self,"_superclass_subclass_instanceVariableNames_package_",[aClass,aString,"",nil]);
906
+ return $1;
907
+ }
562
908
  }),
563
909
  smalltalk.ClassBuilder);
564
910
 
@@ -566,13 +912,23 @@ smalltalk.addMethod(
566
912
  "_superclass_subclass_instanceVariableNames_package_",
567
913
  smalltalk.method({
568
914
  selector: "superclass:subclass:instanceVariableNames:package:",
569
- fn: function (aClass, aString, aString2, aString3){
570
- var self=this;
571
- var newClass=nil;
572
- (newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [aClass, aString, smalltalk.send(self, "_instanceVariableNamesFor_", [aString2]), (($receiver = aString3) == nil || $receiver == undefined) ? (function(){return "unclassified";})() : $receiver]));
573
- smalltalk.send(self, "_setupClass_", [newClass]);
915
+ fn: function (aClass,aString,aString2,aString3){
916
+ var self=this;
917
+ var $1,$2,$3;
918
+ var newClass;
919
+ if(($receiver = aString3) == nil || $receiver == undefined){
920
+ $1="unclassified";
921
+ } else {
922
+ $1=aString3;
923
+ };
924
+ newClass=smalltalk.send(self,"_addSubclassOf_named_instanceVariableNames_package_",[aClass,aString,smalltalk.send(self,"_instanceVariableNamesFor_",[aString2]),$1]);
925
+ smalltalk.send(self,"_setupClass_",[newClass]);
926
+ $2=smalltalk.send((smalltalk.ClassAdded || ClassAdded),"_new",[]);
927
+ smalltalk.send($2,"_theClass_",[newClass]);
928
+ $3=smalltalk.send($2,"_yourself",[]);
929
+ smalltalk.send(smalltalk.send((smalltalk.SystemAnnouncer || SystemAnnouncer),"_current",[]),"_announce_",[$3]);
574
930
  return newClass;
575
- return self;}
931
+ }
576
932
  }),
577
933
  smalltalk.ClassBuilder);
578
934
 
@@ -583,11 +939,11 @@ smalltalk.addMethod(
583
939
  "_class_category_",
584
940
  smalltalk.method({
585
941
  selector: "class:category:",
586
- fn: function (aClass, aString){
942
+ fn: function (aClass,aString){
587
943
  var self=this;
588
- (self['@class']=aClass);
589
- (self['@category']=aString);
590
- return self;}
944
+ self["@class"]=aClass;
945
+ self["@category"]=aString;
946
+ return self}
591
947
  }),
592
948
  smalltalk.ClassCategoryReader);
593
949
 
@@ -597,8 +953,8 @@ smalltalk.method({
597
953
  selector: "compileMethod:",
598
954
  fn: function (aString){
599
955
  var self=this;
600
- smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_install_forClass_category_", [aString, self['@class'], self['@category']]);
601
- return self;}
956
+ smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler),"_new",[]),"_install_forClass_category_",[aString,self["@class"],self["@category"]]);
957
+ return self}
602
958
  }),
603
959
  smalltalk.ClassCategoryReader);
604
960
 
@@ -608,9 +964,9 @@ smalltalk.method({
608
964
  selector: "initialize",
609
965
  fn: function (){
610
966
  var self=this;
611
- smalltalk.send(self, "_initialize", [], smalltalk.ClassCategoryReader.superclass || nil);
612
- (self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []));
613
- return self;}
967
+ smalltalk.send(self,"_initialize",[],smalltalk.Object);
968
+ self["@chunkParser"]=smalltalk.send((smalltalk.ChunkParser || ChunkParser),"_new",[]);
969
+ return self}
614
970
  }),
615
971
  smalltalk.ClassCategoryReader);
616
972
 
@@ -620,10 +976,16 @@ smalltalk.method({
620
976
  selector: "scanFrom:",
621
977
  fn: function (aChunkParser){
622
978
  var self=this;
623
- var chunk=nil;
624
- (function(){while(!(function(){(chunk=smalltalk.send(aChunkParser, "_nextChunk", []));return smalltalk.send(chunk, "_isEmpty", []);})()) {(function(){return smalltalk.send(self, "_compileMethod_", [chunk]);})()}})();
625
- smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_setupClass_", [self['@class']]);
626
- return self;}
979
+ var chunk;
980
+ smalltalk.send((function(){
981
+ chunk=smalltalk.send(aChunkParser,"_nextChunk",[]);
982
+ chunk;
983
+ return smalltalk.send(chunk,"_isEmpty",[]);
984
+ }),"_whileFalse_",[(function(){
985
+ return smalltalk.send(self,"_compileMethod_",[chunk]);
986
+ })]);
987
+ smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler),"_new",[]),"_setupClass_",[self["@class"]]);
988
+ return self}
627
989
  }),
628
990
  smalltalk.ClassCategoryReader);
629
991
 
@@ -636,8 +998,8 @@ smalltalk.method({
636
998
  selector: "class:",
637
999
  fn: function (aClass){
638
1000
  var self=this;
639
- (self['@class']=aClass);
640
- return self;}
1001
+ self["@class"]=aClass;
1002
+ return self}
641
1003
  }),
642
1004
  smalltalk.ClassCommentReader);
643
1005
 
@@ -647,9 +1009,9 @@ smalltalk.method({
647
1009
  selector: "initialize",
648
1010
  fn: function (){
649
1011
  var self=this;
650
- smalltalk.send(self, "_initialize", [], smalltalk.ClassCommentReader.superclass || nil);
651
- (self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []));
652
- return self;}
1012
+ smalltalk.send(self,"_initialize",[],smalltalk.Object);
1013
+ self["@chunkParser"]=smalltalk.send((smalltalk.ChunkParser || ChunkParser),"_new",[]);
1014
+ return self}
653
1015
  }),
654
1016
  smalltalk.ClassCommentReader);
655
1017
 
@@ -659,10 +1021,14 @@ smalltalk.method({
659
1021
  selector: "scanFrom:",
660
1022
  fn: function (aChunkParser){
661
1023
  var self=this;
662
- var chunk=nil;
663
- (chunk=smalltalk.send(aChunkParser, "_nextChunk", []));
664
- ((($receiver = smalltalk.send(chunk, "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_setComment_", [chunk]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_setComment_", [chunk]);})]));
665
- return self;}
1024
+ var $1;
1025
+ var chunk;
1026
+ chunk=smalltalk.send(aChunkParser,"_nextChunk",[]);
1027
+ $1=smalltalk.send(chunk,"_isEmpty",[]);
1028
+ if(! smalltalk.assert($1)){
1029
+ smalltalk.send(self,"_setComment_",[chunk]);
1030
+ };
1031
+ return self}
666
1032
  }),
667
1033
  smalltalk.ClassCommentReader);
668
1034
 
@@ -672,8 +1038,8 @@ smalltalk.method({
672
1038
  selector: "setComment:",
673
1039
  fn: function (aString){
674
1040
  var self=this;
675
- smalltalk.send(self['@class'], "_comment_", [aString]);
676
- return self;}
1041
+ smalltalk.send(self["@class"],"_comment_",[aString]);
1042
+ return self}
677
1043
  }),
678
1044
  smalltalk.ClassCommentReader);
679
1045
 
@@ -686,13 +1052,23 @@ smalltalk.method({
686
1052
  selector: "getNodesFrom:",
687
1053
  fn: function (aCollection){
688
1054
  var self=this;
689
- var children=nil;
690
- var others=nil;
691
- (children=[]);
692
- (others=[]);
693
- smalltalk.send(aCollection, "_do_", [(function(each){return ((($receiver = smalltalk.send(smalltalk.send(each, "_superclass", []), "__eq", [smalltalk.send(self, "_theClass", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(children, "_add_", [each]);})() : (function(){return smalltalk.send(others, "_add_", [each]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(children, "_add_", [each]);}), (function(){return smalltalk.send(others, "_add_", [each]);})]));})]);
694
- (self['@nodes']=smalltalk.send(children, "_collect_", [(function(each){return smalltalk.send((smalltalk.ClassSorterNode || ClassSorterNode), "_on_classes_level_", [each, others, ((($receiver = smalltalk.send(self, "_level", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);})]));
695
- return self;}
1055
+ var $1;
1056
+ var children;
1057
+ var others;
1058
+ children=[];
1059
+ others=[];
1060
+ smalltalk.send(aCollection,"_do_",[(function(each){
1061
+ $1=smalltalk.send(smalltalk.send(each,"_superclass",[]),"__eq",[smalltalk.send(self,"_theClass",[])]);
1062
+ if(smalltalk.assert($1)){
1063
+ return smalltalk.send(children,"_add_",[each]);
1064
+ } else {
1065
+ return smalltalk.send(others,"_add_",[each]);
1066
+ };
1067
+ })]);
1068
+ self["@nodes"]=smalltalk.send(children,"_collect_",[(function(each){
1069
+ return smalltalk.send((smalltalk.ClassSorterNode || ClassSorterNode),"_on_classes_level_",[each,others,smalltalk.send(smalltalk.send(self,"_level",[]),"__plus",[(1)])]);
1070
+ })]);
1071
+ return self}
696
1072
  }),
697
1073
  smalltalk.ClassSorterNode);
698
1074
 
@@ -702,8 +1078,8 @@ smalltalk.method({
702
1078
  selector: "level",
703
1079
  fn: function (){
704
1080
  var self=this;
705
- return self['@level'];
706
- return self;}
1081
+ return self["@level"];
1082
+ }
707
1083
  }),
708
1084
  smalltalk.ClassSorterNode);
709
1085
 
@@ -713,8 +1089,8 @@ smalltalk.method({
713
1089
  selector: "level:",
714
1090
  fn: function (anInteger){
715
1091
  var self=this;
716
- (self['@level']=anInteger);
717
- return self;}
1092
+ self["@level"]=anInteger;
1093
+ return self}
718
1094
  }),
719
1095
  smalltalk.ClassSorterNode);
720
1096
 
@@ -724,8 +1100,8 @@ smalltalk.method({
724
1100
  selector: "nodes",
725
1101
  fn: function (){
726
1102
  var self=this;
727
- return self['@nodes'];
728
- return self;}
1103
+ return self["@nodes"];
1104
+ }
729
1105
  }),
730
1106
  smalltalk.ClassSorterNode);
731
1107
 
@@ -735,8 +1111,8 @@ smalltalk.method({
735
1111
  selector: "theClass",
736
1112
  fn: function (){
737
1113
  var self=this;
738
- return self['@theClass'];
739
- return self;}
1114
+ return self["@theClass"];
1115
+ }
740
1116
  }),
741
1117
  smalltalk.ClassSorterNode);
742
1118
 
@@ -746,8 +1122,8 @@ smalltalk.method({
746
1122
  selector: "theClass:",
747
1123
  fn: function (aClass){
748
1124
  var self=this;
749
- (self['@theClass']=aClass);
750
- return self;}
1125
+ self["@theClass"]=aClass;
1126
+ return self}
751
1127
  }),
752
1128
  smalltalk.ClassSorterNode);
753
1129
 
@@ -757,9 +1133,13 @@ smalltalk.method({
757
1133
  selector: "traverseClassesWith:",
758
1134
  fn: function (aCollection){
759
1135
  var self=this;
760
- smalltalk.send(aCollection, "_add_", [smalltalk.send(self, "_theClass", [])]);
761
- smalltalk.send(smalltalk.send(smalltalk.send(self, "_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", [])]));})]), "_do_", [(function(aNode){return smalltalk.send(aNode, "_traverseClassesWith_", [aCollection]);})]);
762
- return self;}
1136
+ smalltalk.send(aCollection,"_add_",[smalltalk.send(self,"_theClass",[])]);
1137
+ smalltalk.send(smalltalk.send(smalltalk.send(self,"_nodes",[]),"_sorted_",[(function(a,b){
1138
+ return smalltalk.send(smalltalk.send(smalltalk.send(a,"_theClass",[]),"_name",[]),"__lt_eq",[smalltalk.send(smalltalk.send(b,"_theClass",[]),"_name",[])]);
1139
+ })]),"_do_",[(function(aNode){
1140
+ return smalltalk.send(aNode,"_traverseClassesWith_",[aCollection]);
1141
+ })]);
1142
+ return self}
763
1143
  }),
764
1144
  smalltalk.ClassSorterNode);
765
1145
 
@@ -768,10 +1148,17 @@ smalltalk.addMethod(
768
1148
  "_on_classes_level_",
769
1149
  smalltalk.method({
770
1150
  selector: "on:classes:level:",
771
- fn: function (aClass, aCollection, anInteger){
772
- var self=this;
773
- return (function($rec){smalltalk.send($rec, "_theClass_", [aClass]);smalltalk.send($rec, "_level_", [anInteger]);smalltalk.send($rec, "_getNodesFrom_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
774
- return self;}
1151
+ fn: function (aClass,aCollection,anInteger){
1152
+ var self=this;
1153
+ var $2,$3,$1;
1154
+ $2=smalltalk.send(self,"_new",[]);
1155
+ smalltalk.send($2,"_theClass_",[aClass]);
1156
+ smalltalk.send($2,"_level_",[anInteger]);
1157
+ smalltalk.send($2,"_getNodesFrom_",[aCollection]);
1158
+ $3=smalltalk.send($2,"_yourself",[]);
1159
+ $1=$3;
1160
+ return $1;
1161
+ }
775
1162
  }),
776
1163
  smalltalk.ClassSorterNode.klass);
777
1164