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

Unified Diff: src/compiler/bytecode-graph-builder.cc

Issue 2649143002: [Turbofan] Implement call with spread bytecode in assembly code. (Closed)
Patch Set: Rename PushArgsMode to InterpreterPushArgsMode 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/code-factory.cc ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/bytecode-graph-builder.cc
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
index 5a596e2f45c612a47bc3b14b367a2dad94f6968c..a60c4dfdc49cb4911bb1c7c0140ca9b253280f65 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -1275,11 +1275,14 @@ void BytecodeGraphBuilder::VisitCall() {
void BytecodeGraphBuilder::VisitCallWithSpread() {
PrepareEagerCheckpoint();
- interpreter::Register first_arg = bytecode_iterator().GetRegisterOperand(0);
- size_t arg_count = bytecode_iterator().GetRegisterCountOperand(1);
- const Operator* op =
- javascript()->CallFunctionWithSpread(static_cast<int>(arg_count));
- Node* value = ProcessCallRuntimeArguments(op, first_arg, arg_count);
+ Node* callee =
+ environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
+ interpreter::Register receiver = bytecode_iterator().GetRegisterOperand(1);
+ size_t arg_count = bytecode_iterator().GetRegisterCountOperand(2);
+ const Operator* call =
+ javascript()->CallFunctionWithSpread(static_cast<int>(arg_count + 1));
+
+ Node* value = ProcessCallArguments(call, callee, receiver, arg_count + 1);
environment()->BindAccumulator(value, Environment::kAttachFrameState);
}
« no previous file with comments | « src/code-factory.cc ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698