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

Side by Side Diff: src/compiler/register-allocator.h

Issue 1219063017: [turbofan] Unit tests for live range conflicts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 months 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 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_REGISTER_ALLOCATOR_H_ 5 #ifndef V8_REGISTER_ALLOCATOR_H_
6 #define V8_REGISTER_ALLOCATOR_H_ 6 #define V8_REGISTER_ALLOCATOR_H_
7 7
8 #include "src/compiler/instruction.h" 8 #include "src/compiler/instruction.h"
9 #include "src/ostreams.h" 9 #include "src/ostreams.h"
10 #include "src/zone-containers.h" 10 #include "src/zone-containers.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 134
135 static inline LifetimePosition Invalid() { return LifetimePosition(); } 135 static inline LifetimePosition Invalid() { return LifetimePosition(); }
136 136
137 static inline LifetimePosition MaxPosition() { 137 static inline LifetimePosition MaxPosition() {
138 // We have to use this kind of getter instead of static member due to 138 // We have to use this kind of getter instead of static member due to
139 // crash bug in GDB. 139 // crash bug in GDB.
140 return LifetimePosition(kMaxInt); 140 return LifetimePosition(kMaxInt);
141 } 141 }
142 142
143 static inline LifetimePosition FromInt(int value) {
144 return LifetimePosition(value);
145 }
146
143 private: 147 private:
144 static const int kHalfStep = 2; 148 static const int kHalfStep = 2;
145 static const int kStep = 2 * kHalfStep; 149 static const int kStep = 2 * kHalfStep;
146 150
147 // Code relies on kStep and kHalfStep being a power of two. 151 // Code relies on kStep and kHalfStep being a power of two.
148 STATIC_ASSERT(IS_POWER_OF_TWO(kHalfStep)); 152 STATIC_ASSERT(IS_POWER_OF_TWO(kHalfStep));
149 153
150 explicit LifetimePosition(int value) : value_(value) {} 154 explicit LifetimePosition(int value) : value_(value) {}
151 155
152 int value_; 156 int value_;
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 RegisterAllocationData* const data_; 940 RegisterAllocationData* const data_;
937 941
938 DISALLOW_COPY_AND_ASSIGN(LiveRangeConnector); 942 DISALLOW_COPY_AND_ASSIGN(LiveRangeConnector);
939 }; 943 };
940 944
941 } // namespace compiler 945 } // namespace compiler
942 } // namespace internal 946 } // namespace internal
943 } // namespace v8 947 } // namespace v8
944 948
945 #endif // V8_REGISTER_ALLOCATOR_H_ 949 #endif // V8_REGISTER_ALLOCATOR_H_
OLDNEW
« no previous file with comments | « src/compiler/greedy-allocator.cc ('k') | test/unittests/compiler/coalesced-live-ranges-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698