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

Side by Side Diff: src/compiler/bytecode-graph-builder.cc

Issue 2541113004: [Ignition/turbo] Add a NewWithSpread bytecode. (Closed)
Patch Set: Add todo Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/bytecode-graph-builder.h" 5 #include "src/compiler/bytecode-graph-builder.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/compilation-info.h" 9 #include "src/compilation-info.h"
10 #include "src/compiler/compiler-source-position-table.h" 10 #include "src/compiler/compiler-source-position-table.h"
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1324 interpreter::Register first_return = 1324 interpreter::Register first_return =
1325 bytecode_iterator().GetRegisterOperand(3); 1325 bytecode_iterator().GetRegisterOperand(3);
1326 1326
1327 // Create node to perform the runtime call. 1327 // Create node to perform the runtime call.
1328 const Operator* call = javascript()->CallRuntime(functionId, arg_count); 1328 const Operator* call = javascript()->CallRuntime(functionId, arg_count);
1329 Node* return_pair = ProcessCallRuntimeArguments(call, first_arg, arg_count); 1329 Node* return_pair = ProcessCallRuntimeArguments(call, first_arg, arg_count);
1330 environment()->BindRegistersToProjections(first_return, return_pair, 1330 environment()->BindRegistersToProjections(first_return, return_pair,
1331 Environment::kAttachFrameState); 1331 Environment::kAttachFrameState);
1332 } 1332 }
1333 1333
1334 void BytecodeGraphBuilder::VisitNewWithSpread() {
1335 PrepareEagerCheckpoint();
1336 interpreter::Register first_arg = bytecode_iterator().GetRegisterOperand(0);
1337 size_t arg_count = bytecode_iterator().GetRegisterCountOperand(1);
1338
1339 const Operator* call =
1340 javascript()->CallRuntime(Runtime::kNewWithSpread, arg_count);
1341 Node* value = ProcessCallRuntimeArguments(call, first_arg, arg_count);
1342 environment()->BindAccumulator(value, Environment::kAttachFrameState);
1343 }
1344
1334 void BytecodeGraphBuilder::VisitInvokeIntrinsic() { 1345 void BytecodeGraphBuilder::VisitInvokeIntrinsic() {
1335 PrepareEagerCheckpoint(); 1346 PrepareEagerCheckpoint();
1336 Runtime::FunctionId functionId = bytecode_iterator().GetIntrinsicIdOperand(0); 1347 Runtime::FunctionId functionId = bytecode_iterator().GetIntrinsicIdOperand(0);
1337 interpreter::Register first_arg = bytecode_iterator().GetRegisterOperand(1); 1348 interpreter::Register first_arg = bytecode_iterator().GetRegisterOperand(1);
1338 size_t arg_count = bytecode_iterator().GetRegisterCountOperand(2); 1349 size_t arg_count = bytecode_iterator().GetRegisterCountOperand(2);
1339 1350
1340 // Create node to perform the runtime call. Turbofan will take care of the 1351 // Create node to perform the runtime call. Turbofan will take care of the
1341 // lowering. 1352 // lowering.
1342 const Operator* call = javascript()->CallRuntime(functionId, arg_count); 1353 const Operator* call = javascript()->CallRuntime(functionId, arg_count);
1343 Node* value = ProcessCallRuntimeArguments(call, first_arg, arg_count); 1354 Node* value = ProcessCallRuntimeArguments(call, first_arg, arg_count);
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
2200 it->source_position().ScriptOffset(), start_position_.InliningId())); 2211 it->source_position().ScriptOffset(), start_position_.InliningId()));
2201 it->Advance(); 2212 it->Advance();
2202 } else { 2213 } else {
2203 DCHECK_GT(it->code_offset(), offset); 2214 DCHECK_GT(it->code_offset(), offset);
2204 } 2215 }
2205 } 2216 }
2206 2217
2207 } // namespace compiler 2218 } // namespace compiler
2208 } // namespace internal 2219 } // namespace internal
2209 } // namespace v8 2220 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698