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

Unified Diff: src/compiler/js-intrinsic-lowering.cc

Issue 1439613003: [turbofan] Better and more sane support for tail calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Skip test in ignition configuration 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
« no previous file with comments | « src/compiler/js-intrinsic-lowering.h ('k') | src/compiler/linkage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-intrinsic-lowering.cc
diff --git a/src/compiler/js-intrinsic-lowering.cc b/src/compiler/js-intrinsic-lowering.cc
index e377ba2b122a3b88ae77f6fda13a79fb890549c7..0779dd780ba3b230a52cefa9d95cbe71ab7e720d 100644
--- a/src/compiler/js-intrinsic-lowering.cc
+++ b/src/compiler/js-intrinsic-lowering.cc
@@ -114,6 +114,8 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) {
return ReduceThrowNotDateError(node);
case Runtime::kInlineCall:
return ReduceCall(node);
+ case Runtime::kInlineTailCall:
+ return ReduceTailCall(node);
default:
break;
}
@@ -652,6 +654,16 @@ Reduction JSIntrinsicLowering::ReduceCall(Node* node) {
NodeProperties::ChangeOp(
node, javascript()->CallFunction(arity, STRICT, VectorSlotPair(),
ConvertReceiverMode::kAny,
+ TailCallMode::kDisallow));
+ return Changed(node);
+}
+
+
+Reduction JSIntrinsicLowering::ReduceTailCall(Node* node) {
+ size_t const arity = CallRuntimeParametersOf(node->op()).arity();
+ NodeProperties::ChangeOp(
+ node, javascript()->CallFunction(arity, STRICT, VectorSlotPair(),
+ ConvertReceiverMode::kAny,
TailCallMode::kAllow));
return Changed(node);
}
« no previous file with comments | « src/compiler/js-intrinsic-lowering.h ('k') | src/compiler/linkage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698