resin 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- 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,79 +1,102 @@
|
|
1
1
|
smalltalk.addPackage('Kernel-Exceptions', {});
|
2
2
|
smalltalk.addClass('Error', smalltalk.Object, ['messageText'], 'Kernel-Exceptions');
|
3
3
|
smalltalk.addMethod(
|
4
|
-
|
4
|
+
"_context",
|
5
5
|
smalltalk.method({
|
6
|
-
selector:
|
6
|
+
selector: "context",
|
7
7
|
fn: function (){
|
8
8
|
var self=this;
|
9
|
-
return self
|
9
|
+
return self.context;
|
10
10
|
return self;}
|
11
11
|
}),
|
12
12
|
smalltalk.Error);
|
13
13
|
|
14
14
|
smalltalk.addMethod(
|
15
|
-
|
15
|
+
"_isSmalltalkError",
|
16
16
|
smalltalk.method({
|
17
|
-
selector:
|
18
|
-
fn: function (
|
17
|
+
selector: "isSmalltalkError",
|
18
|
+
fn: function (){
|
19
19
|
var self=this;
|
20
|
-
|
20
|
+
return self.smalltalkError === true;
|
21
21
|
return self;}
|
22
22
|
}),
|
23
23
|
smalltalk.Error);
|
24
24
|
|
25
25
|
smalltalk.addMethod(
|
26
|
-
|
26
|
+
"_jsStack",
|
27
27
|
smalltalk.method({
|
28
|
-
selector:
|
28
|
+
selector: "jsStack",
|
29
29
|
fn: function (){
|
30
30
|
var self=this;
|
31
|
-
|
31
|
+
return self.stack;
|
32
32
|
return self;}
|
33
33
|
}),
|
34
34
|
smalltalk.Error);
|
35
35
|
|
36
36
|
smalltalk.addMethod(
|
37
|
-
|
37
|
+
"_messageText",
|
38
38
|
smalltalk.method({
|
39
|
-
selector:
|
39
|
+
selector: "messageText",
|
40
40
|
fn: function (){
|
41
41
|
var self=this;
|
42
|
-
return self
|
42
|
+
return self['@messageText'];
|
43
43
|
return self;}
|
44
44
|
}),
|
45
45
|
smalltalk.Error);
|
46
46
|
|
47
47
|
smalltalk.addMethod(
|
48
|
-
|
48
|
+
"_messageText_",
|
49
49
|
smalltalk.method({
|
50
|
-
selector:
|
51
|
-
fn: function (){
|
50
|
+
selector: "messageText:",
|
51
|
+
fn: function (aString){
|
52
52
|
var self=this;
|
53
|
-
|
53
|
+
(self['@messageText']=aString);
|
54
54
|
return self;}
|
55
55
|
}),
|
56
56
|
smalltalk.Error);
|
57
57
|
|
58
58
|
smalltalk.addMethod(
|
59
|
-
|
59
|
+
"_signal",
|
60
60
|
smalltalk.method({
|
61
|
-
selector:
|
61
|
+
selector: "signal",
|
62
62
|
fn: function (){
|
63
63
|
var self=this;
|
64
|
-
|
64
|
+
self.context = smalltalk.getThisContext(); self.smalltalkError = true; throw(self);
|
65
|
+
return self;}
|
66
|
+
}),
|
67
|
+
smalltalk.Error);
|
68
|
+
|
69
|
+
smalltalk.addMethod(
|
70
|
+
"_signal_",
|
71
|
+
smalltalk.method({
|
72
|
+
selector: "signal:",
|
73
|
+
fn: function (aString){
|
74
|
+
var self=this;
|
75
|
+
smalltalk.send(self, "_messageText_", [aString]);
|
76
|
+
smalltalk.send(self, "_signal", []);
|
65
77
|
return self;}
|
66
78
|
}),
|
67
79
|
smalltalk.Error);
|
68
80
|
|
69
81
|
|
70
82
|
smalltalk.addMethod(
|
71
|
-
|
83
|
+
"_signal",
|
84
|
+
smalltalk.method({
|
85
|
+
selector: "signal",
|
86
|
+
fn: function (){
|
87
|
+
var self=this;
|
88
|
+
return smalltalk.send(smalltalk.send(self, "_new", []), "_signal", []);
|
89
|
+
return self;}
|
90
|
+
}),
|
91
|
+
smalltalk.Error.klass);
|
92
|
+
|
93
|
+
smalltalk.addMethod(
|
94
|
+
"_signal_",
|
72
95
|
smalltalk.method({
|
73
|
-
selector:
|
96
|
+
selector: "signal:",
|
74
97
|
fn: function (aString){
|
75
98
|
var self=this;
|
76
|
-
return
|
99
|
+
return smalltalk.send(smalltalk.send(self, "_new", []), "_signal_", [aString]);
|
77
100
|
return self;}
|
78
101
|
}),
|
79
102
|
smalltalk.Error.klass);
|
@@ -81,9 +104,9 @@ smalltalk.Error.klass);
|
|
81
104
|
|
82
105
|
smalltalk.addClass('MessageNotUnderstood', smalltalk.Error, ['message', 'receiver'], 'Kernel-Exceptions');
|
83
106
|
smalltalk.addMethod(
|
84
|
-
|
107
|
+
"_message",
|
85
108
|
smalltalk.method({
|
86
|
-
selector:
|
109
|
+
selector: "message",
|
87
110
|
fn: function (){
|
88
111
|
var self=this;
|
89
112
|
return self['@message'];
|
@@ -92,9 +115,9 @@ return self;}
|
|
92
115
|
smalltalk.MessageNotUnderstood);
|
93
116
|
|
94
117
|
smalltalk.addMethod(
|
95
|
-
|
118
|
+
"_message_",
|
96
119
|
smalltalk.method({
|
97
|
-
selector:
|
120
|
+
selector: "message:",
|
98
121
|
fn: function (aMessage){
|
99
122
|
var self=this;
|
100
123
|
(self['@message']=aMessage);
|
@@ -103,34 +126,34 @@ return self;}
|
|
103
126
|
smalltalk.MessageNotUnderstood);
|
104
127
|
|
105
128
|
smalltalk.addMethod(
|
106
|
-
|
129
|
+
"_messageText",
|
107
130
|
smalltalk.method({
|
108
|
-
selector:
|
131
|
+
selector: "messageText",
|
109
132
|
fn: function (){
|
110
133
|
var self=this;
|
111
|
-
return self[
|
134
|
+
return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_receiver", []), "_asString", []), "__comma", [" does not understand #"]), "__comma", [smalltalk.send(smalltalk.send(self, "_message", []), "_selector", [])]);
|
112
135
|
return self;}
|
113
136
|
}),
|
114
137
|
smalltalk.MessageNotUnderstood);
|
115
138
|
|
116
139
|
smalltalk.addMethod(
|
117
|
-
|
140
|
+
"_receiver",
|
118
141
|
smalltalk.method({
|
119
|
-
selector:
|
120
|
-
fn: function (
|
142
|
+
selector: "receiver",
|
143
|
+
fn: function (){
|
121
144
|
var self=this;
|
122
|
-
|
145
|
+
return self['@receiver'];
|
123
146
|
return self;}
|
124
147
|
}),
|
125
148
|
smalltalk.MessageNotUnderstood);
|
126
149
|
|
127
150
|
smalltalk.addMethod(
|
128
|
-
|
151
|
+
"_receiver_",
|
129
152
|
smalltalk.method({
|
130
|
-
selector:
|
131
|
-
fn: function (){
|
153
|
+
selector: "receiver:",
|
154
|
+
fn: function (anObject){
|
132
155
|
var self=this;
|
133
|
-
|
156
|
+
(self['@receiver']=anObject);
|
134
157
|
return self;}
|
135
158
|
}),
|
136
159
|
smalltalk.MessageNotUnderstood);
|
@@ -139,9 +162,9 @@ smalltalk.MessageNotUnderstood);
|
|
139
162
|
|
140
163
|
smalltalk.addClass('ErrorHandler', smalltalk.Object, [], 'Kernel-Exceptions');
|
141
164
|
smalltalk.addMethod(
|
142
|
-
|
165
|
+
"_handleError_",
|
143
166
|
smalltalk.method({
|
144
|
-
selector:
|
167
|
+
selector: "handleError:",
|
145
168
|
fn: function (anError){
|
146
169
|
var self=this;
|
147
170
|
(($receiver = smalltalk.send(anError, "_context", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logErrorContext_", [smalltalk.send(anError, "_context", [])]);})() : nil;
|
@@ -151,32 +174,32 @@ return self;}
|
|
151
174
|
smalltalk.ErrorHandler);
|
152
175
|
|
153
176
|
smalltalk.addMethod(
|
154
|
-
|
177
|
+
"_log_",
|
155
178
|
smalltalk.method({
|
156
|
-
selector:
|
157
|
-
fn: function (
|
179
|
+
selector: "log:",
|
180
|
+
fn: function (aString){
|
158
181
|
var self=this;
|
159
|
-
|
160
|
-
smalltalk.send(self, "_log_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aContext, "_receiver", []), "_asString", []), "__comma", [unescape("%3E%3E")]), "__comma", [smalltalk.send(aContext, "_selector", [])])]);
|
182
|
+
smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [aString]);
|
161
183
|
return self;}
|
162
184
|
}),
|
163
185
|
smalltalk.ErrorHandler);
|
164
186
|
|
165
187
|
smalltalk.addMethod(
|
166
|
-
|
188
|
+
"_logContext_",
|
167
189
|
smalltalk.method({
|
168
|
-
selector:
|
190
|
+
selector: "logContext:",
|
169
191
|
fn: function (aContext){
|
170
192
|
var self=this;
|
171
|
-
(($receiver =
|
193
|
+
(($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logContext_", [smalltalk.send(aContext, "_home", [])]);})() : nil;
|
194
|
+
smalltalk.send(self, "_log_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aContext, "_receiver", []), "_asString", []), "__comma", [">>"]), "__comma", [smalltalk.send(aContext, "_selector", [])])]);
|
172
195
|
return self;}
|
173
196
|
}),
|
174
197
|
smalltalk.ErrorHandler);
|
175
198
|
|
176
199
|
smalltalk.addMethod(
|
177
|
-
|
200
|
+
"_logError_",
|
178
201
|
smalltalk.method({
|
179
|
-
selector:
|
202
|
+
selector: "logError:",
|
180
203
|
fn: function (anError){
|
181
204
|
var self=this;
|
182
205
|
smalltalk.send(self, "_log_", [smalltalk.send(anError, "_messageText", [])]);
|
@@ -185,12 +208,12 @@ return self;}
|
|
185
208
|
smalltalk.ErrorHandler);
|
186
209
|
|
187
210
|
smalltalk.addMethod(
|
188
|
-
|
211
|
+
"_logErrorContext_",
|
189
212
|
smalltalk.method({
|
190
|
-
selector:
|
191
|
-
fn: function (
|
213
|
+
selector: "logErrorContext:",
|
214
|
+
fn: function (aContext){
|
192
215
|
var self=this;
|
193
|
-
|
216
|
+
(($receiver = aContext) != nil && $receiver != undefined) ? (function(){return (($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logContext_", [smalltalk.send(aContext, "_home", [])]);})() : nil;})() : nil;
|
194
217
|
return self;}
|
195
218
|
}),
|
196
219
|
smalltalk.ErrorHandler);
|
@@ -198,9 +221,9 @@ smalltalk.ErrorHandler);
|
|
198
221
|
|
199
222
|
smalltalk.ErrorHandler.klass.iVarNames = ['current'];
|
200
223
|
smalltalk.addMethod(
|
201
|
-
|
224
|
+
"_current",
|
202
225
|
smalltalk.method({
|
203
|
-
selector:
|
226
|
+
selector: "current",
|
204
227
|
fn: function (){
|
205
228
|
var self=this;
|
206
229
|
return (($receiver = self['@current']) == nil || $receiver == undefined) ? (function(){return (self['@current']=smalltalk.send(self, "_new", []));})() : $receiver;
|
@@ -209,9 +232,9 @@ return self;}
|
|
209
232
|
smalltalk.ErrorHandler.klass);
|
210
233
|
|
211
234
|
smalltalk.addMethod(
|
212
|
-
|
235
|
+
"_initialize",
|
213
236
|
smalltalk.method({
|
214
|
-
selector:
|
237
|
+
selector: "initialize",
|
215
238
|
fn: function (){
|
216
239
|
var self=this;
|
217
240
|
smalltalk.send(self, "_register", []);
|
@@ -220,9 +243,9 @@ return self;}
|
|
220
243
|
smalltalk.ErrorHandler.klass);
|
221
244
|
|
222
245
|
smalltalk.addMethod(
|
223
|
-
|
246
|
+
"_register",
|
224
247
|
smalltalk.method({
|
225
|
-
selector:
|
248
|
+
selector: "register",
|
226
249
|
fn: function (){
|
227
250
|
var self=this;
|
228
251
|
smalltalk.send((smalltalk.ErrorHandler || ErrorHandler), "_setCurrent_", [smalltalk.send(self, "_new", [])]);
|
@@ -231,9 +254,9 @@ return self;}
|
|
231
254
|
smalltalk.ErrorHandler.klass);
|
232
255
|
|
233
256
|
smalltalk.addMethod(
|
234
|
-
|
257
|
+
"_setCurrent_",
|
235
258
|
smalltalk.method({
|
236
|
-
selector:
|
259
|
+
selector: "setCurrent:",
|
237
260
|
fn: function (anHandler){
|
238
261
|
var self=this;
|
239
262
|
(self['@current']=anHandler);
|
@@ -1,114 +1,147 @@
|
|
1
1
|
smalltalk.addPackage('Kernel-Exceptions', {});
|
2
2
|
smalltalk.addClass('Error', smalltalk.Object, ['messageText'], 'Kernel-Exceptions');
|
3
3
|
smalltalk.addMethod(
|
4
|
-
|
4
|
+
"_context",
|
5
5
|
smalltalk.method({
|
6
|
-
selector:
|
6
|
+
selector: "context",
|
7
7
|
category: 'accessing',
|
8
8
|
fn: function (){
|
9
9
|
var self=this;
|
10
|
-
return self
|
10
|
+
return self.context;
|
11
11
|
return self;},
|
12
12
|
args: [],
|
13
|
-
source:
|
13
|
+
source: "context\x0a\x09<return self.context>",
|
14
14
|
messageSends: [],
|
15
15
|
referencedClasses: []
|
16
16
|
}),
|
17
17
|
smalltalk.Error);
|
18
18
|
|
19
19
|
smalltalk.addMethod(
|
20
|
-
|
20
|
+
"_isSmalltalkError",
|
21
21
|
smalltalk.method({
|
22
|
-
selector:
|
23
|
-
category: '
|
24
|
-
fn: function (
|
22
|
+
selector: "isSmalltalkError",
|
23
|
+
category: 'testing',
|
24
|
+
fn: function (){
|
25
25
|
var self=this;
|
26
|
-
|
26
|
+
return self.smalltalkError === true;
|
27
27
|
return self;},
|
28
|
-
args: [
|
29
|
-
source:
|
28
|
+
args: [],
|
29
|
+
source: "isSmalltalkError\x0a\x09<return self.smalltalkError === true>",
|
30
30
|
messageSends: [],
|
31
31
|
referencedClasses: []
|
32
32
|
}),
|
33
33
|
smalltalk.Error);
|
34
34
|
|
35
35
|
smalltalk.addMethod(
|
36
|
-
|
36
|
+
"_jsStack",
|
37
37
|
smalltalk.method({
|
38
|
-
selector:
|
39
|
-
category: '
|
38
|
+
selector: "jsStack",
|
39
|
+
category: 'accessing',
|
40
40
|
fn: function (){
|
41
41
|
var self=this;
|
42
|
-
|
42
|
+
return self.stack;
|
43
43
|
return self;},
|
44
44
|
args: [],
|
45
|
-
source:
|
45
|
+
source: "jsStack\x0a\x09<return self.stack>",
|
46
46
|
messageSends: [],
|
47
47
|
referencedClasses: []
|
48
48
|
}),
|
49
49
|
smalltalk.Error);
|
50
50
|
|
51
51
|
smalltalk.addMethod(
|
52
|
-
|
52
|
+
"_messageText",
|
53
53
|
smalltalk.method({
|
54
|
-
selector:
|
54
|
+
selector: "messageText",
|
55
55
|
category: 'accessing',
|
56
56
|
fn: function (){
|
57
57
|
var self=this;
|
58
|
-
return self
|
58
|
+
return self['@messageText'];
|
59
59
|
return self;},
|
60
60
|
args: [],
|
61
|
-
source:
|
61
|
+
source: "messageText\x0a\x09^messageText",
|
62
62
|
messageSends: [],
|
63
63
|
referencedClasses: []
|
64
64
|
}),
|
65
65
|
smalltalk.Error);
|
66
66
|
|
67
67
|
smalltalk.addMethod(
|
68
|
-
|
68
|
+
"_messageText_",
|
69
69
|
smalltalk.method({
|
70
|
-
selector:
|
70
|
+
selector: "messageText:",
|
71
71
|
category: 'accessing',
|
72
|
-
fn: function (){
|
72
|
+
fn: function (aString){
|
73
73
|
var self=this;
|
74
|
-
|
74
|
+
(self['@messageText']=aString);
|
75
75
|
return self;},
|
76
|
-
args: [],
|
77
|
-
source:
|
76
|
+
args: ["aString"],
|
77
|
+
source: "messageText: aString\x0a\x09messageText := aString",
|
78
78
|
messageSends: [],
|
79
79
|
referencedClasses: []
|
80
80
|
}),
|
81
81
|
smalltalk.Error);
|
82
82
|
|
83
83
|
smalltalk.addMethod(
|
84
|
-
|
84
|
+
"_signal",
|
85
85
|
smalltalk.method({
|
86
|
-
selector:
|
87
|
-
category: '
|
86
|
+
selector: "signal",
|
87
|
+
category: 'signaling',
|
88
88
|
fn: function (){
|
89
89
|
var self=this;
|
90
|
-
|
90
|
+
self.context = smalltalk.getThisContext(); self.smalltalkError = true; throw(self);
|
91
91
|
return self;},
|
92
92
|
args: [],
|
93
|
-
source:
|
93
|
+
source: "signal\x0a\x09<self.context = smalltalk.getThisContext(); self.smalltalkError = true; throw(self)>",
|
94
94
|
messageSends: [],
|
95
95
|
referencedClasses: []
|
96
96
|
}),
|
97
97
|
smalltalk.Error);
|
98
98
|
|
99
|
+
smalltalk.addMethod(
|
100
|
+
"_signal_",
|
101
|
+
smalltalk.method({
|
102
|
+
selector: "signal:",
|
103
|
+
category: 'signaling',
|
104
|
+
fn: function (aString){
|
105
|
+
var self=this;
|
106
|
+
smalltalk.send(self, "_messageText_", [aString]);
|
107
|
+
smalltalk.send(self, "_signal", []);
|
108
|
+
return self;},
|
109
|
+
args: ["aString"],
|
110
|
+
source: "signal: aString\x0a\x09self messageText: aString.\x0a\x09self signal",
|
111
|
+
messageSends: ["messageText:", "signal"],
|
112
|
+
referencedClasses: []
|
113
|
+
}),
|
114
|
+
smalltalk.Error);
|
115
|
+
|
116
|
+
|
117
|
+
smalltalk.addMethod(
|
118
|
+
"_signal",
|
119
|
+
smalltalk.method({
|
120
|
+
selector: "signal",
|
121
|
+
category: 'instance creation',
|
122
|
+
fn: function (){
|
123
|
+
var self=this;
|
124
|
+
return smalltalk.send(smalltalk.send(self, "_new", []), "_signal", []);
|
125
|
+
return self;},
|
126
|
+
args: [],
|
127
|
+
source: "signal\x0a\x09^self new signal",
|
128
|
+
messageSends: ["signal", "new"],
|
129
|
+
referencedClasses: []
|
130
|
+
}),
|
131
|
+
smalltalk.Error.klass);
|
99
132
|
|
100
133
|
smalltalk.addMethod(
|
101
|
-
|
134
|
+
"_signal_",
|
102
135
|
smalltalk.method({
|
103
|
-
selector:
|
136
|
+
selector: "signal:",
|
104
137
|
category: 'instance creation',
|
105
138
|
fn: function (aString){
|
106
139
|
var self=this;
|
107
|
-
return
|
140
|
+
return smalltalk.send(smalltalk.send(self, "_new", []), "_signal_", [aString]);
|
108
141
|
return self;},
|
109
142
|
args: ["aString"],
|
110
|
-
source:
|
111
|
-
messageSends: ["
|
143
|
+
source: "signal: aString\x0a\x09 ^self new\x0a\x09\x09signal: aString",
|
144
|
+
messageSends: ["signal:", "new"],
|
112
145
|
referencedClasses: []
|
113
146
|
}),
|
114
147
|
smalltalk.Error.klass);
|
@@ -116,81 +149,81 @@ smalltalk.Error.klass);
|
|
116
149
|
|
117
150
|
smalltalk.addClass('MessageNotUnderstood', smalltalk.Error, ['message', 'receiver'], 'Kernel-Exceptions');
|
118
151
|
smalltalk.addMethod(
|
119
|
-
|
152
|
+
"_message",
|
120
153
|
smalltalk.method({
|
121
|
-
selector:
|
154
|
+
selector: "message",
|
122
155
|
category: 'accessing',
|
123
156
|
fn: function (){
|
124
157
|
var self=this;
|
125
158
|
return self['@message'];
|
126
159
|
return self;},
|
127
160
|
args: [],
|
128
|
-
source:
|
161
|
+
source: "message\x0a\x09^message",
|
129
162
|
messageSends: [],
|
130
163
|
referencedClasses: []
|
131
164
|
}),
|
132
165
|
smalltalk.MessageNotUnderstood);
|
133
166
|
|
134
167
|
smalltalk.addMethod(
|
135
|
-
|
168
|
+
"_message_",
|
136
169
|
smalltalk.method({
|
137
|
-
selector:
|
170
|
+
selector: "message:",
|
138
171
|
category: 'accessing',
|
139
172
|
fn: function (aMessage){
|
140
173
|
var self=this;
|
141
174
|
(self['@message']=aMessage);
|
142
175
|
return self;},
|
143
176
|
args: ["aMessage"],
|
144
|
-
source:
|
177
|
+
source: "message: aMessage\x0a\x09message := aMessage",
|
145
178
|
messageSends: [],
|
146
179
|
referencedClasses: []
|
147
180
|
}),
|
148
181
|
smalltalk.MessageNotUnderstood);
|
149
182
|
|
150
183
|
smalltalk.addMethod(
|
151
|
-
|
184
|
+
"_messageText",
|
152
185
|
smalltalk.method({
|
153
|
-
selector:
|
186
|
+
selector: "messageText",
|
154
187
|
category: 'accessing',
|
155
188
|
fn: function (){
|
156
189
|
var self=this;
|
157
|
-
return self[
|
190
|
+
return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_receiver", []), "_asString", []), "__comma", [" does not understand #"]), "__comma", [smalltalk.send(smalltalk.send(self, "_message", []), "_selector", [])]);
|
158
191
|
return self;},
|
159
192
|
args: [],
|
160
|
-
source:
|
161
|
-
messageSends: [],
|
193
|
+
source: "messageText\x0a\x09^self receiver asString, ' does not understand #', self message selector",
|
194
|
+
messageSends: [",", "asString", "receiver", "selector", "message"],
|
162
195
|
referencedClasses: []
|
163
196
|
}),
|
164
197
|
smalltalk.MessageNotUnderstood);
|
165
198
|
|
166
199
|
smalltalk.addMethod(
|
167
|
-
|
200
|
+
"_receiver",
|
168
201
|
smalltalk.method({
|
169
|
-
selector:
|
202
|
+
selector: "receiver",
|
170
203
|
category: 'accessing',
|
171
|
-
fn: function (
|
204
|
+
fn: function (){
|
172
205
|
var self=this;
|
173
|
-
|
206
|
+
return self['@receiver'];
|
174
207
|
return self;},
|
175
|
-
args: [
|
176
|
-
source:
|
208
|
+
args: [],
|
209
|
+
source: "receiver\x0a\x09^receiver",
|
177
210
|
messageSends: [],
|
178
211
|
referencedClasses: []
|
179
212
|
}),
|
180
213
|
smalltalk.MessageNotUnderstood);
|
181
214
|
|
182
215
|
smalltalk.addMethod(
|
183
|
-
|
216
|
+
"_receiver_",
|
184
217
|
smalltalk.method({
|
185
|
-
selector:
|
218
|
+
selector: "receiver:",
|
186
219
|
category: 'accessing',
|
187
|
-
fn: function (){
|
220
|
+
fn: function (anObject){
|
188
221
|
var self=this;
|
189
|
-
|
222
|
+
(self['@receiver']=anObject);
|
190
223
|
return self;},
|
191
|
-
args: [],
|
192
|
-
source:
|
193
|
-
messageSends: [
|
224
|
+
args: ["anObject"],
|
225
|
+
source: "receiver: anObject\x0a\x09receiver := anObject",
|
226
|
+
messageSends: [],
|
194
227
|
referencedClasses: []
|
195
228
|
}),
|
196
229
|
smalltalk.MessageNotUnderstood);
|
@@ -199,9 +232,9 @@ smalltalk.MessageNotUnderstood);
|
|
199
232
|
|
200
233
|
smalltalk.addClass('ErrorHandler', smalltalk.Object, [], 'Kernel-Exceptions');
|
201
234
|
smalltalk.addMethod(
|
202
|
-
|
235
|
+
"_handleError_",
|
203
236
|
smalltalk.method({
|
204
|
-
selector:
|
237
|
+
selector: "handleError:",
|
205
238
|
category: 'error handling',
|
206
239
|
fn: function (anError){
|
207
240
|
var self=this;
|
@@ -209,73 +242,73 @@ var self=this;
|
|
209
242
|
smalltalk.send(self, "_logError_", [anError]);
|
210
243
|
return self;},
|
211
244
|
args: ["anError"],
|
212
|
-
source:
|
245
|
+
source: "handleError: anError\x0a\x09anError context ifNotNil: [self logErrorContext: anError context].\x0a\x09self logError: anError",
|
213
246
|
messageSends: ["ifNotNil:", "context", "logErrorContext:", "logError:"],
|
214
247
|
referencedClasses: []
|
215
248
|
}),
|
216
249
|
smalltalk.ErrorHandler);
|
217
250
|
|
218
251
|
smalltalk.addMethod(
|
219
|
-
|
252
|
+
"_log_",
|
220
253
|
smalltalk.method({
|
221
|
-
selector:
|
254
|
+
selector: "log:",
|
222
255
|
category: 'private',
|
223
|
-
fn: function (
|
256
|
+
fn: function (aString){
|
224
257
|
var self=this;
|
225
|
-
|
226
|
-
smalltalk.send(self, "_log_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aContext, "_receiver", []), "_asString", []), "__comma", [unescape("%3E%3E")]), "__comma", [smalltalk.send(aContext, "_selector", [])])]);
|
258
|
+
smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [aString]);
|
227
259
|
return self;},
|
228
|
-
args: ["
|
229
|
-
source:
|
230
|
-
messageSends: ["
|
260
|
+
args: ["aString"],
|
261
|
+
source: "log: aString\x0a\x09console log: aString",
|
262
|
+
messageSends: ["log:"],
|
231
263
|
referencedClasses: []
|
232
264
|
}),
|
233
265
|
smalltalk.ErrorHandler);
|
234
266
|
|
235
267
|
smalltalk.addMethod(
|
236
|
-
|
268
|
+
"_logContext_",
|
237
269
|
smalltalk.method({
|
238
|
-
selector:
|
270
|
+
selector: "logContext:",
|
239
271
|
category: 'private',
|
240
272
|
fn: function (aContext){
|
241
273
|
var self=this;
|
242
|
-
(($receiver =
|
274
|
+
(($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logContext_", [smalltalk.send(aContext, "_home", [])]);})() : nil;
|
275
|
+
smalltalk.send(self, "_log_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aContext, "_receiver", []), "_asString", []), "__comma", [">>"]), "__comma", [smalltalk.send(aContext, "_selector", [])])]);
|
243
276
|
return self;},
|
244
277
|
args: ["aContext"],
|
245
|
-
source:
|
246
|
-
messageSends: ["ifNotNil:", "home", "logContext:"],
|
278
|
+
source: "logContext: aContext\x0a\x09aContext home ifNotNil: [\x0a\x09\x09self logContext: aContext home].\x0a\x09self log: aContext receiver asString, '>>', aContext selector",
|
279
|
+
messageSends: ["ifNotNil:", "home", "logContext:", "log:", ",", "asString", "receiver", "selector"],
|
247
280
|
referencedClasses: []
|
248
281
|
}),
|
249
282
|
smalltalk.ErrorHandler);
|
250
283
|
|
251
284
|
smalltalk.addMethod(
|
252
|
-
|
285
|
+
"_logError_",
|
253
286
|
smalltalk.method({
|
254
|
-
selector:
|
287
|
+
selector: "logError:",
|
255
288
|
category: 'private',
|
256
289
|
fn: function (anError){
|
257
290
|
var self=this;
|
258
291
|
smalltalk.send(self, "_log_", [smalltalk.send(anError, "_messageText", [])]);
|
259
292
|
return self;},
|
260
293
|
args: ["anError"],
|
261
|
-
source:
|
294
|
+
source: "logError: anError\x0a\x09self log: anError messageText",
|
262
295
|
messageSends: ["log:", "messageText"],
|
263
296
|
referencedClasses: []
|
264
297
|
}),
|
265
298
|
smalltalk.ErrorHandler);
|
266
299
|
|
267
300
|
smalltalk.addMethod(
|
268
|
-
|
301
|
+
"_logErrorContext_",
|
269
302
|
smalltalk.method({
|
270
|
-
selector:
|
303
|
+
selector: "logErrorContext:",
|
271
304
|
category: 'private',
|
272
|
-
fn: function (
|
305
|
+
fn: function (aContext){
|
273
306
|
var self=this;
|
274
|
-
|
307
|
+
(($receiver = aContext) != nil && $receiver != undefined) ? (function(){return (($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logContext_", [smalltalk.send(aContext, "_home", [])]);})() : nil;})() : nil;
|
275
308
|
return self;},
|
276
|
-
args: ["
|
277
|
-
source:
|
278
|
-
messageSends: ["
|
309
|
+
args: ["aContext"],
|
310
|
+
source: "logErrorContext: aContext\x0a\x09aContext ifNotNil: [\x0a\x09\x09aContext home ifNotNil: [\x0a\x09\x09\x09self logContext: aContext home]]",
|
311
|
+
messageSends: ["ifNotNil:", "home", "logContext:"],
|
279
312
|
referencedClasses: []
|
280
313
|
}),
|
281
314
|
smalltalk.ErrorHandler);
|
@@ -283,64 +316,64 @@ smalltalk.ErrorHandler);
|
|
283
316
|
|
284
317
|
smalltalk.ErrorHandler.klass.iVarNames = ['current'];
|
285
318
|
smalltalk.addMethod(
|
286
|
-
|
319
|
+
"_current",
|
287
320
|
smalltalk.method({
|
288
|
-
selector:
|
321
|
+
selector: "current",
|
289
322
|
category: 'accessing',
|
290
323
|
fn: function (){
|
291
324
|
var self=this;
|
292
325
|
return (($receiver = self['@current']) == nil || $receiver == undefined) ? (function(){return (self['@current']=smalltalk.send(self, "_new", []));})() : $receiver;
|
293
326
|
return self;},
|
294
327
|
args: [],
|
295
|
-
source:
|
328
|
+
source: "current\x0a\x09^current ifNil: [current := self new]",
|
296
329
|
messageSends: ["ifNil:", "new"],
|
297
330
|
referencedClasses: []
|
298
331
|
}),
|
299
332
|
smalltalk.ErrorHandler.klass);
|
300
333
|
|
301
334
|
smalltalk.addMethod(
|
302
|
-
|
335
|
+
"_initialize",
|
303
336
|
smalltalk.method({
|
304
|
-
selector:
|
337
|
+
selector: "initialize",
|
305
338
|
category: 'initialization',
|
306
339
|
fn: function (){
|
307
340
|
var self=this;
|
308
341
|
smalltalk.send(self, "_register", []);
|
309
342
|
return self;},
|
310
343
|
args: [],
|
311
|
-
source:
|
344
|
+
source: "initialize\x0a\x09self register",
|
312
345
|
messageSends: ["register"],
|
313
346
|
referencedClasses: []
|
314
347
|
}),
|
315
348
|
smalltalk.ErrorHandler.klass);
|
316
349
|
|
317
350
|
smalltalk.addMethod(
|
318
|
-
|
351
|
+
"_register",
|
319
352
|
smalltalk.method({
|
320
|
-
selector:
|
353
|
+
selector: "register",
|
321
354
|
category: 'initialization',
|
322
355
|
fn: function (){
|
323
356
|
var self=this;
|
324
357
|
smalltalk.send((smalltalk.ErrorHandler || ErrorHandler), "_setCurrent_", [smalltalk.send(self, "_new", [])]);
|
325
358
|
return self;},
|
326
359
|
args: [],
|
327
|
-
source:
|
360
|
+
source: "register\x0a\x09ErrorHandler setCurrent: self new",
|
328
361
|
messageSends: ["setCurrent:", "new"],
|
329
362
|
referencedClasses: ["ErrorHandler"]
|
330
363
|
}),
|
331
364
|
smalltalk.ErrorHandler.klass);
|
332
365
|
|
333
366
|
smalltalk.addMethod(
|
334
|
-
|
367
|
+
"_setCurrent_",
|
335
368
|
smalltalk.method({
|
336
|
-
selector:
|
369
|
+
selector: "setCurrent:",
|
337
370
|
category: 'accessing',
|
338
371
|
fn: function (anHandler){
|
339
372
|
var self=this;
|
340
373
|
(self['@current']=anHandler);
|
341
374
|
return self;},
|
342
375
|
args: ["anHandler"],
|
343
|
-
source:
|
376
|
+
source: "setCurrent: anHandler\x0a\x09current := anHandler",
|
344
377
|
messageSends: [],
|
345
378
|
referencedClasses: []
|
346
379
|
}),
|