|
@@ -665,7 +665,43 @@ $globals.IRInliner);
|
|
|
|
|
|
$core.addMethod(
|
|
|
$core.method({
|
|
|
-selector: "transformNonLocalReturn:",
|
|
|
+selector: "visitIRAssignment:",
|
|
|
+protocol: 'visiting',
|
|
|
+fn: function (anIRAssignment){
|
|
|
+var self=this;
|
|
|
+
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+
|
|
|
+var $1;
|
|
|
+$1=self._shouldInlineAssignment_(anIRAssignment);
|
|
|
+if($core.assert($1)){
|
|
|
+return $recv(self._assignmentInliner())._inlineAssignment_(anIRAssignment);
|
|
|
+} else {
|
|
|
+return (
|
|
|
+
|
|
|
+$ctx1.supercall = true,
|
|
|
+
|
|
|
+($globals.IRInliner.superclass||$boot.nilAsClass).fn.prototype._visitIRAssignment_.apply($recv(self), [anIRAssignment]));
|
|
|
+
|
|
|
+$ctx1.supercall = false;
|
|
|
+
|
|
|
+};
|
|
|
+
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"visitIRAssignment:",{anIRAssignment:anIRAssignment},$globals.IRInliner)});
|
|
|
+
|
|
|
+},
|
|
|
+
|
|
|
+args: ["anIRAssignment"],
|
|
|
+source: "visitIRAssignment: anIRAssignment\x0a\x09^ (self shouldInlineAssignment: anIRAssignment)\x0a\x09\x09ifTrue: [ self assignmentInliner inlineAssignment: anIRAssignment ]\x0a\x09\x09ifFalse: [ super visitIRAssignment: anIRAssignment ]",
|
|
|
+referencedClasses: [],
|
|
|
+
|
|
|
+messageSends: ["ifTrue:ifFalse:", "shouldInlineAssignment:", "inlineAssignment:", "assignmentInliner", "visitIRAssignment:"]
|
|
|
+}),
|
|
|
+$globals.IRInliner);
|
|
|
+
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "visitIRNonLocalReturn:",
|
|
|
protocol: 'visiting',
|
|
|
fn: function (anIRNonLocalReturn){
|
|
|
var self=this;
|
|
@@ -716,77 +752,18 @@ $ctx1.supercall = false;
|
|
|
|
|
|
return $7;
|
|
|
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"transformNonLocalReturn:",{anIRNonLocalReturn:anIRNonLocalReturn,localReturn:localReturn},$globals.IRInliner)});
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"visitIRNonLocalReturn:",{anIRNonLocalReturn:anIRNonLocalReturn,localReturn:localReturn},$globals.IRInliner)});
|
|
|
|
|
|
},
|
|
|
|
|
|
args: ["anIRNonLocalReturn"],
|
|
|
-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",
|
|
|
+source: "visitIRNonLocalReturn: anIRNonLocalReturn\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",
|
|
|
referencedClasses: ["IRReturn"],
|
|
|
|
|
|
messageSends: ["ifTrue:", "canInlineNonLocalReturns", "scope", "removeNonLocalReturn:", "methodScope", "scope:", "new", "yourself", "do:", "instructions", "add:", "replaceWith:", "visitIRNonLocalReturn:"]
|
|
|
}),
|
|
|
$globals.IRInliner);
|
|
|
|
|
|
-$core.addMethod(
|
|
|
-$core.method({
|
|
|
-selector: "visitIRAssignment:",
|
|
|
-protocol: 'visiting',
|
|
|
-fn: function (anIRAssignment){
|
|
|
-var self=this;
|
|
|
-
|
|
|
-return $core.withContext(function($ctx1) {
|
|
|
-
|
|
|
-var $1;
|
|
|
-$1=self._shouldInlineAssignment_(anIRAssignment);
|
|
|
-if($core.assert($1)){
|
|
|
-return $recv(self._assignmentInliner())._inlineAssignment_(anIRAssignment);
|
|
|
-} else {
|
|
|
-return (
|
|
|
-
|
|
|
-$ctx1.supercall = true,
|
|
|
-
|
|
|
-($globals.IRInliner.superclass||$boot.nilAsClass).fn.prototype._visitIRAssignment_.apply($recv(self), [anIRAssignment]));
|
|
|
-
|
|
|
-$ctx1.supercall = false;
|
|
|
-
|
|
|
-};
|
|
|
-
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"visitIRAssignment:",{anIRAssignment:anIRAssignment},$globals.IRInliner)});
|
|
|
-
|
|
|
-},
|
|
|
-
|
|
|
-args: ["anIRAssignment"],
|
|
|
-source: "visitIRAssignment: anIRAssignment\x0a\x09^ (self shouldInlineAssignment: anIRAssignment)\x0a\x09\x09ifTrue: [ self assignmentInliner inlineAssignment: anIRAssignment ]\x0a\x09\x09ifFalse: [ super visitIRAssignment: anIRAssignment ]",
|
|
|
-referencedClasses: [],
|
|
|
-
|
|
|
-messageSends: ["ifTrue:ifFalse:", "shouldInlineAssignment:", "inlineAssignment:", "assignmentInliner", "visitIRAssignment:"]
|
|
|
-}),
|
|
|
-$globals.IRInliner);
|
|
|
-
|
|
|
-$core.addMethod(
|
|
|
-$core.method({
|
|
|
-selector: "visitIRNonLocalReturn:",
|
|
|
-protocol: 'visiting',
|
|
|
-fn: function (anIRNonLocalReturn){
|
|
|
-var self=this;
|
|
|
-
|
|
|
-return $core.withContext(function($ctx1) {
|
|
|
-
|
|
|
-return self._transformNonLocalReturn_(anIRNonLocalReturn);
|
|
|
-
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"visitIRNonLocalReturn:",{anIRNonLocalReturn:anIRNonLocalReturn},$globals.IRInliner)});
|
|
|
-
|
|
|
-},
|
|
|
-
|
|
|
-args: ["anIRNonLocalReturn"],
|
|
|
-source: "visitIRNonLocalReturn: anIRNonLocalReturn\x0a\x09^ self transformNonLocalReturn: anIRNonLocalReturn",
|
|
|
-referencedClasses: [],
|
|
|
-
|
|
|
-messageSends: ["transformNonLocalReturn:"]
|
|
|
-}),
|
|
|
-$globals.IRInliner);
|
|
|
-
|
|
|
$core.addMethod(
|
|
|
$core.method({
|
|
|
selector: "visitIRReturn:",
|