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.
- data/README.markdown +2 -0
- data/amber/bin/nodecompile.js +3 -3
- data/amber/css/amber.css +47 -23
- data/amber/images/off.amber.png +0 -0
- data/amber/images/offHover.amber.png +0 -0
- data/amber/images/sprite.amber.png +0 -0
- data/amber/images/tinylogo.amber.png +0 -0
- data/amber/js/Benchfib.deploy.js +34 -34
- data/amber/js/Benchfib.js +49 -49
- data/amber/js/Canvas.deploy.js +937 -937
- data/amber/js/Canvas.js +1622 -1622
- data/amber/js/Compiler-Tests.deploy.js +97 -0
- data/amber/js/Compiler-Tests.js +137 -0
- data/amber/js/Compiler.deploy.js +1030 -924
- data/amber/js/Compiler.js +1613 -1467
- data/amber/js/Documentation.deploy.js +417 -417
- data/amber/js/Documentation.js +728 -728
- data/amber/js/Examples.deploy.js +24 -13
- data/amber/js/Examples.js +36 -19
- data/amber/js/IDE.deploy.js +1583 -1527
- data/amber/js/IDE.js +2586 -2510
- data/amber/js/Kernel-Announcements.deploy.js +19 -19
- data/amber/js/Kernel-Announcements.js +28 -28
- data/amber/js/Kernel-Classes.deploy.js +332 -229
- data/amber/js/Kernel-Classes.js +532 -384
- data/amber/js/Kernel-Collections.deploy.js +1516 -1712
- data/amber/js/Kernel-Collections.js +2436 -2712
- data/amber/js/Kernel-Exceptions.deploy.js +85 -62
- data/amber/js/Kernel-Exceptions.js +131 -98
- data/amber/js/Kernel-Methods.deploy.js +326 -378
- data/amber/js/Kernel-Methods.js +473 -525
- data/amber/js/Kernel-Objects.deploy.js +1777 -2428
- data/amber/js/Kernel-Objects.js +2599 -3426
- data/amber/js/Kernel-Tests.deploy.js +871 -772
- data/amber/js/Kernel-Tests.js +1207 -1083
- data/amber/js/Kernel-Transcript.deploy.js +57 -57
- data/amber/js/Kernel-Transcript.js +94 -94
- data/amber/js/SUnit.deploy.js +116 -116
- data/amber/js/SUnit.js +211 -211
- data/amber/js/amber.js +10 -11
- data/amber/js/boot.js +132 -156
- data/amber/js/init.js +2 -2
- data/amber/js/parser.js +2095 -3014
- data/amber/js/parser.pegjs +1 -1
- data/amber/st/Benchfib.st +22 -22
- data/amber/st/Canvas.st +471 -471
- data/amber/st/Compiler-Tests.st +471 -0
- data/amber/st/Compiler.st +858 -794
- data/amber/st/Examples.st +22 -5
- data/amber/st/IDE.st +1326 -1291
- data/amber/st/Kernel-Announcements.st +2 -2
- data/amber/st/Kernel-Classes.st +148 -90
- data/amber/st/Kernel-Collections.st +950 -1061
- data/amber/st/Kernel-Exceptions.st +33 -25
- data/amber/st/Kernel-Methods.st +151 -151
- data/amber/st/Kernel-Objects.st +891 -1036
- data/amber/st/Kernel-Tests.st +622 -544
- data/amber/st/Kernel-Transcript.st +38 -38
- data/amber/st/SUnit.st +53 -53
- 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
|
-
|
4
|
+
"_announcementClass",
|
5
5
|
smalltalk.method({
|
6
|
-
selector:
|
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
|
-
|
15
|
+
"_announcementClass_",
|
16
16
|
smalltalk.method({
|
17
|
-
selector:
|
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
|
-
|
26
|
+
"_block",
|
27
27
|
smalltalk.method({
|
28
|
-
selector:
|
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
|
-
|
37
|
+
"_block_",
|
38
38
|
smalltalk.method({
|
39
|
-
selector:
|
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
|
-
|
48
|
+
"_deliver_",
|
49
49
|
smalltalk.method({
|
50
|
-
selector:
|
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
|
-
|
59
|
+
"_handlesAnnouncement_",
|
60
60
|
smalltalk.method({
|
61
|
-
selector:
|
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
|
-
|
73
|
+
"_announce_",
|
74
74
|
smalltalk.method({
|
75
|
-
selector:
|
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
|
-
|
84
|
+
"_initialize",
|
85
85
|
smalltalk.method({
|
86
|
-
selector:
|
86
|
+
selector: "initialize",
|
87
87
|
fn: function (){
|
88
88
|
var self=this;
|
89
|
-
smalltalk.send(self, "_initialize", [], smalltalk.
|
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
|
-
|
96
|
+
"_on_do_",
|
97
97
|
smalltalk.method({
|
98
|
-
selector:
|
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
|
-
|
4
|
+
"_announcementClass",
|
5
5
|
smalltalk.method({
|
6
|
-
selector:
|
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:
|
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
|
-
|
20
|
+
"_announcementClass_",
|
21
21
|
smalltalk.method({
|
22
|
-
selector:
|
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:
|
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
|
-
|
36
|
+
"_block",
|
37
37
|
smalltalk.method({
|
38
|
-
selector:
|
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:
|
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
|
-
|
52
|
+
"_block_",
|
53
53
|
smalltalk.method({
|
54
|
-
selector:
|
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:
|
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
|
-
|
68
|
+
"_deliver_",
|
69
69
|
smalltalk.method({
|
70
|
-
selector:
|
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:
|
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
|
-
|
84
|
+
"_handlesAnnouncement_",
|
85
85
|
smalltalk.method({
|
86
|
-
selector:
|
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:
|
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
|
-
|
103
|
+
"_announce_",
|
104
104
|
smalltalk.method({
|
105
|
-
selector:
|
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:
|
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
|
-
|
119
|
+
"_initialize",
|
120
120
|
smalltalk.method({
|
121
|
-
selector:
|
121
|
+
selector: "initialize",
|
122
122
|
category: 'initialization',
|
123
123
|
fn: function (){
|
124
124
|
var self=this;
|
125
|
-
smalltalk.send(self, "_initialize", [], smalltalk.
|
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:
|
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
|
-
|
136
|
+
"_on_do_",
|
137
137
|
smalltalk.method({
|
138
|
-
selector:
|
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:
|
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
|
-
|
4
|
+
"_addCompiledMethod_",
|
5
5
|
smalltalk.method({
|
6
|
-
selector:
|
7
|
-
fn: function (){
|
6
|
+
selector: "addCompiledMethod:",
|
7
|
+
fn: function (aMethod){
|
8
8
|
var self=this;
|
9
|
-
|
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
|
-
|
15
|
+
"_allInstanceVariableNames",
|
16
16
|
smalltalk.method({
|
17
|
-
selector:
|
17
|
+
selector: "allInstanceVariableNames",
|
18
18
|
fn: function (){
|
19
19
|
var self=this;
|
20
|
-
|
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
|
-
|
29
|
+
"_allSubclasses",
|
27
30
|
smalltalk.method({
|
28
|
-
selector:
|
31
|
+
selector: "allSubclasses",
|
29
32
|
fn: function (){
|
30
33
|
var self=this;
|
31
|
-
|
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
|
-
|
43
|
+
"_basicNew",
|
38
44
|
smalltalk.method({
|
39
|
-
selector:
|
45
|
+
selector: "basicNew",
|
40
46
|
fn: function (){
|
41
47
|
var self=this;
|
42
|
-
return self.
|
48
|
+
return new self.fn();
|
43
49
|
return self;}
|
44
50
|
}),
|
45
51
|
smalltalk.Behavior);
|
46
52
|
|
47
53
|
smalltalk.addMethod(
|
48
|
-
|
54
|
+
"_canUnderstand_",
|
49
55
|
smalltalk.method({
|
50
|
-
selector:
|
51
|
-
fn: function (){
|
56
|
+
selector: "canUnderstand:",
|
57
|
+
fn: function (aSelector){
|
52
58
|
var self=this;
|
53
|
-
return smalltalk.
|
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
|
-
|
65
|
+
"_comment",
|
60
66
|
smalltalk.method({
|
61
|
-
selector:
|
67
|
+
selector: "comment",
|
62
68
|
fn: function (){
|
63
69
|
var self=this;
|
64
|
-
|
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
|
-
|
76
|
+
"_comment_",
|
74
77
|
smalltalk.method({
|
75
|
-
selector:
|
76
|
-
fn: function (){
|
78
|
+
selector: "comment:",
|
79
|
+
fn: function (aString){
|
77
80
|
var self=this;
|
78
|
-
|
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
|
-
|
87
|
+
"_commentStamp",
|
85
88
|
smalltalk.method({
|
86
|
-
selector:
|
89
|
+
selector: "commentStamp",
|
87
90
|
fn: function (){
|
88
91
|
var self=this;
|
89
|
-
return self.
|
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
|
-
|
98
|
+
"_commentStamp_prior_",
|
96
99
|
smalltalk.method({
|
97
|
-
selector:
|
98
|
-
fn: function (){
|
100
|
+
selector: "commentStamp:prior:",
|
101
|
+
fn: function (aStamp, prior){
|
99
102
|
var self=this;
|
100
|
-
|
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
|
-
|
109
|
+
"_compile_",
|
114
110
|
smalltalk.method({
|
115
|
-
selector:
|
111
|
+
selector: "compile:",
|
116
112
|
fn: function (aString){
|
117
113
|
var self=this;
|
118
|
-
|
114
|
+
smalltalk.send(self, "_compile_category_", [aString, ""]);
|
119
115
|
return self;}
|
120
116
|
}),
|
121
117
|
smalltalk.Behavior);
|
122
118
|
|
123
119
|
smalltalk.addMethod(
|
124
|
-
|
120
|
+
"_compile_category_",
|
125
121
|
smalltalk.method({
|
126
|
-
selector:
|
127
|
-
fn: function (
|
122
|
+
selector: "compile:category:",
|
123
|
+
fn: function (aString, anotherString){
|
128
124
|
var self=this;
|
129
|
-
smalltalk.
|
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
|
-
|
131
|
+
"_inheritsFrom_",
|
136
132
|
smalltalk.method({
|
137
|
-
selector:
|
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
|
-
|
153
|
+
"_methodAt_",
|
147
154
|
smalltalk.method({
|
148
|
-
selector:
|
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
|
-
|
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
|
-
|
182
|
+
"_methodsFor_",
|
158
183
|
smalltalk.method({
|
159
|
-
selector:
|
184
|
+
selector: "methodsFor:",
|
160
185
|
fn: function (aString){
|
161
186
|
var self=this;
|
162
|
-
smalltalk.send(self, "
|
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
|
-
|
193
|
+
"_methodsFor_stamp_",
|
169
194
|
smalltalk.method({
|
170
|
-
selector:
|
171
|
-
fn: function (){
|
195
|
+
selector: "methodsFor:stamp:",
|
196
|
+
fn: function (aString, aStamp){
|
172
197
|
var self=this;
|
173
|
-
return
|
198
|
+
return smalltalk.send(self, "_methodsFor_", [aString]);
|
174
199
|
return self;}
|
175
200
|
}),
|
176
201
|
smalltalk.Behavior);
|
177
202
|
|
178
203
|
smalltalk.addMethod(
|
179
|
-
|
204
|
+
"_name",
|
180
205
|
smalltalk.method({
|
181
|
-
selector:
|
182
|
-
fn: function (
|
206
|
+
selector: "name",
|
207
|
+
fn: function (){
|
183
208
|
var self=this;
|
184
|
-
|
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
|
-
|
215
|
+
"_new",
|
193
216
|
smalltalk.method({
|
194
|
-
selector:
|
195
|
-
fn: function (
|
217
|
+
selector: "new",
|
218
|
+
fn: function (){
|
196
219
|
var self=this;
|
197
|
-
return smalltalk.send(smalltalk.send(
|
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
|
-
|
226
|
+
"_protocols",
|
204
227
|
smalltalk.method({
|
205
|
-
selector:
|
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
|
-
|
240
|
+
"_protocolsDo_",
|
218
241
|
smalltalk.method({
|
219
|
-
selector:
|
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
|
-
|
254
|
+
"_prototype",
|
232
255
|
smalltalk.method({
|
233
|
-
selector:
|
256
|
+
selector: "prototype",
|
234
257
|
fn: function (){
|
235
258
|
var self=this;
|
236
|
-
|
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
|
-
|
265
|
+
"_removeCompiledMethod_",
|
257
266
|
smalltalk.method({
|
258
|
-
selector:
|
259
|
-
fn: function (
|
267
|
+
selector: "removeCompiledMethod:",
|
268
|
+
fn: function (aMethod){
|
260
269
|
var self=this;
|
261
|
-
|
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
|
-
|
278
|
+
"_subclasses",
|
268
279
|
smalltalk.method({
|
269
|
-
selector:
|
270
|
-
fn: function (
|
280
|
+
selector: "subclasses",
|
281
|
+
fn: function (){
|
271
282
|
var self=this;
|
272
|
-
return smalltalk.
|
283
|
+
return smalltalk.subclasses(self);
|
273
284
|
return self;}
|
274
285
|
}),
|
275
286
|
smalltalk.Behavior);
|
276
287
|
|
277
288
|
smalltalk.addMethod(
|
278
|
-
|
289
|
+
"_superclass",
|
279
290
|
smalltalk.method({
|
280
|
-
selector:
|
281
|
-
fn: function (
|
291
|
+
selector: "superclass",
|
292
|
+
fn: function (){
|
282
293
|
var self=this;
|
283
|
-
|
294
|
+
return self.superclass || nil;
|
284
295
|
return self;}
|
285
296
|
}),
|
286
297
|
smalltalk.Behavior);
|
287
298
|
|
288
299
|
smalltalk.addMethod(
|
289
|
-
|
300
|
+
"_withAllSubclasses",
|
290
301
|
smalltalk.method({
|
291
|
-
selector:
|
292
|
-
fn: function (
|
302
|
+
selector: "withAllSubclasses",
|
303
|
+
fn: function (){
|
293
304
|
var self=this;
|
294
|
-
|
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
|
-
|
314
|
+
"_category",
|
307
315
|
smalltalk.method({
|
308
|
-
selector:
|
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
|
-
|
325
|
+
"_isClass",
|
318
326
|
smalltalk.method({
|
319
|
-
selector:
|
320
|
-
fn: function (
|
327
|
+
selector: "isClass",
|
328
|
+
fn: function (){
|
321
329
|
var self=this;
|
322
|
-
return
|
330
|
+
return true;
|
323
331
|
return self;}
|
324
332
|
}),
|
325
333
|
smalltalk.Class);
|
326
334
|
|
327
335
|
smalltalk.addMethod(
|
328
|
-
|
336
|
+
"_package",
|
329
337
|
smalltalk.method({
|
330
|
-
selector:
|
331
|
-
fn: function (
|
338
|
+
selector: "package",
|
339
|
+
fn: function (){
|
332
340
|
var self=this;
|
333
|
-
|
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
|
-
|
347
|
+
"_package_",
|
341
348
|
smalltalk.method({
|
342
|
-
selector:
|
343
|
-
fn: function (){
|
349
|
+
selector: "package:",
|
350
|
+
fn: function (aPackage){
|
344
351
|
var self=this;
|
345
|
-
|
352
|
+
self.pkg = aPackage;
|
346
353
|
return self;}
|
347
354
|
}),
|
348
355
|
smalltalk.Class);
|
349
356
|
|
350
357
|
smalltalk.addMethod(
|
351
|
-
|
358
|
+
"_printString",
|
352
359
|
smalltalk.method({
|
353
|
-
selector:
|
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
|
-
|
369
|
+
"_rename_",
|
363
370
|
smalltalk.method({
|
364
|
-
selector:
|
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
|
-
|
384
|
+
"_subclass_instanceVariableNames_",
|
378
385
|
smalltalk.method({
|
379
|
-
selector:
|
380
|
-
fn: function (aString,
|
386
|
+
selector: "subclass:instanceVariableNames:",
|
387
|
+
fn: function (aString, anotherString){
|
381
388
|
var self=this;
|
382
|
-
return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString,
|
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
|
-
|
395
|
+
"_subclass_instanceVariableNames_category_",
|
389
396
|
smalltalk.method({
|
390
|
-
selector:
|
391
|
-
fn: function (){
|
397
|
+
selector: "subclass:instanceVariableNames:category:",
|
398
|
+
fn: function (aString, aString2, aString3){
|
392
399
|
var self=this;
|
393
|
-
|
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
|
-
|
407
|
+
"_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_",
|
400
408
|
smalltalk.method({
|
401
|
-
selector:
|
402
|
-
fn: function (
|
409
|
+
selector: "subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:",
|
410
|
+
fn: function (aString, aString2, classVars, pools, aString3){
|
403
411
|
var self=this;
|
404
|
-
self
|
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
|
-
|
418
|
+
"_subclass_instanceVariableNames_package_",
|
411
419
|
smalltalk.method({
|
412
|
-
selector:
|
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
|
-
|
432
|
+
"_instanceClass",
|
425
433
|
smalltalk.method({
|
426
|
-
selector:
|
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
|
-
|
443
|
+
"_instanceVariableNames_",
|
436
444
|
smalltalk.method({
|
437
|
-
selector:
|
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
|
-
|
454
|
+
"_isMetaclass",
|
447
455
|
smalltalk.method({
|
448
|
-
selector:
|
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
|
-
|
465
|
+
"_printString",
|
458
466
|
smalltalk.method({
|
459
|
-
selector:
|
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
|
-
|
479
|
+
"_addSubclassOf_named_instanceVariableNames_",
|
472
480
|
smalltalk.method({
|
473
|
-
selector:
|
474
|
-
fn: function (aClass, aString){
|
481
|
+
selector: "addSubclassOf:named:instanceVariableNames:",
|
482
|
+
fn: function (aClass, aString, aCollection){
|
475
483
|
var self=this;
|
476
|
-
|
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
|
-
|
491
|
+
"_addSubclassOf_named_instanceVariableNames_package_",
|
483
492
|
smalltalk.method({
|
484
|
-
selector:
|
485
|
-
fn: function (aClass, aString){
|
493
|
+
selector: "addSubclassOf:named:instanceVariableNames:package:",
|
494
|
+
fn: function (aClass, aString, aCollection, packageName){
|
486
495
|
var self=this;
|
487
|
-
|
488
|
-
|
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
|
-
|
503
|
+
"_class_instanceVariableNames_",
|
496
504
|
smalltalk.method({
|
497
|
-
selector:
|
498
|
-
fn: function (aString){
|
505
|
+
selector: "class:instanceVariableNames:",
|
506
|
+
fn: function (aClass, aString){
|
499
507
|
var self=this;
|
500
|
-
return smalltalk.send(smalltalk.send(
|
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
|
-
|
516
|
+
"_copyClass_named_",
|
507
517
|
smalltalk.method({
|
508
|
-
selector:
|
509
|
-
fn: function (aClass, aString
|
518
|
+
selector: "copyClass:named:",
|
519
|
+
fn: function (aClass, aString){
|
510
520
|
var self=this;
|
511
|
-
|
512
|
-
|
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
|
-
|
533
|
+
"_instanceVariableNamesFor_",
|
519
534
|
smalltalk.method({
|
520
|
-
selector:
|
521
|
-
fn: function (
|
535
|
+
selector: "instanceVariableNamesFor:",
|
536
|
+
fn: function (aString){
|
522
537
|
var self=this;
|
523
|
-
smalltalk.
|
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
|
-
|
544
|
+
"_setupClass_",
|
530
545
|
smalltalk.method({
|
531
|
-
selector:
|
532
|
-
fn: function (aClass
|
546
|
+
selector: "setupClass:",
|
547
|
+
fn: function (aClass){
|
533
548
|
var self=this;
|
534
|
-
|
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
|
-
|
555
|
+
"_superclass_subclass_",
|
544
556
|
smalltalk.method({
|
545
|
-
selector:
|
546
|
-
fn: function (aClass, aString
|
557
|
+
selector: "superclass:subclass:",
|
558
|
+
fn: function (aClass, aString){
|
547
559
|
var self=this;
|
548
|
-
smalltalk.
|
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
|
-
|
566
|
+
"_superclass_subclass_instanceVariableNames_package_",
|
556
567
|
smalltalk.method({
|
557
|
-
selector:
|
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_", [
|
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
|
-
|
583
|
+
"_class_category_",
|
576
584
|
smalltalk.method({
|
577
|
-
selector:
|
578
|
-
fn: function (){
|
585
|
+
selector: "class:category:",
|
586
|
+
fn: function (aClass, aString){
|
579
587
|
var self=this;
|
580
|
-
|
581
|
-
(self['@
|
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
|
-
|
595
|
+
"_compileMethod_",
|
588
596
|
smalltalk.method({
|
589
|
-
selector:
|
590
|
-
fn: function (
|
597
|
+
selector: "compileMethod:",
|
598
|
+
fn: function (aString){
|
591
599
|
var self=this;
|
592
|
-
(self['@class']
|
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
|
-
|
606
|
+
"_initialize",
|
600
607
|
smalltalk.method({
|
601
|
-
selector:
|
602
|
-
fn: function (
|
608
|
+
selector: "initialize",
|
609
|
+
fn: function (){
|
603
610
|
var self=this;
|
604
|
-
|
605
|
-
(
|
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
|
-
|
618
|
+
"_scanFrom_",
|
612
619
|
smalltalk.method({
|
613
|
-
selector:
|
614
|
-
fn: function (
|
620
|
+
selector: "scanFrom:",
|
621
|
+
fn: function (aChunkParser){
|
615
622
|
var self=this;
|
616
|
-
var
|
617
|
-
(
|
618
|
-
smalltalk.send(
|
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
|
-
|
634
|
+
"_class_",
|
629
635
|
smalltalk.method({
|
630
|
-
selector:
|
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
|
-
|
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:
|
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
|
-
|
670
|
+
"_setComment_",
|
653
671
|
smalltalk.method({
|
654
|
-
selector:
|
655
|
-
fn: function (){
|
672
|
+
selector: "setComment:",
|
673
|
+
fn: function (aString){
|
656
674
|
var self=this;
|
657
|
-
smalltalk.send(self, "
|
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
|
-
|
684
|
+
"_getNodesFrom_",
|
665
685
|
smalltalk.method({
|
666
|
-
selector:
|
667
|
-
fn: function (
|
686
|
+
selector: "getNodesFrom:",
|
687
|
+
fn: function (aCollection){
|
668
688
|
var self=this;
|
669
|
-
|
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.
|
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
|
|