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

Unified Diff: src/compiler/linkage.cc

Issue 1455833004: [turbofan]: Implement tail calls with more callee than caller parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove stray change Created 5 years, 1 month 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
Index: src/compiler/linkage.cc
diff --git a/src/compiler/linkage.cc b/src/compiler/linkage.cc
index f7eb3b8b4ceb657fe010a049911f0d423758ecfc..e1a1f56d29dc0d7c4b6cd2090f23360876140600 100644
--- a/src/compiler/linkage.cc
+++ b/src/compiler/linkage.cc
@@ -91,10 +91,7 @@ bool CallDescriptor::HasSameReturnLocationsAs(
bool CallDescriptor::CanTailCall(const Node* node,
int* stack_param_delta) const {
- // TODO(danno): TF only current supports tail calls where the number of stack
- // parameters of the callee is the same or fewer of the caller.
CallDescriptor const* other = OpParameter<CallDescriptor const*>(node);
- if (!HasSameReturnLocationsAs(other)) return false;
size_t current_input = 0;
size_t other_input = 0;
*stack_param_delta = 0;
@@ -118,7 +115,7 @@ bool CallDescriptor::CanTailCall(const Node* node,
++current_input;
++other_input;
}
- return *stack_param_delta <= 0;
+ return HasSameReturnLocationsAs(OpParameter<CallDescriptor const*>(node));
}

Powered by Google App Engine
This is Rietveld 408576698