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

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

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. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/coalesced-live-ranges.h ('k') | src/compiler/code-generator.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 #include "src/compiler/coalesced-live-ranges.h" 5 #include "src/compiler/coalesced-live-ranges.h"
6 #include "src/compiler/greedy-allocator.h" 6 #include "src/compiler/greedy-allocator.h"
7 #include "src/compiler/register-allocator.h" 7 #include "src/compiler/register-allocator.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
11 namespace compiler { 11 namespace compiler {
12 12
13 13
14 LiveRangeConflictIterator::LiveRangeConflictIterator(const LiveRange* range, 14 LiveRangeConflictIterator::LiveRangeConflictIterator(const LiveRange* range,
15 IntervalStore* storage) 15 IntervalStore* storage)
16 : query_(range->first_interval()), 16 : query_(range->first_interval()),
17 pos_(storage->end()), 17 pos_(storage->end()),
18 intervals_(storage) { 18 intervals_(storage) {
19 MovePosAndQueryToFirstConflict(); 19 MovePosAndQueryToFirstConflict();
20 } 20 }
21 21
22 22
23 LiveRange* LiveRangeConflictIterator::Current() const { 23 LiveRange* LiveRangeConflictIterator::Current() const {
24 if (IsFinished()) return nullptr; 24 if (IsFinished()) return nullptr;
25 return pos_->range_; 25 return pos_->range_;
26 } 26 }
27 27
28 28
29 void LiveRangeConflictIterator::MovePosToFirstConflictForQuery() { 29 void LiveRangeConflictIterator::MovePosToFirstConflictForQuery() {
30 DCHECK(query_ != nullptr); 30 DCHECK_NOT_NULL(query_);
31 auto end = intervals_->end(); 31 auto end = intervals_->end();
32 LifetimePosition q_start = query_->start(); 32 LifetimePosition q_start = query_->start();
33 LifetimePosition q_end = query_->end(); 33 LifetimePosition q_end = query_->end();
34 34
35 if (intervals_->empty() || intervals_->rbegin()->end_ <= q_start || 35 if (intervals_->empty() || intervals_->rbegin()->end_ <= q_start ||
36 intervals_->begin()->start_ >= q_end) { 36 intervals_->begin()->start_ >= q_end) {
37 pos_ = end; 37 pos_ = end;
38 return; 38 return;
39 } 39 }
40 40
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } 134 }
135 last_end = i.end_; 135 last_end = i.end_;
136 } 136 }
137 return true; 137 return true;
138 } 138 }
139 139
140 140
141 } // namespace compiler 141 } // namespace compiler
142 } // namespace internal 142 } // namespace internal
143 } // namespace v8 143 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/coalesced-live-ranges.h ('k') | src/compiler/code-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698