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 #ifndef V8_COMPILER_INSTRUCTION_H_ | 5 #ifndef V8_COMPILER_INSTRUCTION_H_ |
6 #define V8_COMPILER_INSTRUCTION_H_ | 6 #define V8_COMPILER_INSTRUCTION_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 #include <map> | 10 #include <map> |
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 typedef ZoneDeque<Instruction*> InstructionDeque; | 837 typedef ZoneDeque<Instruction*> InstructionDeque; |
838 typedef ZoneDeque<PointerMap*> PointerMapDeque; | 838 typedef ZoneDeque<PointerMap*> PointerMapDeque; |
839 typedef ZoneVector<FrameStateDescriptor*> DeoptimizationVector; | 839 typedef ZoneVector<FrameStateDescriptor*> DeoptimizationVector; |
840 typedef ZoneVector<InstructionBlock*> InstructionBlocks; | 840 typedef ZoneVector<InstructionBlock*> InstructionBlocks; |
841 | 841 |
842 // Represents architecture-specific generated code before, during, and after | 842 // Represents architecture-specific generated code before, during, and after |
843 // register allocation. | 843 // register allocation. |
844 // TODO(titzer): s/IsDouble/IsFloat64/ | 844 // TODO(titzer): s/IsDouble/IsFloat64/ |
845 class InstructionSequence FINAL { | 845 class InstructionSequence FINAL { |
846 public: | 846 public: |
847 InstructionSequence(Linkage* linkage, const Graph* graph, | 847 InstructionSequence(Zone* zone, Linkage* linkage, const Graph* graph, |
848 const Schedule* schedule); | 848 const Schedule* schedule); |
849 | 849 |
850 int NextVirtualRegister() { return next_virtual_register_++; } | 850 int NextVirtualRegister() { return next_virtual_register_++; } |
851 int VirtualRegisterCount() const { return next_virtual_register_; } | 851 int VirtualRegisterCount() const { return next_virtual_register_; } |
852 | 852 |
853 int node_count() const { return node_count_; } | 853 int node_count() const { return node_count_; } |
854 | 854 |
855 int BasicBlockCount() const { | 855 int BasicBlockCount() const { |
856 return static_cast<int>(instruction_blocks_.size()); | 856 return static_cast<int>(instruction_blocks_.size()); |
857 } | 857 } |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
978 DeoptimizationVector deoptimization_entries_; | 978 DeoptimizationVector deoptimization_entries_; |
979 }; | 979 }; |
980 | 980 |
981 std::ostream& operator<<(std::ostream& os, const InstructionSequence& code); | 981 std::ostream& operator<<(std::ostream& os, const InstructionSequence& code); |
982 | 982 |
983 } // namespace compiler | 983 } // namespace compiler |
984 } // namespace internal | 984 } // namespace internal |
985 } // namespace v8 | 985 } // namespace v8 |
986 | 986 |
987 #endif // V8_COMPILER_INSTRUCTION_H_ | 987 #endif // V8_COMPILER_INSTRUCTION_H_ |
OLD | NEW |