Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Unified Diff: src/compiler/mips/code-generator-mips.cc

Issue 1216933011: [turbofan] Enable tail calls for %_CallFunction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix platform ports Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/linkage.cc ('k') | src/compiler/mips/instruction-selector-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/mips/code-generator-mips.cc
diff --git a/src/compiler/mips/code-generator-mips.cc b/src/compiler/mips/code-generator-mips.cc
index a7806ccae236c2ee0e83399386915b1480f9d299..4d87f2c2434c331db521d7b71e07db2d80bf6fc0 100644
--- a/src/compiler/mips/code-generator-mips.cc
+++ b/src/compiler/mips/code-generator-mips.cc
@@ -399,10 +399,6 @@ void CodeGenerator::AssembleDeconstructActivationRecord() {
int stack_slots = frame()->GetSpillSlotCount();
if (descriptor->IsJSFunctionCall() || stack_slots > 0) {
__ LeaveFrame(StackFrame::MANUAL);
- int pop_count = descriptor->IsJSFunctionCall()
- ? static_cast<int>(descriptor->JSParameterCount())
- : 0;
- __ Drop(pop_count);
}
}
@@ -1157,8 +1153,14 @@ void CodeGenerator::AssembleReturn() {
__ Pop(ra, fp);
int pop_count = descriptor->IsJSFunctionCall()
? static_cast<int>(descriptor->JSParameterCount())
- : 0;
- __ DropAndRet(pop_count);
+ : (info()->IsStub()
+ ? info()->code_stub()->GetStackParameterCount()
+ : 0);
+ if (pop_count != 0) {
+ __ DropAndRet(pop_count);
+ } else {
+ __ Ret();
+ }
}
} else {
__ Ret();
« no previous file with comments | « src/compiler/linkage.cc ('k') | src/compiler/mips/instruction-selector-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698