Browse Source

Saner return from inlineSend:andReplace:.

Herbert Vojčík 7 năm trước cách đây
mục cha
commit
3658cd1936

+ 2 - 3
src/Compiler-Inlining.js

@@ -1566,15 +1566,14 @@ var self=this;
 return $core.withContext(function($ctx1) {
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 //>>excludeEnd("ctx");
 $recv(anIRInstruction)._replaceWith_(anIRSend);
 $recv(anIRInstruction)._replaceWith_(anIRSend);
-self._inlineSend_(anIRSend);
-return anIRSend;
+return self._inlineSend_(anIRSend);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"inlineSend:andReplace:",{anIRSend:anIRSend,anIRInstruction:anIRInstruction},$globals.IRSendInliner)});
 }, function($ctx1) {$ctx1.fill(self,"inlineSend:andReplace:",{anIRSend:anIRSend,anIRInstruction:anIRInstruction},$globals.IRSendInliner)});
 //>>excludeEnd("ctx");
 //>>excludeEnd("ctx");
 },
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anIRSend", "anIRInstruction"],
 args: ["anIRSend", "anIRInstruction"],
-source: "inlineSend: anIRSend andReplace: anIRInstruction\x0a\x09anIRInstruction replaceWith: anIRSend.\x0a\x09self inlineSend: anIRSend.\x0a\x09^ anIRSend",
+source: "inlineSend: anIRSend andReplace: anIRInstruction\x0a\x09anIRInstruction replaceWith: anIRSend.\x0a\x09^ self inlineSend: anIRSend",
 referencedClasses: [],
 referencedClasses: [],
 //>>excludeEnd("ide");
 //>>excludeEnd("ide");
 messageSends: ["replaceWith:", "inlineSend:"]
 messageSends: ["replaceWith:", "inlineSend:"]

+ 1 - 2
src/Compiler-Inlining.st

@@ -404,8 +404,7 @@ inlineSend: anIRSend
 
 
 inlineSend: anIRSend andReplace: anIRInstruction
 inlineSend: anIRSend andReplace: anIRInstruction
 	anIRInstruction replaceWith: anIRSend.
 	anIRInstruction replaceWith: anIRSend.
-	self inlineSend: anIRSend.
-	^ anIRSend
+	^ self inlineSend: anIRSend
 !
 !
 
 
 inlinedSend: inlinedSend withBlock: anIRInstruction
 inlinedSend: inlinedSend withBlock: anIRInstruction