OLD | NEW |
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 #include "src/base/adapters.h" | 5 #include "src/base/adapters.h" |
6 #include "src/compiler/linkage.h" | 6 #include "src/compiler/linkage.h" |
7 #include "src/compiler/register-allocator.h" | 7 #include "src/compiler/register-allocator.h" |
8 #include "src/string-stream.h" | 8 #include "src/string-stream.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1107 first_interval_ = interval; | 1107 first_interval_ = interval; |
1108 last_interval_ = interval; | 1108 last_interval_ = interval; |
1109 } else { | 1109 } else { |
1110 if (end == first_interval_->start()) { | 1110 if (end == first_interval_->start()) { |
1111 first_interval_->set_start(start); | 1111 first_interval_->set_start(start); |
1112 } else if (end < first_interval_->start()) { | 1112 } else if (end < first_interval_->start()) { |
1113 UseInterval* interval = new (zone) UseInterval(start, end); | 1113 UseInterval* interval = new (zone) UseInterval(start, end); |
1114 interval->set_next(first_interval_); | 1114 interval->set_next(first_interval_); |
1115 first_interval_ = interval; | 1115 first_interval_ = interval; |
1116 } else { | 1116 } else { |
| 1117 // Order of instruction's processing (see ProcessInstructions) guarantees |
| 1118 // that each new use interval either precedes, intersects with or touches |
| 1119 // the last added interval. |
| 1120 DCHECK(start <= first_interval_->end()); |
1117 first_interval_->set_start(Min(start, first_interval_->start())); | 1121 first_interval_->set_start(Min(start, first_interval_->start())); |
1118 first_interval_->set_end(Max(end, first_interval_->end())); | 1122 first_interval_->set_end(Max(end, first_interval_->end())); |
1119 } | 1123 } |
1120 } | 1124 } |
1121 } | 1125 } |
1122 | 1126 |
1123 | 1127 |
1124 void TopLevelLiveRange::AddUsePosition(UsePosition* use_pos) { | 1128 void TopLevelLiveRange::AddUsePosition(UsePosition* use_pos) { |
1125 LifetimePosition pos = use_pos->pos(); | 1129 LifetimePosition pos = use_pos->pos(); |
1126 TRACE("Add to live range %d use position %d\n", vreg(), pos.value()); | 1130 TRACE("Add to live range %d use position %d\n", vreg(), pos.value()); |
(...skipping 2492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3619 } | 3623 } |
3620 } | 3624 } |
3621 } | 3625 } |
3622 } | 3626 } |
3623 } | 3627 } |
3624 | 3628 |
3625 | 3629 |
3626 } // namespace compiler | 3630 } // namespace compiler |
3627 } // namespace internal | 3631 } // namespace internal |
3628 } // namespace v8 | 3632 } // namespace v8 |
OLD | NEW |