| OLD | NEW |
| 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 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1330 Node* return_pair = ProcessCallRuntimeArguments(call, first_arg, arg_count); | 1330 Node* return_pair = ProcessCallRuntimeArguments(call, first_arg, arg_count); |
| 1331 environment()->BindRegistersToProjections(first_return, return_pair, | 1331 environment()->BindRegistersToProjections(first_return, return_pair, |
| 1332 Environment::kAttachFrameState); | 1332 Environment::kAttachFrameState); |
| 1333 } | 1333 } |
| 1334 | 1334 |
| 1335 void BytecodeGraphBuilder::VisitNewWithSpread() { | 1335 void BytecodeGraphBuilder::VisitNewWithSpread() { |
| 1336 PrepareEagerCheckpoint(); | 1336 PrepareEagerCheckpoint(); |
| 1337 interpreter::Register first_arg = bytecode_iterator().GetRegisterOperand(0); | 1337 interpreter::Register first_arg = bytecode_iterator().GetRegisterOperand(0); |
| 1338 size_t arg_count = bytecode_iterator().GetRegisterCountOperand(1); | 1338 size_t arg_count = bytecode_iterator().GetRegisterCountOperand(1); |
| 1339 | 1339 |
| 1340 const Operator* call = | 1340 const Operator* op = |
| 1341 javascript()->CallRuntime(Runtime::kNewWithSpread, arg_count); | 1341 javascript()->CallConstructWithSpread(static_cast<int>(arg_count)); |
| 1342 Node* value = ProcessCallRuntimeArguments(call, first_arg, arg_count); | 1342 Node* value = ProcessCallRuntimeArguments(op, first_arg, arg_count); |
| 1343 environment()->BindAccumulator(value, Environment::kAttachFrameState); | 1343 environment()->BindAccumulator(value, Environment::kAttachFrameState); |
| 1344 } | 1344 } |
| 1345 | 1345 |
| 1346 void BytecodeGraphBuilder::VisitInvokeIntrinsic() { | 1346 void BytecodeGraphBuilder::VisitInvokeIntrinsic() { |
| 1347 PrepareEagerCheckpoint(); | 1347 PrepareEagerCheckpoint(); |
| 1348 Runtime::FunctionId functionId = bytecode_iterator().GetIntrinsicIdOperand(0); | 1348 Runtime::FunctionId functionId = bytecode_iterator().GetIntrinsicIdOperand(0); |
| 1349 interpreter::Register first_arg = bytecode_iterator().GetRegisterOperand(1); | 1349 interpreter::Register first_arg = bytecode_iterator().GetRegisterOperand(1); |
| 1350 size_t arg_count = bytecode_iterator().GetRegisterCountOperand(2); | 1350 size_t arg_count = bytecode_iterator().GetRegisterCountOperand(2); |
| 1351 | 1351 |
| 1352 // Create node to perform the runtime call. Turbofan will take care of the | 1352 // Create node to perform the runtime call. Turbofan will take care of the |
| (...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2233 it->source_position().ScriptOffset(), start_position_.InliningId())); | 2233 it->source_position().ScriptOffset(), start_position_.InliningId())); |
| 2234 it->Advance(); | 2234 it->Advance(); |
| 2235 } else { | 2235 } else { |
| 2236 DCHECK_GT(it->code_offset(), offset); | 2236 DCHECK_GT(it->code_offset(), offset); |
| 2237 } | 2237 } |
| 2238 } | 2238 } |
| 2239 | 2239 |
| 2240 } // namespace compiler | 2240 } // namespace compiler |
| 2241 } // namespace internal | 2241 } // namespace internal |
| 2242 } // namespace v8 | 2242 } // namespace v8 |
| OLD | NEW |