| 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 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1268 Node* value = ProcessCallArguments(call, callee, receiver, arg_count + 1); | 1268 Node* value = ProcessCallArguments(call, callee, receiver, arg_count + 1); |
| 1269 environment()->BindAccumulator(value, Environment::kAttachFrameState); | 1269 environment()->BindAccumulator(value, Environment::kAttachFrameState); |
| 1270 } | 1270 } |
| 1271 | 1271 |
| 1272 void BytecodeGraphBuilder::VisitCall() { | 1272 void BytecodeGraphBuilder::VisitCall() { |
| 1273 BuildCall(TailCallMode::kDisallow, ConvertReceiverMode::kAny); | 1273 BuildCall(TailCallMode::kDisallow, ConvertReceiverMode::kAny); |
| 1274 } | 1274 } |
| 1275 | 1275 |
| 1276 void BytecodeGraphBuilder::VisitCallWithSpread() { | 1276 void BytecodeGraphBuilder::VisitCallWithSpread() { |
| 1277 PrepareEagerCheckpoint(); | 1277 PrepareEagerCheckpoint(); |
| 1278 interpreter::Register first_arg = bytecode_iterator().GetRegisterOperand(0); | 1278 Node* callee = |
| 1279 size_t arg_count = bytecode_iterator().GetRegisterCountOperand(1); | 1279 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
| 1280 const Operator* op = | 1280 interpreter::Register receiver = bytecode_iterator().GetRegisterOperand(1); |
| 1281 javascript()->CallFunctionWithSpread(static_cast<int>(arg_count)); | 1281 size_t arg_count = bytecode_iterator().GetRegisterCountOperand(2); |
| 1282 Node* value = ProcessCallRuntimeArguments(op, first_arg, arg_count); | 1282 const Operator* call = |
| 1283 javascript()->CallFunctionWithSpread(static_cast<int>(arg_count + 1)); |
| 1284 |
| 1285 Node* value = ProcessCallArguments(call, callee, receiver, arg_count + 1); |
| 1283 environment()->BindAccumulator(value, Environment::kAttachFrameState); | 1286 environment()->BindAccumulator(value, Environment::kAttachFrameState); |
| 1284 } | 1287 } |
| 1285 | 1288 |
| 1286 void BytecodeGraphBuilder::VisitCallProperty() { | 1289 void BytecodeGraphBuilder::VisitCallProperty() { |
| 1287 BuildCall(TailCallMode::kDisallow, ConvertReceiverMode::kNotNullOrUndefined); | 1290 BuildCall(TailCallMode::kDisallow, ConvertReceiverMode::kNotNullOrUndefined); |
| 1288 } | 1291 } |
| 1289 | 1292 |
| 1290 void BytecodeGraphBuilder::VisitTailCall() { | 1293 void BytecodeGraphBuilder::VisitTailCall() { |
| 1291 TailCallMode tail_call_mode = | 1294 TailCallMode tail_call_mode = |
| 1292 bytecode_array_->GetIsolate()->is_tail_call_elimination_enabled() | 1295 bytecode_array_->GetIsolate()->is_tail_call_elimination_enabled() |
| (...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2298 it->source_position().ScriptOffset(), start_position_.InliningId())); | 2301 it->source_position().ScriptOffset(), start_position_.InliningId())); |
| 2299 it->Advance(); | 2302 it->Advance(); |
| 2300 } else { | 2303 } else { |
| 2301 DCHECK_GT(it->code_offset(), offset); | 2304 DCHECK_GT(it->code_offset(), offset); |
| 2302 } | 2305 } |
| 2303 } | 2306 } |
| 2304 | 2307 |
| 2305 } // namespace compiler | 2308 } // namespace compiler |
| 2306 } // namespace internal | 2309 } // namespace internal |
| 2307 } // namespace v8 | 2310 } // namespace v8 |
| OLD | NEW |