OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_LIVE_RANGE_BUILDER_H_ | 5 #ifndef V8_LIVE_RANGE_BUILDER_H_ |
6 #define V8_LIVE_RANGE_BUILDER_H_ | 6 #define V8_LIVE_RANGE_BUILDER_H_ |
7 | 7 |
8 #include "src/compiler/register-allocator.h" | 8 #include "src/compiler/register-allocator.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 22 matching lines...) Expand all Loading... |
33 uses_.insert(pos); | 33 uses_.insert(pos); |
34 return *this; | 34 return *this; |
35 } | 35 } |
36 | 36 |
37 TopLevelLiveRange* Build(int start, int end) { | 37 TopLevelLiveRange* Build(int start, int end) { |
38 return Add(start, end).Build(); | 38 return Add(start, end).Build(); |
39 } | 39 } |
40 | 40 |
41 TopLevelLiveRange* Build() { | 41 TopLevelLiveRange* Build() { |
42 TopLevelLiveRange* range = | 42 TopLevelLiveRange* range = |
43 new (zone_) TopLevelLiveRange(id_, MachineType::kRepTagged); | 43 new (zone_) TopLevelLiveRange(id_, MachineRepresentation::kTagged); |
44 // Traverse the provided interval specifications backwards, because that is | 44 // Traverse the provided interval specifications backwards, because that is |
45 // what LiveRange expects. | 45 // what LiveRange expects. |
46 for (int i = static_cast<int>(pairs_.size()) - 1; i >= 0; --i) { | 46 for (int i = static_cast<int>(pairs_.size()) - 1; i >= 0; --i) { |
47 Interval pair = pairs_[i]; | 47 Interval pair = pairs_[i]; |
48 LifetimePosition start = LifetimePosition::FromInt(pair.first); | 48 LifetimePosition start = LifetimePosition::FromInt(pair.first); |
49 LifetimePosition end = LifetimePosition::FromInt(pair.second); | 49 LifetimePosition end = LifetimePosition::FromInt(pair.second); |
50 CHECK(start < end); | 50 CHECK(start < end); |
51 range->AddUseInterval(start, end, zone_); | 51 range->AddUseInterval(start, end, zone_); |
52 } | 52 } |
53 for (int pos : uses_) { | 53 for (int pos : uses_) { |
(...skipping 15 matching lines...) Expand all Loading... |
69 std::set<int> uses_; | 69 std::set<int> uses_; |
70 Zone* zone_; | 70 Zone* zone_; |
71 }; | 71 }; |
72 | 72 |
73 | 73 |
74 } // namespace compiler | 74 } // namespace compiler |
75 } // namespace internal | 75 } // namespace internal |
76 } // namespace v8 | 76 } // namespace v8 |
77 | 77 |
78 #endif // V8_LIVE_RANGE_BUILDER_H_ | 78 #endif // V8_LIVE_RANGE_BUILDER_H_ |
OLD | NEW |