| 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 <iosfwd> | 8 #include <iosfwd> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 class RpoNumber FINAL { | 54 class RpoNumber FINAL { |
| 55 public: | 55 public: |
| 56 int ToInt() const { | 56 int ToInt() const { |
| 57 DCHECK(IsValid()); | 57 DCHECK(IsValid()); |
| 58 return index_; | 58 return index_; |
| 59 } | 59 } |
| 60 size_t ToSize() const { | 60 size_t ToSize() const { |
| 61 DCHECK(IsValid()); | 61 DCHECK(IsValid()); |
| 62 return static_cast<size_t>(index_); | 62 return static_cast<size_t>(index_); |
| 63 } | 63 } |
| 64 bool IsValid() const { return index_ != kInvalidRpoNumber; } | 64 bool IsValid() const { return index_ >= 0; } |
| 65 static RpoNumber FromInt(int index) { return RpoNumber(index); } | 65 static RpoNumber FromInt(int index) { return RpoNumber(index); } |
| 66 static RpoNumber Invalid() { return RpoNumber(kInvalidRpoNumber); } | 66 static RpoNumber Invalid() { return RpoNumber(kInvalidRpoNumber); } |
| 67 | 67 |
| 68 bool IsNext(const RpoNumber other) const { | 68 bool IsNext(const RpoNumber other) const { |
| 69 DCHECK(IsValid()); | 69 DCHECK(IsValid()); |
| 70 return other.index_ == this->index_ + 1; | 70 return other.index_ == this->index_ + 1; |
| 71 } | 71 } |
| 72 | 72 |
| 73 bool operator==(RpoNumber other) const { | 73 bool operator==(RpoNumber other) const { |
| 74 return this->index_ == other.index_; | 74 return this->index_ == other.index_; |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 DISALLOW_COPY_AND_ASSIGN(Schedule); | 283 DISALLOW_COPY_AND_ASSIGN(Schedule); |
| 284 }; | 284 }; |
| 285 | 285 |
| 286 std::ostream& operator<<(std::ostream& os, const Schedule& s); | 286 std::ostream& operator<<(std::ostream& os, const Schedule& s); |
| 287 | 287 |
| 288 } // namespace compiler | 288 } // namespace compiler |
| 289 } // namespace internal | 289 } // namespace internal |
| 290 } // namespace v8 | 290 } // namespace v8 |
| 291 | 291 |
| 292 #endif // V8_COMPILER_SCHEDULE_H_ | 292 #endif // V8_COMPILER_SCHEDULE_H_ |
| OLD | NEW |