resin 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. data/README.markdown +2 -0
  2. data/amber/bin/nodecompile.js +3 -3
  3. data/amber/css/amber.css +47 -23
  4. data/amber/images/off.amber.png +0 -0
  5. data/amber/images/offHover.amber.png +0 -0
  6. data/amber/images/sprite.amber.png +0 -0
  7. data/amber/images/tinylogo.amber.png +0 -0
  8. data/amber/js/Benchfib.deploy.js +34 -34
  9. data/amber/js/Benchfib.js +49 -49
  10. data/amber/js/Canvas.deploy.js +937 -937
  11. data/amber/js/Canvas.js +1622 -1622
  12. data/amber/js/Compiler-Tests.deploy.js +97 -0
  13. data/amber/js/Compiler-Tests.js +137 -0
  14. data/amber/js/Compiler.deploy.js +1030 -924
  15. data/amber/js/Compiler.js +1613 -1467
  16. data/amber/js/Documentation.deploy.js +417 -417
  17. data/amber/js/Documentation.js +728 -728
  18. data/amber/js/Examples.deploy.js +24 -13
  19. data/amber/js/Examples.js +36 -19
  20. data/amber/js/IDE.deploy.js +1583 -1527
  21. data/amber/js/IDE.js +2586 -2510
  22. data/amber/js/Kernel-Announcements.deploy.js +19 -19
  23. data/amber/js/Kernel-Announcements.js +28 -28
  24. data/amber/js/Kernel-Classes.deploy.js +332 -229
  25. data/amber/js/Kernel-Classes.js +532 -384
  26. data/amber/js/Kernel-Collections.deploy.js +1516 -1712
  27. data/amber/js/Kernel-Collections.js +2436 -2712
  28. data/amber/js/Kernel-Exceptions.deploy.js +85 -62
  29. data/amber/js/Kernel-Exceptions.js +131 -98
  30. data/amber/js/Kernel-Methods.deploy.js +326 -378
  31. data/amber/js/Kernel-Methods.js +473 -525
  32. data/amber/js/Kernel-Objects.deploy.js +1777 -2428
  33. data/amber/js/Kernel-Objects.js +2599 -3426
  34. data/amber/js/Kernel-Tests.deploy.js +871 -772
  35. data/amber/js/Kernel-Tests.js +1207 -1083
  36. data/amber/js/Kernel-Transcript.deploy.js +57 -57
  37. data/amber/js/Kernel-Transcript.js +94 -94
  38. data/amber/js/SUnit.deploy.js +116 -116
  39. data/amber/js/SUnit.js +211 -211
  40. data/amber/js/amber.js +10 -11
  41. data/amber/js/boot.js +132 -156
  42. data/amber/js/init.js +2 -2
  43. data/amber/js/parser.js +2095 -3014
  44. data/amber/js/parser.pegjs +1 -1
  45. data/amber/st/Benchfib.st +22 -22
  46. data/amber/st/Canvas.st +471 -471
  47. data/amber/st/Compiler-Tests.st +471 -0
  48. data/amber/st/Compiler.st +858 -794
  49. data/amber/st/Examples.st +22 -5
  50. data/amber/st/IDE.st +1326 -1291
  51. data/amber/st/Kernel-Announcements.st +2 -2
  52. data/amber/st/Kernel-Classes.st +148 -90
  53. data/amber/st/Kernel-Collections.st +950 -1061
  54. data/amber/st/Kernel-Exceptions.st +33 -25
  55. data/amber/st/Kernel-Methods.st +151 -151
  56. data/amber/st/Kernel-Objects.st +891 -1036
  57. data/amber/st/Kernel-Tests.st +622 -544
  58. data/amber/st/Kernel-Transcript.st +38 -38
  59. data/amber/st/SUnit.st +53 -53
  60. metadata +27 -20
@@ -1,294 +1,327 @@
1
1
  smalltalk.addPackage('Kernel-Classes', {});
2
2
  smalltalk.addClass('Behavior', smalltalk.Object, [], 'Kernel-Classes');
3
- smalltalk.Behavior.comment=unescape('Behavior%20is%20the%20superclass%20of%20all%20class%20objects.%20%0A%0AIt%20defines%20the%20protocol%20for%20creating%20instances%20of%20a%20class%20with%20%60%23basicNew%60%20and%20%60%23new%60%20%28see%20%60boot.js%60%20for%20class%20constructors%20details%29.%0AInstances%20know%20about%20the%20subclass/superclass%20relationships%20between%20classes%2C%20contain%20the%20description%20that%20instances%20are%20created%20from%2C%20%0Aand%20hold%20the%20method%20dictionary%20that%27s%20associated%20with%20each%20class.%0A%0ABehavior%20also%20%20provides%20methods%20for%20compiling%20methods%2C%20examining%20the%20method%20dictionary%2C%20and%20iterating%20over%20the%20class%20hierarchy.')
3
+ smalltalk.Behavior.comment="Behavior is the superclass of all class objects. \x0a\x0aIt defines the protocol for creating instances of a class with `#basicNew` and `#new` (see `boot.js` for class constructors details).\x0aInstances know about the subclass/superclass relationships between classes, contain the description that instances are created from, \x0aand hold the method dictionary that's associated with each class.\x0a\x0aBehavior also provides methods for compiling methods, examining the method dictionary, and iterating over the class hierarchy."
4
4
  smalltalk.addMethod(
5
- unescape('_new'),
5
+ "_addCompiledMethod_",
6
6
  smalltalk.method({
7
- selector: unescape('new'),
8
- category: 'instance creation',
9
- fn: function (){
7
+ selector: "addCompiledMethod:",
8
+ category: 'compiling',
9
+ fn: function (aMethod){
10
10
  var self=this;
11
- return smalltalk.send(smalltalk.send(self, "_basicNew", []), "_initialize", []);
11
+ smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self);
12
12
  return self;},
13
- args: [],
14
- source: unescape('new%0A%09%5Eself%20basicNew%20initialize'),
15
- messageSends: ["initialize", "basicNew"],
13
+ args: ["aMethod"],
14
+ source: "addCompiledMethod: aMethod\x0a\x09<smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self)>",
15
+ messageSends: [],
16
16
  referencedClasses: []
17
17
  }),
18
18
  smalltalk.Behavior);
19
19
 
20
20
  smalltalk.addMethod(
21
- unescape('_basicNew'),
21
+ "_allInstanceVariableNames",
22
22
  smalltalk.method({
23
- selector: unescape('basicNew'),
24
- category: 'instance creation',
23
+ selector: "allInstanceVariableNames",
24
+ category: 'accessing',
25
25
  fn: function (){
26
26
  var self=this;
27
- return new self.fn();
27
+ var result=nil;
28
+ (result=smalltalk.send(smalltalk.send(self, "_instanceVariableNames", []), "_copy", []));
29
+ (($receiver = smalltalk.send(self, "_superclass", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(result, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allInstanceVariableNames", [])]);})() : nil;
30
+ return result;
28
31
  return self;},
29
32
  args: [],
30
- source: unescape('basicNew%0A%09%3Creturn%20new%20self.fn%28%29%3E'),
31
- messageSends: [],
33
+ source: "allInstanceVariableNames\x0a\x09| result |\x0a\x09result := self instanceVariableNames copy.\x0a\x09self superclass ifNotNil: [\x0a\x09 result addAll: self superclass allInstanceVariableNames].\x0a\x09^result",
34
+ messageSends: ["copy", "instanceVariableNames", "ifNotNil:", "superclass", "addAll:", "allInstanceVariableNames"],
32
35
  referencedClasses: []
33
36
  }),
34
37
  smalltalk.Behavior);
35
38
 
36
39
  smalltalk.addMethod(
37
- unescape('_name'),
40
+ "_allSubclasses",
38
41
  smalltalk.method({
39
- selector: unescape('name'),
42
+ selector: "allSubclasses",
40
43
  category: 'accessing',
41
44
  fn: function (){
42
45
  var self=this;
43
- return self.className || nil;
46
+ var result=nil;
47
+ (result=smalltalk.send(self, "_subclasses", []));
48
+ smalltalk.send(smalltalk.send(self, "_subclasses", []), "_do_", [(function(each){return smalltalk.send(result, "_addAll_", [smalltalk.send(each, "_allSubclasses", [])]);})]);
49
+ return result;
44
50
  return self;},
45
51
  args: [],
46
- source: unescape('name%0A%09%3Creturn%20self.className%20%7C%7C%20nil%3E'),
47
- messageSends: [],
52
+ source: "allSubclasses\x0a\x09| result |\x0a\x09result := self subclasses.\x0a\x09self subclasses do: [:each |\x0a\x09 result addAll: each allSubclasses].\x0a\x09^result",
53
+ messageSends: ["subclasses", "do:", "addAll:", "allSubclasses"],
48
54
  referencedClasses: []
49
55
  }),
50
56
  smalltalk.Behavior);
51
57
 
52
58
  smalltalk.addMethod(
53
- unescape('_superclass'),
59
+ "_basicNew",
54
60
  smalltalk.method({
55
- selector: unescape('superclass'),
56
- category: 'accessing',
61
+ selector: "basicNew",
62
+ category: 'instance creation',
57
63
  fn: function (){
58
64
  var self=this;
59
- return self.superclass || nil;
65
+ return new self.fn();
60
66
  return self;},
61
67
  args: [],
62
- source: unescape('superclass%0A%09%3Creturn%20self.superclass%20%7C%7C%20nil%3E'),
68
+ source: "basicNew\x0a\x09<return new self.fn()>",
63
69
  messageSends: [],
64
70
  referencedClasses: []
65
71
  }),
66
72
  smalltalk.Behavior);
67
73
 
68
74
  smalltalk.addMethod(
69
- unescape('_subclasses'),
75
+ "_canUnderstand_",
70
76
  smalltalk.method({
71
- selector: unescape('subclasses'),
72
- category: 'accessing',
73
- fn: function (){
77
+ selector: "canUnderstand:",
78
+ category: 'testing',
79
+ fn: function (aSelector){
74
80
  var self=this;
75
- return smalltalk.subclasses(self);
81
+ 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]);})]);})]);
76
82
  return self;},
77
- args: [],
78
- source: unescape('subclasses%0A%09%3Creturn%20smalltalk.subclasses%28self%29%3E'),
79
- messageSends: [],
83
+ args: ["aSelector"],
84
+ source: "canUnderstand: aSelector\x0a\x09^(self methodDictionary keys includes: aSelector asString) or: [\x0a\x09\x09self superclass notNil and: [self superclass canUnderstand: aSelector]]",
85
+ messageSends: ["or:", "includes:", "keys", "methodDictionary", "asString", "and:", "notNil", "superclass", "canUnderstand:"],
80
86
  referencedClasses: []
81
87
  }),
82
88
  smalltalk.Behavior);
83
89
 
84
90
  smalltalk.addMethod(
85
- unescape('_allSubclasses'),
91
+ "_comment",
86
92
  smalltalk.method({
87
- selector: unescape('allSubclasses'),
93
+ selector: "comment",
88
94
  category: 'accessing',
89
95
  fn: function (){
90
96
  var self=this;
91
- var result=nil;
92
- (result=smalltalk.send(self, "_subclasses", []));
93
- smalltalk.send(smalltalk.send(self, "_subclasses", []), "_do_", [(function(each){return smalltalk.send(result, "_addAll_", [smalltalk.send(each, "_allSubclasses", [])]);})]);
94
- return result;
97
+ return (($receiver = smalltalk.send(self, "_basicAt_", ["comment"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
95
98
  return self;},
96
99
  args: [],
97
- source: unescape('allSubclasses%0A%09%7C%20result%20%7C%0A%09result%20%3A%3D%20self%20subclasses.%0A%09self%20subclasses%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20result%20addAll%3A%20each%20allSubclasses%5D.%0A%09%5Eresult'),
98
- messageSends: ["subclasses", "do:", "addAll:", "allSubclasses"],
100
+ source: "comment\x0a ^(self basicAt: 'comment') ifNil: ['']",
101
+ messageSends: ["ifNil:", "basicAt:"],
99
102
  referencedClasses: []
100
103
  }),
101
104
  smalltalk.Behavior);
102
105
 
103
106
  smalltalk.addMethod(
104
- unescape('_withAllSubclasses'),
107
+ "_comment_",
105
108
  smalltalk.method({
106
- selector: unescape('withAllSubclasses'),
109
+ selector: "comment:",
107
110
  category: 'accessing',
108
- fn: function (){
111
+ fn: function (aString){
109
112
  var self=this;
110
- return (function($rec){smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_allSubclasses", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Array || Array), "_with_", [self]));
113
+ smalltalk.send(self, "_basicAt_put_", ["comment", aString]);
111
114
  return self;},
112
- args: [],
113
- source: unescape('withAllSubclasses%0A%09%5E%28Array%20with%3A%20self%29%20addAll%3A%20self%20allSubclasses%3B%20yourself'),
114
- messageSends: ["addAll:", "allSubclasses", "yourself", "with:"],
115
- referencedClasses: ["Array"]
115
+ args: ["aString"],
116
+ source: "comment: aString\x0a self basicAt: 'comment' put: aString",
117
+ messageSends: ["basicAt:put:"],
118
+ referencedClasses: []
116
119
  }),
117
120
  smalltalk.Behavior);
118
121
 
119
122
  smalltalk.addMethod(
120
- unescape('_prototype'),
123
+ "_commentStamp",
121
124
  smalltalk.method({
122
- selector: unescape('prototype'),
125
+ selector: "commentStamp",
123
126
  category: 'accessing',
124
127
  fn: function (){
125
128
  var self=this;
126
- return self.fn.prototype;
129
+ return (function($rec){smalltalk.send($rec, "_class_", [self]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCommentReader || ClassCommentReader), "_new", []));
127
130
  return self;},
128
131
  args: [],
129
- source: unescape('prototype%0A%09%3Creturn%20self.fn.prototype%3E'),
130
- messageSends: [],
131
- referencedClasses: []
132
+ source: "commentStamp\x0a ^ClassCommentReader new\x0a\x09class: self;\x0a\x09yourself",
133
+ messageSends: ["class:", "yourself", "new"],
134
+ referencedClasses: ["ClassCommentReader"]
132
135
  }),
133
136
  smalltalk.Behavior);
134
137
 
135
138
  smalltalk.addMethod(
136
- unescape('_methodDictionary'),
139
+ "_commentStamp_prior_",
137
140
  smalltalk.method({
138
- selector: unescape('methodDictionary'),
141
+ selector: "commentStamp:prior:",
139
142
  category: 'accessing',
140
- fn: function (){
143
+ fn: function (aStamp, prior){
141
144
  var self=this;
142
- var dict = smalltalk.HashedCollection._new();
143
- var methods = self.fn.prototype.methods;
144
- for(var i in methods) {
145
- if(methods[i].selector) {
146
- dict._at_put_(methods[i].selector, methods[i]);
147
- }
148
- };
149
- return dict;
145
+ return smalltalk.send(self, "_commentStamp", []);
150
146
  return self;},
151
- args: [],
152
- source: unescape('methodDictionary%0A%09%3Cvar%20dict%20%3D%20smalltalk.HashedCollection._new%28%29%3B%0A%09var%20methods%20%3D%20self.fn.prototype.methods%3B%0A%09for%28var%20i%20in%20methods%29%20%7B%0A%09%09if%28methods%5Bi%5D.selector%29%20%7B%0A%09%09%09dict._at_put_%28methods%5Bi%5D.selector%2C%20methods%5Bi%5D%29%3B%0A%09%09%7D%0A%09%7D%3B%0A%09return%20dict%3E'),
153
- messageSends: [],
147
+ args: ["aStamp", "prior"],
148
+ source: "commentStamp: aStamp prior: prior\x0a ^self commentStamp",
149
+ messageSends: ["commentStamp"],
154
150
  referencedClasses: []
155
151
  }),
156
152
  smalltalk.Behavior);
157
153
 
158
154
  smalltalk.addMethod(
159
- unescape('_methodsFor_'),
155
+ "_compile_",
160
156
  smalltalk.method({
161
- selector: unescape('methodsFor%3A'),
162
- category: 'accessing',
157
+ selector: "compile:",
158
+ category: 'compiling',
163
159
  fn: function (aString){
164
160
  var self=this;
165
- return (function($rec){smalltalk.send($rec, "_class_category_", [self, aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCategoryReader || ClassCategoryReader), "_new", []));
161
+ smalltalk.send(self, "_compile_category_", [aString, ""]);
166
162
  return self;},
167
163
  args: ["aString"],
168
- source: unescape('methodsFor%3A%20aString%0A%09%5EClassCategoryReader%20new%0A%09%20%20%20%20class%3A%20self%20category%3A%20aString%3B%0A%09%20%20%20%20yourself'),
169
- messageSends: ["class:category:", "yourself", "new"],
170
- referencedClasses: ["ClassCategoryReader"]
164
+ source: "compile: aString\x0a\x09self compile: aString category: ''",
165
+ messageSends: ["compile:category:"],
166
+ referencedClasses: []
171
167
  }),
172
168
  smalltalk.Behavior);
173
169
 
174
170
  smalltalk.addMethod(
175
- unescape('_addCompiledMethod_'),
171
+ "_compile_category_",
176
172
  smalltalk.method({
177
- selector: unescape('addCompiledMethod%3A'),
173
+ selector: "compile:category:",
178
174
  category: 'compiling',
179
- fn: function (aMethod){
175
+ fn: function (aString, anotherString){
180
176
  var self=this;
181
- smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self);
177
+ (function($rec){smalltalk.send($rec, "_install_forClass_category_", [aString, self, anotherString]);return smalltalk.send($rec, "_setupClass_", [self]);})(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []));
182
178
  return self;},
183
- args: ["aMethod"],
184
- source: unescape('addCompiledMethod%3A%20aMethod%0A%09%3Csmalltalk.addMethod%28aMethod.selector._asSelector%28%29%2C%20aMethod%2C%20self%29%3E'),
185
- messageSends: [],
179
+ args: ["aString", "anotherString"],
180
+ source: "compile: aString category: anotherString\x0a\x09Compiler new\x0a\x09\x09install: aString forClass: self category: anotherString;\x0a\x09\x09setupClass: self",
181
+ messageSends: ["install:forClass:category:", "setupClass:", "new"],
182
+ referencedClasses: ["Compiler"]
183
+ }),
184
+ smalltalk.Behavior);
185
+
186
+ smalltalk.addMethod(
187
+ "_inheritsFrom_",
188
+ smalltalk.method({
189
+ selector: "inheritsFrom:",
190
+ category: 'testing',
191
+ fn: function (aClass){
192
+ var self=this;
193
+ return smalltalk.send(smalltalk.send(aClass, "_allSubclasses", []), "_includes_", [self]);
194
+ return self;},
195
+ args: ["aClass"],
196
+ source: "inheritsFrom: aClass\x0a\x09^aClass allSubclasses includes: self",
197
+ messageSends: ["includes:", "allSubclasses"],
186
198
  referencedClasses: []
187
199
  }),
188
200
  smalltalk.Behavior);
189
201
 
190
202
  smalltalk.addMethod(
191
- unescape('_instanceVariableNames'),
203
+ "_instanceVariableNames",
192
204
  smalltalk.method({
193
- selector: unescape('instanceVariableNames'),
205
+ selector: "instanceVariableNames",
194
206
  category: 'accessing',
195
207
  fn: function (){
196
208
  var self=this;
197
209
  return self.iVarNames;
198
210
  return self;},
199
211
  args: [],
200
- source: unescape('instanceVariableNames%0A%09%3Creturn%20self.iVarNames%3E'),
212
+ source: "instanceVariableNames\x0a\x09<return self.iVarNames>",
213
+ messageSends: [],
214
+ referencedClasses: []
215
+ }),
216
+ smalltalk.Behavior);
217
+
218
+ smalltalk.addMethod(
219
+ "_methodAt_",
220
+ smalltalk.method({
221
+ selector: "methodAt:",
222
+ category: 'accessing',
223
+ fn: function (aString){
224
+ var self=this;
225
+ return smalltalk.methods(self)[aString];
226
+ return self;},
227
+ args: ["aString"],
228
+ source: "methodAt: aString\x0a\x09<return smalltalk.methods(self)[aString]>",
201
229
  messageSends: [],
202
230
  referencedClasses: []
203
231
  }),
204
232
  smalltalk.Behavior);
205
233
 
206
234
  smalltalk.addMethod(
207
- unescape('_comment'),
235
+ "_methodDictionary",
208
236
  smalltalk.method({
209
- selector: unescape('comment'),
237
+ selector: "methodDictionary",
210
238
  category: 'accessing',
211
239
  fn: function (){
212
240
  var self=this;
213
- return (($receiver = smalltalk.send(self, "_basicAt_", ["comment"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
241
+ var dict = smalltalk.HashedCollection._new();
242
+ var methods = self.fn.prototype.methods;
243
+ for(var i in methods) {
244
+ if(methods[i].selector) {
245
+ dict._at_put_(methods[i].selector, methods[i]);
246
+ }
247
+ };
248
+ return dict;
214
249
  return self;},
215
250
  args: [],
216
- source: unescape('comment%0A%20%20%20%20%5E%28self%20basicAt%3A%20%27comment%27%29%20ifNil%3A%20%5B%27%27%5D'),
217
- messageSends: ["ifNil:", "basicAt:"],
251
+ source: "methodDictionary\x0a\x09<var dict = smalltalk.HashedCollection._new();\x0a\x09var methods = self.fn.prototype.methods;\x0a\x09for(var i in methods) {\x0a\x09\x09if(methods[i].selector) {\x0a\x09\x09\x09dict._at_put_(methods[i].selector, methods[i]);\x0a\x09\x09}\x0a\x09};\x0a\x09return dict>",
252
+ messageSends: [],
218
253
  referencedClasses: []
219
254
  }),
220
255
  smalltalk.Behavior);
221
256
 
222
257
  smalltalk.addMethod(
223
- unescape('_comment_'),
258
+ "_methodsFor_",
224
259
  smalltalk.method({
225
- selector: unescape('comment%3A'),
260
+ selector: "methodsFor:",
226
261
  category: 'accessing',
227
262
  fn: function (aString){
228
263
  var self=this;
229
- smalltalk.send(self, "_basicAt_put_", ["comment", aString]);
264
+ return (function($rec){smalltalk.send($rec, "_class_category_", [self, aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCategoryReader || ClassCategoryReader), "_new", []));
230
265
  return self;},
231
266
  args: ["aString"],
232
- source: unescape('comment%3A%20aString%0A%20%20%20%20self%20basicAt%3A%20%27comment%27%20put%3A%20aString'),
233
- messageSends: ["basicAt:put:"],
234
- referencedClasses: []
267
+ source: "methodsFor: aString\x0a\x09^ClassCategoryReader new\x0a\x09 class: self category: aString;\x0a\x09 yourself",
268
+ messageSends: ["class:category:", "yourself", "new"],
269
+ referencedClasses: ["ClassCategoryReader"]
235
270
  }),
236
271
  smalltalk.Behavior);
237
272
 
238
273
  smalltalk.addMethod(
239
- unescape('_commentStamp'),
274
+ "_methodsFor_stamp_",
240
275
  smalltalk.method({
241
- selector: unescape('commentStamp'),
276
+ selector: "methodsFor:stamp:",
242
277
  category: 'accessing',
243
- fn: function (){
278
+ fn: function (aString, aStamp){
244
279
  var self=this;
245
- return (function($rec){smalltalk.send($rec, "_class_", [self]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCommentReader || ClassCommentReader), "_new", []));
280
+ return smalltalk.send(self, "_methodsFor_", [aString]);
246
281
  return self;},
247
- args: [],
248
- source: unescape('commentStamp%0A%20%20%20%20%5EClassCommentReader%20new%0A%09class%3A%20self%3B%0A%09yourself'),
249
- messageSends: ["class:", "yourself", "new"],
250
- referencedClasses: ["ClassCommentReader"]
282
+ args: ["aString", "aStamp"],
283
+ source: "methodsFor: aString stamp: aStamp\x0a\x09\x22Added for compatibility, right now ignores stamp.\x22\x0a\x09^self methodsFor: aString",
284
+ messageSends: ["methodsFor:"],
285
+ referencedClasses: []
251
286
  }),
252
287
  smalltalk.Behavior);
253
288
 
254
289
  smalltalk.addMethod(
255
- unescape('_removeCompiledMethod_'),
290
+ "_name",
256
291
  smalltalk.method({
257
- selector: unescape('removeCompiledMethod%3A'),
258
- category: 'compiling',
259
- fn: function (aMethod){
292
+ selector: "name",
293
+ category: 'accessing',
294
+ fn: function (){
260
295
  var self=this;
261
- delete self.fn.prototype[aMethod.selector._asSelector()];
262
- delete self.fn.prototype.methods[aMethod.selector];
263
- smalltalk.init(self);;
296
+ return self.className || nil;
264
297
  return self;},
265
- args: ["aMethod"],
266
- source: unescape('removeCompiledMethod%3A%20aMethod%0A%09%3Cdelete%20self.fn.prototype%5BaMethod.selector._asSelector%28%29%5D%3B%0A%09delete%20self.fn.prototype.methods%5BaMethod.selector%5D%3B%0A%09smalltalk.init%28self%29%3B%3E'),
298
+ args: [],
299
+ source: "name\x0a\x09<return self.className || nil>",
267
300
  messageSends: [],
268
301
  referencedClasses: []
269
302
  }),
270
303
  smalltalk.Behavior);
271
304
 
272
305
  smalltalk.addMethod(
273
- unescape('_inheritsFrom_'),
306
+ "_new",
274
307
  smalltalk.method({
275
- selector: unescape('inheritsFrom%3A'),
276
- category: 'testing',
277
- fn: function (aClass){
308
+ selector: "new",
309
+ category: 'instance creation',
310
+ fn: function (){
278
311
  var self=this;
279
- return smalltalk.send(smalltalk.send(aClass, "_allSubclasses", []), "_includes_", [self]);
312
+ return smalltalk.send(smalltalk.send(self, "_basicNew", []), "_initialize", []);
280
313
  return self;},
281
- args: ["aClass"],
282
- source: unescape('inheritsFrom%3A%20aClass%0A%09%5EaClass%20allSubclasses%20includes%3A%20self'),
283
- messageSends: ["includes:", "allSubclasses"],
314
+ args: [],
315
+ source: "new\x0a\x09^self basicNew initialize",
316
+ messageSends: ["initialize", "basicNew"],
284
317
  referencedClasses: []
285
318
  }),
286
319
  smalltalk.Behavior);
287
320
 
288
321
  smalltalk.addMethod(
289
- unescape('_protocols'),
322
+ "_protocols",
290
323
  smalltalk.method({
291
- selector: unescape('protocols'),
324
+ selector: "protocols",
292
325
  category: 'accessing',
293
326
  fn: function (){
294
327
  var self=this;
@@ -298,16 +331,16 @@ smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_do_", [(function
298
331
  return smalltalk.send(protocols, "_sort", []);
299
332
  return self;},
300
333
  args: [],
301
- source: unescape('protocols%0A%20%20%20%20%7C%20protocols%20%7C%0A%20%20%20%20protocols%20%3A%3D%20Array%20new.%0A%20%20%20%20self%20methodDictionary%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20%28protocols%20includes%3A%20each%20category%29%20ifFalse%3A%20%5B%0A%09%09protocols%20add%3A%20each%20category%5D%5D.%0A%20%20%20%20%5Eprotocols%20sort'),
334
+ source: "protocols\x0a | protocols |\x0a protocols := Array new.\x0a self methodDictionary do: [:each |\x0a\x09 (protocols includes: each category) ifFalse: [\x0a\x09\x09protocols add: each category]].\x0a ^protocols sort",
302
335
  messageSends: ["new", "do:", "methodDictionary", "ifFalse:", "includes:", "category", "add:", "sort"],
303
336
  referencedClasses: ["Array"]
304
337
  }),
305
338
  smalltalk.Behavior);
306
339
 
307
340
  smalltalk.addMethod(
308
- unescape('_protocolsDo_'),
341
+ "_protocolsDo_",
309
342
  smalltalk.method({
310
- selector: unescape('protocolsDo%3A'),
343
+ selector: "protocolsDo:",
311
344
  category: 'accessing',
312
345
  fn: function (aBlock){
313
346
  var self=this;
@@ -317,203 +350,182 @@ smalltalk.send(smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_v
317
350
  smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [(function(category){return smalltalk.send(aBlock, "_value_value_", [category, smalltalk.send(methodsByCategory, "_at_", [category])]);})]);
318
351
  return self;},
319
352
  args: ["aBlock"],
320
- source: unescape('protocolsDo%3A%20aBlock%0A%09%22Execute%20aBlock%20for%20each%20method%20category%20with%0A%09its%20collection%20of%20methods%20in%20the%20sort%20order%20of%20category%20name.%22%0A%0A%09%7C%20methodsByCategory%20%7C%0A%09methodsByCategory%20%3A%3D%20HashedCollection%20new.%0A%09self%20methodDictionary%20values%20do%3A%20%5B%3Am%20%7C%0A%09%09%28methodsByCategory%20at%3A%20m%20category%20ifAbsentPut%3A%20%5BArray%20new%5D%29%0A%20%09%09%09add%3A%20m%5D.%20%0A%09self%20protocols%20do%3A%20%5B%3Acategory%20%7C%0A%09%09aBlock%20value%3A%20category%20value%3A%20%28methodsByCategory%20at%3A%20category%29%5D'),
353
+ source: "protocolsDo: aBlock\x0a\x09\x22Execute aBlock for each method category with\x0a\x09its collection of methods in the sort order of category name.\x22\x0a\x0a\x09| methodsByCategory |\x0a\x09methodsByCategory := HashedCollection new.\x0a\x09self methodDictionary values do: [:m |\x0a\x09\x09(methodsByCategory at: m category ifAbsentPut: [Array new])\x0a \x09\x09\x09add: m]. \x0a\x09self protocols do: [:category |\x0a\x09\x09aBlock value: category value: (methodsByCategory at: category)]",
321
354
  messageSends: ["new", "do:", "values", "methodDictionary", "add:", "at:ifAbsentPut:", "category", "protocols", "value:value:", "at:"],
322
355
  referencedClasses: ["HashedCollection", "Array"]
323
356
  }),
324
357
  smalltalk.Behavior);
325
358
 
326
359
  smalltalk.addMethod(
327
- unescape('_allInstanceVariableNames'),
360
+ "_prototype",
328
361
  smalltalk.method({
329
- selector: unescape('allInstanceVariableNames'),
362
+ selector: "prototype",
330
363
  category: 'accessing',
331
364
  fn: function (){
332
365
  var self=this;
333
- var result=nil;
334
- (result=smalltalk.send(smalltalk.send(self, "_instanceVariableNames", []), "_copy", []));
335
- (($receiver = smalltalk.send(self, "_superclass", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(result, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allInstanceVariableNames", [])]);})() : nil;
336
- return result;
366
+ return self.fn.prototype;
337
367
  return self;},
338
368
  args: [],
339
- source: unescape('allInstanceVariableNames%0A%09%7C%20result%20%7C%0A%09result%20%3A%3D%20self%20instanceVariableNames%20copy.%0A%09self%20superclass%20ifNotNil%3A%20%5B%0A%09%20%20%20%20result%20addAll%3A%20self%20superclass%20allInstanceVariableNames%5D.%0A%09%5Eresult'),
340
- messageSends: ["copy", "instanceVariableNames", "ifNotNil:", "superclass", "addAll:", "allInstanceVariableNames"],
369
+ source: "prototype\x0a\x09<return self.fn.prototype>",
370
+ messageSends: [],
341
371
  referencedClasses: []
342
372
  }),
343
373
  smalltalk.Behavior);
344
374
 
345
375
  smalltalk.addMethod(
346
- unescape('_methodAt_'),
376
+ "_removeCompiledMethod_",
347
377
  smalltalk.method({
348
- selector: unescape('methodAt%3A'),
349
- category: 'accessing',
350
- fn: function (aString){
378
+ selector: "removeCompiledMethod:",
379
+ category: 'compiling',
380
+ fn: function (aMethod){
351
381
  var self=this;
352
- return smalltalk.methods(self)[aString];
382
+ delete self.fn.prototype[aMethod.selector._asSelector()];
383
+ delete self.fn.prototype.methods[aMethod.selector];
384
+ smalltalk.init(self);;
353
385
  return self;},
354
- args: ["aString"],
355
- source: unescape('methodAt%3A%20aString%0A%09%3Creturn%20smalltalk.methods%28self%29%5BaString%5D%3E'),
386
+ args: ["aMethod"],
387
+ source: "removeCompiledMethod: aMethod\x0a\x09<delete self.fn.prototype[aMethod.selector._asSelector()];\x0a\x09delete self.fn.prototype.methods[aMethod.selector];\x0a\x09smalltalk.init(self);>",
356
388
  messageSends: [],
357
389
  referencedClasses: []
358
390
  }),
359
391
  smalltalk.Behavior);
360
392
 
361
393
  smalltalk.addMethod(
362
- unescape('_methodsFor_stamp_'),
394
+ "_subclasses",
363
395
  smalltalk.method({
364
- selector: unescape('methodsFor%3Astamp%3A'),
396
+ selector: "subclasses",
365
397
  category: 'accessing',
366
- fn: function (aString, aStamp){
398
+ fn: function (){
367
399
  var self=this;
368
- return smalltalk.send(self, "_methodsFor_", [aString]);
400
+ return smalltalk.subclasses(self);
369
401
  return self;},
370
- args: ["aString", "aStamp"],
371
- source: unescape('methodsFor%3A%20aString%20stamp%3A%20aStamp%0A%09%22Added%20for%20compatibility%2C%20right%20now%20ignores%20stamp.%22%0A%09%5Eself%20methodsFor%3A%20aString'),
372
- messageSends: ["methodsFor:"],
402
+ args: [],
403
+ source: "subclasses\x0a\x09<return smalltalk.subclasses(self)>",
404
+ messageSends: [],
373
405
  referencedClasses: []
374
406
  }),
375
407
  smalltalk.Behavior);
376
408
 
377
409
  smalltalk.addMethod(
378
- unescape('_commentStamp_prior_'),
410
+ "_superclass",
379
411
  smalltalk.method({
380
- selector: unescape('commentStamp%3Aprior%3A'),
412
+ selector: "superclass",
381
413
  category: 'accessing',
382
- fn: function (aStamp, prior){
383
- var self=this;
384
- return smalltalk.send(self, "_commentStamp", []);
385
- return self;},
386
- args: ["aStamp", "prior"],
387
- source: unescape('commentStamp%3A%20aStamp%20prior%3A%20prior%0A%20%20%20%20%20%20%20%20%5Eself%20commentStamp'),
388
- messageSends: ["commentStamp"],
389
- referencedClasses: []
390
- }),
391
- smalltalk.Behavior);
392
-
393
- smalltalk.addMethod(
394
- unescape('_compile_'),
395
- smalltalk.method({
396
- selector: unescape('compile%3A'),
397
- category: 'compiling',
398
- fn: function (aString){
414
+ fn: function (){
399
415
  var self=this;
400
- smalltalk.send(self, "_compile_category_", [aString, ""]);
416
+ return self.superclass || nil;
401
417
  return self;},
402
- args: ["aString"],
403
- source: unescape('compile%3A%20aString%0A%09self%20compile%3A%20aString%20category%3A%20%27%27'),
404
- messageSends: ["compile:category:"],
418
+ args: [],
419
+ source: "superclass\x0a\x09<return self.superclass || nil>",
420
+ messageSends: [],
405
421
  referencedClasses: []
406
422
  }),
407
423
  smalltalk.Behavior);
408
424
 
409
425
  smalltalk.addMethod(
410
- unescape('_compile_category_'),
426
+ "_withAllSubclasses",
411
427
  smalltalk.method({
412
- selector: unescape('compile%3Acategory%3A'),
413
- category: 'compiling',
414
- fn: function (aString, anotherString){
428
+ selector: "withAllSubclasses",
429
+ category: 'accessing',
430
+ fn: function (){
415
431
  var self=this;
416
- var method=nil;
417
- (method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self]));
418
- smalltalk.send(method, "_category_", [anotherString]);
419
- smalltalk.send(self, "_addCompiledMethod_", [method]);
432
+ return (function($rec){smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_allSubclasses", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Array || Array), "_with_", [self]));
420
433
  return self;},
421
- args: ["aString", "anotherString"],
422
- source: unescape('compile%3A%20aString%20category%3A%20anotherString%0A%09%7C%20method%20%7C%0A%09method%20%3A%3D%20Compiler%20new%20load%3A%20aString%20forClass%3A%20self.%0A%09method%20category%3A%20anotherString.%0A%09self%20addCompiledMethod%3A%20method'),
423
- messageSends: ["load:forClass:", "new", "category:", "addCompiledMethod:"],
424
- referencedClasses: ["Compiler"]
434
+ args: [],
435
+ source: "withAllSubclasses\x0a\x09^(Array with: self) addAll: self allSubclasses; yourself",
436
+ messageSends: ["addAll:", "allSubclasses", "yourself", "with:"],
437
+ referencedClasses: ["Array"]
425
438
  }),
426
439
  smalltalk.Behavior);
427
440
 
428
441
 
429
442
 
430
443
  smalltalk.addClass('Class', smalltalk.Behavior, [], 'Kernel-Classes');
431
- smalltalk.Class.comment=unescape('Class%20is%20__the__%20class%20object.%20%0A%0AInstances%20are%20the%20classes%20of%20the%20system.%0AClass%20creation%20is%20done%20throught%20a%20%60ClassBuilder%60')
444
+ smalltalk.Class.comment="Class is __the__ class object. \x0a\x0aInstances are the classes of the system.\x0aClass creation is done throught a `ClassBuilder`"
432
445
  smalltalk.addMethod(
433
- unescape('_category'),
446
+ "_category",
434
447
  smalltalk.method({
435
- selector: unescape('category'),
448
+ selector: "category",
436
449
  category: 'accessing',
437
450
  fn: function (){
438
451
  var self=this;
439
452
  return (($receiver = smalltalk.send(self, "_package", [])) == nil || $receiver == undefined) ? (function(){return "Unclassified";})() : (function(){return smalltalk.send(smalltalk.send(self, "_package", []), "_name", []);})();
440
453
  return self;},
441
454
  args: [],
442
- source: unescape('category%0A%09%5Eself%20package%20ifNil%3A%20%5B%27Unclassified%27%5D%20ifNotNil%3A%20%5Bself%20package%20name%5D'),
455
+ source: "category\x0a\x09^self package ifNil: ['Unclassified'] ifNotNil: [self package name]",
443
456
  messageSends: ["ifNil:ifNotNil:", "package", "name"],
444
457
  referencedClasses: []
445
458
  }),
446
459
  smalltalk.Class);
447
460
 
448
461
  smalltalk.addMethod(
449
- unescape('_subclass_instanceVariableNames_'),
462
+ "_isClass",
450
463
  smalltalk.method({
451
- selector: unescape('subclass%3AinstanceVariableNames%3A'),
452
- category: 'class creation',
453
- fn: function (aString, anotherString){
464
+ selector: "isClass",
465
+ category: 'testing',
466
+ fn: function (){
454
467
  var self=this;
455
- return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
468
+ return true;
456
469
  return self;},
457
- args: ["aString", "anotherString"],
458
- source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%0A%09%22Kept%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%20package%3A%20nil'),
459
- messageSends: ["subclass:instanceVariableNames:package:"],
470
+ args: [],
471
+ source: "isClass\x0a\x09^true",
472
+ messageSends: [],
460
473
  referencedClasses: []
461
474
  }),
462
475
  smalltalk.Class);
463
476
 
464
477
  smalltalk.addMethod(
465
- unescape('_subclass_instanceVariableNames_category_'),
478
+ "_package",
466
479
  smalltalk.method({
467
- selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
468
- category: 'class creation',
469
- fn: function (aString, aString2, aString3){
480
+ selector: "package",
481
+ category: 'accessing',
482
+ fn: function (){
470
483
  var self=this;
471
- smalltalk.send(self, "_deprecatedAPI", []);
472
- return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
484
+ return self.pkg;
473
485
  return self;},
474
- args: ["aString", "aString2", "aString3"],
475
- source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20category%3A%20aString3%0A%09%22Kept%20for%20compatibility.%22%0A%09self%20deprecatedAPI.%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
476
- messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"],
486
+ args: [],
487
+ source: "package\x0a\x09<return self.pkg>",
488
+ messageSends: [],
477
489
  referencedClasses: []
478
490
  }),
479
491
  smalltalk.Class);
480
492
 
481
493
  smalltalk.addMethod(
482
- unescape('_isClass'),
494
+ "_package_",
483
495
  smalltalk.method({
484
- selector: unescape('isClass'),
485
- category: 'testing',
486
- fn: function (){
496
+ selector: "package:",
497
+ category: 'accessing',
498
+ fn: function (aPackage){
487
499
  var self=this;
488
- return true;
500
+ self.pkg = aPackage;
489
501
  return self;},
490
- args: [],
491
- source: unescape('isClass%0A%09%5Etrue'),
502
+ args: ["aPackage"],
503
+ source: "package: aPackage\x0a\x09<self.pkg = aPackage>",
492
504
  messageSends: [],
493
505
  referencedClasses: []
494
506
  }),
495
507
  smalltalk.Class);
496
508
 
497
509
  smalltalk.addMethod(
498
- unescape('_printString'),
510
+ "_printString",
499
511
  smalltalk.method({
500
- selector: unescape('printString'),
512
+ selector: "printString",
501
513
  category: 'printing',
502
514
  fn: function (){
503
515
  var self=this;
504
516
  return smalltalk.send(self, "_name", []);
505
517
  return self;},
506
518
  args: [],
507
- source: unescape('printString%0A%09%5Eself%20name'),
519
+ source: "printString\x0a\x09^self name",
508
520
  messageSends: ["name"],
509
521
  referencedClasses: []
510
522
  }),
511
523
  smalltalk.Class);
512
524
 
513
525
  smalltalk.addMethod(
514
- unescape('_rename_'),
526
+ "_rename_",
515
527
  smalltalk.method({
516
- selector: unescape('rename%3A'),
528
+ selector: "rename:",
517
529
  category: 'accessing',
518
530
  fn: function (aString){
519
531
  var self=this;
@@ -524,71 +536,72 @@ var self=this;
524
536
  ;
525
537
  return self;},
526
538
  args: ["aString"],
527
- source: unescape('rename%3A%20aString%0A%09%3C%0A%09%09smalltalk%5BaString%5D%20%3D%20self%3B%0A%09%09delete%20smalltalk%5Bself.className%5D%3B%0A%09%09self.className%20%3D%20aString%3B%0A%09%3E'),
539
+ source: "rename: aString\x0a\x09<\x0a\x09\x09smalltalk[aString] = self;\x0a\x09\x09delete smalltalk[self.className];\x0a\x09\x09self.className = aString;\x0a\x09>",
528
540
  messageSends: [],
529
541
  referencedClasses: []
530
542
  }),
531
543
  smalltalk.Class);
532
544
 
533
545
  smalltalk.addMethod(
534
- unescape('_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_'),
546
+ "_subclass_instanceVariableNames_",
535
547
  smalltalk.method({
536
- selector: unescape('subclass%3AinstanceVariableNames%3AclassVariableNames%3ApoolDictionaries%3Acategory%3A'),
548
+ selector: "subclass:instanceVariableNames:",
537
549
  category: 'class creation',
538
- fn: function (aString, aString2, classVars, pools, aString3){
550
+ fn: function (aString, anotherString){
539
551
  var self=this;
540
- return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
552
+ return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
541
553
  return self;},
542
- args: ["aString", "aString2", "classVars", "pools", "aString3"],
543
- source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20classVariableNames%3A%20classVars%20poolDictionaries%3A%20pools%20category%3A%20aString3%0A%09%22Just%20ignore%20class%20variables%20and%20pools.%20Added%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
554
+ args: ["aString", "anotherString"],
555
+ source: "subclass: aString instanceVariableNames: anotherString\x0a\x09\x22Kept for compatibility.\x22\x0a\x09^self subclass: aString instanceVariableNames: anotherString package: nil",
544
556
  messageSends: ["subclass:instanceVariableNames:package:"],
545
557
  referencedClasses: []
546
558
  }),
547
559
  smalltalk.Class);
548
560
 
549
561
  smalltalk.addMethod(
550
- unescape('_package'),
562
+ "_subclass_instanceVariableNames_category_",
551
563
  smalltalk.method({
552
- selector: unescape('package'),
553
- category: 'accessing',
554
- fn: function (){
564
+ selector: "subclass:instanceVariableNames:category:",
565
+ category: 'class creation',
566
+ fn: function (aString, aString2, aString3){
555
567
  var self=this;
556
- return self.pkg;
568
+ smalltalk.send(self, "_deprecatedAPI", []);
569
+ return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
557
570
  return self;},
558
- args: [],
559
- source: unescape('package%0A%09%3Creturn%20self.pkg%3E'),
560
- messageSends: [],
571
+ args: ["aString", "aString2", "aString3"],
572
+ 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",
573
+ messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"],
561
574
  referencedClasses: []
562
575
  }),
563
576
  smalltalk.Class);
564
577
 
565
578
  smalltalk.addMethod(
566
- unescape('_package_'),
579
+ "_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_",
567
580
  smalltalk.method({
568
- selector: unescape('package%3A'),
569
- category: 'accessing',
570
- fn: function (aPackage){
581
+ selector: "subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:",
582
+ category: 'class creation',
583
+ fn: function (aString, aString2, classVars, pools, aString3){
571
584
  var self=this;
572
- self.pkg = aPackage;
585
+ return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
573
586
  return self;},
574
- args: ["aPackage"],
575
- source: unescape('package%3A%20aPackage%0A%09%3Cself.pkg%20%3D%20aPackage%3E'),
576
- messageSends: [],
587
+ args: ["aString", "aString2", "classVars", "pools", "aString3"],
588
+ source: "subclass: aString instanceVariableNames: aString2 classVariableNames: classVars poolDictionaries: pools category: aString3\x0a\x09\x22Just ignore class variables and pools. Added for compatibility.\x22\x0a\x09^self subclass: aString instanceVariableNames: aString2 package: aString3",
589
+ messageSends: ["subclass:instanceVariableNames:package:"],
577
590
  referencedClasses: []
578
591
  }),
579
592
  smalltalk.Class);
580
593
 
581
594
  smalltalk.addMethod(
582
- unescape('_subclass_instanceVariableNames_package_'),
595
+ "_subclass_instanceVariableNames_package_",
583
596
  smalltalk.method({
584
- selector: unescape('subclass%3AinstanceVariableNames%3Apackage%3A'),
597
+ selector: "subclass:instanceVariableNames:package:",
585
598
  category: 'class creation',
586
599
  fn: function (aString, aString2, aString3){
587
600
  var self=this;
588
601
  return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, smalltalk.send(aString, "_asString", []), aString2, aString3]);
589
602
  return self;},
590
603
  args: ["aString", "aString2", "aString3"],
591
- source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3%0A%09%5EClassBuilder%20new%0A%09%20%20%20%20superclass%3A%20self%20subclass%3A%20aString%20asString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
604
+ source: "subclass: aString instanceVariableNames: aString2 package: aString3\x0a\x09^ClassBuilder new\x0a\x09 superclass: self subclass: aString asString instanceVariableNames: aString2 package: aString3",
592
605
  messageSends: ["superclass:subclass:instanceVariableNames:package:", "new", "asString"],
593
606
  referencedClasses: ["ClassBuilder"]
594
607
  }),
@@ -597,67 +610,67 @@ smalltalk.Class);
597
610
 
598
611
 
599
612
  smalltalk.addClass('Metaclass', smalltalk.Behavior, [], 'Kernel-Classes');
600
- smalltalk.Metaclass.comment=unescape('Metaclass%20is%20the%20root%20of%20the%20class%20hierarchy.%0A%0AMetaclass%20instances%20are%20metaclasses%2C%20one%20for%20each%20real%20class.%20%0AMetaclass%20instances%20have%20a%20single%20instance%2C%20which%20they%20hold%20onto%2C%20which%20is%20the%20class%20that%20they%20are%20the%20metaclass%20of.')
613
+ smalltalk.Metaclass.comment="Metaclass is the root of the class hierarchy.\x0a\x0aMetaclass instances are metaclasses, one for each real class. \x0aMetaclass instances have a single instance, which they hold onto, which is the class that they are the metaclass of."
601
614
  smalltalk.addMethod(
602
- unescape('_instanceClass'),
615
+ "_instanceClass",
603
616
  smalltalk.method({
604
- selector: unescape('instanceClass'),
617
+ selector: "instanceClass",
605
618
  category: 'accessing',
606
619
  fn: function (){
607
620
  var self=this;
608
621
  return self.instanceClass;
609
622
  return self;},
610
623
  args: [],
611
- source: unescape('instanceClass%0A%09%3Creturn%20self.instanceClass%3E'),
624
+ source: "instanceClass\x0a\x09<return self.instanceClass>",
612
625
  messageSends: [],
613
626
  referencedClasses: []
614
627
  }),
615
628
  smalltalk.Metaclass);
616
629
 
617
630
  smalltalk.addMethod(
618
- unescape('_instanceVariableNames_'),
631
+ "_instanceVariableNames_",
619
632
  smalltalk.method({
620
- selector: unescape('instanceVariableNames%3A'),
633
+ selector: "instanceVariableNames:",
621
634
  category: 'accessing',
622
635
  fn: function (aCollection){
623
636
  var self=this;
624
637
  smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_class_instanceVariableNames_", [self, aCollection]);
625
638
  return self;},
626
639
  args: ["aCollection"],
627
- source: unescape('instanceVariableNames%3A%20aCollection%0A%09ClassBuilder%20new%0A%09%20%20%20%20class%3A%20self%20instanceVariableNames%3A%20aCollection'),
640
+ source: "instanceVariableNames: aCollection\x0a\x09ClassBuilder new\x0a\x09 class: self instanceVariableNames: aCollection",
628
641
  messageSends: ["class:instanceVariableNames:", "new"],
629
642
  referencedClasses: ["ClassBuilder"]
630
643
  }),
631
644
  smalltalk.Metaclass);
632
645
 
633
646
  smalltalk.addMethod(
634
- unescape('_isMetaclass'),
647
+ "_isMetaclass",
635
648
  smalltalk.method({
636
- selector: unescape('isMetaclass'),
649
+ selector: "isMetaclass",
637
650
  category: 'testing',
638
651
  fn: function (){
639
652
  var self=this;
640
653
  return true;
641
654
  return self;},
642
655
  args: [],
643
- source: unescape('isMetaclass%0A%09%5Etrue'),
656
+ source: "isMetaclass\x0a\x09^true",
644
657
  messageSends: [],
645
658
  referencedClasses: []
646
659
  }),
647
660
  smalltalk.Metaclass);
648
661
 
649
662
  smalltalk.addMethod(
650
- unescape('_printString'),
663
+ "_printString",
651
664
  smalltalk.method({
652
- selector: unescape('printString'),
665
+ selector: "printString",
653
666
  category: 'printing',
654
667
  fn: function (){
655
668
  var self=this;
656
669
  return smalltalk.send(smalltalk.send(smalltalk.send(self, "_instanceClass", []), "_name", []), "__comma", [" class"]);
657
670
  return self;},
658
671
  args: [],
659
- source: unescape('printString%0A%09%5Eself%20instanceClass%20name%2C%20%27%20class%27'),
660
- messageSends: [unescape("%2C"), "name", "instanceClass"],
672
+ source: "printString\x0a\x09^self instanceClass name, ' class'",
673
+ messageSends: [",", "name", "instanceClass"],
661
674
  referencedClasses: []
662
675
  }),
663
676
  smalltalk.Metaclass);
@@ -665,27 +678,45 @@ smalltalk.Metaclass);
665
678
 
666
679
 
667
680
  smalltalk.addClass('ClassBuilder', smalltalk.Object, [], 'Kernel-Classes');
668
- smalltalk.ClassBuilder.comment=unescape('ClassBuilder%20is%20responsible%20for%20compiling%20new%20classes%20or%20modifying%20existing%20classes%20in%20the%20system.%0A%0ARather%20than%20using%20ClassBuilder%20directly%20to%20compile%20a%20class%2C%20use%20%60Class%20%3E%3E%20subclass%3AinstanceVariableNames%3Apackage%3A%60.')
681
+ smalltalk.ClassBuilder.comment="ClassBuilder is responsible for compiling new classes or modifying existing classes in the system.\x0a\x0aRather than using ClassBuilder directly to compile a class, use `Class >> subclass:instanceVariableNames:package:`."
669
682
  smalltalk.addMethod(
670
- unescape('_superclass_subclass_'),
683
+ "_addSubclassOf_named_instanceVariableNames_",
671
684
  smalltalk.method({
672
- selector: unescape('superclass%3Asubclass%3A'),
673
- category: 'class creation',
674
- fn: function (aClass, aString){
685
+ selector: "addSubclassOf:named:instanceVariableNames:",
686
+ category: 'private',
687
+ fn: function (aClass, aString, aCollection){
675
688
  var self=this;
676
- return smalltalk.send(self, "_superclass_subclass_instanceVariableNames_package_", [aClass, aString, "", nil]);
689
+ smalltalk.addClass(aString, aClass, aCollection);
690
+ return smalltalk[aString];
677
691
  return self;},
678
- args: ["aClass", "aString"],
679
- source: unescape('superclass%3A%20aClass%20subclass%3A%20aString%0A%09%5Eself%20superclass%3A%20aClass%20subclass%3A%20aString%20instanceVariableNames%3A%20%27%27%20package%3A%20nil'),
680
- messageSends: ["superclass:subclass:instanceVariableNames:package:"],
692
+ args: ["aClass", "aString", "aCollection"],
693
+ source: "addSubclassOf: aClass named: aString instanceVariableNames: aCollection\x0a\x09<smalltalk.addClass(aString, aClass, aCollection);\x0a\x09 return smalltalk[aString]>",
694
+ messageSends: [],
695
+ referencedClasses: []
696
+ }),
697
+ smalltalk.ClassBuilder);
698
+
699
+ smalltalk.addMethod(
700
+ "_addSubclassOf_named_instanceVariableNames_package_",
701
+ smalltalk.method({
702
+ selector: "addSubclassOf:named:instanceVariableNames:package:",
703
+ category: 'private',
704
+ fn: function (aClass, aString, aCollection, packageName){
705
+ var self=this;
706
+ smalltalk.addClass(aString, aClass, aCollection, packageName);
707
+ return smalltalk[aString];
708
+ return self;},
709
+ args: ["aClass", "aString", "aCollection", "packageName"],
710
+ source: "addSubclassOf: aClass named: aString instanceVariableNames: aCollection package: packageName\x0a\x09<smalltalk.addClass(aString, aClass, aCollection, packageName);\x0a\x09 return smalltalk[aString]>",
711
+ messageSends: [],
681
712
  referencedClasses: []
682
713
  }),
683
714
  smalltalk.ClassBuilder);
684
715
 
685
716
  smalltalk.addMethod(
686
- unescape('_class_instanceVariableNames_'),
717
+ "_class_instanceVariableNames_",
687
718
  smalltalk.method({
688
- selector: unescape('class%3AinstanceVariableNames%3A'),
719
+ selector: "class:instanceVariableNames:",
689
720
  category: 'class creation',
690
721
  fn: function (aClass, aString){
691
722
  var self=this;
@@ -694,65 +725,86 @@ smalltalk.send(aClass, "_basicAt_put_", ["iVarNames", smalltalk.send(self, "_ins
694
725
  smalltalk.send(self, "_setupClass_", [aClass]);
695
726
  return self;},
696
727
  args: ["aClass", "aString"],
697
- source: unescape('class%3A%20aClass%20instanceVariableNames%3A%20aString%0A%09aClass%20isMetaclass%20ifFalse%3A%20%5Bself%20error%3A%20aClass%20name%2C%20%27%20is%20not%20a%20metaclass%27%5D.%0A%09aClass%20basicAt%3A%20%27iVarNames%27%20put%3A%20%28self%20instanceVariableNamesFor%3A%20aString%29.%0A%09self%20setupClass%3A%20aClass'),
698
- messageSends: ["ifFalse:", "isMetaclass", "error:", unescape("%2C"), "name", "basicAt:put:", "instanceVariableNamesFor:", "setupClass:"],
728
+ source: "class: aClass instanceVariableNames: aString\x0a\x09aClass isMetaclass ifFalse: [self error: aClass name, ' is not a metaclass'].\x0a\x09aClass basicAt: 'iVarNames' put: (self instanceVariableNamesFor: aString).\x0a\x09self setupClass: aClass",
729
+ messageSends: ["ifFalse:", "isMetaclass", "error:", ",", "name", "basicAt:put:", "instanceVariableNamesFor:", "setupClass:"],
699
730
  referencedClasses: []
700
731
  }),
701
732
  smalltalk.ClassBuilder);
702
733
 
703
734
  smalltalk.addMethod(
704
- unescape('_instanceVariableNamesFor_'),
735
+ "_copyClass_named_",
736
+ smalltalk.method({
737
+ selector: "copyClass:named:",
738
+ category: 'private',
739
+ fn: function (aClass, aString){
740
+ var self=this;
741
+ var newClass=nil;
742
+ (newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [smalltalk.send(aClass, "_superclass", []), aString, smalltalk.send(aClass, "_instanceVariableNames", []), smalltalk.send(smalltalk.send(aClass, "_package", []), "_name", [])]));
743
+ smalltalk.send(self, "_setupClass_", [newClass]);
744
+ 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", [])]);})]);
745
+ 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", [])]);})]);
746
+ smalltalk.send(self, "_setupClass_", [newClass]);
747
+ return newClass;
748
+ return self;},
749
+ args: ["aClass", "aString"],
750
+ source: "copyClass: aClass named: aString\x0a\x09| newClass |\x0a\x0a\x09newClass := self \x0a\x09\x09addSubclassOf: aClass superclass\x0a\x09\x09named: aString \x0a\x09\x09instanceVariableNames: aClass instanceVariableNames \x0a\x09\x09package: aClass package name.\x0a\x0a\x09self setupClass: newClass.\x0a\x0a\x09aClass methodDictionary values do: [:each |\x0a\x09\x09Compiler new install: each source forClass: newClass category: each category].\x0a\x0a\x09aClass class methodDictionary values do: [:each |\x0a\x09\x09Compiler new install: each source forClass: newClass class category: each category].\x0a\x0a\x09self setupClass: newClass.\x0a\x09^newClass",
751
+ messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "superclass", "instanceVariableNames", "name", "package", "setupClass:", "do:", "values", "methodDictionary", "install:forClass:category:", "new", "source", "category", "class"],
752
+ referencedClasses: ["Compiler"]
753
+ }),
754
+ smalltalk.ClassBuilder);
755
+
756
+ smalltalk.addMethod(
757
+ "_instanceVariableNamesFor_",
705
758
  smalltalk.method({
706
- selector: unescape('instanceVariableNamesFor%3A'),
759
+ selector: "instanceVariableNamesFor:",
707
760
  category: 'private',
708
761
  fn: function (aString){
709
762
  var self=this;
710
763
  return smalltalk.send(smalltalk.send(aString, "_tokenize_", [" "]), "_reject_", [(function(each){return smalltalk.send(each, "_isEmpty", []);})]);
711
764
  return self;},
712
765
  args: ["aString"],
713
- source: unescape('instanceVariableNamesFor%3A%20aString%0A%09%5E%28aString%20tokenize%3A%20%27%20%27%29%20reject%3A%20%5B%3Aeach%20%7C%20each%20isEmpty%5D'),
766
+ source: "instanceVariableNamesFor: aString\x0a\x09^(aString tokenize: ' ') reject: [:each | each isEmpty]",
714
767
  messageSends: ["reject:", "tokenize:", "isEmpty"],
715
768
  referencedClasses: []
716
769
  }),
717
770
  smalltalk.ClassBuilder);
718
771
 
719
772
  smalltalk.addMethod(
720
- unescape('_addSubclassOf_named_instanceVariableNames_'),
773
+ "_setupClass_",
721
774
  smalltalk.method({
722
- selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3A'),
775
+ selector: "setupClass:",
723
776
  category: 'private',
724
- fn: function (aClass, aString, aCollection){
777
+ fn: function (aClass){
725
778
  var self=this;
726
- smalltalk.addClass(aString, aClass, aCollection);
727
- return smalltalk[aString];
779
+ smalltalk.init(aClass);;
728
780
  return self;},
729
- args: ["aClass", "aString", "aCollection"],
730
- source: unescape('addSubclassOf%3A%20aClass%20named%3A%20aString%20instanceVariableNames%3A%20aCollection%0A%09%3Csmalltalk.addClass%28aString%2C%20aClass%2C%20aCollection%29%3B%0A%09%20%20%20%20return%20smalltalk%5BaString%5D%3E'),
781
+ args: ["aClass"],
782
+ source: "setupClass: aClass\x0a\x09<smalltalk.init(aClass);>",
731
783
  messageSends: [],
732
784
  referencedClasses: []
733
785
  }),
734
786
  smalltalk.ClassBuilder);
735
787
 
736
788
  smalltalk.addMethod(
737
- unescape('_setupClass_'),
789
+ "_superclass_subclass_",
738
790
  smalltalk.method({
739
- selector: unescape('setupClass%3A'),
740
- category: 'private',
741
- fn: function (aClass){
791
+ selector: "superclass:subclass:",
792
+ category: 'class creation',
793
+ fn: function (aClass, aString){
742
794
  var self=this;
743
- smalltalk.init(aClass);;
795
+ return smalltalk.send(self, "_superclass_subclass_instanceVariableNames_package_", [aClass, aString, "", nil]);
744
796
  return self;},
745
- args: ["aClass"],
746
- source: unescape('setupClass%3A%20aClass%0A%09%3Csmalltalk.init%28aClass%29%3B%3E'),
747
- messageSends: [],
797
+ args: ["aClass", "aString"],
798
+ source: "superclass: aClass subclass: aString\x0a\x09^self superclass: aClass subclass: aString instanceVariableNames: '' package: nil",
799
+ messageSends: ["superclass:subclass:instanceVariableNames:package:"],
748
800
  referencedClasses: []
749
801
  }),
750
802
  smalltalk.ClassBuilder);
751
803
 
752
804
  smalltalk.addMethod(
753
- unescape('_superclass_subclass_instanceVariableNames_package_'),
805
+ "_superclass_subclass_instanceVariableNames_package_",
754
806
  smalltalk.method({
755
- selector: unescape('superclass%3Asubclass%3AinstanceVariableNames%3Apackage%3A'),
807
+ selector: "superclass:subclass:instanceVariableNames:package:",
756
808
  category: 'class creation',
757
809
  fn: function (aClass, aString, aString2, aString3){
758
810
  var self=this;
@@ -762,195 +814,291 @@ smalltalk.send(self, "_setupClass_", [newClass]);
762
814
  return newClass;
763
815
  return self;},
764
816
  args: ["aClass", "aString", "aString2", "aString3"],
765
- source: unescape('superclass%3A%20aClass%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3%0A%09%7C%20newClass%20%7C%0A%09newClass%20%3A%3D%20self%20addSubclassOf%3A%20aClass%0A%09%09%09%09named%3A%20aString%20instanceVariableNames%3A%20%28self%20instanceVariableNamesFor%3A%20aString2%29%0A%09%09%09%09package%3A%20%28aString3%20ifNil%3A%20%5B%27unclassified%27%5D%29.%0A%09self%20setupClass%3A%20newClass.%0A%09%5EnewClass'),
817
+ source: "superclass: aClass subclass: aString instanceVariableNames: aString2 package: aString3\x0a\x09| newClass |\x0a\x09newClass := self addSubclassOf: aClass\x0a\x09\x09\x09\x09named: aString instanceVariableNames: (self instanceVariableNamesFor: aString2)\x0a\x09\x09\x09\x09package: (aString3 ifNil: ['unclassified']).\x0a\x09self setupClass: newClass.\x0a\x09^newClass",
766
818
  messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "instanceVariableNamesFor:", "ifNil:", "setupClass:"],
767
819
  referencedClasses: []
768
820
  }),
769
821
  smalltalk.ClassBuilder);
770
822
 
823
+
824
+
825
+ smalltalk.addClass('ClassCategoryReader', smalltalk.Object, ['class', 'category', 'chunkParser'], 'Kernel-Classes');
826
+ smalltalk.ClassCategoryReader.comment="ClassCategoryReader represents a mechanism for retrieving class descriptions stored on a file."
771
827
  smalltalk.addMethod(
772
- unescape('_addSubclassOf_named_instanceVariableNames_package_'),
828
+ "_class_category_",
773
829
  smalltalk.method({
774
- selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3Apackage%3A'),
775
- category: 'private',
776
- fn: function (aClass, aString, aCollection, packageName){
830
+ selector: "class:category:",
831
+ category: 'accessing',
832
+ fn: function (aClass, aString){
777
833
  var self=this;
778
- smalltalk.addClass(aString, aClass, aCollection, packageName);
779
- return smalltalk[aString];
834
+ (self['@class']=aClass);
835
+ (self['@category']=aString);
780
836
  return self;},
781
- args: ["aClass", "aString", "aCollection", "packageName"],
782
- source: unescape('addSubclassOf%3A%20aClass%20named%3A%20aString%20instanceVariableNames%3A%20aCollection%20package%3A%20packageName%0A%09%3Csmalltalk.addClass%28aString%2C%20aClass%2C%20aCollection%2C%20packageName%29%3B%0A%09%20%20%20%20return%20smalltalk%5BaString%5D%3E'),
837
+ args: ["aClass", "aString"],
838
+ source: "class: aClass category: aString\x0a\x09class := aClass.\x0a\x09category := aString",
783
839
  messageSends: [],
784
840
  referencedClasses: []
785
841
  }),
786
- smalltalk.ClassBuilder);
842
+ smalltalk.ClassCategoryReader);
787
843
 
788
844
  smalltalk.addMethod(
789
- unescape('_copyClass_named_'),
845
+ "_compileMethod_",
790
846
  smalltalk.method({
791
- selector: unescape('copyClass%3Anamed%3A'),
847
+ selector: "compileMethod:",
792
848
  category: 'private',
793
- fn: function (aClass, aString){
849
+ fn: function (aString){
794
850
  var self=this;
795
- var newClass=nil;
796
- (newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [smalltalk.send(aClass, "_superclass", []), aString, smalltalk.send(aClass, "_instanceVariableNames", []), smalltalk.send(smalltalk.send(aClass, "_package", []), "_name", [])]));
797
- smalltalk.send(self, "_setupClass_", [newClass]);
798
- smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_do_", [(function(each){smalltalk.send(newClass, "_addCompiledMethod_", [smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [smalltalk.send(each, "_source", []), newClass])]);return smalltalk.send(smalltalk.send(smalltalk.send(newClass, "_methodDictionary", []), "_at_", [smalltalk.send(each, "_selector", [])]), "_category_", [smalltalk.send(each, "_category", [])]);})]);
799
- smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_methodDictionary", []), "_values", []), "_do_", [(function(each){smalltalk.send(smalltalk.send(newClass, "_class", []), "_addCompiledMethod_", [smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [smalltalk.send(each, "_source", []), smalltalk.send(newClass, "_class", [])])]);return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(newClass, "_class", []), "_methodDictionary", []), "_at_", [smalltalk.send(each, "_selector", [])]), "_category_", [smalltalk.send(each, "_category", [])]);})]);
800
- smalltalk.send(self, "_setupClass_", [newClass]);
801
- return newClass;
851
+ smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_install_forClass_category_", [aString, self['@class'], self['@category']]);
802
852
  return self;},
803
- args: ["aClass", "aString"],
804
- source: unescape('copyClass%3A%20aClass%20named%3A%20aString%0A%09%7C%20newClass%20%7C%0A%0A%09newClass%20%3A%3D%20self%20%0A%09%09addSubclassOf%3A%20aClass%20superclass%0A%09%09named%3A%20aString%20%0A%09%09instanceVariableNames%3A%20aClass%20instanceVariableNames%20%0A%09%09package%3A%20aClass%20package%20name.%0A%0A%09self%20setupClass%3A%20newClass.%0A%0A%09aClass%20methodDictionary%20values%20do%3A%20%5B%3Aeach%20%7C%0A%09%09newClass%20addCompiledMethod%3A%20%28Compiler%20new%20load%3A%20each%20source%20forClass%3A%20newClass%29.%0A%09%09%28newClass%20methodDictionary%20at%3A%20each%20selector%29%20category%3A%20each%20category%5D.%0A%0A%09aClass%20class%20methodDictionary%20values%20do%3A%20%5B%3Aeach%20%7C%0A%09%09newClass%20class%20addCompiledMethod%3A%20%28Compiler%20new%20load%3A%20each%20source%20forClass%3A%20newClass%20class%29.%0A%09%09%28newClass%20class%20methodDictionary%20at%3A%20each%20selector%29%20category%3A%20each%20category%5D.%0A%0A%09self%20setupClass%3A%20newClass.%0A%09%5EnewClass'),
805
- messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "superclass", "instanceVariableNames", "name", "package", "setupClass:", "do:", "values", "methodDictionary", "addCompiledMethod:", "load:forClass:", "new", "source", "category:", "at:", "selector", "category", "class"],
853
+ args: ["aString"],
854
+ source: "compileMethod: aString\x0a\x09Compiler new install: aString forClass: class category: category",
855
+ messageSends: ["install:forClass:category:", "new"],
806
856
  referencedClasses: ["Compiler"]
807
857
  }),
808
- smalltalk.ClassBuilder);
809
-
810
-
858
+ smalltalk.ClassCategoryReader);
811
859
 
812
- smalltalk.addClass('ClassCategoryReader', smalltalk.Object, ['class', 'category', 'chunkParser'], 'Kernel-Classes');
813
- smalltalk.ClassCategoryReader.comment=unescape('ClassCategoryReader%20represents%20a%20mechanism%20for%20retrieving%20class%20descriptions%20stored%20on%20a%20file.')
814
860
  smalltalk.addMethod(
815
- unescape('_initialize'),
861
+ "_initialize",
816
862
  smalltalk.method({
817
- selector: unescape('initialize'),
863
+ selector: "initialize",
818
864
  category: 'initialization',
819
865
  fn: function (){
820
866
  var self=this;
821
- smalltalk.send(self, "_initialize", [], smalltalk.Object);
867
+ smalltalk.send(self, "_initialize", [], smalltalk.ClassCategoryReader.superclass || nil);
822
868
  (self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []));
823
869
  return self;},
824
870
  args: [],
825
- source: unescape('initialize%0A%09super%20initialize.%0A%09chunkParser%20%3A%3D%20ChunkParser%20new.'),
871
+ source: "initialize\x0a\x09super initialize.\x0a\x09chunkParser := ChunkParser new.",
826
872
  messageSends: ["initialize", "new"],
827
873
  referencedClasses: ["ChunkParser"]
828
874
  }),
829
875
  smalltalk.ClassCategoryReader);
830
876
 
831
877
  smalltalk.addMethod(
832
- unescape('_class_category_'),
878
+ "_scanFrom_",
833
879
  smalltalk.method({
834
- selector: unescape('class%3Acategory%3A'),
880
+ selector: "scanFrom:",
881
+ category: 'fileIn',
882
+ fn: function (aChunkParser){
883
+ var self=this;
884
+ var chunk=nil;
885
+ (function(){while(!(function(){(chunk=smalltalk.send(aChunkParser, "_nextChunk", []));return smalltalk.send(chunk, "_isEmpty", []);})()) {(function(){return smalltalk.send(self, "_compileMethod_", [chunk]);})()}})();
886
+ smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_setupClass_", [self['@class']]);
887
+ return self;},
888
+ args: ["aChunkParser"],
889
+ source: "scanFrom: aChunkParser\x0a\x09| chunk |\x0a\x09[chunk := aChunkParser nextChunk.\x0a\x09chunk isEmpty] whileFalse: [\x0a\x09 self compileMethod: chunk].\x0a\x09Compiler new setupClass: class",
890
+ messageSends: ["whileFalse:", "nextChunk", "isEmpty", "compileMethod:", "setupClass:", "new"],
891
+ referencedClasses: ["Compiler"]
892
+ }),
893
+ smalltalk.ClassCategoryReader);
894
+
895
+
896
+
897
+ smalltalk.addClass('ClassCommentReader', smalltalk.Object, ['class', 'chunkParser'], 'Kernel-Classes');
898
+ smalltalk.ClassCommentReader.comment="ClassCommentReader represents a mechanism for retrieving class descriptions stored on a file.\x0aSee `ClassCategoryReader` too."
899
+ smalltalk.addMethod(
900
+ "_class_",
901
+ smalltalk.method({
902
+ selector: "class:",
835
903
  category: 'accessing',
836
- fn: function (aClass, aString){
904
+ fn: function (aClass){
837
905
  var self=this;
838
906
  (self['@class']=aClass);
839
- (self['@category']=aString);
840
907
  return self;},
841
- args: ["aClass", "aString"],
842
- source: unescape('class%3A%20aClass%20category%3A%20aString%0A%09class%20%3A%3D%20aClass.%0A%09category%20%3A%3D%20aString'),
908
+ args: ["aClass"],
909
+ source: "class: aClass\x0a\x09class := aClass",
843
910
  messageSends: [],
844
911
  referencedClasses: []
845
912
  }),
846
- smalltalk.ClassCategoryReader);
913
+ smalltalk.ClassCommentReader);
914
+
915
+ smalltalk.addMethod(
916
+ "_initialize",
917
+ smalltalk.method({
918
+ selector: "initialize",
919
+ category: 'initialization',
920
+ fn: function (){
921
+ var self=this;
922
+ smalltalk.send(self, "_initialize", [], smalltalk.ClassCommentReader.superclass || nil);
923
+ (self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []));
924
+ return self;},
925
+ args: [],
926
+ source: "initialize\x0a\x09super initialize.\x0a\x09chunkParser := ChunkParser new.",
927
+ messageSends: ["initialize", "new"],
928
+ referencedClasses: ["ChunkParser"]
929
+ }),
930
+ smalltalk.ClassCommentReader);
847
931
 
848
932
  smalltalk.addMethod(
849
- unescape('_scanFrom_'),
933
+ "_scanFrom_",
850
934
  smalltalk.method({
851
- selector: unescape('scanFrom%3A'),
935
+ selector: "scanFrom:",
852
936
  category: 'fileIn',
853
937
  fn: function (aChunkParser){
854
938
  var self=this;
855
939
  var chunk=nil;
856
- (function(){while(!(function(){(chunk=smalltalk.send(aChunkParser, "_nextChunk", []));return smalltalk.send(chunk, "_isEmpty", []);})()) {(function(){return smalltalk.send(self, "_compileMethod_", [chunk]);})()}})();
940
+ (chunk=smalltalk.send(aChunkParser, "_nextChunk", []));
941
+ ((($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]);})]));
857
942
  return self;},
858
943
  args: ["aChunkParser"],
859
- source: unescape('scanFrom%3A%20aChunkParser%0A%09%7C%20chunk%20%7C%0A%09%5Bchunk%20%3A%3D%20aChunkParser%20nextChunk.%0A%09chunk%20isEmpty%5D%20whileFalse%3A%20%5B%0A%09%20%20%20%20self%20compileMethod%3A%20chunk%5D'),
860
- messageSends: ["whileFalse:", "nextChunk", "isEmpty", "compileMethod:"],
944
+ source: "scanFrom: aChunkParser\x0a\x09| chunk |\x0a\x09chunk := aChunkParser nextChunk.\x0a\x09chunk isEmpty ifFalse: [\x0a\x09 self setComment: chunk].",
945
+ messageSends: ["nextChunk", "ifFalse:", "isEmpty", "setComment:"],
861
946
  referencedClasses: []
862
947
  }),
863
- smalltalk.ClassCategoryReader);
948
+ smalltalk.ClassCommentReader);
864
949
 
865
950
  smalltalk.addMethod(
866
- unescape('_compileMethod_'),
951
+ "_setComment_",
867
952
  smalltalk.method({
868
- selector: unescape('compileMethod%3A'),
953
+ selector: "setComment:",
869
954
  category: 'private',
870
955
  fn: function (aString){
871
956
  var self=this;
872
- var method=nil;
873
- (method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self['@class']]));
874
- smalltalk.send(method, "_category_", [self['@category']]);
875
- smalltalk.send(self['@class'], "_addCompiledMethod_", [method]);
957
+ smalltalk.send(self['@class'], "_comment_", [aString]);
876
958
  return self;},
877
959
  args: ["aString"],
878
- source: unescape('compileMethod%3A%20aString%0A%09%7C%20method%20%7C%0A%09method%20%3A%3D%20Compiler%20new%20load%3A%20aString%20forClass%3A%20class.%0A%09method%20category%3A%20category.%0A%09class%20addCompiledMethod%3A%20method'),
879
- messageSends: ["load:forClass:", "new", "category:", "addCompiledMethod:"],
880
- referencedClasses: ["Compiler"]
960
+ source: "setComment: aString\x0a class comment: aString",
961
+ messageSends: ["comment:"],
962
+ referencedClasses: []
881
963
  }),
882
- smalltalk.ClassCategoryReader);
964
+ smalltalk.ClassCommentReader);
883
965
 
884
966
 
885
967
 
886
- smalltalk.addClass('ClassCommentReader', smalltalk.Object, ['class', 'chunkParser'], 'Kernel-Classes');
887
- smalltalk.ClassCommentReader.comment=unescape('ClassCommentReader%20represents%20a%20mechanism%20for%20retrieving%20class%20descriptions%20stored%20on%20a%20file.%0ASee%20%60ClassCategoryReader%60%20too.')
968
+ smalltalk.addClass('ClassSorterNode', smalltalk.Object, ['theClass', 'level', 'nodes'], 'Kernel-Classes');
888
969
  smalltalk.addMethod(
889
- unescape('_class_'),
970
+ "_getNodesFrom_",
890
971
  smalltalk.method({
891
- selector: unescape('class%3A'),
972
+ selector: "getNodesFrom:",
892
973
  category: 'accessing',
893
- fn: function (aClass){
974
+ fn: function (aCollection){
894
975
  var self=this;
895
- (self['@class']=aClass);
976
+ var children=nil;
977
+ var others=nil;
978
+ (children=[]);
979
+ (others=[]);
980
+ 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]);})]));})]);
981
+ (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)]))]);})]));
896
982
  return self;},
897
- args: ["aClass"],
898
- source: unescape('class%3A%20aClass%0A%09class%20%3A%3D%20aClass'),
983
+ args: ["aCollection"],
984
+ source: "getNodesFrom: aCollection\x0a\x09| children others |\x0a\x09children := #().\x0a\x09others := #().\x0a\x09aCollection do: [:each |\x0a\x09\x09(each superclass = self theClass)\x0a\x09\x09\x09ifTrue: [children add: each]\x0a\x09\x09\x09ifFalse: [others add: each]].\x0a\x09nodes:= children collect: [:each |\x0a\x09\x09ClassSorterNode on: each classes: others level: self level + 1]",
985
+ messageSends: ["do:", "ifTrue:ifFalse:", "=", "superclass", "theClass", "add:", "collect:", "on:classes:level:", "+", "level"],
986
+ referencedClasses: ["ClassSorterNode"]
987
+ }),
988
+ smalltalk.ClassSorterNode);
989
+
990
+ smalltalk.addMethod(
991
+ "_level",
992
+ smalltalk.method({
993
+ selector: "level",
994
+ category: 'accessing',
995
+ fn: function (){
996
+ var self=this;
997
+ return self['@level'];
998
+ return self;},
999
+ args: [],
1000
+ source: "level\x0a\x09^level",
899
1001
  messageSends: [],
900
1002
  referencedClasses: []
901
1003
  }),
902
- smalltalk.ClassCommentReader);
1004
+ smalltalk.ClassSorterNode);
903
1005
 
904
1006
  smalltalk.addMethod(
905
- unescape('_scanFrom_'),
1007
+ "_level_",
906
1008
  smalltalk.method({
907
- selector: unescape('scanFrom%3A'),
908
- category: 'fileIn',
909
- fn: function (aChunkParser){
1009
+ selector: "level:",
1010
+ category: 'accessing',
1011
+ fn: function (anInteger){
910
1012
  var self=this;
911
- var chunk=nil;
912
- (chunk=smalltalk.send(aChunkParser, "_nextChunk", []));
913
- ((($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]);})]));
1013
+ (self['@level']=anInteger);
914
1014
  return self;},
915
- args: ["aChunkParser"],
916
- source: unescape('scanFrom%3A%20aChunkParser%0A%09%7C%20chunk%20%7C%0A%09chunk%20%3A%3D%20aChunkParser%20nextChunk.%0A%09chunk%20isEmpty%20ifFalse%3A%20%5B%0A%09%20%20%20%20self%20setComment%3A%20chunk%5D.'),
917
- messageSends: ["nextChunk", "ifFalse:", "isEmpty", "setComment:"],
1015
+ args: ["anInteger"],
1016
+ source: "level: anInteger\x0a\x09level := anInteger",
1017
+ messageSends: [],
918
1018
  referencedClasses: []
919
1019
  }),
920
- smalltalk.ClassCommentReader);
1020
+ smalltalk.ClassSorterNode);
921
1021
 
922
1022
  smalltalk.addMethod(
923
- unescape('_initialize'),
1023
+ "_nodes",
924
1024
  smalltalk.method({
925
- selector: unescape('initialize'),
926
- category: 'initialization',
1025
+ selector: "nodes",
1026
+ category: 'accessing',
927
1027
  fn: function (){
928
1028
  var self=this;
929
- smalltalk.send(self, "_initialize", [], smalltalk.Object);
930
- (self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []));
1029
+ return self['@nodes'];
931
1030
  return self;},
932
1031
  args: [],
933
- source: unescape('initialize%0A%09super%20initialize.%0A%09chunkParser%20%3A%3D%20ChunkParser%20new.'),
934
- messageSends: ["initialize", "new"],
935
- referencedClasses: ["ChunkParser"]
1032
+ source: "nodes\x0a\x09^nodes",
1033
+ messageSends: [],
1034
+ referencedClasses: []
936
1035
  }),
937
- smalltalk.ClassCommentReader);
1036
+ smalltalk.ClassSorterNode);
938
1037
 
939
1038
  smalltalk.addMethod(
940
- unescape('_setComment_'),
1039
+ "_theClass",
941
1040
  smalltalk.method({
942
- selector: unescape('setComment%3A'),
943
- category: 'private',
944
- fn: function (aString){
1041
+ selector: "theClass",
1042
+ category: 'accessing',
1043
+ fn: function (){
945
1044
  var self=this;
946
- smalltalk.send(self['@class'], "_comment_", [aString]);
1045
+ return self['@theClass'];
947
1046
  return self;},
948
- args: ["aString"],
949
- source: unescape('setComment%3A%20aString%0A%20%20%20%20class%20comment%3A%20aString'),
950
- messageSends: ["comment:"],
1047
+ args: [],
1048
+ source: "theClass\x0a\x09^theClass",
1049
+ messageSends: [],
951
1050
  referencedClasses: []
952
1051
  }),
953
- smalltalk.ClassCommentReader);
1052
+ smalltalk.ClassSorterNode);
1053
+
1054
+ smalltalk.addMethod(
1055
+ "_theClass_",
1056
+ smalltalk.method({
1057
+ selector: "theClass:",
1058
+ category: 'accessing',
1059
+ fn: function (aClass){
1060
+ var self=this;
1061
+ (self['@theClass']=aClass);
1062
+ return self;},
1063
+ args: ["aClass"],
1064
+ source: "theClass: aClass\x0a\x09theClass := aClass",
1065
+ messageSends: [],
1066
+ referencedClasses: []
1067
+ }),
1068
+ smalltalk.ClassSorterNode);
1069
+
1070
+ smalltalk.addMethod(
1071
+ "_traverseClassesWith_",
1072
+ smalltalk.method({
1073
+ selector: "traverseClassesWith:",
1074
+ category: 'visiting',
1075
+ fn: function (aCollection){
1076
+ var self=this;
1077
+ smalltalk.send(aCollection, "_add_", [smalltalk.send(self, "_theClass", [])]);
1078
+ 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]);})]);
1079
+ return self;},
1080
+ args: ["aCollection"],
1081
+ source: "traverseClassesWith: aCollection\x0a\x09\x22sort classes alphabetically Issue #143\x22\x0a\x0a\x09aCollection add: self theClass.\x0a\x09(self nodes sorted: [:a :b | a theClass name <= b theClass name ]) do: [:aNode |\x0a\x09\x09aNode traverseClassesWith: aCollection ].",
1082
+ messageSends: ["add:", "theClass", "do:", "sorted:", "nodes", "<=", "name", "traverseClassesWith:"],
1083
+ referencedClasses: []
1084
+ }),
1085
+ smalltalk.ClassSorterNode);
1086
+
954
1087
 
1088
+ smalltalk.addMethod(
1089
+ "_on_classes_level_",
1090
+ smalltalk.method({
1091
+ selector: "on:classes:level:",
1092
+ category: 'instance creation',
1093
+ fn: function (aClass, aCollection, anInteger){
1094
+ var self=this;
1095
+ 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", []));
1096
+ return self;},
1097
+ args: ["aClass", "aCollection", "anInteger"],
1098
+ source: "on: aClass classes: aCollection level: anInteger\x0a\x09^self new\x0a\x09\x09theClass: aClass;\x0a\x09\x09level: anInteger;\x0a\x09\x09getNodesFrom: aCollection;\x0a\x09\x09yourself",
1099
+ messageSends: ["theClass:", "level:", "getNodesFrom:", "yourself", "new"],
1100
+ referencedClasses: []
1101
+ }),
1102
+ smalltalk.ClassSorterNode.klass);
955
1103
 
956
1104