Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: test/unittests/compiler/live-range-builder.h

Issue 1513543003: [turbofan] Make MachineType a pair of enums. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moar rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « test/unittests/compiler/linkage-tail-call-unittest.cc ('k') | test/unittests/compiler/live-range-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698