resin 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/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
@@ -8,10 +8,10 @@ selector: "accept:",
|
|
8
8
|
category: 'visiting',
|
9
9
|
fn: function (aVisitor){
|
10
10
|
var self=this;
|
11
|
-
|
12
|
-
$1=
|
11
|
+
return smalltalk.withContext(function($ctx1) {
|
12
|
+
$1=_st(aVisitor)._visitIRInlinedAssignment_(self);
|
13
13
|
return $1;
|
14
|
-
},
|
14
|
+
}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRInlinedAssignment)})},
|
15
15
|
args: ["aVisitor"],
|
16
16
|
source: "accept: aVisitor\x0a\x09^ aVisitor visitIRInlinedAssignment: self",
|
17
17
|
messageSends: ["visitIRInlinedAssignment:"],
|
@@ -26,8 +26,8 @@ selector: "isInlined",
|
|
26
26
|
category: 'testing',
|
27
27
|
fn: function (){
|
28
28
|
var self=this;
|
29
|
-
return
|
30
|
-
},
|
29
|
+
return smalltalk.withContext(function($ctx1) {
|
30
|
+
}, function($ctx1) {$ctx1.fill(self,"isInlined",{}, smalltalk.IRInlinedAssignment)})},
|
31
31
|
args: [],
|
32
32
|
source: "isInlined\x0a\x09^ true",
|
33
33
|
messageSends: [],
|
@@ -46,8 +46,8 @@ selector: "accept:",
|
|
46
46
|
category: 'visiting',
|
47
47
|
fn: function (aVisitor){
|
48
48
|
var self=this;
|
49
|
-
smalltalk.
|
50
|
-
return self},
|
49
|
+
return smalltalk.withContext(function($ctx1) {
|
50
|
+
return self}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRInlinedClosure)})},
|
51
51
|
args: ["aVisitor"],
|
52
52
|
source: "accept: aVisitor\x0a\x09aVisitor visitIRInlinedClosure: self",
|
53
53
|
messageSends: ["visitIRInlinedClosure:"],
|
@@ -62,8 +62,8 @@ selector: "isInlined",
|
|
62
62
|
category: 'testing',
|
63
63
|
fn: function (){
|
64
64
|
var self=this;
|
65
|
-
return
|
66
|
-
},
|
65
|
+
return smalltalk.withContext(function($ctx1) {
|
66
|
+
}, function($ctx1) {$ctx1.fill(self,"isInlined",{}, smalltalk.IRInlinedClosure)})},
|
67
67
|
args: [],
|
68
68
|
source: "isInlined\x0a\x09^ true",
|
69
69
|
messageSends: [],
|
@@ -82,10 +82,10 @@ selector: "accept:",
|
|
82
82
|
category: 'visiting',
|
83
83
|
fn: function (aVisitor){
|
84
84
|
var self=this;
|
85
|
-
|
86
|
-
$1=
|
85
|
+
return smalltalk.withContext(function($ctx1) {
|
86
|
+
$1=_st(aVisitor)._visitIRInlinedReturn_(self);
|
87
87
|
return $1;
|
88
|
-
},
|
88
|
+
}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRInlinedReturn)})},
|
89
89
|
args: ["aVisitor"],
|
90
90
|
source: "accept: aVisitor\x0a\x09^ aVisitor visitIRInlinedReturn: self",
|
91
91
|
messageSends: ["visitIRInlinedReturn:"],
|
@@ -100,8 +100,8 @@ selector: "isInlined",
|
|
100
100
|
category: 'testing',
|
101
101
|
fn: function (){
|
102
102
|
var self=this;
|
103
|
-
return
|
104
|
-
},
|
103
|
+
return smalltalk.withContext(function($ctx1) {
|
104
|
+
}, function($ctx1) {$ctx1.fill(self,"isInlined",{}, smalltalk.IRInlinedReturn)})},
|
105
105
|
args: [],
|
106
106
|
source: "isInlined\x0a\x09^ true",
|
107
107
|
messageSends: [],
|
@@ -120,10 +120,10 @@ selector: "accept:",
|
|
120
120
|
category: 'visiting',
|
121
121
|
fn: function (aVisitor){
|
122
122
|
var self=this;
|
123
|
-
|
124
|
-
$1=
|
123
|
+
return smalltalk.withContext(function($ctx1) {
|
124
|
+
$1=_st(aVisitor)._visitIRInlinedNonLocalReturn_(self);
|
125
125
|
return $1;
|
126
|
-
},
|
126
|
+
}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRInlinedNonLocalReturn)})},
|
127
127
|
args: ["aVisitor"],
|
128
128
|
source: "accept: aVisitor\x0a\x09^ aVisitor visitIRInlinedNonLocalReturn: self",
|
129
129
|
messageSends: ["visitIRInlinedNonLocalReturn:"],
|
@@ -138,8 +138,8 @@ selector: "isInlined",
|
|
138
138
|
category: 'testing',
|
139
139
|
fn: function (){
|
140
140
|
var self=this;
|
141
|
-
return
|
142
|
-
},
|
141
|
+
return smalltalk.withContext(function($ctx1) {
|
142
|
+
}, function($ctx1) {$ctx1.fill(self,"isInlined",{}, smalltalk.IRInlinedNonLocalReturn)})},
|
143
143
|
args: [],
|
144
144
|
source: "isInlined\x0a\x09^ true",
|
145
145
|
messageSends: [],
|
@@ -158,8 +158,8 @@ selector: "accept:",
|
|
158
158
|
category: 'visiting',
|
159
159
|
fn: function (aVisitor){
|
160
160
|
var self=this;
|
161
|
-
smalltalk.
|
162
|
-
return self},
|
161
|
+
return smalltalk.withContext(function($ctx1) {
|
162
|
+
return self}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRInlinedSend)})},
|
163
163
|
args: ["aVisitor"],
|
164
164
|
source: "accept: aVisitor\x0a\x09aVisitor visitInlinedSend: self",
|
165
165
|
messageSends: ["visitInlinedSend:"],
|
@@ -174,8 +174,8 @@ selector: "isInlined",
|
|
174
174
|
category: 'testing',
|
175
175
|
fn: function (){
|
176
176
|
var self=this;
|
177
|
-
return
|
178
|
-
},
|
177
|
+
return smalltalk.withContext(function($ctx1) {
|
178
|
+
}, function($ctx1) {$ctx1.fill(self,"isInlined",{}, smalltalk.IRInlinedSend)})},
|
179
179
|
args: [],
|
180
180
|
source: "isInlined\x0a\x09^ true",
|
181
181
|
messageSends: [],
|
@@ -193,8 +193,8 @@ selector: "accept:",
|
|
193
193
|
category: 'visiting',
|
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.IRInlinedIfFalse)})},
|
198
198
|
args: ["aVisitor"],
|
199
199
|
source: "accept: aVisitor\x0a\x09aVisitor visitIRInlinedIfFalse: self",
|
200
200
|
messageSends: ["visitIRInlinedIfFalse:"],
|
@@ -212,8 +212,8 @@ selector: "accept:",
|
|
212
212
|
category: 'visiting',
|
213
213
|
fn: function (aVisitor){
|
214
214
|
var self=this;
|
215
|
-
smalltalk.
|
216
|
-
return self},
|
215
|
+
return smalltalk.withContext(function($ctx1) {
|
216
|
+
return self}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRInlinedIfNilIfNotNil)})},
|
217
217
|
args: ["aVisitor"],
|
218
218
|
source: "accept: aVisitor\x0a\x09aVisitor visitIRInlinedIfNilIfNotNil: self",
|
219
219
|
messageSends: ["visitIRInlinedIfNilIfNotNil:"],
|
@@ -231,8 +231,8 @@ selector: "accept:",
|
|
231
231
|
category: 'visiting',
|
232
232
|
fn: function (aVisitor){
|
233
233
|
var self=this;
|
234
|
-
smalltalk.
|
235
|
-
return self},
|
234
|
+
return smalltalk.withContext(function($ctx1) {
|
235
|
+
return self}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRInlinedIfTrue)})},
|
236
236
|
args: ["aVisitor"],
|
237
237
|
source: "accept: aVisitor\x0a\x09aVisitor visitIRInlinedIfTrue: self",
|
238
238
|
messageSends: ["visitIRInlinedIfTrue:"],
|
@@ -250,8 +250,8 @@ selector: "accept:",
|
|
250
250
|
category: 'visiting',
|
251
251
|
fn: function (aVisitor){
|
252
252
|
var self=this;
|
253
|
-
smalltalk.
|
254
|
-
return self},
|
253
|
+
return smalltalk.withContext(function($ctx1) {
|
254
|
+
return self}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRInlinedIfTrueIfFalse)})},
|
255
255
|
args: ["aVisitor"],
|
256
256
|
source: "accept: aVisitor\x0a\x09aVisitor visitIRInlinedIfTrueIfFalse: self",
|
257
257
|
messageSends: ["visitIRInlinedIfTrueIfFalse:"],
|
@@ -270,8 +270,8 @@ selector: "accept:",
|
|
270
270
|
category: 'visiting',
|
271
271
|
fn: function (aVisitor){
|
272
272
|
var self=this;
|
273
|
-
smalltalk.
|
274
|
-
return self},
|
273
|
+
return smalltalk.withContext(function($ctx1) {
|
274
|
+
return self}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRInlinedSequence)})},
|
275
275
|
args: ["aVisitor"],
|
276
276
|
source: "accept: aVisitor\x0a\x09aVisitor visitIRInlinedSequence: self",
|
277
277
|
messageSends: ["visitIRInlinedSequence:"],
|
@@ -286,8 +286,8 @@ selector: "isInlined",
|
|
286
286
|
category: 'testing',
|
287
287
|
fn: function (){
|
288
288
|
var self=this;
|
289
|
-
return
|
290
|
-
},
|
289
|
+
return smalltalk.withContext(function($ctx1) {
|
290
|
+
}, function($ctx1) {$ctx1.fill(self,"isInlined",{}, smalltalk.IRInlinedSequence)})},
|
291
291
|
args: [],
|
292
292
|
source: "isInlined\x0a\x09^ true",
|
293
293
|
messageSends: [],
|
@@ -306,13 +306,13 @@ selector: "assignmentInliner",
|
|
306
306
|
category: 'factory',
|
307
307
|
fn: function (){
|
308
308
|
var self=this;
|
309
|
-
|
310
|
-
$2=
|
311
|
-
|
312
|
-
$3=
|
309
|
+
return smalltalk.withContext(function($ctx1) {
|
310
|
+
$2=_st((smalltalk.IRAssignmentInliner || IRAssignmentInliner))._new();
|
311
|
+
_st($2)._translator_(self);
|
312
|
+
$3=_st($2)._yourself();
|
313
313
|
$1=$3;
|
314
314
|
return $1;
|
315
|
-
},
|
315
|
+
}, function($ctx1) {$ctx1.fill(self,"assignmentInliner",{}, smalltalk.IRInliner)})},
|
316
316
|
args: [],
|
317
317
|
source: "assignmentInliner\x0a\x09^ IRAssignmentInliner new \x0a\x09\x09translator: self;\x0a\x09\x09yourself",
|
318
318
|
messageSends: ["translator:", "new", "yourself"],
|
@@ -327,13 +327,13 @@ selector: "nonLocalReturnInliner",
|
|
327
327
|
category: 'factory',
|
328
328
|
fn: function (){
|
329
329
|
var self=this;
|
330
|
-
|
331
|
-
$2=
|
332
|
-
|
333
|
-
$3=
|
330
|
+
return smalltalk.withContext(function($ctx1) {
|
331
|
+
$2=_st((smalltalk.IRNonLocalReturnInliner || IRNonLocalReturnInliner))._new();
|
332
|
+
_st($2)._translator_(self);
|
333
|
+
$3=_st($2)._yourself();
|
334
334
|
$1=$3;
|
335
335
|
return $1;
|
336
|
-
},
|
336
|
+
}, function($ctx1) {$ctx1.fill(self,"nonLocalReturnInliner",{}, smalltalk.IRInliner)})},
|
337
337
|
args: [],
|
338
338
|
source: "nonLocalReturnInliner\x0a\x09^ IRNonLocalReturnInliner new \x0a\x09\x09translator: self;\x0a\x09\x09yourself",
|
339
339
|
messageSends: ["translator:", "new", "yourself"],
|
@@ -348,13 +348,13 @@ selector: "returnInliner",
|
|
348
348
|
category: 'factory',
|
349
349
|
fn: function (){
|
350
350
|
var self=this;
|
351
|
-
|
352
|
-
$2=
|
353
|
-
|
354
|
-
$3=
|
351
|
+
return smalltalk.withContext(function($ctx1) {
|
352
|
+
$2=_st((smalltalk.IRReturnInliner || IRReturnInliner))._new();
|
353
|
+
_st($2)._translator_(self);
|
354
|
+
$3=_st($2)._yourself();
|
355
355
|
$1=$3;
|
356
356
|
return $1;
|
357
|
-
},
|
357
|
+
}, function($ctx1) {$ctx1.fill(self,"returnInliner",{}, smalltalk.IRInliner)})},
|
358
358
|
args: [],
|
359
359
|
source: "returnInliner\x0a\x09^ IRReturnInliner new \x0a\x09\x09translator: self;\x0a\x09\x09yourself",
|
360
360
|
messageSends: ["translator:", "new", "yourself"],
|
@@ -369,13 +369,13 @@ selector: "sendInliner",
|
|
369
369
|
category: 'factory',
|
370
370
|
fn: function (){
|
371
371
|
var self=this;
|
372
|
-
|
373
|
-
$2=
|
374
|
-
|
375
|
-
$3=
|
372
|
+
return smalltalk.withContext(function($ctx1) {
|
373
|
+
$2=_st((smalltalk.IRSendInliner || IRSendInliner))._new();
|
374
|
+
_st($2)._translator_(self);
|
375
|
+
$3=_st($2)._yourself();
|
376
376
|
$1=$3;
|
377
377
|
return $1;
|
378
|
-
},
|
378
|
+
}, function($ctx1) {$ctx1.fill(self,"sendInliner",{}, smalltalk.IRInliner)})},
|
379
379
|
args: [],
|
380
380
|
source: "sendInliner\x0a\x09^ IRSendInliner new \x0a\x09\x09translator: self;\x0a\x09\x09yourself",
|
381
381
|
messageSends: ["translator:", "new", "yourself"],
|
@@ -390,14 +390,14 @@ selector: "shouldInlineAssignment:",
|
|
390
390
|
category: 'testing',
|
391
391
|
fn: function (anIRAssignment){
|
392
392
|
var self=this;
|
393
|
-
|
394
|
-
$1=
|
395
|
-
return smalltalk.
|
396
|
-
return smalltalk.
|
397
|
-
})
|
398
|
-
})
|
393
|
+
return smalltalk.withContext(function($ctx1) {
|
394
|
+
$1=_st(_st(_st(anIRAssignment)._isInlined())._not())._and_((function(){
|
395
|
+
return smalltalk.withContext(function($ctx2) {
|
396
|
+
return smalltalk.withContext(function($ctx3) {
|
397
|
+
}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
|
398
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
399
399
|
return $1;
|
400
|
-
},
|
400
|
+
}, function($ctx1) {$ctx1.fill(self,"shouldInlineAssignment:",{anIRAssignment:anIRAssignment}, smalltalk.IRInliner)})},
|
401
401
|
args: ["anIRAssignment"],
|
402
402
|
source: "shouldInlineAssignment: anIRAssignment\x0a\x09^ anIRAssignment isInlined not and: [ \x0a\x09\x09anIRAssignment instructions last isSend and: [\x09\x0a\x09\x09\x09self shouldInlineSend: (anIRAssignment instructions last) ]]",
|
403
403
|
messageSends: ["and:", "shouldInlineSend:", "last", "instructions", "isSend", "not", "isInlined"],
|
@@ -412,14 +412,14 @@ selector: "shouldInlineReturn:",
|
|
412
412
|
category: 'testing',
|
413
413
|
fn: function (anIRReturn){
|
414
414
|
var self=this;
|
415
|
-
|
416
|
-
$1=
|
417
|
-
return smalltalk.
|
418
|
-
return smalltalk.
|
419
|
-
})
|
420
|
-
})
|
415
|
+
return smalltalk.withContext(function($ctx1) {
|
416
|
+
$1=_st(_st(_st(anIRReturn)._isInlined())._not())._and_((function(){
|
417
|
+
return smalltalk.withContext(function($ctx2) {
|
418
|
+
return smalltalk.withContext(function($ctx3) {
|
419
|
+
}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
|
420
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
421
421
|
return $1;
|
422
|
-
},
|
422
|
+
}, function($ctx1) {$ctx1.fill(self,"shouldInlineReturn:",{anIRReturn:anIRReturn}, smalltalk.IRInliner)})},
|
423
423
|
args: ["anIRReturn"],
|
424
424
|
source: "shouldInlineReturn: anIRReturn\x0a\x09^ anIRReturn isInlined not and: [ \x0a\x09\x09anIRReturn instructions first isSend and: [\x09\x0a\x09\x09\x09self shouldInlineSend: (anIRReturn instructions first) ]]",
|
425
425
|
messageSends: ["and:", "shouldInlineSend:", "first", "instructions", "isSend", "not", "isInlined"],
|
@@ -434,12 +434,12 @@ selector: "shouldInlineSend:",
|
|
434
434
|
category: 'testing',
|
435
435
|
fn: function (anIRSend){
|
436
436
|
var self=this;
|
437
|
-
|
438
|
-
$1=
|
439
|
-
return smalltalk.
|
440
|
-
})
|
437
|
+
return smalltalk.withContext(function($ctx1) {
|
438
|
+
$1=_st(_st(_st(anIRSend)._isInlined())._not())._and_((function(){
|
439
|
+
return smalltalk.withContext(function($ctx2) {
|
440
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
441
441
|
return $1;
|
442
|
-
},
|
442
|
+
}, function($ctx1) {$ctx1.fill(self,"shouldInlineSend:",{anIRSend:anIRSend}, smalltalk.IRInliner)})},
|
443
443
|
args: ["anIRSend"],
|
444
444
|
source: "shouldInlineSend: anIRSend\x0a\x09^ anIRSend isInlined not and: [\x0a\x09\x09IRSendInliner shouldInline: anIRSend ]",
|
445
445
|
messageSends: ["and:", "shouldInline:", "not", "isInlined"],
|
@@ -454,25 +454,26 @@ selector: "transformNonLocalReturn:",
|
|
454
454
|
category: 'visiting',
|
455
455
|
fn: function (anIRNonLocalReturn){
|
456
456
|
var self=this;
|
457
|
-
var $1,$2,$3,$4;
|
458
457
|
var localReturn;
|
459
|
-
|
458
|
+
return smalltalk.withContext(function($ctx1) {
|
459
|
+
$1=_st(_st(anIRNonLocalReturn)._scope())._canInlineNonLocalReturns();
|
460
460
|
if(smalltalk.assert($1)){
|
461
|
-
|
462
|
-
$2=
|
463
|
-
|
464
|
-
$3=
|
461
|
+
_st(_st(_st(anIRNonLocalReturn)._scope())._methodScope())._removeNonLocalReturn_(_st(anIRNonLocalReturn)._scope());
|
462
|
+
$2=_st((smalltalk.IRReturn || IRReturn))._new();
|
463
|
+
_st($2)._scope_(_st(anIRNonLocalReturn)._scope());
|
464
|
+
$3=_st($2)._yourself();
|
465
465
|
localReturn=$3;
|
466
466
|
localReturn;
|
467
|
-
|
468
|
-
return smalltalk.
|
469
|
-
})
|
470
|
-
|
471
|
-
|
472
|
-
};
|
473
|
-
$4=smalltalk.send(self,"_visitIRNonLocalReturn_",[anIRNonLocalReturn],smalltalk.IRVisitor);
|
467
|
+
_st(_st(anIRNonLocalReturn)._instructions())._do_((function(each){
|
468
|
+
return smalltalk.withContext(function($ctx2) {
|
469
|
+
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
470
|
+
_st(anIRNonLocalReturn)._replaceWith_(localReturn);
|
471
|
+
$4=localReturn;
|
474
472
|
return $4;
|
475
|
-
}
|
473
|
+
};
|
474
|
+
$5=smalltalk.IRVisitor.fn.prototype._visitIRNonLocalReturn_.apply(_st(self), [anIRNonLocalReturn]);
|
475
|
+
return $5;
|
476
|
+
}, function($ctx1) {$ctx1.fill(self,"transformNonLocalReturn:",{anIRNonLocalReturn:anIRNonLocalReturn,localReturn:localReturn}, smalltalk.IRInliner)})},
|
476
477
|
args: ["anIRNonLocalReturn"],
|
477
478
|
source: "transformNonLocalReturn: anIRNonLocalReturn\x0a\x09\x22Replace a non local return into a local return\x22\x0a\x0a\x09| localReturn |\x0a\x09anIRNonLocalReturn scope canInlineNonLocalReturns ifTrue: [\x0a\x09\x09anIRNonLocalReturn scope methodScope removeNonLocalReturn: anIRNonLocalReturn scope.\x0a\x09\x09localReturn := IRReturn new\x0a\x09\x09\x09scope: anIRNonLocalReturn scope;\x0a\x09\x09\x09yourself.\x0a\x09\x09anIRNonLocalReturn instructions do: [ :each |\x0a\x09\x09\x09localReturn add: each ].\x0a\x09\x09anIRNonLocalReturn replaceWith: localReturn.\x0a\x09\x09^ localReturn ].\x0a\x09^ super visitIRNonLocalReturn: anIRNonLocalReturn",
|
478
479
|
messageSends: ["ifTrue:", "removeNonLocalReturn:", "scope", "methodScope", "scope:", "new", "yourself", "do:", "add:", "instructions", "replaceWith:", "canInlineNonLocalReturns", "visitIRNonLocalReturn:"],
|
@@ -487,15 +488,15 @@ selector: "visitIRAssignment:",
|
|
487
488
|
category: 'visiting',
|
488
489
|
fn: function (anIRAssignment){
|
489
490
|
var self=this;
|
490
|
-
|
491
|
-
$2=
|
491
|
+
return smalltalk.withContext(function($ctx1) {
|
492
|
+
$2=_st(self)._shouldInlineAssignment_(anIRAssignment);
|
492
493
|
if(smalltalk.assert($2)){
|
493
|
-
$1=
|
494
|
+
$1=_st(_st(self)._assignmentInliner())._inlineAssignment_(anIRAssignment);
|
494
495
|
} else {
|
495
|
-
$1=smalltalk.
|
496
|
+
$1=smalltalk.IRVisitor.fn.prototype._visitIRAssignment_.apply(_st(self), [anIRAssignment]);
|
496
497
|
};
|
497
498
|
return $1;
|
498
|
-
},
|
499
|
+
}, function($ctx1) {$ctx1.fill(self,"visitIRAssignment:",{anIRAssignment:anIRAssignment}, smalltalk.IRInliner)})},
|
499
500
|
args: ["anIRAssignment"],
|
500
501
|
source: "visitIRAssignment: anIRAssignment\x0a\x09^ (self shouldInlineAssignment: anIRAssignment) \x0a\x09\x09ifTrue: [ self assignmentInliner inlineAssignment: anIRAssignment ]\x0a\x09\x09ifFalse: [ super visitIRAssignment: anIRAssignment ]",
|
501
502
|
messageSends: ["ifTrue:ifFalse:", "inlineAssignment:", "assignmentInliner", "visitIRAssignment:", "shouldInlineAssignment:"],
|
@@ -510,15 +511,15 @@ selector: "visitIRNonLocalReturn:",
|
|
510
511
|
category: 'visiting',
|
511
512
|
fn: function (anIRNonLocalReturn){
|
512
513
|
var self=this;
|
513
|
-
|
514
|
-
$2=
|
514
|
+
return smalltalk.withContext(function($ctx1) {
|
515
|
+
$2=_st(self)._shouldInlineReturn_(anIRNonLocalReturn);
|
515
516
|
if(smalltalk.assert($2)){
|
516
|
-
$1=
|
517
|
+
$1=_st(_st(self)._nonLocalReturnInliner())._inlineReturn_(anIRNonLocalReturn);
|
517
518
|
} else {
|
518
|
-
$1=
|
519
|
+
$1=_st(self)._transformNonLocalReturn_(anIRNonLocalReturn);
|
519
520
|
};
|
520
521
|
return $1;
|
521
|
-
},
|
522
|
+
}, function($ctx1) {$ctx1.fill(self,"visitIRNonLocalReturn:",{anIRNonLocalReturn:anIRNonLocalReturn}, smalltalk.IRInliner)})},
|
522
523
|
args: ["anIRNonLocalReturn"],
|
523
524
|
source: "visitIRNonLocalReturn: anIRNonLocalReturn\x0a\x09^ (self shouldInlineReturn: anIRNonLocalReturn) \x0a\x09\x09ifTrue: [ self nonLocalReturnInliner inlineReturn: anIRNonLocalReturn ]\x0a\x09\x09ifFalse: [ self transformNonLocalReturn: anIRNonLocalReturn ]",
|
524
525
|
messageSends: ["ifTrue:ifFalse:", "inlineReturn:", "nonLocalReturnInliner", "transformNonLocalReturn:", "shouldInlineReturn:"],
|
@@ -533,15 +534,15 @@ selector: "visitIRReturn:",
|
|
533
534
|
category: 'visiting',
|
534
535
|
fn: function (anIRReturn){
|
535
536
|
var self=this;
|
536
|
-
|
537
|
-
$2=
|
537
|
+
return smalltalk.withContext(function($ctx1) {
|
538
|
+
$2=_st(self)._shouldInlineReturn_(anIRReturn);
|
538
539
|
if(smalltalk.assert($2)){
|
539
|
-
$1=
|
540
|
+
$1=_st(_st(self)._returnInliner())._inlineReturn_(anIRReturn);
|
540
541
|
} else {
|
541
|
-
$1=smalltalk.
|
542
|
+
$1=smalltalk.IRVisitor.fn.prototype._visitIRReturn_.apply(_st(self), [anIRReturn]);
|
542
543
|
};
|
543
544
|
return $1;
|
544
|
-
},
|
545
|
+
}, function($ctx1) {$ctx1.fill(self,"visitIRReturn:",{anIRReturn:anIRReturn}, smalltalk.IRInliner)})},
|
545
546
|
args: ["anIRReturn"],
|
546
547
|
source: "visitIRReturn: anIRReturn\x0a\x09^ (self shouldInlineReturn: anIRReturn) \x0a\x09\x09ifTrue: [ self returnInliner inlineReturn: anIRReturn ]\x0a\x09\x09ifFalse: [ super visitIRReturn: anIRReturn ]",
|
547
548
|
messageSends: ["ifTrue:ifFalse:", "inlineReturn:", "returnInliner", "visitIRReturn:", "shouldInlineReturn:"],
|
@@ -556,15 +557,15 @@ selector: "visitIRSend:",
|
|
556
557
|
category: 'visiting',
|
557
558
|
fn: function (anIRSend){
|
558
559
|
var self=this;
|
559
|
-
|
560
|
-
$2=
|
560
|
+
return smalltalk.withContext(function($ctx1) {
|
561
|
+
$2=_st(self)._shouldInlineSend_(anIRSend);
|
561
562
|
if(smalltalk.assert($2)){
|
562
|
-
$1=
|
563
|
+
$1=_st(_st(self)._sendInliner())._inlineSend_(anIRSend);
|
563
564
|
} else {
|
564
|
-
$1=smalltalk.
|
565
|
+
$1=smalltalk.IRVisitor.fn.prototype._visitIRSend_.apply(_st(self), [anIRSend]);
|
565
566
|
};
|
566
567
|
return $1;
|
567
|
-
},
|
568
|
+
}, function($ctx1) {$ctx1.fill(self,"visitIRSend:",{anIRSend:anIRSend}, smalltalk.IRInliner)})},
|
568
569
|
args: ["anIRSend"],
|
569
570
|
source: "visitIRSend: anIRSend\x0a\x09^ (self shouldInlineSend: anIRSend)\x0a\x09\x09ifTrue: [ self sendInliner inlineSend: anIRSend ]\x0a\x09\x09ifFalse: [ super visitIRSend: anIRSend ]",
|
570
571
|
messageSends: ["ifTrue:ifFalse:", "inlineSend:", "sendInliner", "visitIRSend:", "shouldInlineSend:"],
|
@@ -583,8 +584,8 @@ selector: "visitIRInlinedAssignment:",
|
|
583
584
|
category: 'visiting',
|
584
585
|
fn: function (anIRInlinedAssignment){
|
585
586
|
var self=this;
|
586
|
-
smalltalk.
|
587
|
-
return self},
|
587
|
+
return smalltalk.withContext(function($ctx1) {
|
588
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedAssignment:",{anIRInlinedAssignment:anIRInlinedAssignment}, smalltalk.IRInliningJSTranslator)})},
|
588
589
|
args: ["anIRInlinedAssignment"],
|
589
590
|
source: "visitIRInlinedAssignment: anIRInlinedAssignment\x0a\x09self visit: anIRInlinedAssignment instructions last",
|
590
591
|
messageSends: ["visit:", "last", "instructions"],
|
@@ -599,10 +600,10 @@ selector: "visitIRInlinedClosure:",
|
|
599
600
|
category: 'visiting',
|
600
601
|
fn: function (anIRInlinedClosure){
|
601
602
|
var self=this;
|
602
|
-
smalltalk.
|
603
|
-
return smalltalk.
|
604
|
-
})
|
605
|
-
return self},
|
603
|
+
return smalltalk.withContext(function($ctx1) {
|
604
|
+
return smalltalk.withContext(function($ctx2) {
|
605
|
+
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
606
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedClosure:",{anIRInlinedClosure:anIRInlinedClosure}, smalltalk.IRInliningJSTranslator)})},
|
606
607
|
args: ["anIRInlinedClosure"],
|
607
608
|
source: "visitIRInlinedClosure: anIRInlinedClosure\x0a\x09anIRInlinedClosure instructions do: [ :each |\x0a\x09\x09self visit: each ]",
|
608
609
|
messageSends: ["do:", "visit:", "instructions"],
|
@@ -617,14 +618,14 @@ selector: "visitIRInlinedIfFalse:",
|
|
617
618
|
category: 'visiting',
|
618
619
|
fn: function (anIRInlinedIfFalse){
|
619
620
|
var self=this;
|
620
|
-
smalltalk.
|
621
|
-
smalltalk.
|
622
|
-
|
623
|
-
return
|
624
|
-
}),(function(){
|
625
|
-
return smalltalk.
|
626
|
-
})
|
627
|
-
return self},
|
621
|
+
return smalltalk.withContext(function($ctx1) {
|
622
|
+
return smalltalk.withContext(function($ctx2) {
|
623
|
+
_st(self)._visit_(_st(_st(anIRInlinedIfFalse)._instructions())._first());
|
624
|
+
return _st(_st(self)._stream())._nextPutAll_(")");
|
625
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
|
626
|
+
return smalltalk.withContext(function($ctx2) {
|
627
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
628
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfFalse:",{anIRInlinedIfFalse:anIRInlinedIfFalse}, smalltalk.IRInliningJSTranslator)})},
|
628
629
|
args: ["anIRInlinedIfFalse"],
|
629
630
|
source: "visitIRInlinedIfFalse: anIRInlinedIfFalse\x0a\x09self stream nextPutIf: [ \x0a\x09\x09self stream nextPutAll: '! smalltalk.assert('.\x0a\x09\x09self visit: anIRInlinedIfFalse instructions first.\x0a\x09\x09self stream nextPutAll: ')' ]\x0a\x09\x09with: [ self visit: anIRInlinedIfFalse instructions last ]",
|
630
631
|
messageSends: ["nextPutIf:with:", "nextPutAll:", "stream", "visit:", "first", "instructions", "last"],
|
@@ -639,14 +640,14 @@ selector: "visitIRInlinedIfNil:",
|
|
639
640
|
category: 'visiting',
|
640
641
|
fn: function (anIRInlinedIfNil){
|
641
642
|
var self=this;
|
642
|
-
smalltalk.
|
643
|
-
smalltalk.
|
644
|
-
|
645
|
-
return
|
646
|
-
}),(function(){
|
647
|
-
return smalltalk.
|
648
|
-
})
|
649
|
-
return self},
|
643
|
+
return smalltalk.withContext(function($ctx1) {
|
644
|
+
return smalltalk.withContext(function($ctx2) {
|
645
|
+
_st(self)._visit_(_st(_st(anIRInlinedIfNil)._instructions())._first());
|
646
|
+
return _st(_st(self)._stream())._nextPutAll_(") == nil || $receiver == undefined");
|
647
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
|
648
|
+
return smalltalk.withContext(function($ctx2) {
|
649
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
650
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfNil:",{anIRInlinedIfNil:anIRInlinedIfNil}, smalltalk.IRInliningJSTranslator)})},
|
650
651
|
args: ["anIRInlinedIfNil"],
|
651
652
|
source: "visitIRInlinedIfNil: anIRInlinedIfNil\x0a\x09self stream nextPutIf: [ \x0a\x09\x09self stream nextPutAll: '($receiver = '. \x0a\x09\x09self visit: anIRInlinedIfNil instructions first.\x0a\x09\x09self stream nextPutAll: ') == nil || $receiver == undefined' ]\x0a\x09\x09with: [ self visit: anIRInlinedIfNil instructions last ]",
|
652
653
|
messageSends: ["nextPutIf:with:", "nextPutAll:", "stream", "visit:", "first", "instructions", "last"],
|
@@ -661,16 +662,16 @@ selector: "visitIRInlinedIfNilIfNotNil:",
|
|
661
662
|
category: 'visiting',
|
662
663
|
fn: function (anIRInlinedIfNilIfNotNil){
|
663
664
|
var self=this;
|
664
|
-
smalltalk.
|
665
|
-
smalltalk.
|
666
|
-
|
667
|
-
return
|
668
|
-
}),(function(){
|
669
|
-
return smalltalk.
|
670
|
-
}),(function(){
|
671
|
-
return smalltalk.
|
672
|
-
})
|
673
|
-
return self},
|
665
|
+
return smalltalk.withContext(function($ctx1) {
|
666
|
+
return smalltalk.withContext(function($ctx2) {
|
667
|
+
_st(self)._visit_(_st(_st(anIRInlinedIfNilIfNotNil)._instructions())._first());
|
668
|
+
return _st(_st(self)._stream())._nextPutAll_(") == nil || $receiver == undefined");
|
669
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
|
670
|
+
return smalltalk.withContext(function($ctx2) {
|
671
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
|
672
|
+
return smalltalk.withContext(function($ctx2) {
|
673
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
674
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfNilIfNotNil:",{anIRInlinedIfNilIfNotNil:anIRInlinedIfNilIfNotNil}, smalltalk.IRInliningJSTranslator)})},
|
674
675
|
args: ["anIRInlinedIfNilIfNotNil"],
|
675
676
|
source: "visitIRInlinedIfNilIfNotNil: anIRInlinedIfNilIfNotNil\x0a\x09self stream \x0a\x09\x09nextPutIfElse: [ \x0a\x09\x09\x09self stream nextPutAll: '($receiver = '. \x0a\x09\x09\x09self visit: anIRInlinedIfNilIfNotNil instructions first.\x0a\x09\x09\x09self stream nextPutAll: ') == nil || $receiver == undefined' ]\x0a\x09\x09with: [ self visit: anIRInlinedIfNilIfNotNil instructions second ]\x0a\x09\x09with: [ self visit: anIRInlinedIfNilIfNotNil instructions third ]",
|
676
677
|
messageSends: ["nextPutIfElse:with:with:", "nextPutAll:", "stream", "visit:", "first", "instructions", "second", "third"],
|
@@ -685,14 +686,14 @@ selector: "visitIRInlinedIfTrue:",
|
|
685
686
|
category: 'visiting',
|
686
687
|
fn: function (anIRInlinedIfTrue){
|
687
688
|
var self=this;
|
688
|
-
smalltalk.
|
689
|
-
smalltalk.
|
690
|
-
|
691
|
-
return
|
692
|
-
}),(function(){
|
693
|
-
return smalltalk.
|
694
|
-
})
|
695
|
-
return self},
|
689
|
+
return smalltalk.withContext(function($ctx1) {
|
690
|
+
return smalltalk.withContext(function($ctx2) {
|
691
|
+
_st(self)._visit_(_st(_st(anIRInlinedIfTrue)._instructions())._first());
|
692
|
+
return _st(_st(self)._stream())._nextPutAll_(")");
|
693
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
|
694
|
+
return smalltalk.withContext(function($ctx2) {
|
695
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
696
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfTrue:",{anIRInlinedIfTrue:anIRInlinedIfTrue}, smalltalk.IRInliningJSTranslator)})},
|
696
697
|
args: ["anIRInlinedIfTrue"],
|
697
698
|
source: "visitIRInlinedIfTrue: anIRInlinedIfTrue\x0a\x09self stream nextPutIf: [ \x0a\x09\x09self stream nextPutAll: 'smalltalk.assert('. \x0a\x09\x09self visit: anIRInlinedIfTrue instructions first.\x0a\x09\x09self stream nextPutAll: ')' ]\x0a\x09\x09with: [ self visit: anIRInlinedIfTrue instructions last ]",
|
698
699
|
messageSends: ["nextPutIf:with:", "nextPutAll:", "stream", "visit:", "first", "instructions", "last"],
|
@@ -707,16 +708,16 @@ selector: "visitIRInlinedIfTrueIfFalse:",
|
|
707
708
|
category: 'visiting',
|
708
709
|
fn: function (anIRInlinedIfTrueIfFalse){
|
709
710
|
var self=this;
|
710
|
-
smalltalk.
|
711
|
-
smalltalk.
|
712
|
-
|
713
|
-
return
|
714
|
-
}),(function(){
|
715
|
-
return smalltalk.
|
716
|
-
}),(function(){
|
717
|
-
return smalltalk.
|
718
|
-
})
|
719
|
-
return self},
|
711
|
+
return smalltalk.withContext(function($ctx1) {
|
712
|
+
return smalltalk.withContext(function($ctx2) {
|
713
|
+
_st(self)._visit_(_st(_st(anIRInlinedIfTrueIfFalse)._instructions())._first());
|
714
|
+
return _st(_st(self)._stream())._nextPutAll_(")");
|
715
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
|
716
|
+
return smalltalk.withContext(function($ctx2) {
|
717
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
|
718
|
+
return smalltalk.withContext(function($ctx2) {
|
719
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
720
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfTrueIfFalse:",{anIRInlinedIfTrueIfFalse:anIRInlinedIfTrueIfFalse}, smalltalk.IRInliningJSTranslator)})},
|
720
721
|
args: ["anIRInlinedIfTrueIfFalse"],
|
721
722
|
source: "visitIRInlinedIfTrueIfFalse: anIRInlinedIfTrueIfFalse\x0a\x09self stream \x0a\x09\x09nextPutIfElse: [ \x0a\x09\x09\x09self stream nextPutAll: 'smalltalk.assert('. \x0a\x09\x09\x09self visit: anIRInlinedIfTrueIfFalse instructions first.\x0a\x09\x09\x09self stream nextPutAll: ')' ]\x0a\x09\x09with: [ self visit: anIRInlinedIfTrueIfFalse instructions second ]\x0a\x09\x09with: [ self visit: anIRInlinedIfTrueIfFalse instructions third ]",
|
722
723
|
messageSends: ["nextPutIfElse:with:with:", "nextPutAll:", "stream", "visit:", "first", "instructions", "second", "third"],
|
@@ -731,12 +732,12 @@ selector: "visitIRInlinedNonLocalReturn:",
|
|
731
732
|
category: 'visiting',
|
732
733
|
fn: function (anIRInlinedReturn){
|
733
734
|
var self=this;
|
734
|
-
smalltalk.
|
735
|
-
return smalltalk.
|
736
|
-
})
|
737
|
-
|
738
|
-
|
739
|
-
return self},
|
735
|
+
return smalltalk.withContext(function($ctx1) {
|
736
|
+
return smalltalk.withContext(function($ctx2) {
|
737
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
738
|
+
_st(_st(self)._stream())._nextPutNonLocalReturnWith_((function(){
|
739
|
+
return smalltalk.withContext(function($ctx2) {
|
740
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedNonLocalReturn:",{anIRInlinedReturn:anIRInlinedReturn}, smalltalk.IRInliningJSTranslator)})},
|
740
741
|
args: ["anIRInlinedReturn"],
|
741
742
|
source: "visitIRInlinedNonLocalReturn: anIRInlinedReturn\x0a\x09self stream nextPutStatementWith: [\x0a\x09\x09self visit: anIRInlinedReturn instructions last ].\x0a\x09self stream nextPutNonLocalReturnWith: [ ]",
|
742
743
|
messageSends: ["nextPutStatementWith:", "visit:", "last", "instructions", "stream", "nextPutNonLocalReturnWith:"],
|
@@ -751,8 +752,8 @@ selector: "visitIRInlinedReturn:",
|
|
751
752
|
category: 'visiting',
|
752
753
|
fn: function (anIRInlinedReturn){
|
753
754
|
var self=this;
|
754
|
-
smalltalk.
|
755
|
-
return self},
|
755
|
+
return smalltalk.withContext(function($ctx1) {
|
756
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedReturn:",{anIRInlinedReturn:anIRInlinedReturn}, smalltalk.IRInliningJSTranslator)})},
|
756
757
|
args: ["anIRInlinedReturn"],
|
757
758
|
source: "visitIRInlinedReturn: anIRInlinedReturn\x0a\x09self visit: anIRInlinedReturn instructions last",
|
758
759
|
messageSends: ["visit:", "last", "instructions"],
|
@@ -767,12 +768,12 @@ selector: "visitIRInlinedSequence:",
|
|
767
768
|
category: 'visiting',
|
768
769
|
fn: function (anIRInlinedSequence){
|
769
770
|
var self=this;
|
770
|
-
smalltalk.
|
771
|
-
return smalltalk.
|
772
|
-
return smalltalk.
|
773
|
-
})
|
774
|
-
})
|
775
|
-
return self},
|
771
|
+
return smalltalk.withContext(function($ctx1) {
|
772
|
+
return smalltalk.withContext(function($ctx2) {
|
773
|
+
return smalltalk.withContext(function($ctx3) {
|
774
|
+
}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
|
775
|
+
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
776
|
+
return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedSequence:",{anIRInlinedSequence:anIRInlinedSequence}, smalltalk.IRInliningJSTranslator)})},
|
776
777
|
args: ["anIRInlinedSequence"],
|
777
778
|
source: "visitIRInlinedSequence: anIRInlinedSequence\x0a\x09anIRInlinedSequence instructions do: [ :each | \x0a\x09\x09self stream nextPutStatementWith: [ self visit: each ]]",
|
778
779
|
messageSends: ["do:", "nextPutStatementWith:", "visit:", "stream", "instructions"],
|
@@ -791,10 +792,10 @@ selector: "ifFalse:",
|
|
791
792
|
category: 'inlining',
|
792
793
|
fn: function (anIRInstruction){
|
793
794
|
var self=this;
|
794
|
-
|
795
|
-
$1=
|
795
|
+
return smalltalk.withContext(function($ctx1) {
|
796
|
+
$1=_st(self)._inlinedSend_with_(_st((smalltalk.IRInlinedIfFalse || IRInlinedIfFalse))._new(),anIRInstruction);
|
796
797
|
return $1;
|
797
|
-
},
|
798
|
+
}, function($ctx1) {$ctx1.fill(self,"ifFalse:",{anIRInstruction:anIRInstruction}, smalltalk.IRSendInliner)})},
|
798
799
|
args: ["anIRInstruction"],
|
799
800
|
source: "ifFalse: anIRInstruction\x0a\x09^ self inlinedSend: IRInlinedIfFalse new with: anIRInstruction",
|
800
801
|
messageSends: ["inlinedSend:with:", "new"],
|
@@ -809,10 +810,10 @@ selector: "ifFalse:ifTrue:",
|
|
809
810
|
category: 'inlining',
|
810
811
|
fn: function (anIRInstruction,anotherIRInstruction){
|
811
812
|
var self=this;
|
812
|
-
|
813
|
-
$1=
|
813
|
+
return smalltalk.withContext(function($ctx1) {
|
814
|
+
$1=_st(self)._perform_withArguments_(smalltalk.symbolFor("ifTrue:ifFalse:"),[anotherIRInstruction,anIRInstruction]);
|
814
815
|
return $1;
|
815
|
-
},
|
816
|
+
}, function($ctx1) {$ctx1.fill(self,"ifFalse:ifTrue:",{anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction}, smalltalk.IRSendInliner)})},
|
816
817
|
args: ["anIRInstruction", "anotherIRInstruction"],
|
817
818
|
source: "ifFalse: anIRInstruction ifTrue: anotherIRInstruction\x0a\x09^ self perform: #ifTrue:ifFalse: withArguments: { anotherIRInstruction. anIRInstruction }",
|
818
819
|
messageSends: ["perform:withArguments:"],
|
@@ -827,17 +828,17 @@ selector: "ifNil:",
|
|
827
828
|
category: 'inlining',
|
828
829
|
fn: function (anIRInstruction){
|
829
830
|
var self=this;
|
830
|
-
|
831
|
-
$2=
|
832
|
-
|
833
|
-
$3=
|
834
|
-
|
835
|
-
$4=
|
836
|
-
|
837
|
-
$5=
|
838
|
-
$1=
|
831
|
+
return smalltalk.withContext(function($ctx1) {
|
832
|
+
$2=_st((smalltalk.IRClosure || IRClosure))._new();
|
833
|
+
_st($2)._scope_(_st(_st(anIRInstruction)._scope())._copy());
|
834
|
+
$3=_st((smalltalk.IRBlockSequence || IRBlockSequence))._new();
|
835
|
+
_st($3)._add_(_st(_st(_st(self)._send())._instructions())._first());
|
836
|
+
$4=_st($3)._yourself();
|
837
|
+
_st($2)._add_($4);
|
838
|
+
$5=_st($2)._yourself();
|
839
|
+
$1=_st(self)._inlinedSend_with_with_(_st((smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil))._new(),anIRInstruction,$5);
|
839
840
|
return $1;
|
840
|
-
},
|
841
|
+
}, function($ctx1) {$ctx1.fill(self,"ifNil:",{anIRInstruction:anIRInstruction}, smalltalk.IRSendInliner)})},
|
841
842
|
args: ["anIRInstruction"],
|
842
843
|
source: "ifNil: anIRInstruction\x0a\x09^ self \x0a\x09\x09inlinedSend: IRInlinedIfNilIfNotNil new \x0a\x09\x09with: anIRInstruction\x0a\x09\x09with: (IRClosure new\x0a\x09\x09\x09scope: anIRInstruction scope copy;\x0a\x09\x09\x09add: (IRBlockSequence new\x0a\x09\x09\x09\x09add: self send instructions first;\x0a\x09\x09\x09\x09yourself);\x0a\x09\x09\x09yourself)",
|
843
844
|
messageSends: ["inlinedSend:with:with:", "new", "scope:", "copy", "scope", "add:", "first", "instructions", "send", "yourself"],
|
@@ -852,10 +853,10 @@ selector: "ifNil:ifNotNil:",
|
|
852
853
|
category: 'inlining',
|
853
854
|
fn: function (anIRInstruction,anotherIRInstruction){
|
854
855
|
var self=this;
|
855
|
-
|
856
|
-
$1=
|
856
|
+
return smalltalk.withContext(function($ctx1) {
|
857
|
+
$1=_st(self)._inlinedSend_with_with_(_st((smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil))._new(),anIRInstruction,anotherIRInstruction);
|
857
858
|
return $1;
|
858
|
-
},
|
859
|
+
}, function($ctx1) {$ctx1.fill(self,"ifNil:ifNotNil:",{anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction}, smalltalk.IRSendInliner)})},
|
859
860
|
args: ["anIRInstruction", "anotherIRInstruction"],
|
860
861
|
source: "ifNil: anIRInstruction ifNotNil: anotherIRInstruction\x0a\x09^ self inlinedSend: IRInlinedIfNilIfNotNil new with: anIRInstruction with: anotherIRInstruction",
|
861
862
|
messageSends: ["inlinedSend:with:with:", "new"],
|
@@ -870,17 +871,17 @@ selector: "ifNotNil:",
|
|
870
871
|
category: 'inlining',
|
871
872
|
fn: function (anIRInstruction){
|
872
873
|
var self=this;
|
873
|
-
|
874
|
-
$2=
|
875
|
-
|
876
|
-
$3=
|
877
|
-
|
878
|
-
$4=
|
879
|
-
|
880
|
-
$5=
|
881
|
-
$1=
|
874
|
+
return smalltalk.withContext(function($ctx1) {
|
875
|
+
$2=_st((smalltalk.IRClosure || IRClosure))._new();
|
876
|
+
_st($2)._scope_(_st(_st(anIRInstruction)._scope())._copy());
|
877
|
+
$3=_st((smalltalk.IRBlockSequence || IRBlockSequence))._new();
|
878
|
+
_st($3)._add_(_st(_st(_st(self)._send())._instructions())._first());
|
879
|
+
$4=_st($3)._yourself();
|
880
|
+
_st($2)._add_($4);
|
881
|
+
$5=_st($2)._yourself();
|
882
|
+
$1=_st(self)._inlinedSend_with_with_(_st((smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil))._new(),$5,anIRInstruction);
|
882
883
|
return $1;
|
883
|
-
},
|
884
|
+
}, function($ctx1) {$ctx1.fill(self,"ifNotNil:",{anIRInstruction:anIRInstruction}, smalltalk.IRSendInliner)})},
|
884
885
|
args: ["anIRInstruction"],
|
885
886
|
source: "ifNotNil: anIRInstruction\x0a\x09^ self \x0a\x09\x09inlinedSend: IRInlinedIfNilIfNotNil new\x0a\x09\x09with: (IRClosure new\x0a\x09\x09\x09scope: anIRInstruction scope copy;\x0a\x09\x09\x09add: (IRBlockSequence new\x0a\x09\x09\x09\x09add: self send instructions first;\x0a\x09\x09\x09\x09yourself);\x0a\x09\x09\x09yourself)\x0a\x09\x09with: anIRInstruction",
|
886
887
|
messageSends: ["inlinedSend:with:with:", "new", "scope:", "copy", "scope", "add:", "first", "instructions", "send", "yourself"],
|
@@ -895,10 +896,10 @@ selector: "ifNotNil:ifNil:",
|
|
895
896
|
category: 'inlining',
|
896
897
|
fn: function (anIRInstruction,anotherIRInstruction){
|
897
898
|
var self=this;
|
898
|
-
|
899
|
-
$1=
|
899
|
+
return smalltalk.withContext(function($ctx1) {
|
900
|
+
$1=_st(self)._inlinedSend_with_with_(_st((smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil))._new(),anotherIRInstruction,anIRInstruction);
|
900
901
|
return $1;
|
901
|
-
},
|
902
|
+
}, function($ctx1) {$ctx1.fill(self,"ifNotNil:ifNil:",{anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction}, smalltalk.IRSendInliner)})},
|
902
903
|
args: ["anIRInstruction", "anotherIRInstruction"],
|
903
904
|
source: "ifNotNil: anIRInstruction ifNil: anotherIRInstruction\x0a\x09^ self inlinedSend: IRInlinedIfNilIfNotNil new with: anotherIRInstruction with: anIRInstruction",
|
904
905
|
messageSends: ["inlinedSend:with:with:", "new"],
|
@@ -913,10 +914,10 @@ selector: "ifTrue:",
|
|
913
914
|
category: 'inlining',
|
914
915
|
fn: function (anIRInstruction){
|
915
916
|
var self=this;
|
916
|
-
|
917
|
-
$1=
|
917
|
+
return smalltalk.withContext(function($ctx1) {
|
918
|
+
$1=_st(self)._inlinedSend_with_(_st((smalltalk.IRInlinedIfTrue || IRInlinedIfTrue))._new(),anIRInstruction);
|
918
919
|
return $1;
|
919
|
-
},
|
920
|
+
}, function($ctx1) {$ctx1.fill(self,"ifTrue:",{anIRInstruction:anIRInstruction}, smalltalk.IRSendInliner)})},
|
920
921
|
args: ["anIRInstruction"],
|
921
922
|
source: "ifTrue: anIRInstruction\x0a\x09^ self inlinedSend: IRInlinedIfTrue new with: anIRInstruction",
|
922
923
|
messageSends: ["inlinedSend:with:", "new"],
|
@@ -931,10 +932,10 @@ selector: "ifTrue:ifFalse:",
|
|
931
932
|
category: 'inlining',
|
932
933
|
fn: function (anIRInstruction,anotherIRInstruction){
|
933
934
|
var self=this;
|
934
|
-
|
935
|
-
$1=
|
935
|
+
return smalltalk.withContext(function($ctx1) {
|
936
|
+
$1=_st(self)._inlinedSend_with_with_(_st((smalltalk.IRInlinedIfTrueIfFalse || IRInlinedIfTrueIfFalse))._new(),anIRInstruction,anotherIRInstruction);
|
936
937
|
return $1;
|
937
|
-
},
|
938
|
+
}, function($ctx1) {$ctx1.fill(self,"ifTrue:ifFalse:",{anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction}, smalltalk.IRSendInliner)})},
|
938
939
|
args: ["anIRInstruction", "anotherIRInstruction"],
|
939
940
|
source: "ifTrue: anIRInstruction ifFalse: anotherIRInstruction\x0a\x09^ self inlinedSend: IRInlinedIfTrueIfFalse new with: anIRInstruction with: anotherIRInstruction",
|
940
941
|
messageSends: ["inlinedSend:with:with:", "new"],
|
@@ -949,36 +950,39 @@ selector: "inlineClosure:",
|
|
949
950
|
category: 'inlining',
|
950
951
|
fn: function (anIRClosure){
|
951
952
|
var self=this;
|
952
|
-
var
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
smalltalk.
|
959
|
-
|
960
|
-
|
961
|
-
return smalltalk.send(inlinedClosure,"_add_",[each]);
|
953
|
+
var inlinedClosure,sequence,statements;
|
954
|
+
return smalltalk.withContext(function($ctx1) {
|
955
|
+
inlinedClosure=_st(self)._inlinedClosure();
|
956
|
+
_st(inlinedClosure)._scope_(_st(anIRClosure)._scope());
|
957
|
+
$1=_st(anIRClosure)._instructions();
|
958
|
+
$2=(function(each){
|
959
|
+
return smalltalk.withContext(function($ctx2) {
|
960
|
+
if(! smalltalk.assert($3)){
|
961
|
+
return _st(inlinedClosure)._add_(each);
|
962
962
|
};
|
963
|
-
})
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
963
|
+
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
|
964
|
+
_st($1)._do_($2);
|
965
|
+
sequence=_st(self)._inlinedSequence();
|
966
|
+
_st(inlinedClosure)._add_(sequence);
|
967
|
+
statements=_st(_st(_st(anIRClosure)._instructions())._last())._instructions();
|
968
|
+
$4=statements;
|
969
|
+
$5=(function(){
|
970
|
+
return smalltalk.withContext(function($ctx2) {
|
971
|
+
return smalltalk.withContext(function($ctx3) {
|
972
|
+
}, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
|
973
|
+
$6=_st(_st(_st(statements)._last())._isReturn())._and_((function(){
|
974
|
+
return smalltalk.withContext(function($ctx3) {
|
975
|
+
}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
|
976
|
+
if(smalltalk.assert($6)){
|
977
|
+
return _st(sequence)._add_(_st(_st(_st(statements)._last())._instructions())._first());
|
976
978
|
} else {
|
977
|
-
return
|
979
|
+
return _st(sequence)._add_(_st(statements)._last());
|
978
980
|
};
|
979
|
-
})
|
980
|
-
|
981
|
-
|
981
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
|
982
|
+
_st($4)._ifNotEmpty_($5);
|
983
|
+
$7=inlinedClosure;
|
984
|
+
return $7;
|
985
|
+
}, function($ctx1) {$ctx1.fill(self,"inlineClosure:",{anIRClosure:anIRClosure,inlinedClosure:inlinedClosure,sequence:sequence,statements:statements}, smalltalk.IRSendInliner)})},
|
982
986
|
args: ["anIRClosure"],
|
983
987
|
source: "inlineClosure: anIRClosure\x0a\x09| inlinedClosure sequence statements |\x0a\x0a\x09inlinedClosure := self inlinedClosure.\x0a\x09inlinedClosure scope: anIRClosure scope.\x0a\x0a\x09\x22Add the possible temp declarations\x22\x0a\x09anIRClosure instructions do: [ :each | \x0a\x09\x09each isSequence ifFalse: [\x0a\x09\x09\x09inlinedClosure add: each ]].\x0a\x0a\x09\x22Add a block sequence\x22\x0a\x09sequence := self inlinedSequence.\x0a\x09inlinedClosure add: sequence.\x0a\x0a\x09\x22Get all the statements\x22\x0a\x09statements := anIRClosure instructions last instructions.\x0a\x09\x0a\x09statements ifNotEmpty: [\x0a\x09\x09statements allButLast do: [ :each | sequence add: each ].\x0a\x0a\x09\x09\x22Inlined closures don't have implicit local returns\x22\x0a\x09\x09(statements last isReturn and: [ statements last isBlockReturn ])\x0a\x09\x09\x09ifTrue: [ sequence add: statements last instructions first ]\x0a\x09\x09\x09ifFalse: [ sequence add: statements last ] ].\x0a\x0a\x09^ inlinedClosure",
|
984
988
|
messageSends: ["inlinedClosure", "scope:", "scope", "do:", "ifFalse:", "add:", "isSequence", "instructions", "inlinedSequence", "last", "ifNotEmpty:", "allButLast", "ifTrue:ifFalse:", "first", "and:", "isBlockReturn", "isReturn"],
|
@@ -993,11 +997,11 @@ selector: "inlineSend:",
|
|
993
997
|
category: 'inlining',
|
994
998
|
fn: function (anIRSend){
|
995
999
|
var self=this;
|
996
|
-
|
997
|
-
|
998
|
-
$1=
|
1000
|
+
return smalltalk.withContext(function($ctx1) {
|
1001
|
+
_st(self)._send_(anIRSend);
|
1002
|
+
$1=_st(self)._perform_withArguments_(_st(_st(self)._send())._selector(),_st(_st(_st(self)._send())._instructions())._allButFirst());
|
999
1003
|
return $1;
|
1000
|
-
},
|
1004
|
+
}, function($ctx1) {$ctx1.fill(self,"inlineSend:",{anIRSend:anIRSend}, smalltalk.IRSendInliner)})},
|
1001
1005
|
args: ["anIRSend"],
|
1002
1006
|
source: "inlineSend: anIRSend\x0a\x09self send: anIRSend.\x0a\x09^ self \x0a\x09\x09perform: self send selector \x0a\x09\x09withArguments: self send instructions allButFirst",
|
1003
1007
|
messageSends: ["send:", "perform:withArguments:", "selector", "send", "allButFirst", "instructions"],
|
@@ -1012,10 +1016,10 @@ selector: "inlinedClosure",
|
|
1012
1016
|
category: 'factory',
|
1013
1017
|
fn: function (){
|
1014
1018
|
var self=this;
|
1015
|
-
|
1016
|
-
$1=
|
1019
|
+
return smalltalk.withContext(function($ctx1) {
|
1020
|
+
$1=_st((smalltalk.IRInlinedClosure || IRInlinedClosure))._new();
|
1017
1021
|
return $1;
|
1018
|
-
},
|
1022
|
+
}, function($ctx1) {$ctx1.fill(self,"inlinedClosure",{}, smalltalk.IRSendInliner)})},
|
1019
1023
|
args: [],
|
1020
1024
|
source: "inlinedClosure\x0a\x09^ IRInlinedClosure new",
|
1021
1025
|
messageSends: ["new"],
|
@@ -1030,22 +1034,24 @@ selector: "inlinedSend:with:",
|
|
1030
1034
|
category: 'inlining',
|
1031
1035
|
fn: function (inlinedSend,anIRInstruction){
|
1032
1036
|
var self=this;
|
1033
|
-
var $1,$2,$3;
|
1034
1037
|
var inlinedClosure;
|
1035
|
-
|
1038
|
+
return smalltalk.withContext(function($ctx1) {
|
1039
|
+
$1=_st(anIRInstruction)._isClosure();
|
1036
1040
|
if(! smalltalk.assert($1)){
|
1037
|
-
|
1041
|
+
_st(self)._inliningError_("Message argument should be a block");
|
1038
1042
|
};
|
1039
|
-
$2=
|
1043
|
+
$2=_st(_st(_st(anIRInstruction)._arguments())._size()).__eq((0));
|
1040
1044
|
if(! smalltalk.assert($2)){
|
1041
|
-
|
1045
|
+
_st(self)._inliningError_("Inlined block should have zero argument");
|
1042
1046
|
};
|
1043
|
-
inlinedClosure=
|
1044
|
-
|
1045
|
-
$3
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1047
|
+
inlinedClosure=_st(_st(self)._translator())._visit_(_st(self)._inlineClosure_(anIRInstruction));
|
1048
|
+
$3=inlinedSend;
|
1049
|
+
_st($3)._add_(_st(_st(_st(self)._send())._instructions())._first());
|
1050
|
+
$4=_st($3)._add_(inlinedClosure);
|
1051
|
+
_st(_st(self)._send())._replaceWith_(inlinedSend);
|
1052
|
+
$5=inlinedSend;
|
1053
|
+
return $5;
|
1054
|
+
}, function($ctx1) {$ctx1.fill(self,"inlinedSend:with:",{inlinedSend:inlinedSend,anIRInstruction:anIRInstruction,inlinedClosure:inlinedClosure}, smalltalk.IRSendInliner)})},
|
1049
1055
|
args: ["inlinedSend", "anIRInstruction"],
|
1050
1056
|
source: "inlinedSend: inlinedSend with: anIRInstruction\x0a\x09| inlinedClosure |\x0a\x0a\x09anIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].\x0a\x09anIRInstruction arguments size = 0 ifFalse: [ self inliningError: 'Inlined block should have zero argument' ].\x0a\x0a\x09inlinedClosure := self translator visit: (self inlineClosure: anIRInstruction).\x0a\x0a\x09inlinedSend\x0a\x09\x09add: self send instructions first;\x0a\x09\x09add: inlinedClosure.\x0a\x0a\x09self send replaceWith: inlinedSend.\x0a\x0a\x09^ inlinedSend",
|
1051
1057
|
messageSends: ["ifFalse:", "inliningError:", "isClosure", "=", "size", "arguments", "visit:", "inlineClosure:", "translator", "add:", "first", "instructions", "send", "replaceWith:"],
|
@@ -1060,33 +1066,34 @@ selector: "inlinedSend:with:with:",
|
|
1060
1066
|
category: 'inlining',
|
1061
1067
|
fn: function (inlinedSend,anIRInstruction,anotherIRInstruction){
|
1062
1068
|
var self=this;
|
1063
|
-
var
|
1064
|
-
|
1065
|
-
|
1066
|
-
$1=smalltalk.send(anIRInstruction,"_isClosure",[]);
|
1069
|
+
var inlinedClosure1,inlinedClosure2;
|
1070
|
+
return smalltalk.withContext(function($ctx1) {
|
1071
|
+
$1=_st(anIRInstruction)._isClosure();
|
1067
1072
|
if(! smalltalk.assert($1)){
|
1068
|
-
|
1073
|
+
_st(self)._inliningError_("Message argument should be a block");
|
1069
1074
|
};
|
1070
|
-
$2=
|
1075
|
+
$2=_st(_st(_st(anIRInstruction)._arguments())._size()).__eq((0));
|
1071
1076
|
if(! smalltalk.assert($2)){
|
1072
|
-
|
1077
|
+
_st(self)._inliningError_("Inlined block should have zero argument");
|
1073
1078
|
};
|
1074
|
-
$3=
|
1079
|
+
$3=_st(anotherIRInstruction)._isClosure();
|
1075
1080
|
if(! smalltalk.assert($3)){
|
1076
|
-
|
1081
|
+
_st(self)._inliningError_("Message argument should be a block");
|
1077
1082
|
};
|
1078
|
-
$4=
|
1083
|
+
$4=_st(_st(_st(anotherIRInstruction)._arguments())._size()).__eq((0));
|
1079
1084
|
if(! smalltalk.assert($4)){
|
1080
|
-
|
1085
|
+
_st(self)._inliningError_("Inlined block should have zero argument");
|
1081
1086
|
};
|
1082
|
-
inlinedClosure1=
|
1083
|
-
inlinedClosure2=
|
1084
|
-
|
1085
|
-
|
1086
|
-
$5
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1087
|
+
inlinedClosure1=_st(_st(self)._translator())._visit_(_st(self)._inlineClosure_(anIRInstruction));
|
1088
|
+
inlinedClosure2=_st(_st(self)._translator())._visit_(_st(self)._inlineClosure_(anotherIRInstruction));
|
1089
|
+
$5=inlinedSend;
|
1090
|
+
_st($5)._add_(_st(_st(_st(self)._send())._instructions())._first());
|
1091
|
+
_st($5)._add_(inlinedClosure1);
|
1092
|
+
$6=_st($5)._add_(inlinedClosure2);
|
1093
|
+
_st(_st(self)._send())._replaceWith_(inlinedSend);
|
1094
|
+
$7=inlinedSend;
|
1095
|
+
return $7;
|
1096
|
+
}, function($ctx1) {$ctx1.fill(self,"inlinedSend:with:with:",{inlinedSend:inlinedSend,anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction,inlinedClosure1:inlinedClosure1,inlinedClosure2:inlinedClosure2}, smalltalk.IRSendInliner)})},
|
1090
1097
|
args: ["inlinedSend", "anIRInstruction", "anotherIRInstruction"],
|
1091
1098
|
source: "inlinedSend: inlinedSend with: anIRInstruction with: anotherIRInstruction\x0a\x09| inlinedClosure1 inlinedClosure2 |\x0a\x0a\x09anIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].\x0a\x09anIRInstruction arguments size = 0 ifFalse: [ self inliningError: 'Inlined block should have zero argument' ].\x0a\x0a\x09anotherIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].\x0a\x09anotherIRInstruction arguments size = 0 ifFalse: [ self inliningError: 'Inlined block should have zero argument' ].\x0a\x0a\x09inlinedClosure1 := self translator visit: (self inlineClosure: anIRInstruction).\x0a\x09inlinedClosure2 := self translator visit: (self inlineClosure: anotherIRInstruction).\x0a\x0a\x0a\x09inlinedSend\x0a\x09\x09add: self send instructions first;\x0a\x09\x09add: inlinedClosure1;\x0a\x09\x09add: inlinedClosure2.\x0a\x0a\x09self send replaceWith: inlinedSend.\x0a\x09^ inlinedSend",
|
1092
1099
|
messageSends: ["ifFalse:", "inliningError:", "isClosure", "=", "size", "arguments", "visit:", "inlineClosure:", "translator", "add:", "first", "instructions", "send", "replaceWith:"],
|
@@ -1101,10 +1108,10 @@ selector: "inlinedSequence",
|
|
1101
1108
|
category: 'factory',
|
1102
1109
|
fn: function (){
|
1103
1110
|
var self=this;
|
1104
|
-
|
1105
|
-
$1=
|
1111
|
+
return smalltalk.withContext(function($ctx1) {
|
1112
|
+
$1=_st((smalltalk.IRInlinedSequence || IRInlinedSequence))._new();
|
1106
1113
|
return $1;
|
1107
|
-
},
|
1114
|
+
}, function($ctx1) {$ctx1.fill(self,"inlinedSequence",{}, smalltalk.IRSendInliner)})},
|
1108
1115
|
args: [],
|
1109
1116
|
source: "inlinedSequence\x0a\x09^ IRInlinedSequence new",
|
1110
1117
|
messageSends: ["new"],
|
@@ -1119,8 +1126,8 @@ selector: "inliningError:",
|
|
1119
1126
|
category: 'error handling',
|
1120
1127
|
fn: function (aString){
|
1121
1128
|
var self=this;
|
1122
|
-
smalltalk.
|
1123
|
-
return self},
|
1129
|
+
return smalltalk.withContext(function($ctx1) {
|
1130
|
+
return self}, function($ctx1) {$ctx1.fill(self,"inliningError:",{aString:aString}, smalltalk.IRSendInliner)})},
|
1124
1131
|
args: ["aString"],
|
1125
1132
|
source: "inliningError: aString\x0a\x09InliningError signal: aString",
|
1126
1133
|
messageSends: ["signal:"],
|
@@ -1135,8 +1142,10 @@ selector: "send",
|
|
1135
1142
|
category: 'accessing',
|
1136
1143
|
fn: function (){
|
1137
1144
|
var self=this;
|
1138
|
-
return
|
1139
|
-
|
1145
|
+
return smalltalk.withContext(function($ctx1) {
|
1146
|
+
$1=self["@send"];
|
1147
|
+
return $1;
|
1148
|
+
}, function($ctx1) {$ctx1.fill(self,"send",{}, smalltalk.IRSendInliner)})},
|
1140
1149
|
args: [],
|
1141
1150
|
source: "send\x0a\x09^ send",
|
1142
1151
|
messageSends: [],
|
@@ -1151,8 +1160,8 @@ selector: "send:",
|
|
1151
1160
|
category: 'accessing',
|
1152
1161
|
fn: function (anIRSend){
|
1153
1162
|
var self=this;
|
1154
|
-
|
1155
|
-
return self},
|
1163
|
+
return smalltalk.withContext(function($ctx1) {
|
1164
|
+
return self}, function($ctx1) {$ctx1.fill(self,"send:",{anIRSend:anIRSend}, smalltalk.IRSendInliner)})},
|
1156
1165
|
args: ["anIRSend"],
|
1157
1166
|
source: "send: anIRSend\x0a\x09send := anIRSend",
|
1158
1167
|
messageSends: [],
|
@@ -1167,8 +1176,10 @@ selector: "translator",
|
|
1167
1176
|
category: 'accessing',
|
1168
1177
|
fn: function (){
|
1169
1178
|
var self=this;
|
1170
|
-
return
|
1171
|
-
|
1179
|
+
return smalltalk.withContext(function($ctx1) {
|
1180
|
+
$1=self["@translator"];
|
1181
|
+
return $1;
|
1182
|
+
}, function($ctx1) {$ctx1.fill(self,"translator",{}, smalltalk.IRSendInliner)})},
|
1172
1183
|
args: [],
|
1173
1184
|
source: "translator\x0a\x09^ translator",
|
1174
1185
|
messageSends: [],
|
@@ -1183,8 +1194,8 @@ selector: "translator:",
|
|
1183
1194
|
category: 'accessing',
|
1184
1195
|
fn: function (anASTTranslator){
|
1185
1196
|
var self=this;
|
1186
|
-
|
1187
|
-
return self},
|
1197
|
+
return smalltalk.withContext(function($ctx1) {
|
1198
|
+
return self}, function($ctx1) {$ctx1.fill(self,"translator:",{anASTTranslator:anASTTranslator}, smalltalk.IRSendInliner)})},
|
1188
1199
|
args: ["anASTTranslator"],
|
1189
1200
|
source: "translator: anASTTranslator\x0a\x09translator := anASTTranslator",
|
1190
1201
|
messageSends: [],
|
@@ -1200,8 +1211,8 @@ selector: "inlinedSelectors",
|
|
1200
1211
|
category: 'accessing',
|
1201
1212
|
fn: function (){
|
1202
1213
|
var self=this;
|
1203
|
-
return
|
1204
|
-
},
|
1214
|
+
return smalltalk.withContext(function($ctx1) {
|
1215
|
+
}, function($ctx1) {$ctx1.fill(self,"inlinedSelectors",{}, smalltalk.IRSendInliner.klass)})},
|
1205
1216
|
args: [],
|
1206
1217
|
source: "inlinedSelectors\x0a\x09^ #('ifTrue:' 'ifFalse:' 'ifTrue:ifFalse:' 'ifFalse:ifTrue:' 'ifNil:' 'ifNotNil:' 'ifNil:ifNotNil:' 'ifNotNil:ifNil')",
|
1207
1218
|
messageSends: [],
|
@@ -1216,23 +1227,25 @@ selector: "shouldInline:",
|
|
1216
1227
|
category: 'accessing',
|
1217
1228
|
fn: function (anIRInstruction){
|
1218
1229
|
var self=this;
|
1219
|
-
|
1230
|
+
return smalltalk.withContext(function($ctx1) {
|
1220
1231
|
var $early={};
|
1221
1232
|
try {
|
1222
|
-
$1=
|
1233
|
+
$1=_st(_st(self)._inlinedSelectors())._includes_(_st(anIRInstruction)._selector());
|
1223
1234
|
if(! smalltalk.assert($1)){
|
1224
1235
|
return false;
|
1225
1236
|
};
|
1226
|
-
|
1227
|
-
$
|
1228
|
-
|
1237
|
+
$2=_st(_st(anIRInstruction)._instructions())._allButFirst();
|
1238
|
+
$3=(function(each){
|
1239
|
+
return smalltalk.withContext(function($ctx2) {
|
1240
|
+
if(! smalltalk.assert($4)){
|
1229
1241
|
throw $early=[false];
|
1230
1242
|
};
|
1231
|
-
})
|
1243
|
+
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
|
1244
|
+
_st($2)._do_($3);
|
1232
1245
|
return true;
|
1233
1246
|
}
|
1234
1247
|
catch(e) {if(e===$early)return e[0]; throw e}
|
1235
|
-
},
|
1248
|
+
}, function($ctx1) {$ctx1.fill(self,"shouldInline:",{anIRInstruction:anIRInstruction}, smalltalk.IRSendInliner.klass)})},
|
1236
1249
|
args: ["anIRInstruction"],
|
1237
1250
|
source: "shouldInline: anIRInstruction\x0a\x09(self inlinedSelectors includes: anIRInstruction selector) ifFalse: [ ^ false ].\x0a\x09anIRInstruction instructions allButFirst do: [ :each |\x0a\x09\x09each isClosure ifFalse: [ ^ false ]].\x0a\x09^ true",
|
1238
1251
|
messageSends: ["ifFalse:", "includes:", "selector", "inlinedSelectors", "do:", "isClosure", "allButFirst", "instructions"],
|
@@ -1250,8 +1263,10 @@ selector: "assignment",
|
|
1250
1263
|
category: 'accessing',
|
1251
1264
|
fn: function (){
|
1252
1265
|
var self=this;
|
1253
|
-
return
|
1254
|
-
|
1266
|
+
return smalltalk.withContext(function($ctx1) {
|
1267
|
+
$1=self["@assignment"];
|
1268
|
+
return $1;
|
1269
|
+
}, function($ctx1) {$ctx1.fill(self,"assignment",{}, smalltalk.IRAssignmentInliner)})},
|
1255
1270
|
args: [],
|
1256
1271
|
source: "assignment\x0a\x09^ assignment",
|
1257
1272
|
messageSends: [],
|
@@ -1266,8 +1281,8 @@ selector: "assignment:",
|
|
1266
1281
|
category: 'accessing',
|
1267
1282
|
fn: function (aNode){
|
1268
1283
|
var self=this;
|
1269
|
-
|
1270
|
-
return self},
|
1284
|
+
return smalltalk.withContext(function($ctx1) {
|
1285
|
+
return self}, function($ctx1) {$ctx1.fill(self,"assignment:",{aNode:aNode}, smalltalk.IRAssignmentInliner)})},
|
1271
1286
|
args: ["aNode"],
|
1272
1287
|
source: "assignment: aNode\x0a\x09assignment := aNode",
|
1273
1288
|
messageSends: [],
|
@@ -1283,15 +1298,17 @@ category: 'inlining',
|
|
1283
1298
|
fn: function (anIRAssignment){
|
1284
1299
|
var self=this;
|
1285
1300
|
var inlinedAssignment;
|
1286
|
-
smalltalk.
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1301
|
+
return smalltalk.withContext(function($ctx1) {
|
1302
|
+
_st(self)._assignment_(anIRAssignment);
|
1303
|
+
inlinedAssignment=_st((smalltalk.IRInlinedAssignment || IRInlinedAssignment))._new();
|
1304
|
+
_st(_st(anIRAssignment)._instructions())._do_((function(each){
|
1305
|
+
return smalltalk.withContext(function($ctx2) {
|
1306
|
+
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
1307
|
+
_st(anIRAssignment)._replaceWith_(inlinedAssignment);
|
1308
|
+
_st(self)._inlineSend_(_st(_st(inlinedAssignment)._instructions())._last());
|
1309
|
+
$1=inlinedAssignment;
|
1310
|
+
return $1;
|
1311
|
+
}, function($ctx1) {$ctx1.fill(self,"inlineAssignment:",{anIRAssignment:anIRAssignment,inlinedAssignment:inlinedAssignment}, smalltalk.IRAssignmentInliner)})},
|
1295
1312
|
args: ["anIRAssignment"],
|
1296
1313
|
source: "inlineAssignment: anIRAssignment\x0a\x09| inlinedAssignment |\x0a\x09self assignment: anIRAssignment.\x0a\x09inlinedAssignment := IRInlinedAssignment new.\x0a\x09anIRAssignment instructions do: [ :each |\x0a\x09\x09inlinedAssignment add: each ].\x0a\x09anIRAssignment replaceWith: inlinedAssignment.\x0a\x09self inlineSend: inlinedAssignment instructions last.\x0a\x09^ inlinedAssignment",
|
1297
1314
|
messageSends: ["assignment:", "new", "do:", "add:", "instructions", "replaceWith:", "inlineSend:", "last"],
|
@@ -1306,23 +1323,25 @@ selector: "inlineClosure:",
|
|
1306
1323
|
category: 'inlining',
|
1307
1324
|
fn: function (anIRClosure){
|
1308
1325
|
var self=this;
|
1309
|
-
var
|
1310
|
-
|
1311
|
-
|
1312
|
-
inlinedClosure
|
1313
|
-
statements
|
1314
|
-
|
1315
|
-
|
1316
|
-
if(smalltalk.assert($
|
1317
|
-
$
|
1318
|
-
|
1319
|
-
|
1320
|
-
$
|
1321
|
-
return
|
1326
|
+
var inlinedClosure,statements;
|
1327
|
+
return smalltalk.withContext(function($ctx1) {
|
1328
|
+
inlinedClosure=smalltalk.IRSendInliner.fn.prototype._inlineClosure_.apply(_st(self), [anIRClosure]);
|
1329
|
+
statements=_st(_st(_st(inlinedClosure)._instructions())._last())._instructions();
|
1330
|
+
$1=statements;
|
1331
|
+
$2=(function(){
|
1332
|
+
return smalltalk.withContext(function($ctx2) {
|
1333
|
+
if(smalltalk.assert($3)){
|
1334
|
+
$4=_st((smalltalk.IRAssignment || IRAssignment))._new();
|
1335
|
+
_st($4)._add_(_st(_st(_st(self)._assignment())._instructions())._first());
|
1336
|
+
_st($4)._add_(_st(_st(statements)._last())._copy());
|
1337
|
+
$5=_st($4)._yourself();
|
1338
|
+
return _st(_st(statements)._last())._replaceWith_($5);
|
1322
1339
|
};
|
1323
|
-
})
|
1324
|
-
|
1325
|
-
|
1340
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
|
1341
|
+
_st($1)._ifNotEmpty_($2);
|
1342
|
+
$6=inlinedClosure;
|
1343
|
+
return $6;
|
1344
|
+
}, function($ctx1) {$ctx1.fill(self,"inlineClosure:",{anIRClosure:anIRClosure,inlinedClosure:inlinedClosure,statements:statements}, smalltalk.IRAssignmentInliner)})},
|
1326
1345
|
args: ["anIRClosure"],
|
1327
1346
|
source: "inlineClosure: anIRClosure\x0a\x09| inlinedClosure statements |\x0a\x0a\x09inlinedClosure := super inlineClosure: anIRClosure.\x0a\x09statements := inlinedClosure instructions last instructions.\x0a\x09\x0a\x09statements ifNotEmpty: [\x0a\x09\x09statements last canBeAssigned ifTrue: [\x0a\x09\x09\x09statements last replaceWith: (IRAssignment new\x0a\x09\x09\x09\x09add: self assignment instructions first;\x0a\x09\x09\x09\x09add: statements last copy;\x0a\x09\x09\x09\x09yourself) ] ].\x0a\x0a\x09^ inlinedClosure",
|
1328
1347
|
messageSends: ["inlineClosure:", "instructions", "last", "ifNotEmpty:", "ifTrue:", "replaceWith:", "add:", "first", "assignment", "new", "copy", "yourself", "canBeAssigned"],
|
@@ -1340,10 +1359,10 @@ selector: "inlineClosure:",
|
|
1340
1359
|
category: 'inlining',
|
1341
1360
|
fn: function (anIRClosure){
|
1342
1361
|
var self=this;
|
1343
|
-
|
1344
|
-
$1=smalltalk.
|
1362
|
+
return smalltalk.withContext(function($ctx1) {
|
1363
|
+
$1=smalltalk.IRSendInliner.fn.prototype._inlineCLosure_.apply(_st(self), [anIRClosure]);
|
1345
1364
|
return $1;
|
1346
|
-
},
|
1365
|
+
}, function($ctx1) {$ctx1.fill(self,"inlineClosure:",{anIRClosure:anIRClosure}, smalltalk.IRNonLocalReturnInliner)})},
|
1347
1366
|
args: ["anIRClosure"],
|
1348
1367
|
source: "inlineClosure: anIRClosure\x0a\x09\x22| inlinedClosure statements |\x0a\x0a\x09inlinedClosure := super inlineClosure: anIRClosure.\x0a\x09statements := inlinedClosure instructions last instructions.\x0a\x09\x0a\x09statements ifNotEmpty: [\x0a\x09\x09statements last replaceWith: (IRNonLocalReturn new\x0a\x09\x09\x09add: statements last copy;\x0a\x09\x09\x09yourself) ].\x0a\x0a\x09^ inlinedClosure\x22\x0a\x0a\x09^ super inlineCLosure: anIRClosure",
|
1349
1368
|
messageSends: ["inlineCLosure:"],
|
@@ -1358,10 +1377,10 @@ selector: "inlinedReturn",
|
|
1358
1377
|
category: 'factory',
|
1359
1378
|
fn: function (){
|
1360
1379
|
var self=this;
|
1361
|
-
|
1362
|
-
$1=
|
1380
|
+
return smalltalk.withContext(function($ctx1) {
|
1381
|
+
$1=_st((smalltalk.IRInlinedNonLocalReturn || IRInlinedNonLocalReturn))._new();
|
1363
1382
|
return $1;
|
1364
|
-
},
|
1383
|
+
}, function($ctx1) {$ctx1.fill(self,"inlinedReturn",{}, smalltalk.IRNonLocalReturnInliner)})},
|
1365
1384
|
args: [],
|
1366
1385
|
source: "inlinedReturn\x0a\x09^ IRInlinedNonLocalReturn new",
|
1367
1386
|
messageSends: ["new"],
|
@@ -1380,22 +1399,24 @@ selector: "inlineClosure:",
|
|
1380
1399
|
category: 'inlining',
|
1381
1400
|
fn: function (anIRClosure){
|
1382
1401
|
var self=this;
|
1383
|
-
var
|
1384
|
-
|
1385
|
-
|
1386
|
-
closure
|
1387
|
-
statements
|
1388
|
-
|
1389
|
-
|
1390
|
-
if(! smalltalk.assert($
|
1391
|
-
$
|
1392
|
-
|
1393
|
-
$
|
1394
|
-
return
|
1402
|
+
var closure,statements;
|
1403
|
+
return smalltalk.withContext(function($ctx1) {
|
1404
|
+
closure=smalltalk.IRSendInliner.fn.prototype._inlineClosure_.apply(_st(self), [anIRClosure]);
|
1405
|
+
statements=_st(_st(_st(closure)._instructions())._last())._instructions();
|
1406
|
+
$1=statements;
|
1407
|
+
$2=(function(){
|
1408
|
+
return smalltalk.withContext(function($ctx2) {
|
1409
|
+
if(! smalltalk.assert($3)){
|
1410
|
+
$4=_st((smalltalk.IRReturn || IRReturn))._new();
|
1411
|
+
_st($4)._add_(_st(_st(statements)._last())._copy());
|
1412
|
+
$5=_st($4)._yourself();
|
1413
|
+
return _st(_st(statements)._last())._replaceWith_($5);
|
1395
1414
|
};
|
1396
|
-
})
|
1397
|
-
|
1398
|
-
|
1415
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
|
1416
|
+
_st($1)._ifNotEmpty_($2);
|
1417
|
+
$6=closure;
|
1418
|
+
return $6;
|
1419
|
+
}, function($ctx1) {$ctx1.fill(self,"inlineClosure:",{anIRClosure:anIRClosure,closure:closure,statements:statements}, smalltalk.IRReturnInliner)})},
|
1399
1420
|
args: ["anIRClosure"],
|
1400
1421
|
source: "inlineClosure: anIRClosure\x0a\x09| closure statements |\x0a\x0a\x09closure := super inlineClosure: anIRClosure.\x0a\x09statements := closure instructions last instructions.\x0a\x09\x0a\x09statements ifNotEmpty: [\x0a\x09\x09statements last isReturn\x0a\x09\x09\x09ifFalse: [ statements last replaceWith: (IRReturn new\x0a\x09\x09\x09\x09add: statements last copy;\x0a\x09\x09\x09\x09yourself)] ].\x0a\x0a\x09^ closure",
|
1401
1422
|
messageSends: ["inlineClosure:", "instructions", "last", "ifNotEmpty:", "ifFalse:", "replaceWith:", "add:", "copy", "new", "yourself", "isReturn"],
|
@@ -1411,14 +1432,16 @@ category: 'inlining',
|
|
1411
1432
|
fn: function (anIRReturn){
|
1412
1433
|
var self=this;
|
1413
1434
|
var return_;
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1435
|
+
return smalltalk.withContext(function($ctx1) {
|
1436
|
+
return_=_st(self)._inlinedReturn();
|
1437
|
+
_st(_st(anIRReturn)._instructions())._do_((function(each){
|
1438
|
+
return smalltalk.withContext(function($ctx2) {
|
1439
|
+
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
1440
|
+
_st(anIRReturn)._replaceWith_(return_);
|
1441
|
+
_st(self)._inlineSend_(_st(_st(return_)._instructions())._last());
|
1442
|
+
$1=return_;
|
1443
|
+
return $1;
|
1444
|
+
}, function($ctx1) {$ctx1.fill(self,"inlineReturn:",{anIRReturn:anIRReturn,return_:return_}, smalltalk.IRReturnInliner)})},
|
1422
1445
|
args: ["anIRReturn"],
|
1423
1446
|
source: "inlineReturn: anIRReturn\x0a\x09| return |\x0a\x09return := self inlinedReturn.\x0a\x09anIRReturn instructions do: [ :each |\x0a\x09\x09return add: each ].\x0a\x09anIRReturn replaceWith: return.\x0a\x09self inlineSend: return instructions last.\x0a\x09^ return",
|
1424
1447
|
messageSends: ["inlinedReturn", "do:", "add:", "instructions", "replaceWith:", "inlineSend:", "last"],
|
@@ -1433,10 +1456,10 @@ selector: "inlinedReturn",
|
|
1433
1456
|
category: 'factory',
|
1434
1457
|
fn: function (){
|
1435
1458
|
var self=this;
|
1436
|
-
|
1437
|
-
$1=
|
1459
|
+
return smalltalk.withContext(function($ctx1) {
|
1460
|
+
$1=_st((smalltalk.IRInlinedReturn || IRInlinedReturn))._new();
|
1438
1461
|
return $1;
|
1439
|
-
},
|
1462
|
+
}, function($ctx1) {$ctx1.fill(self,"inlinedReturn",{}, smalltalk.IRReturnInliner)})},
|
1440
1463
|
args: [],
|
1441
1464
|
source: "inlinedReturn\x0a\x09^ IRInlinedReturn new",
|
1442
1465
|
messageSends: ["new"],
|
@@ -1455,18 +1478,17 @@ selector: "compileNode:",
|
|
1455
1478
|
category: 'compiling',
|
1456
1479
|
fn: function (aNode){
|
1457
1480
|
var self=this;
|
1458
|
-
var
|
1459
|
-
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
$2
|
1465
|
-
|
1466
|
-
$3=smalltalk.send($2,"_contents",[]);
|
1481
|
+
var ir,stream;
|
1482
|
+
return smalltalk.withContext(function($ctx1) {
|
1483
|
+
_st(_st(self)._semanticAnalyzer())._visit_(aNode);
|
1484
|
+
ir=_st(_st(self)._translator())._visit_(aNode);
|
1485
|
+
_st(_st(self)._inliner())._visit_(ir);
|
1486
|
+
$2=_st(self)._irTranslator();
|
1487
|
+
_st($2)._visit_(ir);
|
1488
|
+
$3=_st($2)._contents();
|
1467
1489
|
$1=$3;
|
1468
1490
|
return $1;
|
1469
|
-
},
|
1491
|
+
}, function($ctx1) {$ctx1.fill(self,"compileNode:",{aNode:aNode,ir:ir,stream:stream}, smalltalk.InliningCodeGenerator)})},
|
1470
1492
|
args: ["aNode"],
|
1471
1493
|
source: "compileNode: aNode\x0a\x09| ir stream |\x0a\x0a\x09self semanticAnalyzer visit: aNode.\x0a\x09ir := self translator visit: aNode.\x0a\x09self inliner visit: ir.\x0a\x0a\x09^ self irTranslator\x0a\x09\x09visit: ir;\x0a\x09\x09contents",
|
1472
1494
|
messageSends: ["visit:", "semanticAnalyzer", "translator", "inliner", "irTranslator", "contents"],
|
@@ -1481,10 +1503,10 @@ selector: "inliner",
|
|
1481
1503
|
category: 'compiling',
|
1482
1504
|
fn: function (){
|
1483
1505
|
var self=this;
|
1484
|
-
|
1485
|
-
$1=
|
1506
|
+
return smalltalk.withContext(function($ctx1) {
|
1507
|
+
$1=_st((smalltalk.IRInliner || IRInliner))._new();
|
1486
1508
|
return $1;
|
1487
|
-
},
|
1509
|
+
}, function($ctx1) {$ctx1.fill(self,"inliner",{}, smalltalk.InliningCodeGenerator)})},
|
1488
1510
|
args: [],
|
1489
1511
|
source: "inliner\x0a\x09^ IRInliner new",
|
1490
1512
|
messageSends: ["new"],
|
@@ -1499,10 +1521,10 @@ selector: "irTranslator",
|
|
1499
1521
|
category: 'compiling',
|
1500
1522
|
fn: function (){
|
1501
1523
|
var self=this;
|
1502
|
-
|
1503
|
-
$1=
|
1524
|
+
return smalltalk.withContext(function($ctx1) {
|
1525
|
+
$1=_st((smalltalk.IRInliningJSTranslator || IRInliningJSTranslator))._new();
|
1504
1526
|
return $1;
|
1505
|
-
},
|
1527
|
+
}, function($ctx1) {$ctx1.fill(self,"irTranslator",{}, smalltalk.InliningCodeGenerator)})},
|
1506
1528
|
args: [],
|
1507
1529
|
source: "irTranslator\x0a\x09^ IRInliningJSTranslator new",
|
1508
1530
|
messageSends: ["new"],
|