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

Unified Diff: src/compiler/instruction-selector.cc

Issue 2121753002: [turbofan] Robustify tail parameter stack size computations (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix windows build Created 4 years, 5 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 | « no previous file | src/compiler/linkage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-selector.cc
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc
index 91af86bb20a7e2156fbb8eb922fbbd1014f1d650..4186844c57d63c37f491962093e8130f3c555706 100644
--- a/src/compiler/instruction-selector.cc
+++ b/src/compiler/instruction-selector.cc
@@ -1754,11 +1754,10 @@ void InstructionSelector::VisitTailCall(Node* node) {
CallDescriptor const* descriptor = CallDescriptorOf(node->op());
DCHECK_NE(0, descriptor->flags() & CallDescriptor::kSupportsTailCalls);
- // TODO(turbofan): Relax restriction for stack parameters.
-
- int stack_param_delta = 0;
- if (linkage()->GetIncomingDescriptor()->CanTailCall(node,
- &stack_param_delta)) {
+ CallDescriptor* caller = linkage()->GetIncomingDescriptor();
+ if (caller->CanTailCall(node)) {
+ const CallDescriptor* callee = CallDescriptorOf(node->op());
+ int stack_param_delta = callee->GetStackParameterDelta(caller);
CallBuffer buffer(zone(), descriptor, nullptr);
// Compute InstructionOperands for inputs and outputs.
« no previous file with comments | « no previous file | src/compiler/linkage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698