Chromium Code Reviews

Side by Side Diff: src/compiler/coalesced-live-ranges.h

Issue 1578723002: [turbofan] Build s/NULL/nullptr/g and CHECK(x != nullptr) to CHECK_NOT_NULL(x). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/compiler/coalesced-live-ranges.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_COALESCED_LIVE_RANGES_H_ 5 #ifndef V8_COALESCED_LIVE_RANGES_H_
6 #define V8_COALESCED_LIVE_RANGES_H_ 6 #define V8_COALESCED_LIVE_RANGES_H_
7 7
8 #include "src/compiler/register-allocator.h" 8 #include "src/compiler/register-allocator.h"
9 #include "src/zone-containers.h" 9 #include "src/zone-containers.h"
10 10
(...skipping 71 matching lines...)
82 return AllocatedInterval(pos, LifetimePosition::Invalid(), nullptr); 82 return AllocatedInterval(pos, LifetimePosition::Invalid(), nullptr);
83 } 83 }
84 84
85 // Intersection utilities. 85 // Intersection utilities.
86 static bool Intersects(LifetimePosition a_start, LifetimePosition a_end, 86 static bool Intersects(LifetimePosition a_start, LifetimePosition a_end,
87 LifetimePosition b_start, LifetimePosition b_end) { 87 LifetimePosition b_start, LifetimePosition b_end) {
88 return a_start < b_end && b_start < a_end; 88 return a_start < b_end && b_start < a_end;
89 } 89 }
90 90
91 bool QueryIntersectsAllocatedInterval() const { 91 bool QueryIntersectsAllocatedInterval() const {
92 DCHECK(query_ != nullptr); 92 DCHECK_NOT_NULL(query_);
93 return pos_ != intervals_->end() && 93 return pos_ != intervals_->end() &&
94 Intersects(query_->start(), query_->end(), pos_->start_, pos_->end_); 94 Intersects(query_->start(), query_->end(), pos_->start_, pos_->end_);
95 } 95 }
96 96
97 void Invalidate() { 97 void Invalidate() {
98 query_ = nullptr; 98 query_ = nullptr;
99 pos_ = intervals_->end(); 99 pos_ = intervals_->end();
100 } 100 }
101 101
102 const UseInterval* query_; 102 const UseInterval* query_;
(...skipping 46 matching lines...)
149 149
150 IntervalStore intervals_; 150 IntervalStore intervals_;
151 DISALLOW_COPY_AND_ASSIGN(CoalescedLiveRanges); 151 DISALLOW_COPY_AND_ASSIGN(CoalescedLiveRanges);
152 }; 152 };
153 153
154 154
155 } // namespace compiler 155 } // namespace compiler
156 } // namespace internal 156 } // namespace internal
157 } // namespace v8 157 } // namespace v8
158 #endif // V8_COALESCED_LIVE_RANGES_H_ 158 #endif // V8_COALESCED_LIVE_RANGES_H_
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/compiler/coalesced-live-ranges.cc » ('j') | no next file with comments »

Powered by Google App Engine