resin 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
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,9 +1,9 @@
1
1
  smalltalk.addPackage('Kernel-Announcements', {});
2
2
  smalltalk.addClass('AnnouncementSubscription', smalltalk.Object, ['block', 'announcementClass'], 'Kernel-Announcements');
3
3
  smalltalk.addMethod(
4
- unescape('_announcementClass'),
4
+ "_announcementClass",
5
5
  smalltalk.method({
6
- selector: unescape('announcementClass'),
6
+ selector: "announcementClass",
7
7
  fn: function (){
8
8
  var self=this;
9
9
  return self['@announcementClass'];
@@ -12,9 +12,9 @@ return self;}
12
12
  smalltalk.AnnouncementSubscription);
13
13
 
14
14
  smalltalk.addMethod(
15
- unescape('_announcementClass_'),
15
+ "_announcementClass_",
16
16
  smalltalk.method({
17
- selector: unescape('announcementClass%3A'),
17
+ selector: "announcementClass:",
18
18
  fn: function (aClass){
19
19
  var self=this;
20
20
  (self['@announcementClass']=aClass);
@@ -23,9 +23,9 @@ return self;}
23
23
  smalltalk.AnnouncementSubscription);
24
24
 
25
25
  smalltalk.addMethod(
26
- unescape('_block'),
26
+ "_block",
27
27
  smalltalk.method({
28
- selector: unescape('block'),
28
+ selector: "block",
29
29
  fn: function (){
30
30
  var self=this;
31
31
  return self['@block'];
@@ -34,9 +34,9 @@ return self;}
34
34
  smalltalk.AnnouncementSubscription);
35
35
 
36
36
  smalltalk.addMethod(
37
- unescape('_block_'),
37
+ "_block_",
38
38
  smalltalk.method({
39
- selector: unescape('block%3A'),
39
+ selector: "block:",
40
40
  fn: function (aBlock){
41
41
  var self=this;
42
42
  (self['@block']=aBlock);
@@ -45,9 +45,9 @@ return self;}
45
45
  smalltalk.AnnouncementSubscription);
46
46
 
47
47
  smalltalk.addMethod(
48
- unescape('_deliver_'),
48
+ "_deliver_",
49
49
  smalltalk.method({
50
- selector: unescape('deliver%3A'),
50
+ selector: "deliver:",
51
51
  fn: function (anAnnouncement){
52
52
  var self=this;
53
53
  ((($receiver = smalltalk.send(self, "_handlesAnnouncement_", [anAnnouncement])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_block", []), "_value_", [anAnnouncement]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(smalltalk.send(self, "_block", []), "_value_", [anAnnouncement]);})]));
@@ -56,9 +56,9 @@ return self;}
56
56
  smalltalk.AnnouncementSubscription);
57
57
 
58
58
  smalltalk.addMethod(
59
- unescape('_handlesAnnouncement_'),
59
+ "_handlesAnnouncement_",
60
60
  smalltalk.method({
61
- selector: unescape('handlesAnnouncement%3A'),
61
+ selector: "handlesAnnouncement:",
62
62
  fn: function (anAnnouncement){
63
63
  var self=this;
64
64
  return smalltalk.send(anAnnouncement, "_isKindOf_", [smalltalk.send(self, "_announcementClass", [])]);
@@ -70,9 +70,9 @@ smalltalk.AnnouncementSubscription);
70
70
 
71
71
  smalltalk.addClass('Announcer', smalltalk.Object, ['registry', 'subscriptions'], 'Kernel-Announcements');
72
72
  smalltalk.addMethod(
73
- unescape('_announce_'),
73
+ "_announce_",
74
74
  smalltalk.method({
75
- selector: unescape('announce%3A'),
75
+ selector: "announce:",
76
76
  fn: function (anAnnouncement){
77
77
  var self=this;
78
78
  smalltalk.send(self['@subscriptions'], "_do_", [(function(each){return smalltalk.send(each, "_deliver_", [anAnnouncement]);})]);
@@ -81,21 +81,21 @@ return self;}
81
81
  smalltalk.Announcer);
82
82
 
83
83
  smalltalk.addMethod(
84
- unescape('_initialize'),
84
+ "_initialize",
85
85
  smalltalk.method({
86
- selector: unescape('initialize'),
86
+ selector: "initialize",
87
87
  fn: function (){
88
88
  var self=this;
89
- smalltalk.send(self, "_initialize", [], smalltalk.Object);
89
+ smalltalk.send(self, "_initialize", [], smalltalk.Announcer.superclass || nil);
90
90
  (self['@subscriptions']=smalltalk.send((smalltalk.Array || Array), "_new", []));
91
91
  return self;}
92
92
  }),
93
93
  smalltalk.Announcer);
94
94
 
95
95
  smalltalk.addMethod(
96
- unescape('_on_do_'),
96
+ "_on_do_",
97
97
  smalltalk.method({
98
- selector: unescape('on%3Ado%3A'),
98
+ selector: "on:do:",
99
99
  fn: function (aClass, aBlock){
100
100
  var self=this;
101
101
  smalltalk.send(self['@subscriptions'], "_add_", [(function($rec){smalltalk.send($rec, "_block_", [aBlock]);smalltalk.send($rec, "_announcementClass_", [aClass]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.AnnouncementSubscription || AnnouncementSubscription), "_new", []))]);
@@ -1,96 +1,96 @@
1
1
  smalltalk.addPackage('Kernel-Announcements', {});
2
2
  smalltalk.addClass('AnnouncementSubscription', smalltalk.Object, ['block', 'announcementClass'], 'Kernel-Announcements');
3
3
  smalltalk.addMethod(
4
- unescape('_announcementClass'),
4
+ "_announcementClass",
5
5
  smalltalk.method({
6
- selector: unescape('announcementClass'),
6
+ selector: "announcementClass",
7
7
  category: 'accessing',
8
8
  fn: function (){
9
9
  var self=this;
10
10
  return self['@announcementClass'];
11
11
  return self;},
12
12
  args: [],
13
- source: unescape('announcementClass%0A%09%5EannouncementClass'),
13
+ source: "announcementClass\x0a\x09^announcementClass",
14
14
  messageSends: [],
15
15
  referencedClasses: []
16
16
  }),
17
17
  smalltalk.AnnouncementSubscription);
18
18
 
19
19
  smalltalk.addMethod(
20
- unescape('_announcementClass_'),
20
+ "_announcementClass_",
21
21
  smalltalk.method({
22
- selector: unescape('announcementClass%3A'),
22
+ selector: "announcementClass:",
23
23
  category: 'accessing',
24
24
  fn: function (aClass){
25
25
  var self=this;
26
26
  (self['@announcementClass']=aClass);
27
27
  return self;},
28
28
  args: ["aClass"],
29
- source: unescape('announcementClass%3A%20aClass%0A%09announcementClass%20%3A%3D%20aClass'),
29
+ source: "announcementClass: aClass\x0a\x09announcementClass := aClass",
30
30
  messageSends: [],
31
31
  referencedClasses: []
32
32
  }),
33
33
  smalltalk.AnnouncementSubscription);
34
34
 
35
35
  smalltalk.addMethod(
36
- unescape('_block'),
36
+ "_block",
37
37
  smalltalk.method({
38
- selector: unescape('block'),
38
+ selector: "block",
39
39
  category: 'accessing',
40
40
  fn: function (){
41
41
  var self=this;
42
42
  return self['@block'];
43
43
  return self;},
44
44
  args: [],
45
- source: unescape('block%0A%09%5Eblock'),
45
+ source: "block\x0a\x09^block",
46
46
  messageSends: [],
47
47
  referencedClasses: []
48
48
  }),
49
49
  smalltalk.AnnouncementSubscription);
50
50
 
51
51
  smalltalk.addMethod(
52
- unescape('_block_'),
52
+ "_block_",
53
53
  smalltalk.method({
54
- selector: unescape('block%3A'),
54
+ selector: "block:",
55
55
  category: 'accessing',
56
56
  fn: function (aBlock){
57
57
  var self=this;
58
58
  (self['@block']=aBlock);
59
59
  return self;},
60
60
  args: ["aBlock"],
61
- source: unescape('block%3A%20aBlock%0A%09block%20%3A%3D%20aBlock'),
61
+ source: "block: aBlock\x0a\x09block := aBlock",
62
62
  messageSends: [],
63
63
  referencedClasses: []
64
64
  }),
65
65
  smalltalk.AnnouncementSubscription);
66
66
 
67
67
  smalltalk.addMethod(
68
- unescape('_deliver_'),
68
+ "_deliver_",
69
69
  smalltalk.method({
70
- selector: unescape('deliver%3A'),
70
+ selector: "deliver:",
71
71
  category: 'announcing',
72
72
  fn: function (anAnnouncement){
73
73
  var self=this;
74
74
  ((($receiver = smalltalk.send(self, "_handlesAnnouncement_", [anAnnouncement])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_block", []), "_value_", [anAnnouncement]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(smalltalk.send(self, "_block", []), "_value_", [anAnnouncement]);})]));
75
75
  return self;},
76
76
  args: ["anAnnouncement"],
77
- source: unescape('deliver%3A%20anAnnouncement%0A%09%28self%20handlesAnnouncement%3A%20anAnnouncement%29%0A%09%09ifTrue%3A%20%5Bself%20block%20value%3A%20anAnnouncement%5D'),
77
+ source: "deliver: anAnnouncement\x0a\x09(self handlesAnnouncement: anAnnouncement)\x0a\x09\x09ifTrue: [self block value: anAnnouncement]",
78
78
  messageSends: ["ifTrue:", "handlesAnnouncement:", "value:", "block"],
79
79
  referencedClasses: []
80
80
  }),
81
81
  smalltalk.AnnouncementSubscription);
82
82
 
83
83
  smalltalk.addMethod(
84
- unescape('_handlesAnnouncement_'),
84
+ "_handlesAnnouncement_",
85
85
  smalltalk.method({
86
- selector: unescape('handlesAnnouncement%3A'),
86
+ selector: "handlesAnnouncement:",
87
87
  category: 'announcing',
88
88
  fn: function (anAnnouncement){
89
89
  var self=this;
90
90
  return smalltalk.send(anAnnouncement, "_isKindOf_", [smalltalk.send(self, "_announcementClass", [])]);
91
91
  return self;},
92
92
  args: ["anAnnouncement"],
93
- source: unescape('handlesAnnouncement%3A%20anAnnouncement%0A%09%5EanAnnouncement%20isKindOf%3A%20self%20announcementClass'),
93
+ source: "handlesAnnouncement: anAnnouncement\x0a\x09^anAnnouncement isKindOf: self announcementClass",
94
94
  messageSends: ["isKindOf:", "announcementClass"],
95
95
  referencedClasses: []
96
96
  }),
@@ -100,49 +100,49 @@ smalltalk.AnnouncementSubscription);
100
100
 
101
101
  smalltalk.addClass('Announcer', smalltalk.Object, ['registry', 'subscriptions'], 'Kernel-Announcements');
102
102
  smalltalk.addMethod(
103
- unescape('_announce_'),
103
+ "_announce_",
104
104
  smalltalk.method({
105
- selector: unescape('announce%3A'),
105
+ selector: "announce:",
106
106
  category: 'announcing',
107
107
  fn: function (anAnnouncement){
108
108
  var self=this;
109
109
  smalltalk.send(self['@subscriptions'], "_do_", [(function(each){return smalltalk.send(each, "_deliver_", [anAnnouncement]);})]);
110
110
  return self;},
111
111
  args: ["anAnnouncement"],
112
- source: unescape('announce%3A%20anAnnouncement%0A%09subscriptions%20do%3A%20%5B%3Aeach%20%7C%0A%09%09each%20deliver%3A%20anAnnouncement%5D'),
112
+ source: "announce: anAnnouncement\x0a\x09subscriptions do: [:each |\x0a\x09\x09each deliver: anAnnouncement]",
113
113
  messageSends: ["do:", "deliver:"],
114
114
  referencedClasses: []
115
115
  }),
116
116
  smalltalk.Announcer);
117
117
 
118
118
  smalltalk.addMethod(
119
- unescape('_initialize'),
119
+ "_initialize",
120
120
  smalltalk.method({
121
- selector: unescape('initialize'),
121
+ selector: "initialize",
122
122
  category: 'initialization',
123
123
  fn: function (){
124
124
  var self=this;
125
- smalltalk.send(self, "_initialize", [], smalltalk.Object);
125
+ smalltalk.send(self, "_initialize", [], smalltalk.Announcer.superclass || nil);
126
126
  (self['@subscriptions']=smalltalk.send((smalltalk.Array || Array), "_new", []));
127
127
  return self;},
128
128
  args: [],
129
- source: unescape('initialize%0A%09super%20initialize.%0A%09subscriptions%20%3A%3D%20Array%20new'),
129
+ source: "initialize\x0a\x09super initialize.\x0a\x09subscriptions := Array new",
130
130
  messageSends: ["initialize", "new"],
131
131
  referencedClasses: ["Array"]
132
132
  }),
133
133
  smalltalk.Announcer);
134
134
 
135
135
  smalltalk.addMethod(
136
- unescape('_on_do_'),
136
+ "_on_do_",
137
137
  smalltalk.method({
138
- selector: unescape('on%3Ado%3A'),
138
+ selector: "on:do:",
139
139
  category: 'subscribing',
140
140
  fn: function (aClass, aBlock){
141
141
  var self=this;
142
142
  smalltalk.send(self['@subscriptions'], "_add_", [(function($rec){smalltalk.send($rec, "_block_", [aBlock]);smalltalk.send($rec, "_announcementClass_", [aClass]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.AnnouncementSubscription || AnnouncementSubscription), "_new", []))]);
143
143
  return self;},
144
144
  args: ["aClass", "aBlock"],
145
- source: unescape('on%3A%20aClass%20do%3A%20aBlock%0A%09subscriptions%20add%3A%20%28AnnouncementSubscription%20new%0A%09%09block%3A%20aBlock%3B%0A%09%09announcementClass%3A%20aClass%3B%0A%09%09yourself%29'),
145
+ source: "on: aClass do: aBlock\x0a\x09subscriptions add: (AnnouncementSubscription new\x0a\x09\x09block: aBlock;\x0a\x09\x09announcementClass: aClass;\x0a\x09\x09yourself)",
146
146
  messageSends: ["add:", "block:", "announcementClass:", "yourself", "new"],
147
147
  referencedClasses: ["AnnouncementSubscription"]
148
148
  }),
@@ -1,140 +1,147 @@
1
1
  smalltalk.addPackage('Kernel-Classes', {});
2
2
  smalltalk.addClass('Behavior', smalltalk.Object, [], 'Kernel-Classes');
3
3
  smalltalk.addMethod(
4
- unescape('_new'),
4
+ "_addCompiledMethod_",
5
5
  smalltalk.method({
6
- selector: unescape('new'),
7
- fn: function (){
6
+ selector: "addCompiledMethod:",
7
+ fn: function (aMethod){
8
8
  var self=this;
9
- return smalltalk.send(smalltalk.send(self, "_basicNew", []), "_initialize", []);
9
+ smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self);
10
10
  return self;}
11
11
  }),
12
12
  smalltalk.Behavior);
13
13
 
14
14
  smalltalk.addMethod(
15
- unescape('_basicNew'),
15
+ "_allInstanceVariableNames",
16
16
  smalltalk.method({
17
- selector: unescape('basicNew'),
17
+ selector: "allInstanceVariableNames",
18
18
  fn: function (){
19
19
  var self=this;
20
- return new self.fn();
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;
23
+ return result;
21
24
  return self;}
22
25
  }),
23
26
  smalltalk.Behavior);
24
27
 
25
28
  smalltalk.addMethod(
26
- unescape('_name'),
29
+ "_allSubclasses",
27
30
  smalltalk.method({
28
- selector: unescape('name'),
31
+ selector: "allSubclasses",
29
32
  fn: function (){
30
33
  var self=this;
31
- return self.className || nil;
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", [])]);})]);
37
+ return result;
32
38
  return self;}
33
39
  }),
34
40
  smalltalk.Behavior);
35
41
 
36
42
  smalltalk.addMethod(
37
- unescape('_superclass'),
43
+ "_basicNew",
38
44
  smalltalk.method({
39
- selector: unescape('superclass'),
45
+ selector: "basicNew",
40
46
  fn: function (){
41
47
  var self=this;
42
- return self.superclass || nil;
48
+ return new self.fn();
43
49
  return self;}
44
50
  }),
45
51
  smalltalk.Behavior);
46
52
 
47
53
  smalltalk.addMethod(
48
- unescape('_subclasses'),
54
+ "_canUnderstand_",
49
55
  smalltalk.method({
50
- selector: unescape('subclasses'),
51
- fn: function (){
56
+ selector: "canUnderstand:",
57
+ fn: function (aSelector){
52
58
  var self=this;
53
- return smalltalk.subclasses(self);
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]);})]);})]);
54
60
  return self;}
55
61
  }),
56
62
  smalltalk.Behavior);
57
63
 
58
64
  smalltalk.addMethod(
59
- unescape('_allSubclasses'),
65
+ "_comment",
60
66
  smalltalk.method({
61
- selector: unescape('allSubclasses'),
67
+ selector: "comment",
62
68
  fn: function (){
63
69
  var self=this;
64
- var result=nil;
65
- (result=smalltalk.send(self, "_subclasses", []));
66
- smalltalk.send(smalltalk.send(self, "_subclasses", []), "_do_", [(function(each){return smalltalk.send(result, "_addAll_", [smalltalk.send(each, "_allSubclasses", [])]);})]);
67
- return result;
70
+ return (($receiver = smalltalk.send(self, "_basicAt_", ["comment"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
68
71
  return self;}
69
72
  }),
70
73
  smalltalk.Behavior);
71
74
 
72
75
  smalltalk.addMethod(
73
- unescape('_withAllSubclasses'),
76
+ "_comment_",
74
77
  smalltalk.method({
75
- selector: unescape('withAllSubclasses'),
76
- fn: function (){
78
+ selector: "comment:",
79
+ fn: function (aString){
77
80
  var self=this;
78
- return (function($rec){smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_allSubclasses", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Array || Array), "_with_", [self]));
81
+ smalltalk.send(self, "_basicAt_put_", ["comment", aString]);
79
82
  return self;}
80
83
  }),
81
84
  smalltalk.Behavior);
82
85
 
83
86
  smalltalk.addMethod(
84
- unescape('_prototype'),
87
+ "_commentStamp",
85
88
  smalltalk.method({
86
- selector: unescape('prototype'),
89
+ selector: "commentStamp",
87
90
  fn: function (){
88
91
  var self=this;
89
- return self.fn.prototype;
92
+ return (function($rec){smalltalk.send($rec, "_class_", [self]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCommentReader || ClassCommentReader), "_new", []));
90
93
  return self;}
91
94
  }),
92
95
  smalltalk.Behavior);
93
96
 
94
97
  smalltalk.addMethod(
95
- unescape('_methodDictionary'),
98
+ "_commentStamp_prior_",
96
99
  smalltalk.method({
97
- selector: unescape('methodDictionary'),
98
- fn: function (){
100
+ selector: "commentStamp:prior:",
101
+ fn: function (aStamp, prior){
99
102
  var self=this;
100
- var dict = smalltalk.HashedCollection._new();
101
- var methods = self.fn.prototype.methods;
102
- for(var i in methods) {
103
- if(methods[i].selector) {
104
- dict._at_put_(methods[i].selector, methods[i]);
105
- }
106
- };
107
- return dict;
103
+ return smalltalk.send(self, "_commentStamp", []);
108
104
  return self;}
109
105
  }),
110
106
  smalltalk.Behavior);
111
107
 
112
108
  smalltalk.addMethod(
113
- unescape('_methodsFor_'),
109
+ "_compile_",
114
110
  smalltalk.method({
115
- selector: unescape('methodsFor%3A'),
111
+ selector: "compile:",
116
112
  fn: function (aString){
117
113
  var self=this;
118
- return (function($rec){smalltalk.send($rec, "_class_category_", [self, aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCategoryReader || ClassCategoryReader), "_new", []));
114
+ smalltalk.send(self, "_compile_category_", [aString, ""]);
119
115
  return self;}
120
116
  }),
121
117
  smalltalk.Behavior);
122
118
 
123
119
  smalltalk.addMethod(
124
- unescape('_addCompiledMethod_'),
120
+ "_compile_category_",
125
121
  smalltalk.method({
126
- selector: unescape('addCompiledMethod%3A'),
127
- fn: function (aMethod){
122
+ selector: "compile:category:",
123
+ fn: function (aString, anotherString){
128
124
  var self=this;
129
- smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self);
125
+ (function($rec){smalltalk.send($rec, "_install_forClass_category_", [aString, self, anotherString]);return smalltalk.send($rec, "_setupClass_", [self]);})(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []));
130
126
  return self;}
131
127
  }),
132
128
  smalltalk.Behavior);
133
129
 
134
130
  smalltalk.addMethod(
135
- unescape('_instanceVariableNames'),
131
+ "_inheritsFrom_",
136
132
  smalltalk.method({
137
- selector: unescape('instanceVariableNames'),
133
+ selector: "inheritsFrom:",
134
+ fn: function (aClass){
135
+ var self=this;
136
+ return smalltalk.send(smalltalk.send(aClass, "_allSubclasses", []), "_includes_", [self]);
137
+ return self;}
138
+ }),
139
+ smalltalk.Behavior);
140
+
141
+ smalltalk.addMethod(
142
+ "_instanceVariableNames",
143
+ smalltalk.method({
144
+ selector: "instanceVariableNames",
138
145
  fn: function (){
139
146
  var self=this;
140
147
  return self.iVarNames;
@@ -143,66 +150,82 @@ return self;}
143
150
  smalltalk.Behavior);
144
151
 
145
152
  smalltalk.addMethod(
146
- unescape('_comment'),
153
+ "_methodAt_",
147
154
  smalltalk.method({
148
- selector: unescape('comment'),
155
+ selector: "methodAt:",
156
+ fn: function (aString){
157
+ var self=this;
158
+ return smalltalk.methods(self)[aString];
159
+ return self;}
160
+ }),
161
+ smalltalk.Behavior);
162
+
163
+ smalltalk.addMethod(
164
+ "_methodDictionary",
165
+ smalltalk.method({
166
+ selector: "methodDictionary",
149
167
  fn: function (){
150
168
  var self=this;
151
- return (($receiver = smalltalk.send(self, "_basicAt_", ["comment"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
169
+ var dict = smalltalk.HashedCollection._new();
170
+ var methods = self.fn.prototype.methods;
171
+ for(var i in methods) {
172
+ if(methods[i].selector) {
173
+ dict._at_put_(methods[i].selector, methods[i]);
174
+ }
175
+ };
176
+ return dict;
152
177
  return self;}
153
178
  }),
154
179
  smalltalk.Behavior);
155
180
 
156
181
  smalltalk.addMethod(
157
- unescape('_comment_'),
182
+ "_methodsFor_",
158
183
  smalltalk.method({
159
- selector: unescape('comment%3A'),
184
+ selector: "methodsFor:",
160
185
  fn: function (aString){
161
186
  var self=this;
162
- smalltalk.send(self, "_basicAt_put_", ["comment", aString]);
187
+ return (function($rec){smalltalk.send($rec, "_class_category_", [self, aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCategoryReader || ClassCategoryReader), "_new", []));
163
188
  return self;}
164
189
  }),
165
190
  smalltalk.Behavior);
166
191
 
167
192
  smalltalk.addMethod(
168
- unescape('_commentStamp'),
193
+ "_methodsFor_stamp_",
169
194
  smalltalk.method({
170
- selector: unescape('commentStamp'),
171
- fn: function (){
195
+ selector: "methodsFor:stamp:",
196
+ fn: function (aString, aStamp){
172
197
  var self=this;
173
- return (function($rec){smalltalk.send($rec, "_class_", [self]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCommentReader || ClassCommentReader), "_new", []));
198
+ return smalltalk.send(self, "_methodsFor_", [aString]);
174
199
  return self;}
175
200
  }),
176
201
  smalltalk.Behavior);
177
202
 
178
203
  smalltalk.addMethod(
179
- unescape('_removeCompiledMethod_'),
204
+ "_name",
180
205
  smalltalk.method({
181
- selector: unescape('removeCompiledMethod%3A'),
182
- fn: function (aMethod){
206
+ selector: "name",
207
+ fn: function (){
183
208
  var self=this;
184
- delete self.fn.prototype[aMethod.selector._asSelector()];
185
- delete self.fn.prototype.methods[aMethod.selector];
186
- smalltalk.init(self);;
209
+ return self.className || nil;
187
210
  return self;}
188
211
  }),
189
212
  smalltalk.Behavior);
190
213
 
191
214
  smalltalk.addMethod(
192
- unescape('_inheritsFrom_'),
215
+ "_new",
193
216
  smalltalk.method({
194
- selector: unescape('inheritsFrom%3A'),
195
- fn: function (aClass){
217
+ selector: "new",
218
+ fn: function (){
196
219
  var self=this;
197
- return smalltalk.send(smalltalk.send(aClass, "_allSubclasses", []), "_includes_", [self]);
220
+ return smalltalk.send(smalltalk.send(self, "_basicNew", []), "_initialize", []);
198
221
  return self;}
199
222
  }),
200
223
  smalltalk.Behavior);
201
224
 
202
225
  smalltalk.addMethod(
203
- unescape('_protocols'),
226
+ "_protocols",
204
227
  smalltalk.method({
205
- selector: unescape('protocols'),
228
+ selector: "protocols",
206
229
  fn: function (){
207
230
  var self=this;
208
231
  var protocols=nil;
@@ -214,9 +237,9 @@ return self;}
214
237
  smalltalk.Behavior);
215
238
 
216
239
  smalltalk.addMethod(
217
- unescape('_protocolsDo_'),
240
+ "_protocolsDo_",
218
241
  smalltalk.method({
219
- selector: unescape('protocolsDo%3A'),
242
+ selector: "protocolsDo:",
220
243
  fn: function (aBlock){
221
244
  var self=this;
222
245
  var methodsByCategory=nil;
@@ -228,73 +251,58 @@ return self;}
228
251
  smalltalk.Behavior);
229
252
 
230
253
  smalltalk.addMethod(
231
- unescape('_allInstanceVariableNames'),
254
+ "_prototype",
232
255
  smalltalk.method({
233
- selector: unescape('allInstanceVariableNames'),
256
+ selector: "prototype",
234
257
  fn: function (){
235
258
  var self=this;
236
- var result=nil;
237
- (result=smalltalk.send(smalltalk.send(self, "_instanceVariableNames", []), "_copy", []));
238
- (($receiver = smalltalk.send(self, "_superclass", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(result, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allInstanceVariableNames", [])]);})() : nil;
239
- return result;
240
- return self;}
241
- }),
242
- smalltalk.Behavior);
243
-
244
- smalltalk.addMethod(
245
- unescape('_methodAt_'),
246
- smalltalk.method({
247
- selector: unescape('methodAt%3A'),
248
- fn: function (aString){
249
- var self=this;
250
- return smalltalk.methods(self)[aString];
259
+ return self.fn.prototype;
251
260
  return self;}
252
261
  }),
253
262
  smalltalk.Behavior);
254
263
 
255
264
  smalltalk.addMethod(
256
- unescape('_methodsFor_stamp_'),
265
+ "_removeCompiledMethod_",
257
266
  smalltalk.method({
258
- selector: unescape('methodsFor%3Astamp%3A'),
259
- fn: function (aString, aStamp){
267
+ selector: "removeCompiledMethod:",
268
+ fn: function (aMethod){
260
269
  var self=this;
261
- return smalltalk.send(self, "_methodsFor_", [aString]);
270
+ delete self.fn.prototype[aMethod.selector._asSelector()];
271
+ delete self.fn.prototype.methods[aMethod.selector];
272
+ smalltalk.init(self);;
262
273
  return self;}
263
274
  }),
264
275
  smalltalk.Behavior);
265
276
 
266
277
  smalltalk.addMethod(
267
- unescape('_commentStamp_prior_'),
278
+ "_subclasses",
268
279
  smalltalk.method({
269
- selector: unescape('commentStamp%3Aprior%3A'),
270
- fn: function (aStamp, prior){
280
+ selector: "subclasses",
281
+ fn: function (){
271
282
  var self=this;
272
- return smalltalk.send(self, "_commentStamp", []);
283
+ return smalltalk.subclasses(self);
273
284
  return self;}
274
285
  }),
275
286
  smalltalk.Behavior);
276
287
 
277
288
  smalltalk.addMethod(
278
- unescape('_compile_'),
289
+ "_superclass",
279
290
  smalltalk.method({
280
- selector: unescape('compile%3A'),
281
- fn: function (aString){
291
+ selector: "superclass",
292
+ fn: function (){
282
293
  var self=this;
283
- smalltalk.send(self, "_compile_category_", [aString, ""]);
294
+ return self.superclass || nil;
284
295
  return self;}
285
296
  }),
286
297
  smalltalk.Behavior);
287
298
 
288
299
  smalltalk.addMethod(
289
- unescape('_compile_category_'),
300
+ "_withAllSubclasses",
290
301
  smalltalk.method({
291
- selector: unescape('compile%3Acategory%3A'),
292
- fn: function (aString, anotherString){
302
+ selector: "withAllSubclasses",
303
+ fn: function (){
293
304
  var self=this;
294
- var method=nil;
295
- (method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self]));
296
- smalltalk.send(method, "_category_", [anotherString]);
297
- smalltalk.send(self, "_addCompiledMethod_", [method]);
305
+ return (function($rec){smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_allSubclasses", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Array || Array), "_with_", [self]));
298
306
  return self;}
299
307
  }),
300
308
  smalltalk.Behavior);
@@ -303,9 +311,9 @@ smalltalk.Behavior);
303
311
 
304
312
  smalltalk.addClass('Class', smalltalk.Behavior, [], 'Kernel-Classes');
305
313
  smalltalk.addMethod(
306
- unescape('_category'),
314
+ "_category",
307
315
  smalltalk.method({
308
- selector: unescape('category'),
316
+ selector: "category",
309
317
  fn: function (){
310
318
  var self=this;
311
319
  return (($receiver = smalltalk.send(self, "_package", [])) == nil || $receiver == undefined) ? (function(){return "Unclassified";})() : (function(){return smalltalk.send(smalltalk.send(self, "_package", []), "_name", []);})();
@@ -314,43 +322,42 @@ return self;}
314
322
  smalltalk.Class);
315
323
 
316
324
  smalltalk.addMethod(
317
- unescape('_subclass_instanceVariableNames_'),
325
+ "_isClass",
318
326
  smalltalk.method({
319
- selector: unescape('subclass%3AinstanceVariableNames%3A'),
320
- fn: function (aString, anotherString){
327
+ selector: "isClass",
328
+ fn: function (){
321
329
  var self=this;
322
- return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
330
+ return true;
323
331
  return self;}
324
332
  }),
325
333
  smalltalk.Class);
326
334
 
327
335
  smalltalk.addMethod(
328
- unescape('_subclass_instanceVariableNames_category_'),
336
+ "_package",
329
337
  smalltalk.method({
330
- selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
331
- fn: function (aString, aString2, aString3){
338
+ selector: "package",
339
+ fn: function (){
332
340
  var self=this;
333
- smalltalk.send(self, "_deprecatedAPI", []);
334
- return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
341
+ return self.pkg;
335
342
  return self;}
336
343
  }),
337
344
  smalltalk.Class);
338
345
 
339
346
  smalltalk.addMethod(
340
- unescape('_isClass'),
347
+ "_package_",
341
348
  smalltalk.method({
342
- selector: unescape('isClass'),
343
- fn: function (){
349
+ selector: "package:",
350
+ fn: function (aPackage){
344
351
  var self=this;
345
- return true;
352
+ self.pkg = aPackage;
346
353
  return self;}
347
354
  }),
348
355
  smalltalk.Class);
349
356
 
350
357
  smalltalk.addMethod(
351
- unescape('_printString'),
358
+ "_printString",
352
359
  smalltalk.method({
353
- selector: unescape('printString'),
360
+ selector: "printString",
354
361
  fn: function (){
355
362
  var self=this;
356
363
  return smalltalk.send(self, "_name", []);
@@ -359,9 +366,9 @@ return self;}
359
366
  smalltalk.Class);
360
367
 
361
368
  smalltalk.addMethod(
362
- unescape('_rename_'),
369
+ "_rename_",
363
370
  smalltalk.method({
364
- selector: unescape('rename%3A'),
371
+ selector: "rename:",
365
372
  fn: function (aString){
366
373
  var self=this;
367
374
 
@@ -374,42 +381,43 @@ return self;}
374
381
  smalltalk.Class);
375
382
 
376
383
  smalltalk.addMethod(
377
- unescape('_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_'),
384
+ "_subclass_instanceVariableNames_",
378
385
  smalltalk.method({
379
- selector: unescape('subclass%3AinstanceVariableNames%3AclassVariableNames%3ApoolDictionaries%3Acategory%3A'),
380
- fn: function (aString, aString2, classVars, pools, aString3){
386
+ selector: "subclass:instanceVariableNames:",
387
+ fn: function (aString, anotherString){
381
388
  var self=this;
382
- return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
389
+ return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
383
390
  return self;}
384
391
  }),
385
392
  smalltalk.Class);
386
393
 
387
394
  smalltalk.addMethod(
388
- unescape('_package'),
395
+ "_subclass_instanceVariableNames_category_",
389
396
  smalltalk.method({
390
- selector: unescape('package'),
391
- fn: function (){
397
+ selector: "subclass:instanceVariableNames:category:",
398
+ fn: function (aString, aString2, aString3){
392
399
  var self=this;
393
- return self.pkg;
400
+ smalltalk.send(self, "_deprecatedAPI", []);
401
+ return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
394
402
  return self;}
395
403
  }),
396
404
  smalltalk.Class);
397
405
 
398
406
  smalltalk.addMethod(
399
- unescape('_package_'),
407
+ "_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_",
400
408
  smalltalk.method({
401
- selector: unescape('package%3A'),
402
- fn: function (aPackage){
409
+ selector: "subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:",
410
+ fn: function (aString, aString2, classVars, pools, aString3){
403
411
  var self=this;
404
- self.pkg = aPackage;
412
+ return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
405
413
  return self;}
406
414
  }),
407
415
  smalltalk.Class);
408
416
 
409
417
  smalltalk.addMethod(
410
- unescape('_subclass_instanceVariableNames_package_'),
418
+ "_subclass_instanceVariableNames_package_",
411
419
  smalltalk.method({
412
- selector: unescape('subclass%3AinstanceVariableNames%3Apackage%3A'),
420
+ selector: "subclass:instanceVariableNames:package:",
413
421
  fn: function (aString, aString2, aString3){
414
422
  var self=this;
415
423
  return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, smalltalk.send(aString, "_asString", []), aString2, aString3]);
@@ -421,9 +429,9 @@ smalltalk.Class);
421
429
 
422
430
  smalltalk.addClass('Metaclass', smalltalk.Behavior, [], 'Kernel-Classes');
423
431
  smalltalk.addMethod(
424
- unescape('_instanceClass'),
432
+ "_instanceClass",
425
433
  smalltalk.method({
426
- selector: unescape('instanceClass'),
434
+ selector: "instanceClass",
427
435
  fn: function (){
428
436
  var self=this;
429
437
  return self.instanceClass;
@@ -432,9 +440,9 @@ return self;}
432
440
  smalltalk.Metaclass);
433
441
 
434
442
  smalltalk.addMethod(
435
- unescape('_instanceVariableNames_'),
443
+ "_instanceVariableNames_",
436
444
  smalltalk.method({
437
- selector: unescape('instanceVariableNames%3A'),
445
+ selector: "instanceVariableNames:",
438
446
  fn: function (aCollection){
439
447
  var self=this;
440
448
  smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_class_instanceVariableNames_", [self, aCollection]);
@@ -443,9 +451,9 @@ return self;}
443
451
  smalltalk.Metaclass);
444
452
 
445
453
  smalltalk.addMethod(
446
- unescape('_isMetaclass'),
454
+ "_isMetaclass",
447
455
  smalltalk.method({
448
- selector: unescape('isMetaclass'),
456
+ selector: "isMetaclass",
449
457
  fn: function (){
450
458
  var self=this;
451
459
  return true;
@@ -454,9 +462,9 @@ return self;}
454
462
  smalltalk.Metaclass);
455
463
 
456
464
  smalltalk.addMethod(
457
- unescape('_printString'),
465
+ "_printString",
458
466
  smalltalk.method({
459
- selector: unescape('printString'),
467
+ selector: "printString",
460
468
  fn: function (){
461
469
  var self=this;
462
470
  return smalltalk.send(smalltalk.send(smalltalk.send(self, "_instanceClass", []), "_name", []), "__comma", [" class"]);
@@ -468,100 +476,100 @@ smalltalk.Metaclass);
468
476
 
469
477
  smalltalk.addClass('ClassBuilder', smalltalk.Object, [], 'Kernel-Classes');
470
478
  smalltalk.addMethod(
471
- unescape('_superclass_subclass_'),
479
+ "_addSubclassOf_named_instanceVariableNames_",
472
480
  smalltalk.method({
473
- selector: unescape('superclass%3Asubclass%3A'),
474
- fn: function (aClass, aString){
481
+ selector: "addSubclassOf:named:instanceVariableNames:",
482
+ fn: function (aClass, aString, aCollection){
475
483
  var self=this;
476
- return smalltalk.send(self, "_superclass_subclass_instanceVariableNames_package_", [aClass, aString, "", nil]);
484
+ smalltalk.addClass(aString, aClass, aCollection);
485
+ return smalltalk[aString];
477
486
  return self;}
478
487
  }),
479
488
  smalltalk.ClassBuilder);
480
489
 
481
490
  smalltalk.addMethod(
482
- unescape('_class_instanceVariableNames_'),
491
+ "_addSubclassOf_named_instanceVariableNames_package_",
483
492
  smalltalk.method({
484
- selector: unescape('class%3AinstanceVariableNames%3A'),
485
- fn: function (aClass, aString){
493
+ selector: "addSubclassOf:named:instanceVariableNames:package:",
494
+ fn: function (aClass, aString, aCollection, packageName){
486
495
  var self=this;
487
- ((($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"])]);})]));
488
- smalltalk.send(aClass, "_basicAt_put_", ["iVarNames", smalltalk.send(self, "_instanceVariableNamesFor_", [aString])]);
489
- smalltalk.send(self, "_setupClass_", [aClass]);
496
+ smalltalk.addClass(aString, aClass, aCollection, packageName);
497
+ return smalltalk[aString];
490
498
  return self;}
491
499
  }),
492
500
  smalltalk.ClassBuilder);
493
501
 
494
502
  smalltalk.addMethod(
495
- unescape('_instanceVariableNamesFor_'),
503
+ "_class_instanceVariableNames_",
496
504
  smalltalk.method({
497
- selector: unescape('instanceVariableNamesFor%3A'),
498
- fn: function (aString){
505
+ selector: "class:instanceVariableNames:",
506
+ fn: function (aClass, aString){
499
507
  var self=this;
500
- return smalltalk.send(smalltalk.send(aString, "_tokenize_", [" "]), "_reject_", [(function(each){return smalltalk.send(each, "_isEmpty", []);})]);
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]);
501
511
  return self;}
502
512
  }),
503
513
  smalltalk.ClassBuilder);
504
514
 
505
515
  smalltalk.addMethod(
506
- unescape('_addSubclassOf_named_instanceVariableNames_'),
516
+ "_copyClass_named_",
507
517
  smalltalk.method({
508
- selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3A'),
509
- fn: function (aClass, aString, aCollection){
518
+ selector: "copyClass:named:",
519
+ fn: function (aClass, aString){
510
520
  var self=this;
511
- smalltalk.addClass(aString, aClass, aCollection);
512
- return smalltalk[aString];
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]);
527
+ return newClass;
513
528
  return self;}
514
529
  }),
515
530
  smalltalk.ClassBuilder);
516
531
 
517
532
  smalltalk.addMethod(
518
- unescape('_setupClass_'),
533
+ "_instanceVariableNamesFor_",
519
534
  smalltalk.method({
520
- selector: unescape('setupClass%3A'),
521
- fn: function (aClass){
535
+ selector: "instanceVariableNamesFor:",
536
+ fn: function (aString){
522
537
  var self=this;
523
- smalltalk.init(aClass);;
538
+ return smalltalk.send(smalltalk.send(aString, "_tokenize_", [" "]), "_reject_", [(function(each){return smalltalk.send(each, "_isEmpty", []);})]);
524
539
  return self;}
525
540
  }),
526
541
  smalltalk.ClassBuilder);
527
542
 
528
543
  smalltalk.addMethod(
529
- unescape('_superclass_subclass_instanceVariableNames_package_'),
544
+ "_setupClass_",
530
545
  smalltalk.method({
531
- selector: unescape('superclass%3Asubclass%3AinstanceVariableNames%3Apackage%3A'),
532
- fn: function (aClass, aString, aString2, aString3){
546
+ selector: "setupClass:",
547
+ fn: function (aClass){
533
548
  var self=this;
534
- var newClass=nil;
535
- (newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [aClass, aString, smalltalk.send(self, "_instanceVariableNamesFor_", [aString2]), (($receiver = aString3) == nil || $receiver == undefined) ? (function(){return "unclassified";})() : $receiver]));
536
- smalltalk.send(self, "_setupClass_", [newClass]);
537
- return newClass;
549
+ smalltalk.init(aClass);;
538
550
  return self;}
539
551
  }),
540
552
  smalltalk.ClassBuilder);
541
553
 
542
554
  smalltalk.addMethod(
543
- unescape('_addSubclassOf_named_instanceVariableNames_package_'),
555
+ "_superclass_subclass_",
544
556
  smalltalk.method({
545
- selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3Apackage%3A'),
546
- fn: function (aClass, aString, aCollection, packageName){
557
+ selector: "superclass:subclass:",
558
+ fn: function (aClass, aString){
547
559
  var self=this;
548
- smalltalk.addClass(aString, aClass, aCollection, packageName);
549
- return smalltalk[aString];
560
+ return smalltalk.send(self, "_superclass_subclass_instanceVariableNames_package_", [aClass, aString, "", nil]);
550
561
  return self;}
551
562
  }),
552
563
  smalltalk.ClassBuilder);
553
564
 
554
565
  smalltalk.addMethod(
555
- unescape('_copyClass_named_'),
566
+ "_superclass_subclass_instanceVariableNames_package_",
556
567
  smalltalk.method({
557
- selector: unescape('copyClass%3Anamed%3A'),
558
- fn: function (aClass, aString){
568
+ selector: "superclass:subclass:instanceVariableNames:package:",
569
+ fn: function (aClass, aString, aString2, aString3){
559
570
  var self=this;
560
571
  var newClass=nil;
561
- (newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [smalltalk.send(aClass, "_superclass", []), aString, smalltalk.send(aClass, "_instanceVariableNames", []), smalltalk.send(smalltalk.send(aClass, "_package", []), "_name", [])]));
562
- smalltalk.send(self, "_setupClass_", [newClass]);
563
- 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", [])]);})]);
564
- 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", [])]);})]);
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]));
565
573
  smalltalk.send(self, "_setupClass_", [newClass]);
566
574
  return newClass;
567
575
  return self;}
@@ -572,51 +580,49 @@ smalltalk.ClassBuilder);
572
580
 
573
581
  smalltalk.addClass('ClassCategoryReader', smalltalk.Object, ['class', 'category', 'chunkParser'], 'Kernel-Classes');
574
582
  smalltalk.addMethod(
575
- unescape('_initialize'),
583
+ "_class_category_",
576
584
  smalltalk.method({
577
- selector: unescape('initialize'),
578
- fn: function (){
585
+ selector: "class:category:",
586
+ fn: function (aClass, aString){
579
587
  var self=this;
580
- smalltalk.send(self, "_initialize", [], smalltalk.Object);
581
- (self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []));
588
+ (self['@class']=aClass);
589
+ (self['@category']=aString);
582
590
  return self;}
583
591
  }),
584
592
  smalltalk.ClassCategoryReader);
585
593
 
586
594
  smalltalk.addMethod(
587
- unescape('_class_category_'),
595
+ "_compileMethod_",
588
596
  smalltalk.method({
589
- selector: unescape('class%3Acategory%3A'),
590
- fn: function (aClass, aString){
597
+ selector: "compileMethod:",
598
+ fn: function (aString){
591
599
  var self=this;
592
- (self['@class']=aClass);
593
- (self['@category']=aString);
600
+ smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_install_forClass_category_", [aString, self['@class'], self['@category']]);
594
601
  return self;}
595
602
  }),
596
603
  smalltalk.ClassCategoryReader);
597
604
 
598
605
  smalltalk.addMethod(
599
- unescape('_scanFrom_'),
606
+ "_initialize",
600
607
  smalltalk.method({
601
- selector: unescape('scanFrom%3A'),
602
- fn: function (aChunkParser){
608
+ selector: "initialize",
609
+ fn: function (){
603
610
  var self=this;
604
- var chunk=nil;
605
- (function(){while(!(function(){(chunk=smalltalk.send(aChunkParser, "_nextChunk", []));return smalltalk.send(chunk, "_isEmpty", []);})()) {(function(){return smalltalk.send(self, "_compileMethod_", [chunk]);})()}})();
611
+ smalltalk.send(self, "_initialize", [], smalltalk.ClassCategoryReader.superclass || nil);
612
+ (self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []));
606
613
  return self;}
607
614
  }),
608
615
  smalltalk.ClassCategoryReader);
609
616
 
610
617
  smalltalk.addMethod(
611
- unescape('_compileMethod_'),
618
+ "_scanFrom_",
612
619
  smalltalk.method({
613
- selector: unescape('compileMethod%3A'),
614
- fn: function (aString){
620
+ selector: "scanFrom:",
621
+ fn: function (aChunkParser){
615
622
  var self=this;
616
- var method=nil;
617
- (method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self['@class']]));
618
- smalltalk.send(method, "_category_", [self['@category']]);
619
- smalltalk.send(self['@class'], "_addCompiledMethod_", [method]);
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']]);
620
626
  return self;}
621
627
  }),
622
628
  smalltalk.ClassCategoryReader);
@@ -625,9 +631,9 @@ smalltalk.ClassCategoryReader);
625
631
 
626
632
  smalltalk.addClass('ClassCommentReader', smalltalk.Object, ['class', 'chunkParser'], 'Kernel-Classes');
627
633
  smalltalk.addMethod(
628
- unescape('_class_'),
634
+ "_class_",
629
635
  smalltalk.method({
630
- selector: unescape('class%3A'),
636
+ selector: "class:",
631
637
  fn: function (aClass){
632
638
  var self=this;
633
639
  (self['@class']=aClass);
@@ -636,9 +642,21 @@ return self;}
636
642
  smalltalk.ClassCommentReader);
637
643
 
638
644
  smalltalk.addMethod(
639
- unescape('_scanFrom_'),
645
+ "_initialize",
646
+ smalltalk.method({
647
+ selector: "initialize",
648
+ fn: function (){
649
+ var self=this;
650
+ smalltalk.send(self, "_initialize", [], smalltalk.ClassCommentReader.superclass || nil);
651
+ (self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []));
652
+ return self;}
653
+ }),
654
+ smalltalk.ClassCommentReader);
655
+
656
+ smalltalk.addMethod(
657
+ "_scanFrom_",
640
658
  smalltalk.method({
641
- selector: unescape('scanFrom%3A'),
659
+ selector: "scanFrom:",
642
660
  fn: function (aChunkParser){
643
661
  var self=this;
644
662
  var chunk=nil;
@@ -649,27 +667,112 @@ return self;}
649
667
  smalltalk.ClassCommentReader);
650
668
 
651
669
  smalltalk.addMethod(
652
- unescape('_initialize'),
670
+ "_setComment_",
653
671
  smalltalk.method({
654
- selector: unescape('initialize'),
655
- fn: function (){
672
+ selector: "setComment:",
673
+ fn: function (aString){
656
674
  var self=this;
657
- smalltalk.send(self, "_initialize", [], smalltalk.Object);
658
- (self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []));
675
+ smalltalk.send(self['@class'], "_comment_", [aString]);
659
676
  return self;}
660
677
  }),
661
678
  smalltalk.ClassCommentReader);
662
679
 
680
+
681
+
682
+ smalltalk.addClass('ClassSorterNode', smalltalk.Object, ['theClass', 'level', 'nodes'], 'Kernel-Classes');
663
683
  smalltalk.addMethod(
664
- unescape('_setComment_'),
684
+ "_getNodesFrom_",
665
685
  smalltalk.method({
666
- selector: unescape('setComment%3A'),
667
- fn: function (aString){
686
+ selector: "getNodesFrom:",
687
+ fn: function (aCollection){
668
688
  var self=this;
669
- smalltalk.send(self['@class'], "_comment_", [aString]);
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)]))]);})]));
670
695
  return self;}
671
696
  }),
672
- smalltalk.ClassCommentReader);
697
+ smalltalk.ClassSorterNode);
698
+
699
+ smalltalk.addMethod(
700
+ "_level",
701
+ smalltalk.method({
702
+ selector: "level",
703
+ fn: function (){
704
+ var self=this;
705
+ return self['@level'];
706
+ return self;}
707
+ }),
708
+ smalltalk.ClassSorterNode);
709
+
710
+ smalltalk.addMethod(
711
+ "_level_",
712
+ smalltalk.method({
713
+ selector: "level:",
714
+ fn: function (anInteger){
715
+ var self=this;
716
+ (self['@level']=anInteger);
717
+ return self;}
718
+ }),
719
+ smalltalk.ClassSorterNode);
673
720
 
721
+ smalltalk.addMethod(
722
+ "_nodes",
723
+ smalltalk.method({
724
+ selector: "nodes",
725
+ fn: function (){
726
+ var self=this;
727
+ return self['@nodes'];
728
+ return self;}
729
+ }),
730
+ smalltalk.ClassSorterNode);
731
+
732
+ smalltalk.addMethod(
733
+ "_theClass",
734
+ smalltalk.method({
735
+ selector: "theClass",
736
+ fn: function (){
737
+ var self=this;
738
+ return self['@theClass'];
739
+ return self;}
740
+ }),
741
+ smalltalk.ClassSorterNode);
742
+
743
+ smalltalk.addMethod(
744
+ "_theClass_",
745
+ smalltalk.method({
746
+ selector: "theClass:",
747
+ fn: function (aClass){
748
+ var self=this;
749
+ (self['@theClass']=aClass);
750
+ return self;}
751
+ }),
752
+ smalltalk.ClassSorterNode);
753
+
754
+ smalltalk.addMethod(
755
+ "_traverseClassesWith_",
756
+ smalltalk.method({
757
+ selector: "traverseClassesWith:",
758
+ fn: function (aCollection){
759
+ 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;}
763
+ }),
764
+ smalltalk.ClassSorterNode);
765
+
766
+
767
+ smalltalk.addMethod(
768
+ "_on_classes_level_",
769
+ smalltalk.method({
770
+ 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;}
775
+ }),
776
+ smalltalk.ClassSorterNode.klass);
674
777
 
675
778