| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_SCHEDULE_H_ | 5 #ifndef V8_COMPILER_SCHEDULE_H_ |
| 6 #define V8_COMPILER_SCHEDULE_H_ | 6 #define V8_COMPILER_SCHEDULE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "src/v8.h" | 10 #include "src/v8.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 DCHECK(code_end_ >= code_start_); | 85 DCHECK(code_end_ >= code_start_); |
| 86 return code_end_ - 1; | 86 return code_end_ - 1; |
| 87 } | 87 } |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 OStream& operator<<(OStream& os, const BasicBlockData::Control& c); | 90 OStream& operator<<(OStream& os, const BasicBlockData::Control& c); |
| 91 | 91 |
| 92 // A basic block contains an ordered list of nodes and ends with a control | 92 // A basic block contains an ordered list of nodes and ends with a control |
| 93 // node. Note that if a basic block has phis, then all phis must appear as the | 93 // node. Note that if a basic block has phis, then all phis must appear as the |
| 94 // first nodes in the block. | 94 // first nodes in the block. |
| 95 class BasicBlock V8_FINAL : public GenericNode<BasicBlockData, BasicBlock> { | 95 class BasicBlock FINAL : public GenericNode<BasicBlockData, BasicBlock> { |
| 96 public: | 96 public: |
| 97 BasicBlock(GenericGraphBase* graph, int input_count) | 97 BasicBlock(GenericGraphBase* graph, int input_count) |
| 98 : GenericNode<BasicBlockData, BasicBlock>(graph, input_count) {} | 98 : GenericNode<BasicBlockData, BasicBlock>(graph, input_count) {} |
| 99 | 99 |
| 100 typedef Uses Successors; | 100 typedef Uses Successors; |
| 101 typedef Inputs Predecessors; | 101 typedef Inputs Predecessors; |
| 102 | 102 |
| 103 Successors successors() { return static_cast<Successors>(uses()); } | 103 Successors successors() { return static_cast<Successors>(uses()); } |
| 104 Predecessors predecessors() { return static_cast<Predecessors>(inputs()); } | 104 Predecessors predecessors() { return static_cast<Predecessors>(inputs()); } |
| 105 | 105 |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 BasicBlockVector nodeid_to_block_; // Map from node to containing block. | 297 BasicBlockVector nodeid_to_block_; // Map from node to containing block. |
| 298 BasicBlockVector rpo_order_; // Reverse-post-order block list. | 298 BasicBlockVector rpo_order_; // Reverse-post-order block list. |
| 299 }; | 299 }; |
| 300 | 300 |
| 301 OStream& operator<<(OStream& os, const Schedule& s); | 301 OStream& operator<<(OStream& os, const Schedule& s); |
| 302 } | 302 } |
| 303 } | 303 } |
| 304 } // namespace v8::internal::compiler | 304 } // namespace v8::internal::compiler |
| 305 | 305 |
| 306 #endif // V8_COMPILER_SCHEDULE_H_ | 306 #endif // V8_COMPILER_SCHEDULE_H_ |
| OLD | NEW |