| 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 #include "src/compiler/graph.h" | 6 #include "src/compiler/graph.h" |
| 7 #include "src/compiler/instruction.h" | 7 #include "src/compiler/instruction.h" |
| 8 #include "src/compiler/schedule.h" | 8 #include "src/compiler/schedule.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 } | 655 } |
| 656 | 656 |
| 657 | 657 |
| 658 void InstructionSequence::SetSourcePosition(const Instruction* instr, | 658 void InstructionSequence::SetSourcePosition(const Instruction* instr, |
| 659 SourcePosition value) { | 659 SourcePosition value) { |
| 660 source_positions_.insert(std::make_pair(instr, value)); | 660 source_positions_.insert(std::make_pair(instr, value)); |
| 661 } | 661 } |
| 662 | 662 |
| 663 | 663 |
| 664 FrameStateDescriptor::FrameStateDescriptor( | 664 FrameStateDescriptor::FrameStateDescriptor( |
| 665 Zone* zone, const FrameStateCallInfo& state_info, size_t parameters_count, | 665 Zone* zone, FrameStateType type, BailoutId bailout_id, |
| 666 OutputFrameStateCombine state_combine, size_t parameters_count, |
| 666 size_t locals_count, size_t stack_count, FrameStateDescriptor* outer_state) | 667 size_t locals_count, size_t stack_count, FrameStateDescriptor* outer_state) |
| 667 : type_(state_info.type()), | 668 : type_(type), |
| 668 bailout_id_(state_info.bailout_id()), | 669 bailout_id_(bailout_id), |
| 669 frame_state_combine_(state_info.state_combine()), | 670 frame_state_combine_(state_combine), |
| 670 parameters_count_(parameters_count), | 671 parameters_count_(parameters_count), |
| 671 locals_count_(locals_count), | 672 locals_count_(locals_count), |
| 672 stack_count_(stack_count), | 673 stack_count_(stack_count), |
| 673 types_(zone), | 674 types_(zone), |
| 674 outer_state_(outer_state), | 675 outer_state_(outer_state) { |
| 675 jsfunction_(state_info.jsfunction()) { | |
| 676 types_.resize(GetSize(), kMachNone); | 676 types_.resize(GetSize(), kMachNone); |
| 677 } | 677 } |
| 678 | 678 |
| 679 |
| 679 size_t FrameStateDescriptor::GetSize(OutputFrameStateCombine combine) const { | 680 size_t FrameStateDescriptor::GetSize(OutputFrameStateCombine combine) const { |
| 680 size_t size = parameters_count() + locals_count() + stack_count() + | 681 size_t size = 1 + parameters_count() + locals_count() + stack_count() + |
| 681 (HasContext() ? 1 : 0); | 682 (HasContext() ? 1 : 0); |
| 682 switch (combine.kind()) { | 683 switch (combine.kind()) { |
| 683 case OutputFrameStateCombine::kPushOutput: | 684 case OutputFrameStateCombine::kPushOutput: |
| 684 size += combine.GetPushCount(); | 685 size += combine.GetPushCount(); |
| 685 break; | 686 break; |
| 686 case OutputFrameStateCombine::kPokeAt: | 687 case OutputFrameStateCombine::kPokeAt: |
| 687 break; | 688 break; |
| 688 } | 689 } |
| 689 return size; | 690 return size; |
| 690 } | 691 } |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 798 os << " B" << succ.ToInt(); | 799 os << " B" << succ.ToInt(); |
| 799 } | 800 } |
| 800 os << "\n"; | 801 os << "\n"; |
| 801 } | 802 } |
| 802 return os; | 803 return os; |
| 803 } | 804 } |
| 804 | 805 |
| 805 } // namespace compiler | 806 } // namespace compiler |
| 806 } // namespace internal | 807 } // namespace internal |
| 807 } // namespace v8 | 808 } // namespace v8 |
| OLD | NEW |