| 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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 | 350 |
| 351 UseInterval* after = nullptr; | 351 UseInterval* after = nullptr; |
| 352 while (current != nullptr) { | 352 while (current != nullptr) { |
| 353 if (current->Contains(position)) { | 353 if (current->Contains(position)) { |
| 354 after = current->SplitAt(position, zone); | 354 after = current->SplitAt(position, zone); |
| 355 break; | 355 break; |
| 356 } | 356 } |
| 357 auto next = current->next(); | 357 auto next = current->next(); |
| 358 if (next->start() >= position) { | 358 if (next->start() >= position) { |
| 359 split_at_start = (next->start() == position); | 359 split_at_start = (next->start() == position); |
| 360 after = next; |
| 361 current->set_next(nullptr); |
| 360 break; | 362 break; |
| 361 } | 363 } |
| 362 current = next; | 364 current = next; |
| 363 } | 365 } |
| 364 | 366 |
| 365 // Partition original use intervals to the two live ranges. | 367 // Partition original use intervals to the two live ranges. |
| 366 auto before = current; | 368 auto before = current; |
| 367 if (after == nullptr) after = before->next(); | |
| 368 result->last_interval_ = | 369 result->last_interval_ = |
| 369 (last_interval_ == before) | 370 (last_interval_ == before) |
| 370 ? after // Only interval in the range after split. | 371 ? after // Only interval in the range after split. |
| 371 : last_interval_; // Last interval of the original range. | 372 : last_interval_; // Last interval of the original range. |
| 372 result->first_interval_ = after; | 373 result->first_interval_ = after; |
| 373 last_interval_ = before; | 374 last_interval_ = before; |
| 374 | 375 |
| 375 // Find the last use position before the split and the first use | 376 // Find the last use position before the split and the first use |
| 376 // position after it. | 377 // position after it. |
| 377 auto use_after = first_pos_; | 378 auto use_after = first_pos_; |
| (...skipping 2463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2841 auto eliminate = moves->PrepareInsertAfter(move); | 2842 auto eliminate = moves->PrepareInsertAfter(move); |
| 2842 to_insert.push_back(move); | 2843 to_insert.push_back(move); |
| 2843 if (eliminate != nullptr) to_eliminate.push_back(eliminate); | 2844 if (eliminate != nullptr) to_eliminate.push_back(eliminate); |
| 2844 } | 2845 } |
| 2845 } | 2846 } |
| 2846 | 2847 |
| 2847 | 2848 |
| 2848 } // namespace compiler | 2849 } // namespace compiler |
| 2849 } // namespace internal | 2850 } // namespace internal |
| 2850 } // namespace v8 | 2851 } // namespace v8 |
| OLD | NEW |