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/js-generic-lowering.cc

Issue 2655233002: [turbofan] Introduce JSCallForwardVarargs operator. (Closed)
Patch Set: Fix formatting. Created 3 years, 11 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/js-call-reducer.cc ('k') | src/compiler/js-operator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-generic-lowering.cc
diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc
index ac59440c8d02988d1e407b68717a03c71add6f02..a5446d005b0dc218f26b9f4807a970a66b04fd6c 100644
--- a/src/compiler/js-generic-lowering.cc
+++ b/src/compiler/js-generic-lowering.cc
@@ -530,6 +530,22 @@ void JSGenericLowering::LowerJSCallConstructWithSpread(Node* node) {
NodeProperties::ChangeOp(node, common()->Call(desc));
}
+void JSGenericLowering::LowerJSCallForwardVarargs(Node* node) {
+ CallForwardVarargsParameters p = CallForwardVarargsParametersOf(node->op());
+ Callable callable = CodeFactory::CallForwardVarargs(isolate());
+ CallDescriptor::Flags flags = FrameStateFlagForCall(node);
+ if (p.tail_call_mode() == TailCallMode::kAllow) {
+ flags |= CallDescriptor::kSupportsTailCalls;
+ }
+ CallDescriptor* desc = Linkage::GetStubCallDescriptor(
+ isolate(), zone(), callable.descriptor(), 1, flags);
+ Node* stub_code = jsgraph()->HeapConstant(callable.code());
+ Node* start_index = jsgraph()->Uint32Constant(p.start_index());
+ node->InsertInput(zone(), 0, stub_code);
+ node->InsertInput(zone(), 2, start_index);
+ NodeProperties::ChangeOp(node, common()->Call(desc));
+}
+
void JSGenericLowering::LowerJSCallFunction(Node* node) {
CallFunctionParameters const& p = CallFunctionParametersOf(node->op());
int const arg_count = static_cast<int>(p.arity() - 2);
« no previous file with comments | « src/compiler/js-call-reducer.cc ('k') | src/compiler/js-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698