Browse Source

Slipped during "extract direct #instructions usage".

Herbert Vojčík 7 years ago
parent
commit
f8a4437d51
2 changed files with 10 additions and 5 deletions
  1. 9 4
      src/Compiler-Inlining.js
  2. 1 1
      src/Compiler-Inlining.st

+ 9 - 4
src/Compiler-Inlining.js

@@ -592,12 +592,17 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var $1;
+var $3,$2,$1;
 $1=$recv($recv($recv(anIRReturn)._isInlined())._not())._and_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return $recv($recv($recv($recv(anIRReturn)._instructions())._single())._isSend())._and_((function(){
+$3=$recv(anIRReturn)._expression();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx2.sendIdx["expression"]=1;
+//>>excludeEnd("ctx");
+$2=$recv($3)._isSend();
+return $recv($2)._and_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx3) {
 //>>excludeEnd("ctx");
@@ -620,10 +625,10 @@ return $1;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anIRReturn"],
-source: "shouldInlineReturn: anIRReturn\x0a\x09^ anIRReturn isInlined not and: [\x0a\x09\x09anIRReturn instructions single isSend and: [\x0a\x09\x09\x09self shouldInlineSend: anIRReturn expression ]]",
+source: "shouldInlineReturn: anIRReturn\x0a\x09^ anIRReturn isInlined not and: [\x0a\x09\x09anIRReturn expression isSend and: [\x0a\x09\x09\x09self shouldInlineSend: anIRReturn expression ]]",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["and:", "not", "isInlined", "isSend", "single", "instructions", "shouldInlineSend:", "expression"]
+messageSends: ["and:", "not", "isInlined", "isSend", "expression", "shouldInlineSend:"]
 }),
 $globals.IRInliner);
 

+ 1 - 1
src/Compiler-Inlining.st

@@ -200,7 +200,7 @@ shouldInlineAssignment: anIRAssignment
 
 shouldInlineReturn: anIRReturn
 	^ anIRReturn isInlined not and: [
-		anIRReturn instructions single isSend and: [
+		anIRReturn expression isSend and: [
 			self shouldInlineSend: anIRReturn expression ]]
 !