resin 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/amber/bin/amberc +10 -350
- data/amber/js/Benchfib.deploy.js +80 -89
- data/amber/js/Benchfib.js +80 -89
- data/amber/js/Canvas.deploy.js +558 -545
- data/amber/js/Canvas.js +563 -545
- data/amber/js/Compiler-AST.deploy.js +431 -243
- data/amber/js/Compiler-AST.js +487 -244
- data/amber/js/Compiler-Core.deploy.js +201 -1045
- data/amber/js/Compiler-Core.js +208 -1207
- data/amber/js/Compiler-Exceptions.deploy.js +37 -18
- data/amber/js/Compiler-Exceptions.js +42 -18
- data/amber/js/Compiler-IR.deploy.js +1071 -774
- data/amber/js/Compiler-IR.js +1194 -848
- data/amber/js/Compiler-Inlining.deploy.js +395 -373
- data/amber/js/Compiler-Inlining.js +395 -373
- data/amber/js/Compiler-Interpreter.deploy.js +1202 -0
- data/amber/js/Compiler-Interpreter.js +1631 -0
- data/amber/js/Compiler-Semantic.deploy.js +695 -600
- data/amber/js/Compiler-Semantic.js +721 -611
- data/amber/js/Compiler-Tests.deploy.js +699 -376
- data/amber/js/Compiler-Tests.js +834 -381
- data/amber/js/Compiler.deploy.js +8563 -1805
- data/amber/js/Compiler.js +11476 -2633
- data/amber/js/Examples.deploy.js +29 -29
- data/amber/js/Examples.js +29 -29
- data/amber/js/IDE.deploy.js +3292 -2649
- data/amber/js/IDE.js +3318 -2710
- data/amber/js/Importer-Exporter.deploy.js +393 -349
- data/amber/js/Importer-Exporter.js +398 -354
- data/amber/js/Kernel-Announcements.deploy.js +53 -44
- data/amber/js/Kernel-Announcements.js +55 -44
- data/amber/js/Kernel-Classes.deploy.js +566 -368
- data/amber/js/Kernel-Classes.js +660 -402
- data/amber/js/Kernel-Collections.deploy.js +1149 -1098
- data/amber/js/Kernel-Collections.js +1183 -1116
- data/amber/js/Kernel-Exceptions.deploy.js +173 -75
- data/amber/js/Kernel-Exceptions.js +215 -77
- data/amber/js/Kernel-Methods.deploy.js +530 -313
- data/amber/js/Kernel-Methods.js +632 -338
- data/amber/js/Kernel-Objects.deploy.js +1734 -1577
- data/amber/js/Kernel-Objects.js +1867 -1654
- data/amber/js/Kernel-Tests.deploy.js +1416 -973
- data/amber/js/Kernel-Tests.js +1495 -981
- data/amber/js/Kernel-Transcript.deploy.js +23 -24
- data/amber/js/Kernel-Transcript.js +25 -26
- data/amber/js/SUnit-Tests.deploy.js +402 -0
- data/amber/js/SUnit-Tests.js +518 -0
- data/amber/js/SUnit.deploy.js +535 -237
- data/amber/js/SUnit.js +634 -246
- data/amber/js/amber.js +90 -53
- data/amber/js/boot.js +441 -255
- data/amber/js/init.js +1 -3
- data/amber/js/lib/CodeMirror/codemirror.css +3 -0
- data/amber/js/lib/CodeMirror/codemirror.js +104 -55
- data/amber/js/lib/peg-0.7.0.min.js +9 -0
- data/amber/js/parser.js +1504 -802
- data/amber/js/parser.pegjs +170 -165
- data/amber/st/Canvas.st +6 -0
- data/amber/st/Compiler-AST.st +54 -3
- data/amber/st/Compiler-Core.st +6 -551
- data/amber/st/Compiler-Exceptions.st +4 -0
- data/amber/st/Compiler-IR.st +205 -87
- data/amber/st/Compiler-Interpreter.st +597 -0
- data/amber/st/Compiler-Semantic.st +46 -21
- data/amber/st/Compiler-Tests.st +254 -7
- data/amber/st/Compiler.st +3172 -1541
- data/amber/st/IDE.st +57 -93
- data/amber/st/Importer-Exporter.st +4 -7
- data/amber/st/Kernel-Announcements.st +8 -0
- data/amber/st/Kernel-Classes.st +149 -40
- data/amber/st/Kernel-Collections.st +43 -32
- data/amber/st/Kernel-Exceptions.st +70 -1
- data/amber/st/Kernel-Methods.st +165 -27
- data/amber/st/Kernel-Objects.st +215 -140
- data/amber/st/Kernel-Tests.st +195 -10
- data/amber/st/Kernel-Transcript.st +1 -3
- data/amber/st/SUnit-Tests.st +186 -0
- data/amber/st/SUnit.st +186 -14
- data/bin/resin +6 -0
- data/lib/resin/cli.rb +19 -0
- metadata +41 -25
- data/amber/js/lib/peg-0.6.2.min.js +0 -2
- data/bin/resin-compile +0 -6
- data/bin/runresin +0 -12
@@ -4,12 +4,11 @@ smalltalk.addMethod(
|
|
4
4
|
"_addArg_",
|
5
5
|
smalltalk.method({
|
6
6
|
selector: "addArg:",
|
7
|
-
fn: function (aString)
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
}
|
7
|
+
fn: function (aString){
|
8
|
+
var self=this;
|
9
|
+
return smalltalk.withContext(function($ctx1) {
|
10
|
+
_st(_st(_st(self)._args())._at_(aString))._scope_(self);
|
11
|
+
return self}, function($ctx1) {$ctx1.fill(self,"addArg:",{aString:aString}, smalltalk.LexicalScope)})}
|
13
12
|
}),
|
14
13
|
smalltalk.LexicalScope);
|
15
14
|
|
@@ -17,12 +16,24 @@ smalltalk.addMethod(
|
|
17
16
|
"_addTemp_",
|
18
17
|
smalltalk.method({
|
19
18
|
selector: "addTemp:",
|
20
|
-
fn: function (aString)
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
}
|
19
|
+
fn: function (aString){
|
20
|
+
var self=this;
|
21
|
+
return smalltalk.withContext(function($ctx1) {
|
22
|
+
_st(_st(_st(self)._temps())._at_(aString))._scope_(self);
|
23
|
+
return self}, function($ctx1) {$ctx1.fill(self,"addTemp:",{aString:aString}, smalltalk.LexicalScope)})}
|
24
|
+
}),
|
25
|
+
smalltalk.LexicalScope);
|
26
|
+
|
27
|
+
smalltalk.addMethod(
|
28
|
+
"_alias",
|
29
|
+
smalltalk.method({
|
30
|
+
selector: "alias",
|
31
|
+
fn: function (){
|
32
|
+
var self=this;
|
33
|
+
return smalltalk.withContext(function($ctx1) {
|
34
|
+
$1=_st("$ctx").__comma(_st(_st(self)._scopeLevel())._asString());
|
35
|
+
return $1;
|
36
|
+
}, function($ctx1) {$ctx1.fill(self,"alias",{}, smalltalk.LexicalScope)})}
|
26
37
|
}),
|
27
38
|
smalltalk.LexicalScope);
|
28
39
|
|
@@ -30,12 +41,12 @@ smalltalk.addMethod(
|
|
30
41
|
"_allVariableNames",
|
31
42
|
smalltalk.method({
|
32
43
|
selector: "allVariableNames",
|
33
|
-
fn: function ()
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
}
|
44
|
+
fn: function (){
|
45
|
+
var self=this;
|
46
|
+
return smalltalk.withContext(function($ctx1) {
|
47
|
+
$1=_st(_st(_st(self)._args())._keys()).__comma(_st(_st(self)._temps())._keys());
|
48
|
+
return $1;
|
49
|
+
}, function($ctx1) {$ctx1.fill(self,"allVariableNames",{}, smalltalk.LexicalScope)})}
|
39
50
|
}),
|
40
51
|
smalltalk.LexicalScope);
|
41
52
|
|
@@ -43,17 +54,18 @@ smalltalk.addMethod(
|
|
43
54
|
"_args",
|
44
55
|
smalltalk.method({
|
45
56
|
selector: "args",
|
46
|
-
fn: function ()
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
+
fn: function (){
|
58
|
+
var self=this;
|
59
|
+
return smalltalk.withContext(function($ctx1) {
|
60
|
+
$2=self["@args"];
|
61
|
+
if(($receiver = $2) == nil || $receiver == undefined){
|
62
|
+
self["@args"]=_st((smalltalk.Dictionary || Dictionary))._new();
|
63
|
+
$1=self["@args"];
|
64
|
+
} else {
|
65
|
+
$1=$2;
|
66
|
+
};
|
67
|
+
return $1;
|
68
|
+
}, function($ctx1) {$ctx1.fill(self,"args",{}, smalltalk.LexicalScope)})}
|
57
69
|
}),
|
58
70
|
smalltalk.LexicalScope);
|
59
71
|
|
@@ -61,12 +73,18 @@ smalltalk.addMethod(
|
|
61
73
|
"_bindingFor_",
|
62
74
|
smalltalk.method({
|
63
75
|
selector: "bindingFor:",
|
64
|
-
fn: function (aStringOrNode)
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
76
|
+
fn: function (aStringOrNode){
|
77
|
+
var self=this;
|
78
|
+
return smalltalk.withContext(function($ctx1) {
|
79
|
+
$1=_st(_st(self)._pseudoVars())._at_ifAbsent_(_st(aStringOrNode)._value(),(function(){
|
80
|
+
return smalltalk.withContext(function($ctx2) {
|
81
|
+
return smalltalk.withContext(function($ctx3) {
|
82
|
+
return smalltalk.withContext(function($ctx4) {
|
83
|
+
}, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
|
84
|
+
}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
|
85
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
86
|
+
return $1;
|
87
|
+
}, function($ctx1) {$ctx1.fill(self,"bindingFor:",{aStringOrNode:aStringOrNode}, smalltalk.LexicalScope)})}
|
70
88
|
}),
|
71
89
|
smalltalk.LexicalScope);
|
72
90
|
|
@@ -74,12 +92,14 @@ smalltalk.addMethod(
|
|
74
92
|
"_canInlineNonLocalReturns",
|
75
93
|
smalltalk.method({
|
76
94
|
selector: "canInlineNonLocalReturns",
|
77
|
-
fn: function ()
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
}
|
95
|
+
fn: function (){
|
96
|
+
var self=this;
|
97
|
+
return smalltalk.withContext(function($ctx1) {
|
98
|
+
$1=_st(_st(self)._isInlined())._and_((function(){
|
99
|
+
return smalltalk.withContext(function($ctx2) {
|
100
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
101
|
+
return $1;
|
102
|
+
}, function($ctx1) {$ctx1.fill(self,"canInlineNonLocalReturns",{}, smalltalk.LexicalScope)})}
|
83
103
|
}),
|
84
104
|
smalltalk.LexicalScope);
|
85
105
|
|
@@ -87,10 +107,12 @@ smalltalk.addMethod(
|
|
87
107
|
"_instruction",
|
88
108
|
smalltalk.method({
|
89
109
|
selector: "instruction",
|
90
|
-
fn: function ()
|
91
|
-
|
92
|
-
|
93
|
-
|
110
|
+
fn: function (){
|
111
|
+
var self=this;
|
112
|
+
return smalltalk.withContext(function($ctx1) {
|
113
|
+
$1=self["@instruction"];
|
114
|
+
return $1;
|
115
|
+
}, function($ctx1) {$ctx1.fill(self,"instruction",{}, smalltalk.LexicalScope)})}
|
94
116
|
}),
|
95
117
|
smalltalk.LexicalScope);
|
96
118
|
|
@@ -98,11 +120,10 @@ smalltalk.addMethod(
|
|
98
120
|
"_instruction_",
|
99
121
|
smalltalk.method({
|
100
122
|
selector: "instruction:",
|
101
|
-
fn: function (anIRInstruction)
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
}
|
123
|
+
fn: function (anIRInstruction){
|
124
|
+
var self=this;
|
125
|
+
return smalltalk.withContext(function($ctx1) {
|
126
|
+
return self}, function($ctx1) {$ctx1.fill(self,"instruction:",{anIRInstruction:anIRInstruction}, smalltalk.LexicalScope)})}
|
106
127
|
}),
|
107
128
|
smalltalk.LexicalScope);
|
108
129
|
|
@@ -110,12 +131,12 @@ smalltalk.addMethod(
|
|
110
131
|
"_isBlockScope",
|
111
132
|
smalltalk.method({
|
112
133
|
selector: "isBlockScope",
|
113
|
-
fn: function ()
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
}
|
134
|
+
fn: function (){
|
135
|
+
var self=this;
|
136
|
+
return smalltalk.withContext(function($ctx1) {
|
137
|
+
$1=_st(_st(self)._isMethodScope())._not();
|
138
|
+
return $1;
|
139
|
+
}, function($ctx1) {$ctx1.fill(self,"isBlockScope",{}, smalltalk.LexicalScope)})}
|
119
140
|
}),
|
120
141
|
smalltalk.LexicalScope);
|
121
142
|
|
@@ -123,12 +144,14 @@ smalltalk.addMethod(
|
|
123
144
|
"_isInlined",
|
124
145
|
smalltalk.method({
|
125
146
|
selector: "isInlined",
|
126
|
-
fn: function ()
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
}
|
147
|
+
fn: function (){
|
148
|
+
var self=this;
|
149
|
+
return smalltalk.withContext(function($ctx1) {
|
150
|
+
$1=_st(_st(_st(self)._instruction())._notNil())._and_((function(){
|
151
|
+
return smalltalk.withContext(function($ctx2) {
|
152
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
153
|
+
return $1;
|
154
|
+
}, function($ctx1) {$ctx1.fill(self,"isInlined",{}, smalltalk.LexicalScope)})}
|
132
155
|
}),
|
133
156
|
smalltalk.LexicalScope);
|
134
157
|
|
@@ -136,10 +159,10 @@ smalltalk.addMethod(
|
|
136
159
|
"_isMethodScope",
|
137
160
|
smalltalk.method({
|
138
161
|
selector: "isMethodScope",
|
139
|
-
fn: function ()
|
140
|
-
|
141
|
-
|
142
|
-
}
|
162
|
+
fn: function (){
|
163
|
+
var self=this;
|
164
|
+
return smalltalk.withContext(function($ctx1) {
|
165
|
+
}, function($ctx1) {$ctx1.fill(self,"isMethodScope",{}, smalltalk.LexicalScope)})}
|
143
166
|
}),
|
144
167
|
smalltalk.LexicalScope);
|
145
168
|
|
@@ -147,22 +170,25 @@ smalltalk.addMethod(
|
|
147
170
|
"_lookupVariable_",
|
148
171
|
smalltalk.method({
|
149
172
|
selector: "lookupVariable:",
|
150
|
-
fn: function (aNode)
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
173
|
+
fn: function (aNode){
|
174
|
+
var self=this;
|
175
|
+
var lookup;
|
176
|
+
return smalltalk.withContext(function($ctx1) {
|
177
|
+
lookup=_st(self)._bindingFor_(aNode);
|
178
|
+
$1=lookup;
|
179
|
+
$2=(function(){
|
180
|
+
return smalltalk.withContext(function($ctx2) {
|
181
|
+
if(($receiver = $3) == nil || $receiver == undefined){
|
182
|
+
lookup=$3;
|
183
|
+
} else {
|
184
|
+
lookup=_st(_st(self)._outerScope())._lookupVariable_(aNode);
|
185
|
+
};
|
186
|
+
return lookup;
|
187
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
|
188
|
+
_st($1)._ifNil_($2);
|
189
|
+
$4=lookup;
|
190
|
+
return $4;
|
191
|
+
}, function($ctx1) {$ctx1.fill(self,"lookupVariable:",{aNode:aNode,lookup:lookup}, smalltalk.LexicalScope)})}
|
166
192
|
}),
|
167
193
|
smalltalk.LexicalScope);
|
168
194
|
|
@@ -170,17 +196,17 @@ smalltalk.addMethod(
|
|
170
196
|
"_methodScope",
|
171
197
|
smalltalk.method({
|
172
198
|
selector: "methodScope",
|
173
|
-
fn: function ()
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
}
|
199
|
+
fn: function (){
|
200
|
+
var self=this;
|
201
|
+
return smalltalk.withContext(function($ctx1) {
|
202
|
+
$2=_st(self)._outerScope();
|
203
|
+
if(($receiver = $2) == nil || $receiver == undefined){
|
204
|
+
$1=$2;
|
205
|
+
} else {
|
206
|
+
$1=_st(_st(self)._outerScope())._methodScope();
|
207
|
+
};
|
208
|
+
return $1;
|
209
|
+
}, function($ctx1) {$ctx1.fill(self,"methodScope",{}, smalltalk.LexicalScope)})}
|
184
210
|
}),
|
185
211
|
smalltalk.LexicalScope);
|
186
212
|
|
@@ -188,10 +214,12 @@ smalltalk.addMethod(
|
|
188
214
|
"_node",
|
189
215
|
smalltalk.method({
|
190
216
|
selector: "node",
|
191
|
-
fn: function ()
|
192
|
-
|
193
|
-
|
194
|
-
|
217
|
+
fn: function (){
|
218
|
+
var self=this;
|
219
|
+
return smalltalk.withContext(function($ctx1) {
|
220
|
+
$1=self["@node"];
|
221
|
+
return $1;
|
222
|
+
}, function($ctx1) {$ctx1.fill(self,"node",{}, smalltalk.LexicalScope)})}
|
195
223
|
}),
|
196
224
|
smalltalk.LexicalScope);
|
197
225
|
|
@@ -199,11 +227,10 @@ smalltalk.addMethod(
|
|
199
227
|
"_node_",
|
200
228
|
smalltalk.method({
|
201
229
|
selector: "node:",
|
202
|
-
fn: function (aNode)
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
}
|
230
|
+
fn: function (aNode){
|
231
|
+
var self=this;
|
232
|
+
return smalltalk.withContext(function($ctx1) {
|
233
|
+
return self}, function($ctx1) {$ctx1.fill(self,"node:",{aNode:aNode}, smalltalk.LexicalScope)})}
|
207
234
|
}),
|
208
235
|
smalltalk.LexicalScope);
|
209
236
|
|
@@ -211,10 +238,12 @@ smalltalk.addMethod(
|
|
211
238
|
"_outerScope",
|
212
239
|
smalltalk.method({
|
213
240
|
selector: "outerScope",
|
214
|
-
fn: function ()
|
215
|
-
|
216
|
-
|
217
|
-
|
241
|
+
fn: function (){
|
242
|
+
var self=this;
|
243
|
+
return smalltalk.withContext(function($ctx1) {
|
244
|
+
$1=self["@outerScope"];
|
245
|
+
return $1;
|
246
|
+
}, function($ctx1) {$ctx1.fill(self,"outerScope",{}, smalltalk.LexicalScope)})}
|
218
247
|
}),
|
219
248
|
smalltalk.LexicalScope);
|
220
249
|
|
@@ -222,11 +251,10 @@ smalltalk.addMethod(
|
|
222
251
|
"_outerScope_",
|
223
252
|
smalltalk.method({
|
224
253
|
selector: "outerScope:",
|
225
|
-
fn: function (aLexicalScope)
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
}
|
254
|
+
fn: function (aLexicalScope){
|
255
|
+
var self=this;
|
256
|
+
return smalltalk.withContext(function($ctx1) {
|
257
|
+
return self}, function($ctx1) {$ctx1.fill(self,"outerScope:",{aLexicalScope:aLexicalScope}, smalltalk.LexicalScope)})}
|
230
258
|
}),
|
231
259
|
smalltalk.LexicalScope);
|
232
260
|
|
@@ -234,12 +262,12 @@ smalltalk.addMethod(
|
|
234
262
|
"_pseudoVars",
|
235
263
|
smalltalk.method({
|
236
264
|
selector: "pseudoVars",
|
237
|
-
fn: function ()
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
}
|
265
|
+
fn: function (){
|
266
|
+
var self=this;
|
267
|
+
return smalltalk.withContext(function($ctx1) {
|
268
|
+
$1=_st(_st(self)._methodScope())._pseudoVars();
|
269
|
+
return $1;
|
270
|
+
}, function($ctx1) {$ctx1.fill(self,"pseudoVars",{}, smalltalk.LexicalScope)})}
|
243
271
|
}),
|
244
272
|
smalltalk.LexicalScope);
|
245
273
|
|
@@ -247,18 +275,23 @@ smalltalk.addMethod(
|
|
247
275
|
"_scopeLevel",
|
248
276
|
smalltalk.method({
|
249
277
|
selector: "scopeLevel",
|
250
|
-
fn: function ()
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
278
|
+
fn: function (){
|
279
|
+
var self=this;
|
280
|
+
return smalltalk.withContext(function($ctx1) {
|
281
|
+
$1=_st(self)._outerScope();
|
282
|
+
if(($receiver = $1) == nil || $receiver == undefined){
|
283
|
+
return (1);
|
284
|
+
} else {
|
285
|
+
$1;
|
286
|
+
};
|
287
|
+
$2=_st(self)._isInlined();
|
288
|
+
if(smalltalk.assert($2)){
|
289
|
+
$3=_st(_st(self)._outerScope())._scopeLevel();
|
290
|
+
return $3;
|
291
|
+
};
|
292
|
+
$4=_st(_st(_st(self)._outerScope())._scopeLevel()).__plus((1));
|
293
|
+
return $4;
|
294
|
+
}, function($ctx1) {$ctx1.fill(self,"scopeLevel",{}, smalltalk.LexicalScope)})}
|
262
295
|
}),
|
263
296
|
smalltalk.LexicalScope);
|
264
297
|
|
@@ -266,17 +299,18 @@ smalltalk.addMethod(
|
|
266
299
|
"_temps",
|
267
300
|
smalltalk.method({
|
268
301
|
selector: "temps",
|
269
|
-
fn: function ()
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
302
|
+
fn: function (){
|
303
|
+
var self=this;
|
304
|
+
return smalltalk.withContext(function($ctx1) {
|
305
|
+
$2=self["@temps"];
|
306
|
+
if(($receiver = $2) == nil || $receiver == undefined){
|
307
|
+
self["@temps"]=_st((smalltalk.Dictionary || Dictionary))._new();
|
308
|
+
$1=self["@temps"];
|
309
|
+
} else {
|
310
|
+
$1=$2;
|
311
|
+
};
|
312
|
+
return $1;
|
313
|
+
}, function($ctx1) {$ctx1.fill(self,"temps",{}, smalltalk.LexicalScope)})}
|
280
314
|
}),
|
281
315
|
smalltalk.LexicalScope);
|
282
316
|
|
@@ -287,12 +321,11 @@ smalltalk.addMethod(
|
|
287
321
|
"_addIVar_",
|
288
322
|
smalltalk.method({
|
289
323
|
selector: "addIVar:",
|
290
|
-
fn: function (aString)
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
}
|
324
|
+
fn: function (aString){
|
325
|
+
var self=this;
|
326
|
+
return smalltalk.withContext(function($ctx1) {
|
327
|
+
_st(_st(_st(self)._iVars())._at_(aString))._scope_(self);
|
328
|
+
return self}, function($ctx1) {$ctx1.fill(self,"addIVar:",{aString:aString}, smalltalk.MethodLexicalScope)})}
|
296
329
|
}),
|
297
330
|
smalltalk.MethodLexicalScope);
|
298
331
|
|
@@ -300,11 +333,10 @@ smalltalk.addMethod(
|
|
300
333
|
"_addNonLocalReturn_",
|
301
334
|
smalltalk.method({
|
302
335
|
selector: "addNonLocalReturn:",
|
303
|
-
fn: function (aScope)
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
}
|
336
|
+
fn: function (aScope){
|
337
|
+
var self=this;
|
338
|
+
return smalltalk.withContext(function($ctx1) {
|
339
|
+
return self}, function($ctx1) {$ctx1.fill(self,"addNonLocalReturn:",{aScope:aScope}, smalltalk.MethodLexicalScope)})}
|
308
340
|
}),
|
309
341
|
smalltalk.MethodLexicalScope);
|
310
342
|
|
@@ -312,12 +344,12 @@ smalltalk.addMethod(
|
|
312
344
|
"_allVariableNames",
|
313
345
|
smalltalk.method({
|
314
346
|
selector: "allVariableNames",
|
315
|
-
fn: function ()
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
}
|
347
|
+
fn: function (){
|
348
|
+
var self=this;
|
349
|
+
return smalltalk.withContext(function($ctx1) {
|
350
|
+
$1=_st(smalltalk.LexicalScope.fn.prototype._allVariableNames.apply(_st(self), [])).__comma(_st(_st(self)._iVars())._keys());
|
351
|
+
return $1;
|
352
|
+
}, function($ctx1) {$ctx1.fill(self,"allVariableNames",{}, smalltalk.MethodLexicalScope)})}
|
321
353
|
}),
|
322
354
|
smalltalk.MethodLexicalScope);
|
323
355
|
|
@@ -325,17 +357,19 @@ smalltalk.addMethod(
|
|
325
357
|
"_bindingFor_",
|
326
358
|
smalltalk.method({
|
327
359
|
selector: "bindingFor:",
|
328
|
-
fn: function (aNode)
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
}
|
360
|
+
fn: function (aNode){
|
361
|
+
var self=this;
|
362
|
+
return smalltalk.withContext(function($ctx1) {
|
363
|
+
$2=smalltalk.LexicalScope.fn.prototype._bindingFor_.apply(_st(self), [aNode]);
|
364
|
+
if(($receiver = $2) == nil || $receiver == undefined){
|
365
|
+
$1=_st(_st(self)._iVars())._at_ifAbsent_(_st(aNode)._value(),(function(){
|
366
|
+
return smalltalk.withContext(function($ctx2) {
|
367
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
368
|
+
} else {
|
369
|
+
$1=$2;
|
370
|
+
};
|
371
|
+
return $1;
|
372
|
+
}, function($ctx1) {$ctx1.fill(self,"bindingFor:",{aNode:aNode}, smalltalk.MethodLexicalScope)})}
|
339
373
|
}),
|
340
374
|
smalltalk.MethodLexicalScope);
|
341
375
|
|
@@ -343,10 +377,10 @@ smalltalk.addMethod(
|
|
343
377
|
"_canInlineNonLocalReturns",
|
344
378
|
smalltalk.method({
|
345
379
|
selector: "canInlineNonLocalReturns",
|
346
|
-
fn: function ()
|
347
|
-
|
348
|
-
|
349
|
-
}
|
380
|
+
fn: function (){
|
381
|
+
var self=this;
|
382
|
+
return smalltalk.withContext(function($ctx1) {
|
383
|
+
}, function($ctx1) {$ctx1.fill(self,"canInlineNonLocalReturns",{}, smalltalk.MethodLexicalScope)})}
|
350
384
|
}),
|
351
385
|
smalltalk.MethodLexicalScope);
|
352
386
|
|
@@ -354,12 +388,12 @@ smalltalk.addMethod(
|
|
354
388
|
"_hasLocalReturn",
|
355
389
|
smalltalk.method({
|
356
390
|
selector: "hasLocalReturn",
|
357
|
-
fn: function ()
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
}
|
391
|
+
fn: function (){
|
392
|
+
var self=this;
|
393
|
+
return smalltalk.withContext(function($ctx1) {
|
394
|
+
$1=_st(self)._localReturn();
|
395
|
+
return $1;
|
396
|
+
}, function($ctx1) {$ctx1.fill(self,"hasLocalReturn",{}, smalltalk.MethodLexicalScope)})}
|
363
397
|
}),
|
364
398
|
smalltalk.MethodLexicalScope);
|
365
399
|
|
@@ -367,12 +401,12 @@ smalltalk.addMethod(
|
|
367
401
|
"_hasNonLocalReturn",
|
368
402
|
smalltalk.method({
|
369
403
|
selector: "hasNonLocalReturn",
|
370
|
-
fn: function ()
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
}
|
404
|
+
fn: function (){
|
405
|
+
var self=this;
|
406
|
+
return smalltalk.withContext(function($ctx1) {
|
407
|
+
$1=_st(_st(self)._nonLocalReturns())._notEmpty();
|
408
|
+
return $1;
|
409
|
+
}, function($ctx1) {$ctx1.fill(self,"hasNonLocalReturn",{}, smalltalk.MethodLexicalScope)})}
|
376
410
|
}),
|
377
411
|
smalltalk.MethodLexicalScope);
|
378
412
|
|
@@ -380,17 +414,18 @@ smalltalk.addMethod(
|
|
380
414
|
"_iVars",
|
381
415
|
smalltalk.method({
|
382
416
|
selector: "iVars",
|
383
|
-
fn: function ()
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
417
|
+
fn: function (){
|
418
|
+
var self=this;
|
419
|
+
return smalltalk.withContext(function($ctx1) {
|
420
|
+
$2=self["@iVars"];
|
421
|
+
if(($receiver = $2) == nil || $receiver == undefined){
|
422
|
+
self["@iVars"]=_st((smalltalk.Dictionary || Dictionary))._new();
|
423
|
+
$1=self["@iVars"];
|
424
|
+
} else {
|
425
|
+
$1=$2;
|
426
|
+
};
|
427
|
+
return $1;
|
428
|
+
}, function($ctx1) {$ctx1.fill(self,"iVars",{}, smalltalk.MethodLexicalScope)})}
|
394
429
|
}),
|
395
430
|
smalltalk.MethodLexicalScope);
|
396
431
|
|
@@ -398,10 +433,10 @@ smalltalk.addMethod(
|
|
398
433
|
"_isMethodScope",
|
399
434
|
smalltalk.method({
|
400
435
|
selector: "isMethodScope",
|
401
|
-
fn: function ()
|
402
|
-
|
403
|
-
|
404
|
-
}
|
436
|
+
fn: function (){
|
437
|
+
var self=this;
|
438
|
+
return smalltalk.withContext(function($ctx1) {
|
439
|
+
}, function($ctx1) {$ctx1.fill(self,"isMethodScope",{}, smalltalk.MethodLexicalScope)})}
|
405
440
|
}),
|
406
441
|
smalltalk.MethodLexicalScope);
|
407
442
|
|
@@ -409,16 +444,17 @@ smalltalk.addMethod(
|
|
409
444
|
"_localReturn",
|
410
445
|
smalltalk.method({
|
411
446
|
selector: "localReturn",
|
412
|
-
fn: function ()
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
447
|
+
fn: function (){
|
448
|
+
var self=this;
|
449
|
+
return smalltalk.withContext(function($ctx1) {
|
450
|
+
$2=self["@localReturn"];
|
451
|
+
if(($receiver = $2) == nil || $receiver == undefined){
|
452
|
+
$1=false;
|
453
|
+
} else {
|
454
|
+
$1=$2;
|
455
|
+
};
|
456
|
+
return $1;
|
457
|
+
}, function($ctx1) {$ctx1.fill(self,"localReturn",{}, smalltalk.MethodLexicalScope)})}
|
422
458
|
}),
|
423
459
|
smalltalk.MethodLexicalScope);
|
424
460
|
|
@@ -426,11 +462,10 @@ smalltalk.addMethod(
|
|
426
462
|
"_localReturn_",
|
427
463
|
smalltalk.method({
|
428
464
|
selector: "localReturn:",
|
429
|
-
fn: function (aBoolean)
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
}
|
465
|
+
fn: function (aBoolean){
|
466
|
+
var self=this;
|
467
|
+
return smalltalk.withContext(function($ctx1) {
|
468
|
+
return self}, function($ctx1) {$ctx1.fill(self,"localReturn:",{aBoolean:aBoolean}, smalltalk.MethodLexicalScope)})}
|
434
469
|
}),
|
435
470
|
smalltalk.MethodLexicalScope);
|
436
471
|
|
@@ -438,10 +473,12 @@ smalltalk.addMethod(
|
|
438
473
|
"_methodScope",
|
439
474
|
smalltalk.method({
|
440
475
|
selector: "methodScope",
|
441
|
-
fn: function ()
|
442
|
-
|
443
|
-
|
444
|
-
|
476
|
+
fn: function (){
|
477
|
+
var self=this;
|
478
|
+
return smalltalk.withContext(function($ctx1) {
|
479
|
+
$1=self;
|
480
|
+
return $1;
|
481
|
+
}, function($ctx1) {$ctx1.fill(self,"methodScope",{}, smalltalk.MethodLexicalScope)})}
|
445
482
|
}),
|
446
483
|
smalltalk.MethodLexicalScope);
|
447
484
|
|
@@ -449,18 +486,18 @@ smalltalk.addMethod(
|
|
449
486
|
"_nonLocalReturns",
|
450
487
|
smalltalk.method({
|
451
488
|
selector: "nonLocalReturns",
|
452
|
-
fn: function ()
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
}
|
489
|
+
fn: function (){
|
490
|
+
var self=this;
|
491
|
+
return smalltalk.withContext(function($ctx1) {
|
492
|
+
$2=self["@nonLocalReturns"];
|
493
|
+
if(($receiver = $2) == nil || $receiver == undefined){
|
494
|
+
self["@nonLocalReturns"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
|
495
|
+
$1=self["@nonLocalReturns"];
|
496
|
+
} else {
|
497
|
+
$1=$2;
|
498
|
+
};
|
499
|
+
return $1;
|
500
|
+
}, function($ctx1) {$ctx1.fill(self,"nonLocalReturns",{}, smalltalk.MethodLexicalScope)})}
|
464
501
|
}),
|
465
502
|
smalltalk.MethodLexicalScope);
|
466
503
|
|
@@ -468,18 +505,25 @@ smalltalk.addMethod(
|
|
468
505
|
"_pseudoVars",
|
469
506
|
smalltalk.method({
|
470
507
|
selector: "pseudoVars",
|
471
|
-
fn: function ()
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
508
|
+
fn: function (){
|
509
|
+
var self=this;
|
510
|
+
return smalltalk.withContext(function($ctx1) {
|
511
|
+
$1=self["@pseudoVars"];
|
512
|
+
if(($receiver = $1) == nil || $receiver == undefined){
|
513
|
+
self["@pseudoVars"]=_st((smalltalk.Dictionary || Dictionary))._new();
|
514
|
+
self["@pseudoVars"];
|
515
|
+
_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._pseudoVariableNames())._do_((function(each){
|
516
|
+
return smalltalk.withContext(function($ctx2) {
|
517
|
+
_st($2)._scope_(_st(self)._methodScope());
|
518
|
+
$3=_st($2)._yourself();
|
519
|
+
return _st(self["@pseudoVars"])._at_put_(each,$3);
|
520
|
+
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
521
|
+
} else {
|
522
|
+
$1;
|
523
|
+
};
|
524
|
+
$4=self["@pseudoVars"];
|
525
|
+
return $4;
|
526
|
+
}, function($ctx1) {$ctx1.fill(self,"pseudoVars",{}, smalltalk.MethodLexicalScope)})}
|
483
527
|
}),
|
484
528
|
smalltalk.MethodLexicalScope);
|
485
529
|
|
@@ -487,11 +531,11 @@ smalltalk.addMethod(
|
|
487
531
|
"_removeNonLocalReturn_",
|
488
532
|
smalltalk.method({
|
489
533
|
selector: "removeNonLocalReturn:",
|
490
|
-
fn: function (aScope)
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
}
|
534
|
+
fn: function (aScope){
|
535
|
+
var self=this;
|
536
|
+
return smalltalk.withContext(function($ctx1) {
|
537
|
+
return smalltalk.withContext(function($ctx2) {
|
538
|
+
return self}, function($ctx1) {$ctx1.fill(self,"removeNonLocalReturn:",{aScope:aScope}, smalltalk.MethodLexicalScope)})}
|
495
539
|
}),
|
496
540
|
smalltalk.MethodLexicalScope);
|
497
541
|
|
@@ -499,18 +543,18 @@ smalltalk.addMethod(
|
|
499
543
|
"_unknownVariables",
|
500
544
|
smalltalk.method({
|
501
545
|
selector: "unknownVariables",
|
502
|
-
fn: function ()
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
}
|
546
|
+
fn: function (){
|
547
|
+
var self=this;
|
548
|
+
return smalltalk.withContext(function($ctx1) {
|
549
|
+
$2=self["@unknownVariables"];
|
550
|
+
if(($receiver = $2) == nil || $receiver == undefined){
|
551
|
+
self["@unknownVariables"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
|
552
|
+
$1=self["@unknownVariables"];
|
553
|
+
} else {
|
554
|
+
$1=$2;
|
555
|
+
};
|
556
|
+
return $1;
|
557
|
+
}, function($ctx1) {$ctx1.fill(self,"unknownVariables",{}, smalltalk.MethodLexicalScope)})}
|
514
558
|
}),
|
515
559
|
smalltalk.MethodLexicalScope);
|
516
560
|
|
@@ -521,12 +565,12 @@ smalltalk.addMethod(
|
|
521
565
|
"_alias",
|
522
566
|
smalltalk.method({
|
523
567
|
selector: "alias",
|
524
|
-
fn: function ()
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
}
|
568
|
+
fn: function (){
|
569
|
+
var self=this;
|
570
|
+
return smalltalk.withContext(function($ctx1) {
|
571
|
+
$1=_st(_st(self)._name())._asVariableName();
|
572
|
+
return $1;
|
573
|
+
}, function($ctx1) {$ctx1.fill(self,"alias",{}, smalltalk.ScopeVar)})}
|
530
574
|
}),
|
531
575
|
smalltalk.ScopeVar);
|
532
576
|
|
@@ -534,10 +578,10 @@ smalltalk.addMethod(
|
|
534
578
|
"_isArgVar",
|
535
579
|
smalltalk.method({
|
536
580
|
selector: "isArgVar",
|
537
|
-
fn: function ()
|
538
|
-
|
539
|
-
|
540
|
-
}
|
581
|
+
fn: function (){
|
582
|
+
var self=this;
|
583
|
+
return smalltalk.withContext(function($ctx1) {
|
584
|
+
}, function($ctx1) {$ctx1.fill(self,"isArgVar",{}, smalltalk.ScopeVar)})}
|
541
585
|
}),
|
542
586
|
smalltalk.ScopeVar);
|
543
587
|
|
@@ -545,10 +589,10 @@ smalltalk.addMethod(
|
|
545
589
|
"_isClassRefVar",
|
546
590
|
smalltalk.method({
|
547
591
|
selector: "isClassRefVar",
|
548
|
-
fn: function ()
|
549
|
-
|
550
|
-
|
551
|
-
}
|
592
|
+
fn: function (){
|
593
|
+
var self=this;
|
594
|
+
return smalltalk.withContext(function($ctx1) {
|
595
|
+
}, function($ctx1) {$ctx1.fill(self,"isClassRefVar",{}, smalltalk.ScopeVar)})}
|
552
596
|
}),
|
553
597
|
smalltalk.ScopeVar);
|
554
598
|
|
@@ -556,10 +600,10 @@ smalltalk.addMethod(
|
|
556
600
|
"_isInstanceVar",
|
557
601
|
smalltalk.method({
|
558
602
|
selector: "isInstanceVar",
|
559
|
-
fn: function ()
|
560
|
-
|
561
|
-
|
562
|
-
}
|
603
|
+
fn: function (){
|
604
|
+
var self=this;
|
605
|
+
return smalltalk.withContext(function($ctx1) {
|
606
|
+
}, function($ctx1) {$ctx1.fill(self,"isInstanceVar",{}, smalltalk.ScopeVar)})}
|
563
607
|
}),
|
564
608
|
smalltalk.ScopeVar);
|
565
609
|
|
@@ -567,10 +611,10 @@ smalltalk.addMethod(
|
|
567
611
|
"_isPseudoVar",
|
568
612
|
smalltalk.method({
|
569
613
|
selector: "isPseudoVar",
|
570
|
-
fn: function ()
|
571
|
-
|
572
|
-
|
573
|
-
}
|
614
|
+
fn: function (){
|
615
|
+
var self=this;
|
616
|
+
return smalltalk.withContext(function($ctx1) {
|
617
|
+
}, function($ctx1) {$ctx1.fill(self,"isPseudoVar",{}, smalltalk.ScopeVar)})}
|
574
618
|
}),
|
575
619
|
smalltalk.ScopeVar);
|
576
620
|
|
@@ -578,10 +622,10 @@ smalltalk.addMethod(
|
|
578
622
|
"_isTempVar",
|
579
623
|
smalltalk.method({
|
580
624
|
selector: "isTempVar",
|
581
|
-
fn: function ()
|
582
|
-
|
583
|
-
|
584
|
-
}
|
625
|
+
fn: function (){
|
626
|
+
var self=this;
|
627
|
+
return smalltalk.withContext(function($ctx1) {
|
628
|
+
}, function($ctx1) {$ctx1.fill(self,"isTempVar",{}, smalltalk.ScopeVar)})}
|
585
629
|
}),
|
586
630
|
smalltalk.ScopeVar);
|
587
631
|
|
@@ -589,10 +633,10 @@ smalltalk.addMethod(
|
|
589
633
|
"_isUnknownVar",
|
590
634
|
smalltalk.method({
|
591
635
|
selector: "isUnknownVar",
|
592
|
-
fn: function ()
|
593
|
-
|
594
|
-
|
595
|
-
}
|
636
|
+
fn: function (){
|
637
|
+
var self=this;
|
638
|
+
return smalltalk.withContext(function($ctx1) {
|
639
|
+
}, function($ctx1) {$ctx1.fill(self,"isUnknownVar",{}, smalltalk.ScopeVar)})}
|
596
640
|
}),
|
597
641
|
smalltalk.ScopeVar);
|
598
642
|
|
@@ -600,10 +644,12 @@ smalltalk.addMethod(
|
|
600
644
|
"_name",
|
601
645
|
smalltalk.method({
|
602
646
|
selector: "name",
|
603
|
-
fn: function ()
|
604
|
-
|
605
|
-
|
606
|
-
|
647
|
+
fn: function (){
|
648
|
+
var self=this;
|
649
|
+
return smalltalk.withContext(function($ctx1) {
|
650
|
+
$1=self["@name"];
|
651
|
+
return $1;
|
652
|
+
}, function($ctx1) {$ctx1.fill(self,"name",{}, smalltalk.ScopeVar)})}
|
607
653
|
}),
|
608
654
|
smalltalk.ScopeVar);
|
609
655
|
|
@@ -611,11 +657,10 @@ smalltalk.addMethod(
|
|
611
657
|
"_name_",
|
612
658
|
smalltalk.method({
|
613
659
|
selector: "name:",
|
614
|
-
fn: function (aString)
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
}
|
660
|
+
fn: function (aString){
|
661
|
+
var self=this;
|
662
|
+
return smalltalk.withContext(function($ctx1) {
|
663
|
+
return self}, function($ctx1) {$ctx1.fill(self,"name:",{aString:aString}, smalltalk.ScopeVar)})}
|
619
664
|
}),
|
620
665
|
smalltalk.ScopeVar);
|
621
666
|
|
@@ -623,10 +668,12 @@ smalltalk.addMethod(
|
|
623
668
|
"_scope",
|
624
669
|
smalltalk.method({
|
625
670
|
selector: "scope",
|
626
|
-
fn: function ()
|
627
|
-
|
628
|
-
|
629
|
-
|
671
|
+
fn: function (){
|
672
|
+
var self=this;
|
673
|
+
return smalltalk.withContext(function($ctx1) {
|
674
|
+
$1=self["@scope"];
|
675
|
+
return $1;
|
676
|
+
}, function($ctx1) {$ctx1.fill(self,"scope",{}, smalltalk.ScopeVar)})}
|
630
677
|
}),
|
631
678
|
smalltalk.ScopeVar);
|
632
679
|
|
@@ -634,11 +681,10 @@ smalltalk.addMethod(
|
|
634
681
|
"_scope_",
|
635
682
|
smalltalk.method({
|
636
683
|
selector: "scope:",
|
637
|
-
fn: function (aScope)
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
}
|
684
|
+
fn: function (aScope){
|
685
|
+
var self=this;
|
686
|
+
return smalltalk.withContext(function($ctx1) {
|
687
|
+
return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aScope:aScope}, smalltalk.ScopeVar)})}
|
642
688
|
}),
|
643
689
|
smalltalk.ScopeVar);
|
644
690
|
|
@@ -646,17 +692,19 @@ smalltalk.addMethod(
|
|
646
692
|
"_validateAssignment",
|
647
693
|
smalltalk.method({
|
648
694
|
selector: "validateAssignment",
|
649
|
-
fn: function ()
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
695
|
+
fn: function (){
|
696
|
+
var self=this;
|
697
|
+
return smalltalk.withContext(function($ctx1) {
|
698
|
+
$1=_st(_st(self)._isArgVar())._or_((function(){
|
699
|
+
return smalltalk.withContext(function($ctx2) {
|
700
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
701
|
+
if(smalltalk.assert($1)){
|
702
|
+
$2=_st((smalltalk.InvalidAssignmentError || InvalidAssignmentError))._new();
|
703
|
+
_st($2)._variableName_(_st(self)._name());
|
704
|
+
$3=_st($2)._signal();
|
705
|
+
$3;
|
706
|
+
};
|
707
|
+
return self}, function($ctx1) {$ctx1.fill(self,"validateAssignment",{}, smalltalk.ScopeVar)})}
|
660
708
|
}),
|
661
709
|
smalltalk.ScopeVar);
|
662
710
|
|
@@ -665,15 +713,15 @@ smalltalk.addMethod(
|
|
665
713
|
"_on_",
|
666
714
|
smalltalk.method({
|
667
715
|
selector: "on:",
|
668
|
-
fn: function (aString)
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
}
|
716
|
+
fn: function (aString){
|
717
|
+
var self=this;
|
718
|
+
return smalltalk.withContext(function($ctx1) {
|
719
|
+
$2=_st(self)._new();
|
720
|
+
_st($2)._name_(aString);
|
721
|
+
$3=_st($2)._yourself();
|
722
|
+
$1=$3;
|
723
|
+
return $1;
|
724
|
+
}, function($ctx1) {$ctx1.fill(self,"on:",{aString:aString}, smalltalk.ScopeVar.klass)})}
|
677
725
|
}),
|
678
726
|
smalltalk.ScopeVar.klass);
|
679
727
|
|
@@ -683,10 +731,12 @@ smalltalk.addMethod(
|
|
683
731
|
"_node",
|
684
732
|
smalltalk.method({
|
685
733
|
selector: "node",
|
686
|
-
fn: function ()
|
687
|
-
|
688
|
-
|
689
|
-
|
734
|
+
fn: function (){
|
735
|
+
var self=this;
|
736
|
+
return smalltalk.withContext(function($ctx1) {
|
737
|
+
$1=self["@node"];
|
738
|
+
return $1;
|
739
|
+
}, function($ctx1) {$ctx1.fill(self,"node",{}, smalltalk.AliasVar)})}
|
690
740
|
}),
|
691
741
|
smalltalk.AliasVar);
|
692
742
|
|
@@ -694,11 +744,10 @@ smalltalk.addMethod(
|
|
694
744
|
"_node_",
|
695
745
|
smalltalk.method({
|
696
746
|
selector: "node:",
|
697
|
-
fn: function (aNode)
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
}
|
747
|
+
fn: function (aNode){
|
748
|
+
var self=this;
|
749
|
+
return smalltalk.withContext(function($ctx1) {
|
750
|
+
return self}, function($ctx1) {$ctx1.fill(self,"node:",{aNode:aNode}, smalltalk.AliasVar)})}
|
702
751
|
}),
|
703
752
|
smalltalk.AliasVar);
|
704
753
|
|
@@ -709,10 +758,10 @@ smalltalk.addMethod(
|
|
709
758
|
"_isArgVar",
|
710
759
|
smalltalk.method({
|
711
760
|
selector: "isArgVar",
|
712
|
-
fn: function ()
|
713
|
-
|
714
|
-
|
715
|
-
}
|
761
|
+
fn: function (){
|
762
|
+
var self=this;
|
763
|
+
return smalltalk.withContext(function($ctx1) {
|
764
|
+
}, function($ctx1) {$ctx1.fill(self,"isArgVar",{}, smalltalk.ArgVar)})}
|
716
765
|
}),
|
717
766
|
smalltalk.ArgVar);
|
718
767
|
|
@@ -723,12 +772,12 @@ smalltalk.addMethod(
|
|
723
772
|
"_alias",
|
724
773
|
smalltalk.method({
|
725
774
|
selector: "alias",
|
726
|
-
fn: function ()
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
}
|
775
|
+
fn: function (){
|
776
|
+
var self=this;
|
777
|
+
return smalltalk.withContext(function($ctx1) {
|
778
|
+
$1=_st(_st(_st(_st("(smalltalk.").__comma(_st(self)._name())).__comma(" || ")).__comma(_st(self)._name())).__comma(")");
|
779
|
+
return $1;
|
780
|
+
}, function($ctx1) {$ctx1.fill(self,"alias",{}, smalltalk.ClassRefVar)})}
|
732
781
|
}),
|
733
782
|
smalltalk.ClassRefVar);
|
734
783
|
|
@@ -736,10 +785,10 @@ smalltalk.addMethod(
|
|
736
785
|
"_isClassRefVar",
|
737
786
|
smalltalk.method({
|
738
787
|
selector: "isClassRefVar",
|
739
|
-
fn: function ()
|
740
|
-
|
741
|
-
|
742
|
-
}
|
788
|
+
fn: function (){
|
789
|
+
var self=this;
|
790
|
+
return smalltalk.withContext(function($ctx1) {
|
791
|
+
}, function($ctx1) {$ctx1.fill(self,"isClassRefVar",{}, smalltalk.ClassRefVar)})}
|
743
792
|
}),
|
744
793
|
smalltalk.ClassRefVar);
|
745
794
|
|
@@ -750,12 +799,12 @@ smalltalk.addMethod(
|
|
750
799
|
"_alias",
|
751
800
|
smalltalk.method({
|
752
801
|
selector: "alias",
|
753
|
-
fn: function ()
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
}
|
802
|
+
fn: function (){
|
803
|
+
var self=this;
|
804
|
+
return smalltalk.withContext(function($ctx1) {
|
805
|
+
$1=_st(_st("self[\x22@").__comma(_st(self)._name())).__comma("\x22]");
|
806
|
+
return $1;
|
807
|
+
}, function($ctx1) {$ctx1.fill(self,"alias",{}, smalltalk.InstanceVar)})}
|
759
808
|
}),
|
760
809
|
smalltalk.InstanceVar);
|
761
810
|
|
@@ -763,10 +812,10 @@ smalltalk.addMethod(
|
|
763
812
|
"_isInstanceVar",
|
764
813
|
smalltalk.method({
|
765
814
|
selector: "isInstanceVar",
|
766
|
-
fn: function ()
|
767
|
-
|
768
|
-
|
769
|
-
}
|
815
|
+
fn: function (){
|
816
|
+
var self=this;
|
817
|
+
return smalltalk.withContext(function($ctx1) {
|
818
|
+
}, function($ctx1) {$ctx1.fill(self,"isInstanceVar",{}, smalltalk.InstanceVar)})}
|
770
819
|
}),
|
771
820
|
smalltalk.InstanceVar);
|
772
821
|
|
@@ -777,12 +826,12 @@ smalltalk.addMethod(
|
|
777
826
|
"_alias",
|
778
827
|
smalltalk.method({
|
779
828
|
selector: "alias",
|
780
|
-
fn: function ()
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
}
|
829
|
+
fn: function (){
|
830
|
+
var self=this;
|
831
|
+
return smalltalk.withContext(function($ctx1) {
|
832
|
+
$1=_st(self)._name();
|
833
|
+
return $1;
|
834
|
+
}, function($ctx1) {$ctx1.fill(self,"alias",{}, smalltalk.PseudoVar)})}
|
786
835
|
}),
|
787
836
|
smalltalk.PseudoVar);
|
788
837
|
|
@@ -790,10 +839,10 @@ smalltalk.addMethod(
|
|
790
839
|
"_isPseudoVar",
|
791
840
|
smalltalk.method({
|
792
841
|
selector: "isPseudoVar",
|
793
|
-
fn: function ()
|
794
|
-
|
795
|
-
|
796
|
-
}
|
842
|
+
fn: function (){
|
843
|
+
var self=this;
|
844
|
+
return smalltalk.withContext(function($ctx1) {
|
845
|
+
}, function($ctx1) {$ctx1.fill(self,"isPseudoVar",{}, smalltalk.PseudoVar)})}
|
797
846
|
}),
|
798
847
|
smalltalk.PseudoVar);
|
799
848
|
|
@@ -804,10 +853,10 @@ smalltalk.addMethod(
|
|
804
853
|
"_isTempVar",
|
805
854
|
smalltalk.method({
|
806
855
|
selector: "isTempVar",
|
807
|
-
fn: function ()
|
808
|
-
|
809
|
-
|
810
|
-
}
|
856
|
+
fn: function (){
|
857
|
+
var self=this;
|
858
|
+
return smalltalk.withContext(function($ctx1) {
|
859
|
+
}, function($ctx1) {$ctx1.fill(self,"isTempVar",{}, smalltalk.TempVar)})}
|
811
860
|
}),
|
812
861
|
smalltalk.TempVar);
|
813
862
|
|
@@ -818,32 +867,32 @@ smalltalk.addMethod(
|
|
818
867
|
"_isUnknownVar",
|
819
868
|
smalltalk.method({
|
820
869
|
selector: "isUnknownVar",
|
821
|
-
fn: function ()
|
822
|
-
|
823
|
-
|
824
|
-
}
|
870
|
+
fn: function (){
|
871
|
+
var self=this;
|
872
|
+
return smalltalk.withContext(function($ctx1) {
|
873
|
+
}, function($ctx1) {$ctx1.fill(self,"isUnknownVar",{}, smalltalk.UnknownVar)})}
|
825
874
|
}),
|
826
875
|
smalltalk.UnknownVar);
|
827
876
|
|
828
877
|
|
829
878
|
|
830
|
-
smalltalk.addClass('SemanticAnalyzer', smalltalk.NodeVisitor, ['currentScope', 'theClass', 'classReferences', 'messageSends'], 'Compiler-Semantic');
|
879
|
+
smalltalk.addClass('SemanticAnalyzer', smalltalk.NodeVisitor, ['currentScope', 'theClass', 'classReferences', 'messageSends', 'superSends'], 'Compiler-Semantic');
|
831
880
|
smalltalk.addMethod(
|
832
881
|
"_classReferences",
|
833
882
|
smalltalk.method({
|
834
883
|
selector: "classReferences",
|
835
|
-
fn: function ()
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
}
|
884
|
+
fn: function (){
|
885
|
+
var self=this;
|
886
|
+
return smalltalk.withContext(function($ctx1) {
|
887
|
+
$2=self["@classReferences"];
|
888
|
+
if(($receiver = $2) == nil || $receiver == undefined){
|
889
|
+
self["@classReferences"]=_st((smalltalk.Set || Set))._new();
|
890
|
+
$1=self["@classReferences"];
|
891
|
+
} else {
|
892
|
+
$1=$2;
|
893
|
+
};
|
894
|
+
return $1;
|
895
|
+
}, function($ctx1) {$ctx1.fill(self,"classReferences",{}, smalltalk.SemanticAnalyzer)})}
|
847
896
|
}),
|
848
897
|
smalltalk.SemanticAnalyzer);
|
849
898
|
|
@@ -851,14 +900,13 @@ smalltalk.addMethod(
|
|
851
900
|
"_errorShadowingVariable_",
|
852
901
|
smalltalk.method({
|
853
902
|
selector: "errorShadowingVariable:",
|
854
|
-
fn: function (aString)
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
}
|
903
|
+
fn: function (aString){
|
904
|
+
var self=this;
|
905
|
+
return smalltalk.withContext(function($ctx1) {
|
906
|
+
$1=_st((smalltalk.ShadowingVariableError || ShadowingVariableError))._new();
|
907
|
+
_st($1)._variableName_(aString);
|
908
|
+
$2=_st($1)._signal();
|
909
|
+
return self}, function($ctx1) {$ctx1.fill(self,"errorShadowingVariable:",{aString:aString}, smalltalk.SemanticAnalyzer)})}
|
862
910
|
}),
|
863
911
|
smalltalk.SemanticAnalyzer);
|
864
912
|
|
@@ -866,20 +914,34 @@ smalltalk.addMethod(
|
|
866
914
|
"_errorUnknownVariable_",
|
867
915
|
smalltalk.method({
|
868
916
|
selector: "errorUnknownVariable:",
|
869
|
-
fn: function (aNode)
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
}
|
917
|
+
fn: function (aNode){
|
918
|
+
var self=this;
|
919
|
+
var identifier;
|
920
|
+
return smalltalk.withContext(function($ctx1) {
|
921
|
+
identifier=_st(aNode)._value();
|
922
|
+
$1=_st(_st(_st(["jQuery", "window", "process", "global"])._includes_(identifier))._not())._and_((function(){
|
923
|
+
return smalltalk.withContext(function($ctx2) {
|
924
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
925
|
+
if(smalltalk.assert($1)){
|
926
|
+
$2=_st((smalltalk.UnknownVariableError || UnknownVariableError))._new();
|
927
|
+
_st($2)._variableName_(_st(aNode)._value());
|
928
|
+
$3=_st($2)._signal();
|
929
|
+
$3;
|
930
|
+
} else {
|
931
|
+
_st(_st(_st(self["@currentScope"])._methodScope())._unknownVariables())._add_(_st(aNode)._value());
|
932
|
+
};
|
933
|
+
return self}, function($ctx1) {$ctx1.fill(self,"errorUnknownVariable:",{aNode:aNode,identifier:identifier}, smalltalk.SemanticAnalyzer)})}
|
934
|
+
}),
|
935
|
+
smalltalk.SemanticAnalyzer);
|
936
|
+
|
937
|
+
smalltalk.addMethod(
|
938
|
+
"_isVariableGloballyUndefined_",
|
939
|
+
smalltalk.method({
|
940
|
+
selector: "isVariableGloballyUndefined:",
|
941
|
+
fn: function (aString){
|
942
|
+
var self=this;
|
943
|
+
return smalltalk.withContext(function($ctx1) {
|
944
|
+
return self}, function($ctx1) {$ctx1.fill(self,"isVariableGloballyUndefined:",{aString:aString}, smalltalk.SemanticAnalyzer)})}
|
883
945
|
}),
|
884
946
|
smalltalk.SemanticAnalyzer);
|
885
947
|
|
@@ -887,18 +949,18 @@ smalltalk.addMethod(
|
|
887
949
|
"_messageSends",
|
888
950
|
smalltalk.method({
|
889
951
|
selector: "messageSends",
|
890
|
-
fn: function ()
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
}
|
952
|
+
fn: function (){
|
953
|
+
var self=this;
|
954
|
+
return smalltalk.withContext(function($ctx1) {
|
955
|
+
$2=self["@messageSends"];
|
956
|
+
if(($receiver = $2) == nil || $receiver == undefined){
|
957
|
+
self["@messageSends"]=_st((smalltalk.Dictionary || Dictionary))._new();
|
958
|
+
$1=self["@messageSends"];
|
959
|
+
} else {
|
960
|
+
$1=$2;
|
961
|
+
};
|
962
|
+
return $1;
|
963
|
+
}, function($ctx1) {$ctx1.fill(self,"messageSends",{}, smalltalk.SemanticAnalyzer)})}
|
902
964
|
}),
|
903
965
|
smalltalk.SemanticAnalyzer);
|
904
966
|
|
@@ -906,12 +968,12 @@ smalltalk.addMethod(
|
|
906
968
|
"_newBlockScope",
|
907
969
|
smalltalk.method({
|
908
970
|
selector: "newBlockScope",
|
909
|
-
fn: function ()
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
}
|
971
|
+
fn: function (){
|
972
|
+
var self=this;
|
973
|
+
return smalltalk.withContext(function($ctx1) {
|
974
|
+
$1=_st(self)._newScopeOfClass_((smalltalk.LexicalScope || LexicalScope));
|
975
|
+
return $1;
|
976
|
+
}, function($ctx1) {$ctx1.fill(self,"newBlockScope",{}, smalltalk.SemanticAnalyzer)})}
|
915
977
|
}),
|
916
978
|
smalltalk.SemanticAnalyzer);
|
917
979
|
|
@@ -919,12 +981,12 @@ smalltalk.addMethod(
|
|
919
981
|
"_newMethodScope",
|
920
982
|
smalltalk.method({
|
921
983
|
selector: "newMethodScope",
|
922
|
-
fn: function ()
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
}
|
984
|
+
fn: function (){
|
985
|
+
var self=this;
|
986
|
+
return smalltalk.withContext(function($ctx1) {
|
987
|
+
$1=_st(self)._newScopeOfClass_((smalltalk.MethodLexicalScope || MethodLexicalScope));
|
988
|
+
return $1;
|
989
|
+
}, function($ctx1) {$ctx1.fill(self,"newMethodScope",{}, smalltalk.SemanticAnalyzer)})}
|
928
990
|
}),
|
929
991
|
smalltalk.SemanticAnalyzer);
|
930
992
|
|
@@ -932,15 +994,15 @@ smalltalk.addMethod(
|
|
932
994
|
"_newScopeOfClass_",
|
933
995
|
smalltalk.method({
|
934
996
|
selector: "newScopeOfClass:",
|
935
|
-
fn: function (aLexicalScopeClass)
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
}
|
997
|
+
fn: function (aLexicalScopeClass){
|
998
|
+
var self=this;
|
999
|
+
return smalltalk.withContext(function($ctx1) {
|
1000
|
+
$2=_st(aLexicalScopeClass)._new();
|
1001
|
+
_st($2)._outerScope_(self["@currentScope"]);
|
1002
|
+
$3=_st($2)._yourself();
|
1003
|
+
$1=$3;
|
1004
|
+
return $1;
|
1005
|
+
}, function($ctx1) {$ctx1.fill(self,"newScopeOfClass:",{aLexicalScopeClass:aLexicalScopeClass}, smalltalk.SemanticAnalyzer)})}
|
944
1006
|
}),
|
945
1007
|
smalltalk.SemanticAnalyzer);
|
946
1008
|
|
@@ -948,17 +1010,17 @@ smalltalk.addMethod(
|
|
948
1010
|
"_popScope",
|
949
1011
|
smalltalk.method({
|
950
1012
|
selector: "popScope",
|
951
|
-
fn: function ()
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
}
|
1013
|
+
fn: function (){
|
1014
|
+
var self=this;
|
1015
|
+
return smalltalk.withContext(function($ctx1) {
|
1016
|
+
$1=self["@currentScope"];
|
1017
|
+
if(($receiver = $1) == nil || $receiver == undefined){
|
1018
|
+
$1;
|
1019
|
+
} else {
|
1020
|
+
self["@currentScope"]=_st(self["@currentScope"])._outerScope();
|
1021
|
+
self["@currentScope"];
|
1022
|
+
};
|
1023
|
+
return self}, function($ctx1) {$ctx1.fill(self,"popScope",{}, smalltalk.SemanticAnalyzer)})}
|
962
1024
|
}),
|
963
1025
|
smalltalk.SemanticAnalyzer);
|
964
1026
|
|
@@ -966,12 +1028,30 @@ smalltalk.addMethod(
|
|
966
1028
|
"_pushScope_",
|
967
1029
|
smalltalk.method({
|
968
1030
|
selector: "pushScope:",
|
969
|
-
fn: function (aScope)
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
}
|
1031
|
+
fn: function (aScope){
|
1032
|
+
var self=this;
|
1033
|
+
return smalltalk.withContext(function($ctx1) {
|
1034
|
+
self["@currentScope"]=aScope;
|
1035
|
+
return self}, function($ctx1) {$ctx1.fill(self,"pushScope:",{aScope:aScope}, smalltalk.SemanticAnalyzer)})}
|
1036
|
+
}),
|
1037
|
+
smalltalk.SemanticAnalyzer);
|
1038
|
+
|
1039
|
+
smalltalk.addMethod(
|
1040
|
+
"_superSends",
|
1041
|
+
smalltalk.method({
|
1042
|
+
selector: "superSends",
|
1043
|
+
fn: function (){
|
1044
|
+
var self=this;
|
1045
|
+
return smalltalk.withContext(function($ctx1) {
|
1046
|
+
$2=self["@superSends"];
|
1047
|
+
if(($receiver = $2) == nil || $receiver == undefined){
|
1048
|
+
self["@superSends"]=_st((smalltalk.Dictionary || Dictionary))._new();
|
1049
|
+
$1=self["@superSends"];
|
1050
|
+
} else {
|
1051
|
+
$1=$2;
|
1052
|
+
};
|
1053
|
+
return $1;
|
1054
|
+
}, function($ctx1) {$ctx1.fill(self,"superSends",{}, smalltalk.SemanticAnalyzer)})}
|
975
1055
|
}),
|
976
1056
|
smalltalk.SemanticAnalyzer);
|
977
1057
|
|
@@ -979,10 +1059,12 @@ smalltalk.addMethod(
|
|
979
1059
|
"_theClass",
|
980
1060
|
smalltalk.method({
|
981
1061
|
selector: "theClass",
|
982
|
-
fn: function ()
|
983
|
-
|
984
|
-
|
985
|
-
|
1062
|
+
fn: function (){
|
1063
|
+
var self=this;
|
1064
|
+
return smalltalk.withContext(function($ctx1) {
|
1065
|
+
$1=self["@theClass"];
|
1066
|
+
return $1;
|
1067
|
+
}, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.SemanticAnalyzer)})}
|
986
1068
|
}),
|
987
1069
|
smalltalk.SemanticAnalyzer);
|
988
1070
|
|
@@ -990,11 +1072,10 @@ smalltalk.addMethod(
|
|
990
1072
|
"_theClass_",
|
991
1073
|
smalltalk.method({
|
992
1074
|
selector: "theClass:",
|
993
|
-
fn: function (aClass)
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
}
|
1075
|
+
fn: function (aClass){
|
1076
|
+
var self=this;
|
1077
|
+
return smalltalk.withContext(function($ctx1) {
|
1078
|
+
return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass}, smalltalk.SemanticAnalyzer)})}
|
998
1079
|
}),
|
999
1080
|
smalltalk.SemanticAnalyzer);
|
1000
1081
|
|
@@ -1002,16 +1083,16 @@ smalltalk.addMethod(
|
|
1002
1083
|
"_validateVariableScope_",
|
1003
1084
|
smalltalk.method({
|
1004
1085
|
selector: "validateVariableScope:",
|
1005
|
-
fn: function (aString)
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
}
|
1086
|
+
fn: function (aString){
|
1087
|
+
var self=this;
|
1088
|
+
return smalltalk.withContext(function($ctx1) {
|
1089
|
+
$1=_st(self["@currentScope"])._lookupVariable_(aString);
|
1090
|
+
if(($receiver = $1) == nil || $receiver == undefined){
|
1091
|
+
$1;
|
1092
|
+
} else {
|
1093
|
+
_st(self)._errorShadowingVariable_(aString);
|
1094
|
+
};
|
1095
|
+
return self}, function($ctx1) {$ctx1.fill(self,"validateVariableScope:",{aString:aString}, smalltalk.SemanticAnalyzer)})}
|
1015
1096
|
}),
|
1016
1097
|
smalltalk.SemanticAnalyzer);
|
1017
1098
|
|
@@ -1019,12 +1100,11 @@ smalltalk.addMethod(
|
|
1019
1100
|
"_visitAssignmentNode_",
|
1020
1101
|
smalltalk.method({
|
1021
1102
|
selector: "visitAssignmentNode:",
|
1022
|
-
fn: function (aNode)
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
}
|
1103
|
+
fn: function (aNode){
|
1104
|
+
var self=this;
|
1105
|
+
return smalltalk.withContext(function($ctx1) {
|
1106
|
+
_st(_st(aNode)._left())._beAssigned();
|
1107
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitAssignmentNode:",{aNode:aNode}, smalltalk.SemanticAnalyzer)})}
|
1028
1108
|
}),
|
1029
1109
|
smalltalk.SemanticAnalyzer);
|
1030
1110
|
|
@@ -1032,16 +1112,18 @@ smalltalk.addMethod(
|
|
1032
1112
|
"_visitBlockNode_",
|
1033
1113
|
smalltalk.method({
|
1034
1114
|
selector: "visitBlockNode:",
|
1035
|
-
fn: function (aNode)
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1115
|
+
fn: function (aNode){
|
1116
|
+
var self=this;
|
1117
|
+
return smalltalk.withContext(function($ctx1) {
|
1118
|
+
_st(aNode)._scope_(self["@currentScope"]);
|
1119
|
+
_st(self["@currentScope"])._node_(aNode);
|
1120
|
+
_st(_st(aNode)._parameters())._do_((function(each){
|
1121
|
+
return smalltalk.withContext(function($ctx2) {
|
1122
|
+
return _st(self["@currentScope"])._addArg_(each);
|
1123
|
+
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
1124
|
+
smalltalk.NodeVisitor.fn.prototype._visitBlockNode_.apply(_st(self), [aNode]);
|
1125
|
+
_st(self)._popScope();
|
1126
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitBlockNode:",{aNode:aNode}, smalltalk.SemanticAnalyzer)})}
|
1045
1127
|
}),
|
1046
1128
|
smalltalk.SemanticAnalyzer);
|
1047
1129
|
|
@@ -1049,17 +1131,20 @@ smalltalk.addMethod(
|
|
1049
1131
|
"_visitCascadeNode_",
|
1050
1132
|
smalltalk.method({
|
1051
1133
|
selector: "visitCascadeNode:",
|
1052
|
-
fn: function (aNode)
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1134
|
+
fn: function (aNode){
|
1135
|
+
var self=this;
|
1136
|
+
return smalltalk.withContext(function($ctx1) {
|
1137
|
+
_st(_st(aNode)._nodes())._do_((function(each){
|
1138
|
+
return smalltalk.withContext(function($ctx2) {
|
1139
|
+
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
1140
|
+
smalltalk.NodeVisitor.fn.prototype._visitCascadeNode_.apply(_st(self), [aNode]);
|
1141
|
+
$1=_st(_st(_st(aNode)._nodes())._first())._superSend();
|
1142
|
+
if(smalltalk.assert($1)){
|
1143
|
+
_st(_st(aNode)._nodes())._do_((function(each){
|
1144
|
+
return smalltalk.withContext(function($ctx2) {
|
1145
|
+
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
1146
|
+
};
|
1147
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitCascadeNode:",{aNode:aNode}, smalltalk.SemanticAnalyzer)})}
|
1063
1148
|
}),
|
1064
1149
|
smalltalk.SemanticAnalyzer);
|
1065
1150
|
|
@@ -1067,16 +1152,15 @@ smalltalk.addMethod(
|
|
1067
1152
|
"_visitClassReferenceNode_",
|
1068
1153
|
smalltalk.method({
|
1069
1154
|
selector: "visitClassReferenceNode:",
|
1070
|
-
fn: function (aNode)
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
}
|
1155
|
+
fn: function (aNode){
|
1156
|
+
var self=this;
|
1157
|
+
return smalltalk.withContext(function($ctx1) {
|
1158
|
+
_st(_st(self)._classReferences())._add_(_st(aNode)._value());
|
1159
|
+
$1=_st((smalltalk.ClassRefVar || ClassRefVar))._new();
|
1160
|
+
_st($1)._name_(_st(aNode)._value());
|
1161
|
+
$2=_st($1)._yourself();
|
1162
|
+
_st(aNode)._binding_($2);
|
1163
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitClassReferenceNode:",{aNode:aNode}, smalltalk.SemanticAnalyzer)})}
|
1080
1164
|
}),
|
1081
1165
|
smalltalk.SemanticAnalyzer);
|
1082
1166
|
|
@@ -1084,20 +1168,26 @@ smalltalk.addMethod(
|
|
1084
1168
|
"_visitMethodNode_",
|
1085
1169
|
smalltalk.method({
|
1086
1170
|
selector: "visitMethodNode:",
|
1087
|
-
fn: function (aNode)
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1171
|
+
fn: function (aNode){
|
1172
|
+
var self=this;
|
1173
|
+
return smalltalk.withContext(function($ctx1) {
|
1174
|
+
_st(self)._pushScope_(_st(self)._newMethodScope());
|
1175
|
+
_st(aNode)._scope_(self["@currentScope"]);
|
1176
|
+
_st(self["@currentScope"])._node_(aNode);
|
1177
|
+
_st(_st(_st(self)._theClass())._allInstanceVariableNames())._do_((function(each){
|
1178
|
+
return smalltalk.withContext(function($ctx2) {
|
1179
|
+
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
1180
|
+
_st(_st(aNode)._arguments())._do_((function(each){
|
1181
|
+
return smalltalk.withContext(function($ctx2) {
|
1182
|
+
return _st(self["@currentScope"])._addArg_(each);
|
1183
|
+
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
1184
|
+
smalltalk.NodeVisitor.fn.prototype._visitMethodNode_.apply(_st(self), [aNode]);
|
1185
|
+
$1=aNode;
|
1186
|
+
_st($1)._classReferences_(_st(self)._classReferences());
|
1187
|
+
_st($1)._messageSends_(_st(_st(self)._messageSends())._keys());
|
1188
|
+
$2=_st($1)._superSends_(_st(_st(self)._superSends())._keys());
|
1189
|
+
_st(self)._popScope();
|
1190
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitMethodNode:",{aNode:aNode}, smalltalk.SemanticAnalyzer)})}
|
1101
1191
|
}),
|
1102
1192
|
smalltalk.SemanticAnalyzer);
|
1103
1193
|
|
@@ -1105,19 +1195,18 @@ smalltalk.addMethod(
|
|
1105
1195
|
"_visitReturnNode_",
|
1106
1196
|
smalltalk.method({
|
1107
1197
|
selector: "visitReturnNode:",
|
1108
|
-
fn: function (aNode)
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
}
|
1198
|
+
fn: function (aNode){
|
1199
|
+
var self=this;
|
1200
|
+
return smalltalk.withContext(function($ctx1) {
|
1201
|
+
_st(aNode)._scope_(self["@currentScope"]);
|
1202
|
+
$1=_st(self["@currentScope"])._isMethodScope();
|
1203
|
+
if(smalltalk.assert($1)){
|
1204
|
+
_st(self["@currentScope"])._localReturn_(true);
|
1205
|
+
} else {
|
1206
|
+
_st(_st(self["@currentScope"])._methodScope())._addNonLocalReturn_(self["@currentScope"]);
|
1207
|
+
};
|
1208
|
+
smalltalk.NodeVisitor.fn.prototype._visitReturnNode_.apply(_st(self), [aNode]);
|
1209
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitReturnNode:",{aNode:aNode}, smalltalk.SemanticAnalyzer)})}
|
1121
1210
|
}),
|
1122
1211
|
smalltalk.SemanticAnalyzer);
|
1123
1212
|
|
@@ -1125,29 +1214,33 @@ smalltalk.addMethod(
|
|
1125
1214
|
"_visitSendNode_",
|
1126
1215
|
smalltalk.method({
|
1127
1216
|
selector: "visitSendNode:",
|
1128
|
-
fn: function (aNode)
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
}
|
1217
|
+
fn: function (aNode){
|
1218
|
+
var self=this;
|
1219
|
+
return smalltalk.withContext(function($ctx1) {
|
1220
|
+
$1=_st(_st(_st(aNode)._receiver())._value()).__eq("super");
|
1221
|
+
$2=(function(){
|
1222
|
+
return smalltalk.withContext(function($ctx2) {
|
1223
|
+
_st(_st(aNode)._receiver())._value_("self");
|
1224
|
+
_st(_st(self)._superSends())._at_ifAbsentPut_(_st(aNode)._selector(),(function(){
|
1225
|
+
return smalltalk.withContext(function($ctx3) {
|
1226
|
+
}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
|
1227
|
+
return _st(_st(_st(self)._superSends())._at_(_st(aNode)._selector()))._add_(aNode);
|
1228
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
|
1229
|
+
$3=(function(){
|
1230
|
+
return smalltalk.withContext(function($ctx2) {
|
1231
|
+
if(smalltalk.assert($4)){
|
1232
|
+
_st(aNode)._shouldBeInlined_(true);
|
1233
|
+
return _st(_st(aNode)._receiver())._shouldBeAliased_(true);
|
1234
|
+
};
|
1235
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
|
1236
|
+
_st($1)._ifTrue_ifFalse_($2,$3);
|
1237
|
+
_st(_st(self)._messageSends())._at_ifAbsentPut_(_st(aNode)._selector(),(function(){
|
1238
|
+
return smalltalk.withContext(function($ctx2) {
|
1239
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
1240
|
+
_st(_st(_st(self)._messageSends())._at_(_st(aNode)._selector()))._add_(aNode);
|
1241
|
+
_st(aNode)._index_(_st(_st(_st(self)._messageSends())._at_(_st(aNode)._selector()))._size());
|
1242
|
+
smalltalk.NodeVisitor.fn.prototype._visitSendNode_.apply(_st(self), [aNode]);
|
1243
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitSendNode:",{aNode:aNode}, smalltalk.SemanticAnalyzer)})}
|
1151
1244
|
}),
|
1152
1245
|
smalltalk.SemanticAnalyzer);
|
1153
1246
|
|
@@ -1155,12 +1248,14 @@ smalltalk.addMethod(
|
|
1155
1248
|
"_visitSequenceNode_",
|
1156
1249
|
smalltalk.method({
|
1157
1250
|
selector: "visitSequenceNode:",
|
1158
|
-
fn: function (aNode)
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
}
|
1251
|
+
fn: function (aNode){
|
1252
|
+
var self=this;
|
1253
|
+
return smalltalk.withContext(function($ctx1) {
|
1254
|
+
return smalltalk.withContext(function($ctx2) {
|
1255
|
+
return _st(self["@currentScope"])._addTemp_(each);
|
1256
|
+
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
1257
|
+
smalltalk.NodeVisitor.fn.prototype._visitSequenceNode_.apply(_st(self), [aNode]);
|
1258
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitSequenceNode:",{aNode:aNode}, smalltalk.SemanticAnalyzer)})}
|
1164
1259
|
}),
|
1165
1260
|
smalltalk.SemanticAnalyzer);
|
1166
1261
|
|
@@ -1168,22 +1263,22 @@ smalltalk.addMethod(
|
|
1168
1263
|
"_visitVariableNode_",
|
1169
1264
|
smalltalk.method({
|
1170
1265
|
selector: "visitVariableNode:",
|
1171
|
-
fn: function (aNode)
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
}
|
1266
|
+
fn: function (aNode){
|
1267
|
+
var self=this;
|
1268
|
+
return smalltalk.withContext(function($ctx1) {
|
1269
|
+
$1=aNode;
|
1270
|
+
$3=_st(self["@currentScope"])._lookupVariable_(aNode);
|
1271
|
+
if(($receiver = $3) == nil || $receiver == undefined){
|
1272
|
+
_st(self)._errorUnknownVariable_(aNode);
|
1273
|
+
$4=_st((smalltalk.UnknownVar || UnknownVar))._new();
|
1274
|
+
_st($4)._name_(_st(aNode)._value());
|
1275
|
+
$5=_st($4)._yourself();
|
1276
|
+
$2=$5;
|
1277
|
+
} else {
|
1278
|
+
$2=$3;
|
1279
|
+
};
|
1280
|
+
_st($1)._binding_($2);
|
1281
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitVariableNode:",{aNode:aNode}, smalltalk.SemanticAnalyzer)})}
|
1187
1282
|
}),
|
1188
1283
|
smalltalk.SemanticAnalyzer);
|
1189
1284
|
|
@@ -1192,15 +1287,15 @@ smalltalk.addMethod(
|
|
1192
1287
|
"_on_",
|
1193
1288
|
smalltalk.method({
|
1194
1289
|
selector: "on:",
|
1195
|
-
fn: function (aClass)
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
}
|
1290
|
+
fn: function (aClass){
|
1291
|
+
var self=this;
|
1292
|
+
return smalltalk.withContext(function($ctx1) {
|
1293
|
+
$2=_st(self)._new();
|
1294
|
+
_st($2)._theClass_(aClass);
|
1295
|
+
$3=_st($2)._yourself();
|
1296
|
+
$1=$3;
|
1297
|
+
return $1;
|
1298
|
+
}, function($ctx1) {$ctx1.fill(self,"on:",{aClass:aClass}, smalltalk.SemanticAnalyzer.klass)})}
|
1204
1299
|
}),
|
1205
1300
|
smalltalk.SemanticAnalyzer.klass);
|
1206
1301
|
|