| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/common-operator.h" | 5 #include "src/compiler/common-operator.h" |
| 6 | 6 |
| 7 #include "src/assembler.h" | 7 #include "src/assembler.h" |
| 8 #include "src/base/lazy-instance.h" | 8 #include "src/base/lazy-instance.h" |
| 9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
| 10 #include "src/compiler/opcodes.h" | 10 #include "src/compiler/opcodes.h" |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 | 434 |
| 435 const Operator* CommonOperatorBuilder::IfValue(int32_t index) { | 435 const Operator* CommonOperatorBuilder::IfValue(int32_t index) { |
| 436 return new (zone()) Operator1<int32_t>( // -- | 436 return new (zone()) Operator1<int32_t>( // -- |
| 437 IrOpcode::kIfValue, Operator::kKontrol, // opcode | 437 IrOpcode::kIfValue, Operator::kKontrol, // opcode |
| 438 "IfValue", // name | 438 "IfValue", // name |
| 439 0, 0, 1, 0, 0, 1, // counts | 439 0, 0, 1, 0, 0, 1, // counts |
| 440 index); // parameter | 440 index); // parameter |
| 441 } | 441 } |
| 442 | 442 |
| 443 | 443 |
| 444 const Operator* CommonOperatorBuilder::Start(int num_formal_parameters) { | 444 const Operator* CommonOperatorBuilder::Start(int value_output_count) { |
| 445 // Outputs are formal parameters, plus context, receiver, and JSFunction. | |
| 446 const int value_output_count = num_formal_parameters + 3; | |
| 447 return new (zone()) Operator( // -- | 445 return new (zone()) Operator( // -- |
| 448 IrOpcode::kStart, Operator::kFoldable, // opcode | 446 IrOpcode::kStart, Operator::kFoldable, // opcode |
| 449 "Start", // name | 447 "Start", // name |
| 450 0, 0, 0, value_output_count, 1, 1); // counts | 448 0, 0, 0, value_output_count, 1, 1); // counts |
| 451 } | 449 } |
| 452 | 450 |
| 453 | 451 |
| 454 const Operator* CommonOperatorBuilder::Loop(int control_input_count) { | 452 const Operator* CommonOperatorBuilder::Loop(int control_input_count) { |
| 455 switch (control_input_count) { | 453 switch (control_input_count) { |
| 456 #define CACHED_LOOP(input_count) \ | 454 #define CACHED_LOOP(input_count) \ |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 CommonOperatorBuilder::CreateFrameStateFunctionInfo( | 777 CommonOperatorBuilder::CreateFrameStateFunctionInfo( |
| 780 FrameStateType type, int parameter_count, int local_count, | 778 FrameStateType type, int parameter_count, int local_count, |
| 781 Handle<SharedFunctionInfo> shared_info) { | 779 Handle<SharedFunctionInfo> shared_info) { |
| 782 return new (zone()->New(sizeof(FrameStateFunctionInfo))) | 780 return new (zone()->New(sizeof(FrameStateFunctionInfo))) |
| 783 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info); | 781 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info); |
| 784 } | 782 } |
| 785 | 783 |
| 786 } // namespace compiler | 784 } // namespace compiler |
| 787 } // namespace internal | 785 } // namespace internal |
| 788 } // namespace v8 | 786 } // namespace v8 |
| OLD | NEW |