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
@@ -6,10 +6,10 @@ smalltalk.method({
|
|
6
6
|
selector: "accept:",
|
7
7
|
fn: function (aVisitor){
|
8
8
|
var self=this;
|
9
|
-
|
10
|
-
$1=
|
9
|
+
return smalltalk.withContext(function($ctx1) {
|
10
|
+
$1=_st(aVisitor)._visitIRInlinedAssignment_(self);
|
11
11
|
return $1;
|
12
|
-
}
|
12
|
+
}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRInlinedAssignment)})}
|
13
13
|
}),
|
14
14
|
smalltalk.IRInlinedAssignment);
|
15
15
|
|
@@ -19,8 +19,8 @@ smalltalk.method({
|
|
19
19
|
selector: "isInlined",
|
20
20
|
fn: function (){
|
21
21
|
var self=this;
|
22
|
-
return
|
23
|
-
}
|
22
|
+
return smalltalk.withContext(function($ctx1) {
|
23
|
+
}, function($ctx1) {$ctx1.fill(self,"isInlined",{}, smalltalk.IRInlinedAssignment)})}
|
24
24
|
}),
|
25
25
|
smalltalk.IRInlinedAssignment);
|
26
26
|
|
@@ -33,8 +33,8 @@ smalltalk.method({
|
|
33
33
|
selector: "accept:",
|
34
34
|
fn: function (aVisitor){
|
35
35
|
var self=this;
|
36
|
-
smalltalk.
|
37
|
-
return self}
|
36
|
+
return smalltalk.withContext(function($ctx1) {
|
37
|
+
return self}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRInlinedClosure)})}
|
38
38
|
}),
|
39
39
|
smalltalk.IRInlinedClosure);
|
40
40
|
|
@@ -44,8 +44,8 @@ smalltalk.method({
|
|
44
44
|
selector: "isInlined",
|
45
45
|
fn: function (){
|
46
46
|
var self=this;
|
47
|
-
return
|
48
|
-
}
|
47
|
+
return smalltalk.withContext(function($ctx1) {
|
48
|
+
}, function($ctx1) {$ctx1.fill(self,"isInlined",{}, smalltalk.IRInlinedClosure)})}
|
49
49
|
}),
|
50
50
|
smalltalk.IRInlinedClosure);
|
51
51
|
|
@@ -58,10 +58,10 @@ smalltalk.method({
|
|
58
58
|
selector: "accept:",
|
59
59
|
fn: function (aVisitor){
|
60
60
|
var self=this;
|
61
|
-
|
62
|
-
$1=
|
61
|
+
return smalltalk.withContext(function($ctx1) {
|
62
|
+
$1=_st(aVisitor)._visitIRInlinedReturn_(self);
|
63
63
|
return $1;
|
64
|
-
}
|
64
|
+
}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRInlinedReturn)})}
|
65
65
|
}),
|
66
66
|
smalltalk.IRInlinedReturn);
|
67
67
|
|
@@ -71,8 +71,8 @@ smalltalk.method({
|
|
71
71
|
selector: "isInlined",
|
72
72
|
fn: function (){
|
73
73
|
var self=this;
|
74
|
-
return
|
75
|
-
}
|
74
|
+
return smalltalk.withContext(function($ctx1) {
|
75
|
+
}, function($ctx1) {$ctx1.fill(self,"isInlined",{}, smalltalk.IRInlinedReturn)})}
|
76
76
|
}),
|
77
77
|
smalltalk.IRInlinedReturn);
|
78
78
|
|
@@ -85,10 +85,10 @@ smalltalk.method({
|
|
85
85
|
selector: "accept:",
|
86
86
|
fn: function (aVisitor){
|
87
87
|
var self=this;
|
88
|
-
|
89
|
-
$1=
|
88
|
+
return smalltalk.withContext(function($ctx1) {
|
89
|
+
$1=_st(aVisitor)._visitIRInlinedNonLocalReturn_(self);
|
90
90
|
return $1;
|
91
|
-
}
|
91
|
+
}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRInlinedNonLocalReturn)})}
|
92
92
|
}),
|
93
93
|
smalltalk.IRInlinedNonLocalReturn);
|
94
94
|
|
@@ -98,8 +98,8 @@ smalltalk.method({
|
|
98
98
|
selector: "isInlined",
|
99
99
|
fn: function (){
|
100
100
|
var self=this;
|
101
|
-
return
|
102
|
-
}
|
101
|
+
return smalltalk.withContext(function($ctx1) {
|
102
|
+
}, function($ctx1) {$ctx1.fill(self,"isInlined",{}, smalltalk.IRInlinedNonLocalReturn)})}
|
103
103
|
}),
|
104
104
|
smalltalk.IRInlinedNonLocalReturn);
|
105
105
|
|
@@ -112,8 +112,8 @@ smalltalk.method({
|
|
112
112
|
selector: "accept:",
|
113
113
|
fn: function (aVisitor){
|
114
114
|
var self=this;
|
115
|
-
smalltalk.
|
116
|
-
return self}
|
115
|
+
return smalltalk.withContext(function($ctx1) {
|
116
|
+
return self}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRInlinedSend)})}
|
117
117
|
}),
|
118
118
|
smalltalk.IRInlinedSend);
|
119
119
|
|
@@ -123,8 +123,8 @@ smalltalk.method({
|
|
123
123
|
selector: "isInlined",
|
124
124
|
fn: function (){
|
125
125
|
var self=this;
|
126
|
-
return
|
127
|
-
}
|
126
|
+
return smalltalk.withContext(function($ctx1) {
|
127
|
+
}, function($ctx1) {$ctx1.fill(self,"isInlined",{}, smalltalk.IRInlinedSend)})}
|
128
128
|
}),
|
129
129
|
smalltalk.IRInlinedSend);
|
130
130
|
|
@@ -137,8 +137,8 @@ smalltalk.method({
|
|
137
137
|
selector: "accept:",
|
138
138
|
fn: function (aVisitor){
|
139
139
|
var self=this;
|
140
|
-
smalltalk.
|
141
|
-
return self}
|
140
|
+
return smalltalk.withContext(function($ctx1) {
|
141
|
+
return self}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRInlinedIfFalse)})}
|
142
142
|
}),
|
143
143
|
smalltalk.IRInlinedIfFalse);
|
144
144
|
|
@@ -151,8 +151,8 @@ smalltalk.method({
|
|
151
151
|
selector: "accept:",
|
152
152
|
fn: function (aVisitor){
|
153
153
|
var self=this;
|
154
|
-
smalltalk.
|
155
|
-
return self}
|
154
|
+
return smalltalk.withContext(function($ctx1) {
|
155
|
+
return self}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRInlinedIfNilIfNotNil)})}
|
156
156
|
}),
|
157
157
|
smalltalk.IRInlinedIfNilIfNotNil);
|
158
158
|
|
@@ -165,8 +165,8 @@ smalltalk.method({
|
|
165
165
|
selector: "accept:",
|
166
166
|
fn: function (aVisitor){
|
167
167
|
var self=this;
|
168
|
-
smalltalk.
|
169
|
-
return self}
|
168
|
+
return smalltalk.withContext(function($ctx1) {
|
169
|
+
return self}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRInlinedIfTrue)})}
|
170
170
|
}),
|
171
171
|
smalltalk.IRInlinedIfTrue);
|
172
172
|
|
@@ -179,8 +179,8 @@ smalltalk.method({
|
|
179
179
|
selector: "accept:",
|
180
180
|
fn: function (aVisitor){
|
181
181
|
var self=this;
|
182
|
-
smalltalk.
|
183
|
-
return self}
|
182
|
+
return smalltalk.withContext(function($ctx1) {
|
183
|
+
return self}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRInlinedIfTrueIfFalse)})}
|
184
184
|
}),
|
185
185
|
smalltalk.IRInlinedIfTrueIfFalse);
|
186
186
|
|
@@ -193,8 +193,8 @@ smalltalk.method({
|
|
193
193
|
selector: "accept:",
|
194
194
|
fn: function (aVisitor){
|
195
195
|
var self=this;
|
196
|
-
smalltalk.
|
197
|
-
return self}
|
196
|
+
return smalltalk.withContext(function($ctx1) {
|
197
|
+
return self}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRInlinedSequence)})}
|
198
198
|
}),
|
199
199
|
smalltalk.IRInlinedSequence);
|
200
200
|
|
@@ -204,8 +204,8 @@ smalltalk.method({
|
|
204
204
|
selector: "isInlined",
|
205
205
|
fn: function (){
|
206
206
|
var self=this;
|
207
|
-
return
|
208
|
-
}
|
207
|
+
return smalltalk.withContext(function($ctx1) {
|
208
|
+
}, function($ctx1) {$ctx1.fill(self,"isInlined",{}, smalltalk.IRInlinedSequence)})}
|
209
209
|
}),
|
210
210
|
smalltalk.IRInlinedSequence);
|
211
211
|
|
@@ -218,13 +218,13 @@ smalltalk.method({
|
|
218
218
|
selector: "assignmentInliner",
|
219
219
|
fn: function (){
|
220
220
|
var self=this;
|
221
|
-
|
222
|
-
$2=
|
223
|
-
|
224
|
-
$3=
|
221
|
+
return smalltalk.withContext(function($ctx1) {
|
222
|
+
$2=_st((smalltalk.IRAssignmentInliner || IRAssignmentInliner))._new();
|
223
|
+
_st($2)._translator_(self);
|
224
|
+
$3=_st($2)._yourself();
|
225
225
|
$1=$3;
|
226
226
|
return $1;
|
227
|
-
}
|
227
|
+
}, function($ctx1) {$ctx1.fill(self,"assignmentInliner",{}, smalltalk.IRInliner)})}
|
228
228
|
}),
|
229
229
|
smalltalk.IRInliner);
|
230
230
|
|
@@ -234,13 +234,13 @@ smalltalk.method({
|
|
234
234
|
selector: "nonLocalReturnInliner",
|
235
235
|
fn: function (){
|
236
236
|
var self=this;
|
237
|
-
|
238
|
-
$2=
|
239
|
-
|
240
|
-
$3=
|
237
|
+
return smalltalk.withContext(function($ctx1) {
|
238
|
+
$2=_st((smalltalk.IRNonLocalReturnInliner || IRNonLocalReturnInliner))._new();
|
239
|
+
_st($2)._translator_(self);
|
240
|
+
$3=_st($2)._yourself();
|
241
241
|
$1=$3;
|
242
242
|
return $1;
|
243
|
-
}
|
243
|
+
}, function($ctx1) {$ctx1.fill(self,"nonLocalReturnInliner",{}, smalltalk.IRInliner)})}
|
244
244
|
}),
|
245
245
|
smalltalk.IRInliner);
|
246
246
|
|
@@ -250,13 +250,13 @@ smalltalk.method({
|
|
250
250
|
selector: "returnInliner",
|
251
251
|
fn: function (){
|
252
252
|
var self=this;
|
253
|
-
|
254
|
-
$2=
|
255
|
-
|
256
|
-
$3=
|
253
|
+
return smalltalk.withContext(function($ctx1) {
|
254
|
+
$2=_st((smalltalk.IRReturnInliner || IRReturnInliner))._new();
|
255
|
+
_st($2)._translator_(self);
|
256
|
+
$3=_st($2)._yourself();
|
257
257
|
$1=$3;
|
258
258
|
return $1;
|
259
|
-
}
|
259
|
+
}, function($ctx1) {$ctx1.fill(self,"returnInliner",{}, smalltalk.IRInliner)})}
|
260
260
|
}),
|
261
261
|
smalltalk.IRInliner);
|
262
262
|
|
@@ -266,13 +266,13 @@ smalltalk.method({
|
|
266
266
|
selector: "sendInliner",
|
267
267
|
fn: function (){
|
268
268
|
var self=this;
|
269
|
-
|
270
|
-
$2=
|
271
|
-
|
272
|
-
$3=
|
269
|
+
return smalltalk.withContext(function($ctx1) {
|
270
|
+
$2=_st((smalltalk.IRSendInliner || IRSendInliner))._new();
|
271
|
+
_st($2)._translator_(self);
|
272
|
+
$3=_st($2)._yourself();
|
273
273
|
$1=$3;
|
274
274
|
return $1;
|
275
|
-
}
|
275
|
+
}, function($ctx1) {$ctx1.fill(self,"sendInliner",{}, smalltalk.IRInliner)})}
|
276
276
|
}),
|
277
277
|
smalltalk.IRInliner);
|
278
278
|
|
@@ -282,14 +282,14 @@ smalltalk.method({
|
|
282
282
|
selector: "shouldInlineAssignment:",
|
283
283
|
fn: function (anIRAssignment){
|
284
284
|
var self=this;
|
285
|
-
|
286
|
-
$1=
|
287
|
-
return smalltalk.
|
288
|
-
return smalltalk.
|
289
|
-
})
|
290
|
-
})
|
285
|
+
return smalltalk.withContext(function($ctx1) {
|
286
|
+
$1=_st(_st(_st(anIRAssignment)._isInlined())._not())._and_((function(){
|
287
|
+
return smalltalk.withContext(function($ctx2) {
|
288
|
+
return smalltalk.withContext(function($ctx3) {
|
289
|
+
}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
|
290
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
291
291
|
return $1;
|
292
|
-
}
|
292
|
+
}, function($ctx1) {$ctx1.fill(self,"shouldInlineAssignment:",{anIRAssignment:anIRAssignment}, smalltalk.IRInliner)})}
|
293
293
|
}),
|
294
294
|
smalltalk.IRInliner);
|
295
295
|
|
@@ -299,14 +299,14 @@ smalltalk.method({
|
|
299
299
|
selector: "shouldInlineReturn:",
|
300
300
|
fn: function (anIRReturn){
|
301
301
|
var self=this;
|
302
|
-
|
303
|
-
$1=
|
304
|
-
return smalltalk.
|
305
|
-
return smalltalk.
|
306
|
-
})
|
307
|
-
})
|
302
|
+
return smalltalk.withContext(function($ctx1) {
|
303
|
+
$1=_st(_st(_st(anIRReturn)._isInlined())._not())._and_((function(){
|
304
|
+
return smalltalk.withContext(function($ctx2) {
|
305
|
+
return smalltalk.withContext(function($ctx3) {
|
306
|
+
}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
|
307
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
308
308
|
return $1;
|
309
|
-
}
|
309
|
+
}, function($ctx1) {$ctx1.fill(self,"shouldInlineReturn:",{anIRReturn:anIRReturn}, smalltalk.IRInliner)})}
|
310
310
|
}),
|
311
311
|
smalltalk.IRInliner);
|
312
312
|
|
@@ -316,12 +316,12 @@ smalltalk.method({
|
|
316
316
|
selector: "shouldInlineSend:",
|
317
317
|
fn: function (anIRSend){
|
318
318
|
var self=this;
|
319
|
-
|
320
|
-
$1=
|
321
|
-
return smalltalk.
|
322
|
-
})
|
319
|
+
return smalltalk.withContext(function($ctx1) {
|
320
|
+
$1=_st(_st(_st(anIRSend)._isInlined())._not())._and_((function(){
|
321
|
+
return smalltalk.withContext(function($ctx2) {
|
322
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
323
323
|
return $1;
|
324
|
-
}
|
324
|
+
}, function($ctx1) {$ctx1.fill(self,"shouldInlineSend:",{anIRSend:anIRSend}, smalltalk.IRInliner)})}
|
325
325
|
}),
|
326
326
|
smalltalk.IRInliner);
|
327
327
|
|
@@ -331,25 +331,26 @@ smalltalk.method({
|
|
331
331
|
selector: "transformNonLocalReturn:",
|
332
332
|
fn: function (anIRNonLocalReturn){
|
333
333
|
var self=this;
|
334
|
-
var $1,$2,$3,$4;
|
335
334
|
var localReturn;
|
336
|
-
|
335
|
+
return smalltalk.withContext(function($ctx1) {
|
336
|
+
$1=_st(_st(anIRNonLocalReturn)._scope())._canInlineNonLocalReturns();
|
337
337
|
if(smalltalk.assert($1)){
|
338
|
-
|
339
|
-
$2=
|
340
|
-
|
341
|
-
$3=
|
338
|
+
_st(_st(_st(anIRNonLocalReturn)._scope())._methodScope())._removeNonLocalReturn_(_st(anIRNonLocalReturn)._scope());
|
339
|
+
$2=_st((smalltalk.IRReturn || IRReturn))._new();
|
340
|
+
_st($2)._scope_(_st(anIRNonLocalReturn)._scope());
|
341
|
+
$3=_st($2)._yourself();
|
342
342
|
localReturn=$3;
|
343
343
|
localReturn;
|
344
|
-
|
345
|
-
return smalltalk.
|
346
|
-
})
|
347
|
-
|
348
|
-
|
349
|
-
};
|
350
|
-
$4=smalltalk.send(self,"_visitIRNonLocalReturn_",[anIRNonLocalReturn],smalltalk.IRVisitor);
|
344
|
+
_st(_st(anIRNonLocalReturn)._instructions())._do_((function(each){
|
345
|
+
return smalltalk.withContext(function($ctx2) {
|
346
|
+
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
347
|
+
_st(anIRNonLocalReturn)._replaceWith_(localReturn);
|
348
|
+
$4=localReturn;
|
351
349
|
return $4;
|
352
|
-
}
|
350
|
+
};
|
351
|
+
$5=smalltalk.IRVisitor.fn.prototype._visitIRNonLocalReturn_.apply(_st(self), [anIRNonLocalReturn]);
|
352
|
+
return $5;
|
353
|
+
}, function($ctx1) {$ctx1.fill(self,"transformNonLocalReturn:",{anIRNonLocalReturn:anIRNonLocalReturn,localReturn:localReturn}, smalltalk.IRInliner)})}
|
353
354
|
}),
|
354
355
|
smalltalk.IRInliner);
|
355
356
|
|
@@ -359,15 +360,15 @@ smalltalk.method({
|
|
359
360
|
selector: "visitIRAssignment:",
|
360
361
|
fn: function (anIRAssignment){
|
361
362
|
var self=this;
|
362
|
-
|
363
|
-
$2=
|
363
|
+
return smalltalk.withContext(function($ctx1) {
|
364
|
+
$2=_st(self)._shouldInlineAssignment_(anIRAssignment);
|
364
365
|
if(smalltalk.assert($2)){
|
365
|
-
$1=
|
366
|
+
$1=_st(_st(self)._assignmentInliner())._inlineAssignment_(anIRAssignment);
|
366
367
|
} else {
|
367
|
-
$1=smalltalk.
|
368
|
+
$1=smalltalk.IRVisitor.fn.prototype._visitIRAssignment_.apply(_st(self), [anIRAssignment]);
|
368
369
|
};
|
369
370
|
return $1;
|
370
|
-
}
|
371
|
+
}, function($ctx1) {$ctx1.fill(self,"visitIRAssignment:",{anIRAssignment:anIRAssignment}, smalltalk.IRInliner)})}
|
371
372
|
}),
|
372
373
|
smalltalk.IRInliner);
|
373
374
|
|
@@ -377,15 +378,15 @@ smalltalk.method({
|
|
377
378
|
selector: "visitIRNonLocalReturn:",
|
378
379
|
fn: function (anIRNonLocalReturn){
|
379
380
|
var self=this;
|
380
|
-
|
381
|
-
$2=
|
381
|
+
return smalltalk.withContext(function($ctx1) {
|
382
|
+
$2=_st(self)._shouldInlineReturn_(anIRNonLocalReturn);
|
382
383
|
if(smalltalk.assert($2)){
|
383
|
-
$1=
|
384
|
+
$1=_st(_st(self)._nonLocalReturnInliner())._inlineReturn_(anIRNonLocalReturn);
|
384
385
|
} else {
|
385
|
-
$1=
|
386
|
+
$1=_st(self)._transformNonLocalReturn_(anIRNonLocalReturn);
|
386
387
|
};
|
387
388
|
return $1;
|
388
|
-
}
|
389
|
+
}, function($ctx1) {$ctx1.fill(self,"visitIRNonLocalReturn:",{anIRNonLocalReturn:anIRNonLocalReturn}, smalltalk.IRInliner)})}
|
389
390
|
}),
|
390
391
|
smalltalk.IRInliner);
|
391
392
|
|
@@ -395,15 +396,15 @@ smalltalk.method({
|
|
395
396
|
selector: "visitIRReturn:",
|
396
397
|
fn: function (anIRReturn){
|
397
398
|
var self=this;
|
398
|
-
|
399
|
-
$2=
|
399
|
+
return smalltalk.withContext(function($ctx1) {
|
400
|
+
$2=_st(self)._shouldInlineReturn_(anIRReturn);
|
400
401
|
if(smalltalk.assert($2)){
|
401
|
-
$1=
|
402
|
+
$1=_st(_st(self)._returnInliner())._inlineReturn_(anIRReturn);
|
402
403
|
} else {
|
403
|
-
$1=smalltalk.
|
404
|
+
$1=smalltalk.IRVisitor.fn.prototype._visitIRReturn_.apply(_st(self), [anIRReturn]);
|
404
405
|
};
|
405
406
|
return $1;
|
406
|
-
}
|
407
|
+
}, function($ctx1) {$ctx1.fill(self,"visitIRReturn:",{anIRReturn:anIRReturn}, smalltalk.IRInliner)})}
|
407
408
|
}),
|
408
409
|
smalltalk.IRInliner);
|
409
410
|
|
@@ -413,15 +414,15 @@ smalltalk.method({
|
|
413
414
|
selector: "visitIRSend:",
|
414
415
|
fn: function (anIRSend){
|
415
416
|
var self=this;
|
416
|
-
|
417
|
-
$2=
|
417
|
+
return smalltalk.withContext(function($ctx1) {
|
418
|
+
$2=_st(self)._shouldInlineSend_(anIRSend);
|
418
419
|
if(smalltalk.assert($2)){
|
419
|
-
$1=
|
420
|
+
$1=_st(_st(self)._sendInliner())._inlineSend_(anIRSend);
|
420
421
|
} else {
|
421
|
-
$1=smalltalk.
|
422
|
+
$1=smalltalk.IRVisitor.fn.prototype._visitIRSend_.apply(_st(self), [anIRSend]);
|
422
423
|
};
|
423
424
|
return $1;
|
424
|
-
}
|
425
|
+
}, function($ctx1) {$ctx1.fill(self,"visitIRSend:",{anIRSend:anIRSend}, smalltalk.IRInliner)})}
|
425
426
|
}),
|
426
427
|
smalltalk.IRInliner);
|
427
428
|
|
@@ -434,8 +435,8 @@ smalltalk.method({
|
|
434
435
|
selector: "visitIRInlinedAssignment:",
|
435
436
|
fn: function (anIRInlinedAssignment){
|
436
437
|
var self=this;
|
437
|
-
smalltalk.
|
438
|
-
return self}
|
438
|
+
return smalltalk.withContext(function($ctx1) {
|
439
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedAssignment:",{anIRInlinedAssignment:anIRInlinedAssignment}, smalltalk.IRInliningJSTranslator)})}
|
439
440
|
}),
|
440
441
|
smalltalk.IRInliningJSTranslator);
|
441
442
|
|
@@ -445,10 +446,10 @@ smalltalk.method({
|
|
445
446
|
selector: "visitIRInlinedClosure:",
|
446
447
|
fn: function (anIRInlinedClosure){
|
447
448
|
var self=this;
|
448
|
-
smalltalk.
|
449
|
-
return smalltalk.
|
450
|
-
})
|
451
|
-
return self}
|
449
|
+
return smalltalk.withContext(function($ctx1) {
|
450
|
+
return smalltalk.withContext(function($ctx2) {
|
451
|
+
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
452
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedClosure:",{anIRInlinedClosure:anIRInlinedClosure}, smalltalk.IRInliningJSTranslator)})}
|
452
453
|
}),
|
453
454
|
smalltalk.IRInliningJSTranslator);
|
454
455
|
|
@@ -458,14 +459,14 @@ smalltalk.method({
|
|
458
459
|
selector: "visitIRInlinedIfFalse:",
|
459
460
|
fn: function (anIRInlinedIfFalse){
|
460
461
|
var self=this;
|
461
|
-
smalltalk.
|
462
|
-
smalltalk.
|
463
|
-
|
464
|
-
return
|
465
|
-
}),(function(){
|
466
|
-
return smalltalk.
|
467
|
-
})
|
468
|
-
return self}
|
462
|
+
return smalltalk.withContext(function($ctx1) {
|
463
|
+
return smalltalk.withContext(function($ctx2) {
|
464
|
+
_st(self)._visit_(_st(_st(anIRInlinedIfFalse)._instructions())._first());
|
465
|
+
return _st(_st(self)._stream())._nextPutAll_(")");
|
466
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
|
467
|
+
return smalltalk.withContext(function($ctx2) {
|
468
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
469
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfFalse:",{anIRInlinedIfFalse:anIRInlinedIfFalse}, smalltalk.IRInliningJSTranslator)})}
|
469
470
|
}),
|
470
471
|
smalltalk.IRInliningJSTranslator);
|
471
472
|
|
@@ -475,14 +476,14 @@ smalltalk.method({
|
|
475
476
|
selector: "visitIRInlinedIfNil:",
|
476
477
|
fn: function (anIRInlinedIfNil){
|
477
478
|
var self=this;
|
478
|
-
smalltalk.
|
479
|
-
smalltalk.
|
480
|
-
|
481
|
-
return
|
482
|
-
}),(function(){
|
483
|
-
return smalltalk.
|
484
|
-
})
|
485
|
-
return self}
|
479
|
+
return smalltalk.withContext(function($ctx1) {
|
480
|
+
return smalltalk.withContext(function($ctx2) {
|
481
|
+
_st(self)._visit_(_st(_st(anIRInlinedIfNil)._instructions())._first());
|
482
|
+
return _st(_st(self)._stream())._nextPutAll_(") == nil || $receiver == undefined");
|
483
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
|
484
|
+
return smalltalk.withContext(function($ctx2) {
|
485
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
486
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfNil:",{anIRInlinedIfNil:anIRInlinedIfNil}, smalltalk.IRInliningJSTranslator)})}
|
486
487
|
}),
|
487
488
|
smalltalk.IRInliningJSTranslator);
|
488
489
|
|
@@ -492,16 +493,16 @@ smalltalk.method({
|
|
492
493
|
selector: "visitIRInlinedIfNilIfNotNil:",
|
493
494
|
fn: function (anIRInlinedIfNilIfNotNil){
|
494
495
|
var self=this;
|
495
|
-
smalltalk.
|
496
|
-
smalltalk.
|
497
|
-
|
498
|
-
return
|
499
|
-
}),(function(){
|
500
|
-
return smalltalk.
|
501
|
-
}),(function(){
|
502
|
-
return smalltalk.
|
503
|
-
})
|
504
|
-
return self}
|
496
|
+
return smalltalk.withContext(function($ctx1) {
|
497
|
+
return smalltalk.withContext(function($ctx2) {
|
498
|
+
_st(self)._visit_(_st(_st(anIRInlinedIfNilIfNotNil)._instructions())._first());
|
499
|
+
return _st(_st(self)._stream())._nextPutAll_(") == nil || $receiver == undefined");
|
500
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
|
501
|
+
return smalltalk.withContext(function($ctx2) {
|
502
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
|
503
|
+
return smalltalk.withContext(function($ctx2) {
|
504
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
505
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfNilIfNotNil:",{anIRInlinedIfNilIfNotNil:anIRInlinedIfNilIfNotNil}, smalltalk.IRInliningJSTranslator)})}
|
505
506
|
}),
|
506
507
|
smalltalk.IRInliningJSTranslator);
|
507
508
|
|
@@ -511,14 +512,14 @@ smalltalk.method({
|
|
511
512
|
selector: "visitIRInlinedIfTrue:",
|
512
513
|
fn: function (anIRInlinedIfTrue){
|
513
514
|
var self=this;
|
514
|
-
smalltalk.
|
515
|
-
smalltalk.
|
516
|
-
|
517
|
-
return
|
518
|
-
}),(function(){
|
519
|
-
return smalltalk.
|
520
|
-
})
|
521
|
-
return self}
|
515
|
+
return smalltalk.withContext(function($ctx1) {
|
516
|
+
return smalltalk.withContext(function($ctx2) {
|
517
|
+
_st(self)._visit_(_st(_st(anIRInlinedIfTrue)._instructions())._first());
|
518
|
+
return _st(_st(self)._stream())._nextPutAll_(")");
|
519
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
|
520
|
+
return smalltalk.withContext(function($ctx2) {
|
521
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
522
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfTrue:",{anIRInlinedIfTrue:anIRInlinedIfTrue}, smalltalk.IRInliningJSTranslator)})}
|
522
523
|
}),
|
523
524
|
smalltalk.IRInliningJSTranslator);
|
524
525
|
|
@@ -528,16 +529,16 @@ smalltalk.method({
|
|
528
529
|
selector: "visitIRInlinedIfTrueIfFalse:",
|
529
530
|
fn: function (anIRInlinedIfTrueIfFalse){
|
530
531
|
var self=this;
|
531
|
-
smalltalk.
|
532
|
-
smalltalk.
|
533
|
-
|
534
|
-
return
|
535
|
-
}),(function(){
|
536
|
-
return smalltalk.
|
537
|
-
}),(function(){
|
538
|
-
return smalltalk.
|
539
|
-
})
|
540
|
-
return self}
|
532
|
+
return smalltalk.withContext(function($ctx1) {
|
533
|
+
return smalltalk.withContext(function($ctx2) {
|
534
|
+
_st(self)._visit_(_st(_st(anIRInlinedIfTrueIfFalse)._instructions())._first());
|
535
|
+
return _st(_st(self)._stream())._nextPutAll_(")");
|
536
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
|
537
|
+
return smalltalk.withContext(function($ctx2) {
|
538
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
|
539
|
+
return smalltalk.withContext(function($ctx2) {
|
540
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
541
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfTrueIfFalse:",{anIRInlinedIfTrueIfFalse:anIRInlinedIfTrueIfFalse}, smalltalk.IRInliningJSTranslator)})}
|
541
542
|
}),
|
542
543
|
smalltalk.IRInliningJSTranslator);
|
543
544
|
|
@@ -547,12 +548,12 @@ smalltalk.method({
|
|
547
548
|
selector: "visitIRInlinedNonLocalReturn:",
|
548
549
|
fn: function (anIRInlinedReturn){
|
549
550
|
var self=this;
|
550
|
-
smalltalk.
|
551
|
-
return smalltalk.
|
552
|
-
})
|
553
|
-
|
554
|
-
|
555
|
-
return self}
|
551
|
+
return smalltalk.withContext(function($ctx1) {
|
552
|
+
return smalltalk.withContext(function($ctx2) {
|
553
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
554
|
+
_st(_st(self)._stream())._nextPutNonLocalReturnWith_((function(){
|
555
|
+
return smalltalk.withContext(function($ctx2) {
|
556
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedNonLocalReturn:",{anIRInlinedReturn:anIRInlinedReturn}, smalltalk.IRInliningJSTranslator)})}
|
556
557
|
}),
|
557
558
|
smalltalk.IRInliningJSTranslator);
|
558
559
|
|
@@ -562,8 +563,8 @@ smalltalk.method({
|
|
562
563
|
selector: "visitIRInlinedReturn:",
|
563
564
|
fn: function (anIRInlinedReturn){
|
564
565
|
var self=this;
|
565
|
-
smalltalk.
|
566
|
-
return self}
|
566
|
+
return smalltalk.withContext(function($ctx1) {
|
567
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedReturn:",{anIRInlinedReturn:anIRInlinedReturn}, smalltalk.IRInliningJSTranslator)})}
|
567
568
|
}),
|
568
569
|
smalltalk.IRInliningJSTranslator);
|
569
570
|
|
@@ -573,12 +574,12 @@ smalltalk.method({
|
|
573
574
|
selector: "visitIRInlinedSequence:",
|
574
575
|
fn: function (anIRInlinedSequence){
|
575
576
|
var self=this;
|
576
|
-
smalltalk.
|
577
|
-
return smalltalk.
|
578
|
-
return smalltalk.
|
579
|
-
})
|
580
|
-
})
|
581
|
-
return self}
|
577
|
+
return smalltalk.withContext(function($ctx1) {
|
578
|
+
return smalltalk.withContext(function($ctx2) {
|
579
|
+
return smalltalk.withContext(function($ctx3) {
|
580
|
+
}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
|
581
|
+
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
582
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedSequence:",{anIRInlinedSequence:anIRInlinedSequence}, smalltalk.IRInliningJSTranslator)})}
|
582
583
|
}),
|
583
584
|
smalltalk.IRInliningJSTranslator);
|
584
585
|
|
@@ -591,10 +592,10 @@ smalltalk.method({
|
|
591
592
|
selector: "ifFalse:",
|
592
593
|
fn: function (anIRInstruction){
|
593
594
|
var self=this;
|
594
|
-
|
595
|
-
$1=
|
595
|
+
return smalltalk.withContext(function($ctx1) {
|
596
|
+
$1=_st(self)._inlinedSend_with_(_st((smalltalk.IRInlinedIfFalse || IRInlinedIfFalse))._new(),anIRInstruction);
|
596
597
|
return $1;
|
597
|
-
}
|
598
|
+
}, function($ctx1) {$ctx1.fill(self,"ifFalse:",{anIRInstruction:anIRInstruction}, smalltalk.IRSendInliner)})}
|
598
599
|
}),
|
599
600
|
smalltalk.IRSendInliner);
|
600
601
|
|
@@ -604,10 +605,10 @@ smalltalk.method({
|
|
604
605
|
selector: "ifFalse:ifTrue:",
|
605
606
|
fn: function (anIRInstruction,anotherIRInstruction){
|
606
607
|
var self=this;
|
607
|
-
|
608
|
-
$1=
|
608
|
+
return smalltalk.withContext(function($ctx1) {
|
609
|
+
$1=_st(self)._perform_withArguments_(smalltalk.symbolFor("ifTrue:ifFalse:"),[anotherIRInstruction,anIRInstruction]);
|
609
610
|
return $1;
|
610
|
-
}
|
611
|
+
}, function($ctx1) {$ctx1.fill(self,"ifFalse:ifTrue:",{anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction}, smalltalk.IRSendInliner)})}
|
611
612
|
}),
|
612
613
|
smalltalk.IRSendInliner);
|
613
614
|
|
@@ -617,17 +618,17 @@ smalltalk.method({
|
|
617
618
|
selector: "ifNil:",
|
618
619
|
fn: function (anIRInstruction){
|
619
620
|
var self=this;
|
620
|
-
|
621
|
-
$2=
|
622
|
-
|
623
|
-
$3=
|
624
|
-
|
625
|
-
$4=
|
626
|
-
|
627
|
-
$5=
|
628
|
-
$1=
|
621
|
+
return smalltalk.withContext(function($ctx1) {
|
622
|
+
$2=_st((smalltalk.IRClosure || IRClosure))._new();
|
623
|
+
_st($2)._scope_(_st(_st(anIRInstruction)._scope())._copy());
|
624
|
+
$3=_st((smalltalk.IRBlockSequence || IRBlockSequence))._new();
|
625
|
+
_st($3)._add_(_st(_st(_st(self)._send())._instructions())._first());
|
626
|
+
$4=_st($3)._yourself();
|
627
|
+
_st($2)._add_($4);
|
628
|
+
$5=_st($2)._yourself();
|
629
|
+
$1=_st(self)._inlinedSend_with_with_(_st((smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil))._new(),anIRInstruction,$5);
|
629
630
|
return $1;
|
630
|
-
}
|
631
|
+
}, function($ctx1) {$ctx1.fill(self,"ifNil:",{anIRInstruction:anIRInstruction}, smalltalk.IRSendInliner)})}
|
631
632
|
}),
|
632
633
|
smalltalk.IRSendInliner);
|
633
634
|
|
@@ -637,10 +638,10 @@ smalltalk.method({
|
|
637
638
|
selector: "ifNil:ifNotNil:",
|
638
639
|
fn: function (anIRInstruction,anotherIRInstruction){
|
639
640
|
var self=this;
|
640
|
-
|
641
|
-
$1=
|
641
|
+
return smalltalk.withContext(function($ctx1) {
|
642
|
+
$1=_st(self)._inlinedSend_with_with_(_st((smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil))._new(),anIRInstruction,anotherIRInstruction);
|
642
643
|
return $1;
|
643
|
-
}
|
644
|
+
}, function($ctx1) {$ctx1.fill(self,"ifNil:ifNotNil:",{anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction}, smalltalk.IRSendInliner)})}
|
644
645
|
}),
|
645
646
|
smalltalk.IRSendInliner);
|
646
647
|
|
@@ -650,17 +651,17 @@ smalltalk.method({
|
|
650
651
|
selector: "ifNotNil:",
|
651
652
|
fn: function (anIRInstruction){
|
652
653
|
var self=this;
|
653
|
-
|
654
|
-
$2=
|
655
|
-
|
656
|
-
$3=
|
657
|
-
|
658
|
-
$4=
|
659
|
-
|
660
|
-
$5=
|
661
|
-
$1=
|
654
|
+
return smalltalk.withContext(function($ctx1) {
|
655
|
+
$2=_st((smalltalk.IRClosure || IRClosure))._new();
|
656
|
+
_st($2)._scope_(_st(_st(anIRInstruction)._scope())._copy());
|
657
|
+
$3=_st((smalltalk.IRBlockSequence || IRBlockSequence))._new();
|
658
|
+
_st($3)._add_(_st(_st(_st(self)._send())._instructions())._first());
|
659
|
+
$4=_st($3)._yourself();
|
660
|
+
_st($2)._add_($4);
|
661
|
+
$5=_st($2)._yourself();
|
662
|
+
$1=_st(self)._inlinedSend_with_with_(_st((smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil))._new(),$5,anIRInstruction);
|
662
663
|
return $1;
|
663
|
-
}
|
664
|
+
}, function($ctx1) {$ctx1.fill(self,"ifNotNil:",{anIRInstruction:anIRInstruction}, smalltalk.IRSendInliner)})}
|
664
665
|
}),
|
665
666
|
smalltalk.IRSendInliner);
|
666
667
|
|
@@ -670,10 +671,10 @@ smalltalk.method({
|
|
670
671
|
selector: "ifNotNil:ifNil:",
|
671
672
|
fn: function (anIRInstruction,anotherIRInstruction){
|
672
673
|
var self=this;
|
673
|
-
|
674
|
-
$1=
|
674
|
+
return smalltalk.withContext(function($ctx1) {
|
675
|
+
$1=_st(self)._inlinedSend_with_with_(_st((smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil))._new(),anotherIRInstruction,anIRInstruction);
|
675
676
|
return $1;
|
676
|
-
}
|
677
|
+
}, function($ctx1) {$ctx1.fill(self,"ifNotNil:ifNil:",{anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction}, smalltalk.IRSendInliner)})}
|
677
678
|
}),
|
678
679
|
smalltalk.IRSendInliner);
|
679
680
|
|
@@ -683,10 +684,10 @@ smalltalk.method({
|
|
683
684
|
selector: "ifTrue:",
|
684
685
|
fn: function (anIRInstruction){
|
685
686
|
var self=this;
|
686
|
-
|
687
|
-
$1=
|
687
|
+
return smalltalk.withContext(function($ctx1) {
|
688
|
+
$1=_st(self)._inlinedSend_with_(_st((smalltalk.IRInlinedIfTrue || IRInlinedIfTrue))._new(),anIRInstruction);
|
688
689
|
return $1;
|
689
|
-
}
|
690
|
+
}, function($ctx1) {$ctx1.fill(self,"ifTrue:",{anIRInstruction:anIRInstruction}, smalltalk.IRSendInliner)})}
|
690
691
|
}),
|
691
692
|
smalltalk.IRSendInliner);
|
692
693
|
|
@@ -696,10 +697,10 @@ smalltalk.method({
|
|
696
697
|
selector: "ifTrue:ifFalse:",
|
697
698
|
fn: function (anIRInstruction,anotherIRInstruction){
|
698
699
|
var self=this;
|
699
|
-
|
700
|
-
$1=
|
700
|
+
return smalltalk.withContext(function($ctx1) {
|
701
|
+
$1=_st(self)._inlinedSend_with_with_(_st((smalltalk.IRInlinedIfTrueIfFalse || IRInlinedIfTrueIfFalse))._new(),anIRInstruction,anotherIRInstruction);
|
701
702
|
return $1;
|
702
|
-
}
|
703
|
+
}, function($ctx1) {$ctx1.fill(self,"ifTrue:ifFalse:",{anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction}, smalltalk.IRSendInliner)})}
|
703
704
|
}),
|
704
705
|
smalltalk.IRSendInliner);
|
705
706
|
|
@@ -709,36 +710,39 @@ smalltalk.method({
|
|
709
710
|
selector: "inlineClosure:",
|
710
711
|
fn: function (anIRClosure){
|
711
712
|
var self=this;
|
712
|
-
var
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
smalltalk.
|
719
|
-
|
720
|
-
|
721
|
-
return smalltalk.send(inlinedClosure,"_add_",[each]);
|
713
|
+
var inlinedClosure,sequence,statements;
|
714
|
+
return smalltalk.withContext(function($ctx1) {
|
715
|
+
inlinedClosure=_st(self)._inlinedClosure();
|
716
|
+
_st(inlinedClosure)._scope_(_st(anIRClosure)._scope());
|
717
|
+
$1=_st(anIRClosure)._instructions();
|
718
|
+
$2=(function(each){
|
719
|
+
return smalltalk.withContext(function($ctx2) {
|
720
|
+
if(! smalltalk.assert($3)){
|
721
|
+
return _st(inlinedClosure)._add_(each);
|
722
722
|
};
|
723
|
-
})
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
723
|
+
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
|
724
|
+
_st($1)._do_($2);
|
725
|
+
sequence=_st(self)._inlinedSequence();
|
726
|
+
_st(inlinedClosure)._add_(sequence);
|
727
|
+
statements=_st(_st(_st(anIRClosure)._instructions())._last())._instructions();
|
728
|
+
$4=statements;
|
729
|
+
$5=(function(){
|
730
|
+
return smalltalk.withContext(function($ctx2) {
|
731
|
+
return smalltalk.withContext(function($ctx3) {
|
732
|
+
}, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
|
733
|
+
$6=_st(_st(_st(statements)._last())._isReturn())._and_((function(){
|
734
|
+
return smalltalk.withContext(function($ctx3) {
|
735
|
+
}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
|
736
|
+
if(smalltalk.assert($6)){
|
737
|
+
return _st(sequence)._add_(_st(_st(_st(statements)._last())._instructions())._first());
|
736
738
|
} else {
|
737
|
-
return
|
739
|
+
return _st(sequence)._add_(_st(statements)._last());
|
738
740
|
};
|
739
|
-
})
|
740
|
-
|
741
|
-
|
741
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
|
742
|
+
_st($4)._ifNotEmpty_($5);
|
743
|
+
$7=inlinedClosure;
|
744
|
+
return $7;
|
745
|
+
}, function($ctx1) {$ctx1.fill(self,"inlineClosure:",{anIRClosure:anIRClosure,inlinedClosure:inlinedClosure,sequence:sequence,statements:statements}, smalltalk.IRSendInliner)})}
|
742
746
|
}),
|
743
747
|
smalltalk.IRSendInliner);
|
744
748
|
|
@@ -748,11 +752,11 @@ smalltalk.method({
|
|
748
752
|
selector: "inlineSend:",
|
749
753
|
fn: function (anIRSend){
|
750
754
|
var self=this;
|
751
|
-
|
752
|
-
|
753
|
-
$1=
|
755
|
+
return smalltalk.withContext(function($ctx1) {
|
756
|
+
_st(self)._send_(anIRSend);
|
757
|
+
$1=_st(self)._perform_withArguments_(_st(_st(self)._send())._selector(),_st(_st(_st(self)._send())._instructions())._allButFirst());
|
754
758
|
return $1;
|
755
|
-
}
|
759
|
+
}, function($ctx1) {$ctx1.fill(self,"inlineSend:",{anIRSend:anIRSend}, smalltalk.IRSendInliner)})}
|
756
760
|
}),
|
757
761
|
smalltalk.IRSendInliner);
|
758
762
|
|
@@ -762,10 +766,10 @@ smalltalk.method({
|
|
762
766
|
selector: "inlinedClosure",
|
763
767
|
fn: function (){
|
764
768
|
var self=this;
|
765
|
-
|
766
|
-
$1=
|
769
|
+
return smalltalk.withContext(function($ctx1) {
|
770
|
+
$1=_st((smalltalk.IRInlinedClosure || IRInlinedClosure))._new();
|
767
771
|
return $1;
|
768
|
-
}
|
772
|
+
}, function($ctx1) {$ctx1.fill(self,"inlinedClosure",{}, smalltalk.IRSendInliner)})}
|
769
773
|
}),
|
770
774
|
smalltalk.IRSendInliner);
|
771
775
|
|
@@ -775,22 +779,24 @@ smalltalk.method({
|
|
775
779
|
selector: "inlinedSend:with:",
|
776
780
|
fn: function (inlinedSend,anIRInstruction){
|
777
781
|
var self=this;
|
778
|
-
var $1,$2,$3;
|
779
782
|
var inlinedClosure;
|
780
|
-
|
783
|
+
return smalltalk.withContext(function($ctx1) {
|
784
|
+
$1=_st(anIRInstruction)._isClosure();
|
781
785
|
if(! smalltalk.assert($1)){
|
782
|
-
|
786
|
+
_st(self)._inliningError_("Message argument should be a block");
|
783
787
|
};
|
784
|
-
$2=
|
788
|
+
$2=_st(_st(_st(anIRInstruction)._arguments())._size()).__eq((0));
|
785
789
|
if(! smalltalk.assert($2)){
|
786
|
-
|
790
|
+
_st(self)._inliningError_("Inlined block should have zero argument");
|
787
791
|
};
|
788
|
-
inlinedClosure=
|
789
|
-
|
790
|
-
$3
|
791
|
-
|
792
|
-
|
793
|
-
|
792
|
+
inlinedClosure=_st(_st(self)._translator())._visit_(_st(self)._inlineClosure_(anIRInstruction));
|
793
|
+
$3=inlinedSend;
|
794
|
+
_st($3)._add_(_st(_st(_st(self)._send())._instructions())._first());
|
795
|
+
$4=_st($3)._add_(inlinedClosure);
|
796
|
+
_st(_st(self)._send())._replaceWith_(inlinedSend);
|
797
|
+
$5=inlinedSend;
|
798
|
+
return $5;
|
799
|
+
}, function($ctx1) {$ctx1.fill(self,"inlinedSend:with:",{inlinedSend:inlinedSend,anIRInstruction:anIRInstruction,inlinedClosure:inlinedClosure}, smalltalk.IRSendInliner)})}
|
794
800
|
}),
|
795
801
|
smalltalk.IRSendInliner);
|
796
802
|
|
@@ -800,33 +806,34 @@ smalltalk.method({
|
|
800
806
|
selector: "inlinedSend:with:with:",
|
801
807
|
fn: function (inlinedSend,anIRInstruction,anotherIRInstruction){
|
802
808
|
var self=this;
|
803
|
-
var
|
804
|
-
|
805
|
-
|
806
|
-
$1=smalltalk.send(anIRInstruction,"_isClosure",[]);
|
809
|
+
var inlinedClosure1,inlinedClosure2;
|
810
|
+
return smalltalk.withContext(function($ctx1) {
|
811
|
+
$1=_st(anIRInstruction)._isClosure();
|
807
812
|
if(! smalltalk.assert($1)){
|
808
|
-
|
813
|
+
_st(self)._inliningError_("Message argument should be a block");
|
809
814
|
};
|
810
|
-
$2=
|
815
|
+
$2=_st(_st(_st(anIRInstruction)._arguments())._size()).__eq((0));
|
811
816
|
if(! smalltalk.assert($2)){
|
812
|
-
|
817
|
+
_st(self)._inliningError_("Inlined block should have zero argument");
|
813
818
|
};
|
814
|
-
$3=
|
819
|
+
$3=_st(anotherIRInstruction)._isClosure();
|
815
820
|
if(! smalltalk.assert($3)){
|
816
|
-
|
821
|
+
_st(self)._inliningError_("Message argument should be a block");
|
817
822
|
};
|
818
|
-
$4=
|
823
|
+
$4=_st(_st(_st(anotherIRInstruction)._arguments())._size()).__eq((0));
|
819
824
|
if(! smalltalk.assert($4)){
|
820
|
-
|
825
|
+
_st(self)._inliningError_("Inlined block should have zero argument");
|
821
826
|
};
|
822
|
-
inlinedClosure1=
|
823
|
-
inlinedClosure2=
|
824
|
-
|
825
|
-
|
826
|
-
$5
|
827
|
-
|
828
|
-
|
829
|
-
|
827
|
+
inlinedClosure1=_st(_st(self)._translator())._visit_(_st(self)._inlineClosure_(anIRInstruction));
|
828
|
+
inlinedClosure2=_st(_st(self)._translator())._visit_(_st(self)._inlineClosure_(anotherIRInstruction));
|
829
|
+
$5=inlinedSend;
|
830
|
+
_st($5)._add_(_st(_st(_st(self)._send())._instructions())._first());
|
831
|
+
_st($5)._add_(inlinedClosure1);
|
832
|
+
$6=_st($5)._add_(inlinedClosure2);
|
833
|
+
_st(_st(self)._send())._replaceWith_(inlinedSend);
|
834
|
+
$7=inlinedSend;
|
835
|
+
return $7;
|
836
|
+
}, function($ctx1) {$ctx1.fill(self,"inlinedSend:with:with:",{inlinedSend:inlinedSend,anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction,inlinedClosure1:inlinedClosure1,inlinedClosure2:inlinedClosure2}, smalltalk.IRSendInliner)})}
|
830
837
|
}),
|
831
838
|
smalltalk.IRSendInliner);
|
832
839
|
|
@@ -836,10 +843,10 @@ smalltalk.method({
|
|
836
843
|
selector: "inlinedSequence",
|
837
844
|
fn: function (){
|
838
845
|
var self=this;
|
839
|
-
|
840
|
-
$1=
|
846
|
+
return smalltalk.withContext(function($ctx1) {
|
847
|
+
$1=_st((smalltalk.IRInlinedSequence || IRInlinedSequence))._new();
|
841
848
|
return $1;
|
842
|
-
}
|
849
|
+
}, function($ctx1) {$ctx1.fill(self,"inlinedSequence",{}, smalltalk.IRSendInliner)})}
|
843
850
|
}),
|
844
851
|
smalltalk.IRSendInliner);
|
845
852
|
|
@@ -849,8 +856,8 @@ smalltalk.method({
|
|
849
856
|
selector: "inliningError:",
|
850
857
|
fn: function (aString){
|
851
858
|
var self=this;
|
852
|
-
smalltalk.
|
853
|
-
return self}
|
859
|
+
return smalltalk.withContext(function($ctx1) {
|
860
|
+
return self}, function($ctx1) {$ctx1.fill(self,"inliningError:",{aString:aString}, smalltalk.IRSendInliner)})}
|
854
861
|
}),
|
855
862
|
smalltalk.IRSendInliner);
|
856
863
|
|
@@ -860,8 +867,10 @@ smalltalk.method({
|
|
860
867
|
selector: "send",
|
861
868
|
fn: function (){
|
862
869
|
var self=this;
|
863
|
-
return
|
864
|
-
|
870
|
+
return smalltalk.withContext(function($ctx1) {
|
871
|
+
$1=self["@send"];
|
872
|
+
return $1;
|
873
|
+
}, function($ctx1) {$ctx1.fill(self,"send",{}, smalltalk.IRSendInliner)})}
|
865
874
|
}),
|
866
875
|
smalltalk.IRSendInliner);
|
867
876
|
|
@@ -871,8 +880,8 @@ smalltalk.method({
|
|
871
880
|
selector: "send:",
|
872
881
|
fn: function (anIRSend){
|
873
882
|
var self=this;
|
874
|
-
|
875
|
-
return self}
|
883
|
+
return smalltalk.withContext(function($ctx1) {
|
884
|
+
return self}, function($ctx1) {$ctx1.fill(self,"send:",{anIRSend:anIRSend}, smalltalk.IRSendInliner)})}
|
876
885
|
}),
|
877
886
|
smalltalk.IRSendInliner);
|
878
887
|
|
@@ -882,8 +891,10 @@ smalltalk.method({
|
|
882
891
|
selector: "translator",
|
883
892
|
fn: function (){
|
884
893
|
var self=this;
|
885
|
-
return
|
886
|
-
|
894
|
+
return smalltalk.withContext(function($ctx1) {
|
895
|
+
$1=self["@translator"];
|
896
|
+
return $1;
|
897
|
+
}, function($ctx1) {$ctx1.fill(self,"translator",{}, smalltalk.IRSendInliner)})}
|
887
898
|
}),
|
888
899
|
smalltalk.IRSendInliner);
|
889
900
|
|
@@ -893,8 +904,8 @@ smalltalk.method({
|
|
893
904
|
selector: "translator:",
|
894
905
|
fn: function (anASTTranslator){
|
895
906
|
var self=this;
|
896
|
-
|
897
|
-
return self}
|
907
|
+
return smalltalk.withContext(function($ctx1) {
|
908
|
+
return self}, function($ctx1) {$ctx1.fill(self,"translator:",{anASTTranslator:anASTTranslator}, smalltalk.IRSendInliner)})}
|
898
909
|
}),
|
899
910
|
smalltalk.IRSendInliner);
|
900
911
|
|
@@ -905,8 +916,8 @@ smalltalk.method({
|
|
905
916
|
selector: "inlinedSelectors",
|
906
917
|
fn: function (){
|
907
918
|
var self=this;
|
908
|
-
return
|
909
|
-
}
|
919
|
+
return smalltalk.withContext(function($ctx1) {
|
920
|
+
}, function($ctx1) {$ctx1.fill(self,"inlinedSelectors",{}, smalltalk.IRSendInliner.klass)})}
|
910
921
|
}),
|
911
922
|
smalltalk.IRSendInliner.klass);
|
912
923
|
|
@@ -916,23 +927,25 @@ smalltalk.method({
|
|
916
927
|
selector: "shouldInline:",
|
917
928
|
fn: function (anIRInstruction){
|
918
929
|
var self=this;
|
919
|
-
|
930
|
+
return smalltalk.withContext(function($ctx1) {
|
920
931
|
var $early={};
|
921
932
|
try {
|
922
|
-
$1=
|
933
|
+
$1=_st(_st(self)._inlinedSelectors())._includes_(_st(anIRInstruction)._selector());
|
923
934
|
if(! smalltalk.assert($1)){
|
924
935
|
return false;
|
925
936
|
};
|
926
|
-
|
927
|
-
$
|
928
|
-
|
937
|
+
$2=_st(_st(anIRInstruction)._instructions())._allButFirst();
|
938
|
+
$3=(function(each){
|
939
|
+
return smalltalk.withContext(function($ctx2) {
|
940
|
+
if(! smalltalk.assert($4)){
|
929
941
|
throw $early=[false];
|
930
942
|
};
|
931
|
-
})
|
943
|
+
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
|
944
|
+
_st($2)._do_($3);
|
932
945
|
return true;
|
933
946
|
}
|
934
947
|
catch(e) {if(e===$early)return e[0]; throw e}
|
935
|
-
}
|
948
|
+
}, function($ctx1) {$ctx1.fill(self,"shouldInline:",{anIRInstruction:anIRInstruction}, smalltalk.IRSendInliner.klass)})}
|
936
949
|
}),
|
937
950
|
smalltalk.IRSendInliner.klass);
|
938
951
|
|
@@ -944,8 +957,10 @@ smalltalk.method({
|
|
944
957
|
selector: "assignment",
|
945
958
|
fn: function (){
|
946
959
|
var self=this;
|
947
|
-
return
|
948
|
-
|
960
|
+
return smalltalk.withContext(function($ctx1) {
|
961
|
+
$1=self["@assignment"];
|
962
|
+
return $1;
|
963
|
+
}, function($ctx1) {$ctx1.fill(self,"assignment",{}, smalltalk.IRAssignmentInliner)})}
|
949
964
|
}),
|
950
965
|
smalltalk.IRAssignmentInliner);
|
951
966
|
|
@@ -955,8 +970,8 @@ smalltalk.method({
|
|
955
970
|
selector: "assignment:",
|
956
971
|
fn: function (aNode){
|
957
972
|
var self=this;
|
958
|
-
|
959
|
-
return self}
|
973
|
+
return smalltalk.withContext(function($ctx1) {
|
974
|
+
return self}, function($ctx1) {$ctx1.fill(self,"assignment:",{aNode:aNode}, smalltalk.IRAssignmentInliner)})}
|
960
975
|
}),
|
961
976
|
smalltalk.IRAssignmentInliner);
|
962
977
|
|
@@ -967,15 +982,17 @@ selector: "inlineAssignment:",
|
|
967
982
|
fn: function (anIRAssignment){
|
968
983
|
var self=this;
|
969
984
|
var inlinedAssignment;
|
970
|
-
smalltalk.
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
985
|
+
return smalltalk.withContext(function($ctx1) {
|
986
|
+
_st(self)._assignment_(anIRAssignment);
|
987
|
+
inlinedAssignment=_st((smalltalk.IRInlinedAssignment || IRInlinedAssignment))._new();
|
988
|
+
_st(_st(anIRAssignment)._instructions())._do_((function(each){
|
989
|
+
return smalltalk.withContext(function($ctx2) {
|
990
|
+
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
991
|
+
_st(anIRAssignment)._replaceWith_(inlinedAssignment);
|
992
|
+
_st(self)._inlineSend_(_st(_st(inlinedAssignment)._instructions())._last());
|
993
|
+
$1=inlinedAssignment;
|
994
|
+
return $1;
|
995
|
+
}, function($ctx1) {$ctx1.fill(self,"inlineAssignment:",{anIRAssignment:anIRAssignment,inlinedAssignment:inlinedAssignment}, smalltalk.IRAssignmentInliner)})}
|
979
996
|
}),
|
980
997
|
smalltalk.IRAssignmentInliner);
|
981
998
|
|
@@ -985,23 +1002,25 @@ smalltalk.method({
|
|
985
1002
|
selector: "inlineClosure:",
|
986
1003
|
fn: function (anIRClosure){
|
987
1004
|
var self=this;
|
988
|
-
var
|
989
|
-
|
990
|
-
|
991
|
-
inlinedClosure
|
992
|
-
statements
|
993
|
-
|
994
|
-
|
995
|
-
if(smalltalk.assert($
|
996
|
-
$
|
997
|
-
|
998
|
-
|
999
|
-
$
|
1000
|
-
return
|
1005
|
+
var inlinedClosure,statements;
|
1006
|
+
return smalltalk.withContext(function($ctx1) {
|
1007
|
+
inlinedClosure=smalltalk.IRSendInliner.fn.prototype._inlineClosure_.apply(_st(self), [anIRClosure]);
|
1008
|
+
statements=_st(_st(_st(inlinedClosure)._instructions())._last())._instructions();
|
1009
|
+
$1=statements;
|
1010
|
+
$2=(function(){
|
1011
|
+
return smalltalk.withContext(function($ctx2) {
|
1012
|
+
if(smalltalk.assert($3)){
|
1013
|
+
$4=_st((smalltalk.IRAssignment || IRAssignment))._new();
|
1014
|
+
_st($4)._add_(_st(_st(_st(self)._assignment())._instructions())._first());
|
1015
|
+
_st($4)._add_(_st(_st(statements)._last())._copy());
|
1016
|
+
$5=_st($4)._yourself();
|
1017
|
+
return _st(_st(statements)._last())._replaceWith_($5);
|
1001
1018
|
};
|
1002
|
-
})
|
1003
|
-
|
1004
|
-
|
1019
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
|
1020
|
+
_st($1)._ifNotEmpty_($2);
|
1021
|
+
$6=inlinedClosure;
|
1022
|
+
return $6;
|
1023
|
+
}, function($ctx1) {$ctx1.fill(self,"inlineClosure:",{anIRClosure:anIRClosure,inlinedClosure:inlinedClosure,statements:statements}, smalltalk.IRAssignmentInliner)})}
|
1005
1024
|
}),
|
1006
1025
|
smalltalk.IRAssignmentInliner);
|
1007
1026
|
|
@@ -1014,10 +1033,10 @@ smalltalk.method({
|
|
1014
1033
|
selector: "inlineClosure:",
|
1015
1034
|
fn: function (anIRClosure){
|
1016
1035
|
var self=this;
|
1017
|
-
|
1018
|
-
$1=smalltalk.
|
1036
|
+
return smalltalk.withContext(function($ctx1) {
|
1037
|
+
$1=smalltalk.IRSendInliner.fn.prototype._inlineCLosure_.apply(_st(self), [anIRClosure]);
|
1019
1038
|
return $1;
|
1020
|
-
}
|
1039
|
+
}, function($ctx1) {$ctx1.fill(self,"inlineClosure:",{anIRClosure:anIRClosure}, smalltalk.IRNonLocalReturnInliner)})}
|
1021
1040
|
}),
|
1022
1041
|
smalltalk.IRNonLocalReturnInliner);
|
1023
1042
|
|
@@ -1027,10 +1046,10 @@ smalltalk.method({
|
|
1027
1046
|
selector: "inlinedReturn",
|
1028
1047
|
fn: function (){
|
1029
1048
|
var self=this;
|
1030
|
-
|
1031
|
-
$1=
|
1049
|
+
return smalltalk.withContext(function($ctx1) {
|
1050
|
+
$1=_st((smalltalk.IRInlinedNonLocalReturn || IRInlinedNonLocalReturn))._new();
|
1032
1051
|
return $1;
|
1033
|
-
}
|
1052
|
+
}, function($ctx1) {$ctx1.fill(self,"inlinedReturn",{}, smalltalk.IRNonLocalReturnInliner)})}
|
1034
1053
|
}),
|
1035
1054
|
smalltalk.IRNonLocalReturnInliner);
|
1036
1055
|
|
@@ -1043,22 +1062,24 @@ smalltalk.method({
|
|
1043
1062
|
selector: "inlineClosure:",
|
1044
1063
|
fn: function (anIRClosure){
|
1045
1064
|
var self=this;
|
1046
|
-
var
|
1047
|
-
|
1048
|
-
|
1049
|
-
closure
|
1050
|
-
statements
|
1051
|
-
|
1052
|
-
|
1053
|
-
if(! smalltalk.assert($
|
1054
|
-
$
|
1055
|
-
|
1056
|
-
$
|
1057
|
-
return
|
1065
|
+
var closure,statements;
|
1066
|
+
return smalltalk.withContext(function($ctx1) {
|
1067
|
+
closure=smalltalk.IRSendInliner.fn.prototype._inlineClosure_.apply(_st(self), [anIRClosure]);
|
1068
|
+
statements=_st(_st(_st(closure)._instructions())._last())._instructions();
|
1069
|
+
$1=statements;
|
1070
|
+
$2=(function(){
|
1071
|
+
return smalltalk.withContext(function($ctx2) {
|
1072
|
+
if(! smalltalk.assert($3)){
|
1073
|
+
$4=_st((smalltalk.IRReturn || IRReturn))._new();
|
1074
|
+
_st($4)._add_(_st(_st(statements)._last())._copy());
|
1075
|
+
$5=_st($4)._yourself();
|
1076
|
+
return _st(_st(statements)._last())._replaceWith_($5);
|
1058
1077
|
};
|
1059
|
-
})
|
1060
|
-
|
1061
|
-
|
1078
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
|
1079
|
+
_st($1)._ifNotEmpty_($2);
|
1080
|
+
$6=closure;
|
1081
|
+
return $6;
|
1082
|
+
}, function($ctx1) {$ctx1.fill(self,"inlineClosure:",{anIRClosure:anIRClosure,closure:closure,statements:statements}, smalltalk.IRReturnInliner)})}
|
1062
1083
|
}),
|
1063
1084
|
smalltalk.IRReturnInliner);
|
1064
1085
|
|
@@ -1069,14 +1090,16 @@ selector: "inlineReturn:",
|
|
1069
1090
|
fn: function (anIRReturn){
|
1070
1091
|
var self=this;
|
1071
1092
|
var return_;
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1093
|
+
return smalltalk.withContext(function($ctx1) {
|
1094
|
+
return_=_st(self)._inlinedReturn();
|
1095
|
+
_st(_st(anIRReturn)._instructions())._do_((function(each){
|
1096
|
+
return smalltalk.withContext(function($ctx2) {
|
1097
|
+
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
1098
|
+
_st(anIRReturn)._replaceWith_(return_);
|
1099
|
+
_st(self)._inlineSend_(_st(_st(return_)._instructions())._last());
|
1100
|
+
$1=return_;
|
1101
|
+
return $1;
|
1102
|
+
}, function($ctx1) {$ctx1.fill(self,"inlineReturn:",{anIRReturn:anIRReturn,return_:return_}, smalltalk.IRReturnInliner)})}
|
1080
1103
|
}),
|
1081
1104
|
smalltalk.IRReturnInliner);
|
1082
1105
|
|
@@ -1086,10 +1109,10 @@ smalltalk.method({
|
|
1086
1109
|
selector: "inlinedReturn",
|
1087
1110
|
fn: function (){
|
1088
1111
|
var self=this;
|
1089
|
-
|
1090
|
-
$1=
|
1112
|
+
return smalltalk.withContext(function($ctx1) {
|
1113
|
+
$1=_st((smalltalk.IRInlinedReturn || IRInlinedReturn))._new();
|
1091
1114
|
return $1;
|
1092
|
-
}
|
1115
|
+
}, function($ctx1) {$ctx1.fill(self,"inlinedReturn",{}, smalltalk.IRReturnInliner)})}
|
1093
1116
|
}),
|
1094
1117
|
smalltalk.IRReturnInliner);
|
1095
1118
|
|
@@ -1102,18 +1125,17 @@ smalltalk.method({
|
|
1102
1125
|
selector: "compileNode:",
|
1103
1126
|
fn: function (aNode){
|
1104
1127
|
var self=this;
|
1105
|
-
var
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
$2
|
1112
|
-
|
1113
|
-
$3=smalltalk.send($2,"_contents",[]);
|
1128
|
+
var ir,stream;
|
1129
|
+
return smalltalk.withContext(function($ctx1) {
|
1130
|
+
_st(_st(self)._semanticAnalyzer())._visit_(aNode);
|
1131
|
+
ir=_st(_st(self)._translator())._visit_(aNode);
|
1132
|
+
_st(_st(self)._inliner())._visit_(ir);
|
1133
|
+
$2=_st(self)._irTranslator();
|
1134
|
+
_st($2)._visit_(ir);
|
1135
|
+
$3=_st($2)._contents();
|
1114
1136
|
$1=$3;
|
1115
1137
|
return $1;
|
1116
|
-
}
|
1138
|
+
}, function($ctx1) {$ctx1.fill(self,"compileNode:",{aNode:aNode,ir:ir,stream:stream}, smalltalk.InliningCodeGenerator)})}
|
1117
1139
|
}),
|
1118
1140
|
smalltalk.InliningCodeGenerator);
|
1119
1141
|
|
@@ -1123,10 +1145,10 @@ smalltalk.method({
|
|
1123
1145
|
selector: "inliner",
|
1124
1146
|
fn: function (){
|
1125
1147
|
var self=this;
|
1126
|
-
|
1127
|
-
$1=
|
1148
|
+
return smalltalk.withContext(function($ctx1) {
|
1149
|
+
$1=_st((smalltalk.IRInliner || IRInliner))._new();
|
1128
1150
|
return $1;
|
1129
|
-
}
|
1151
|
+
}, function($ctx1) {$ctx1.fill(self,"inliner",{}, smalltalk.InliningCodeGenerator)})}
|
1130
1152
|
}),
|
1131
1153
|
smalltalk.InliningCodeGenerator);
|
1132
1154
|
|
@@ -1136,10 +1158,10 @@ smalltalk.method({
|
|
1136
1158
|
selector: "irTranslator",
|
1137
1159
|
fn: function (){
|
1138
1160
|
var self=this;
|
1139
|
-
|
1140
|
-
$1=
|
1161
|
+
return smalltalk.withContext(function($ctx1) {
|
1162
|
+
$1=_st((smalltalk.IRInliningJSTranslator || IRInliningJSTranslator))._new();
|
1141
1163
|
return $1;
|
1142
|
-
}
|
1164
|
+
}, function($ctx1) {$ctx1.fill(self,"irTranslator",{}, smalltalk.InliningCodeGenerator)})}
|
1143
1165
|
}),
|
1144
1166
|
smalltalk.InliningCodeGenerator);
|
1145
1167
|
|