| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/graph-visualizer.h" | 5 #include "src/compiler/graph-visualizer.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 parent_index = range->parent()->id(); | 749 parent_index = range->parent()->id(); |
| 750 } else { | 750 } else { |
| 751 parent_index = range->id(); | 751 parent_index = range->id(); |
| 752 } | 752 } |
| 753 InstructionOperand* op = range->FirstHint(); | 753 InstructionOperand* op = range->FirstHint(); |
| 754 int hint_index = -1; | 754 int hint_index = -1; |
| 755 if (op != NULL && op->IsUnallocated()) { | 755 if (op != NULL && op->IsUnallocated()) { |
| 756 hint_index = UnallocatedOperand::cast(op)->virtual_register(); | 756 hint_index = UnallocatedOperand::cast(op)->virtual_register(); |
| 757 } | 757 } |
| 758 os_ << " " << parent_index << " " << hint_index; | 758 os_ << " " << parent_index << " " << hint_index; |
| 759 UseInterval* cur_interval = range->first_interval(); | 759 for (auto interval = range->first_interval(); interval != nullptr; |
| 760 while (cur_interval != NULL && range->Covers(cur_interval->start())) { | 760 interval = interval->next()) { |
| 761 os_ << " [" << cur_interval->start().Value() << ", " | 761 os_ << " [" << interval->start().Value() << ", " |
| 762 << cur_interval->end().Value() << "["; | 762 << interval->end().Value() << "["; |
| 763 cur_interval = cur_interval->next(); | |
| 764 } | 763 } |
| 765 | 764 |
| 766 UsePosition* current_pos = range->first_pos(); | 765 UsePosition* current_pos = range->first_pos(); |
| 767 while (current_pos != NULL) { | 766 while (current_pos != NULL) { |
| 768 if (current_pos->RegisterIsBeneficial() || FLAG_trace_all_uses) { | 767 if (current_pos->RegisterIsBeneficial() || FLAG_trace_all_uses) { |
| 769 os_ << " " << current_pos->pos().Value() << " M"; | 768 os_ << " " << current_pos->pos().Value() << " M"; |
| 770 } | 769 } |
| 771 current_pos = current_pos->next(); | 770 current_pos = current_pos->next(); |
| 772 } | 771 } |
| 773 | 772 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 830 os << "#" << SafeId(i) << ":" << SafeMnemonic(i); | 829 os << "#" << SafeId(i) << ":" << SafeMnemonic(i); |
| 831 } | 830 } |
| 832 os << ")" << std::endl; | 831 os << ")" << std::endl; |
| 833 } | 832 } |
| 834 } | 833 } |
| 835 return os; | 834 return os; |
| 836 } | 835 } |
| 837 } | 836 } |
| 838 } | 837 } |
| 839 } // namespace v8::internal::compiler | 838 } // namespace v8::internal::compiler |
| OLD | NEW |