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 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 } | 704 } |
705 | 705 |
706 for (auto range : data->live_ranges()) { | 706 for (auto range : data->live_ranges()) { |
707 PrintLiveRangeChain(range, "object"); | 707 PrintLiveRangeChain(range, "object"); |
708 } | 708 } |
709 } | 709 } |
710 | 710 |
711 | 711 |
712 void GraphC1Visualizer::PrintLiveRangeChain(TopLevelLiveRange* range, | 712 void GraphC1Visualizer::PrintLiveRangeChain(TopLevelLiveRange* range, |
713 const char* type) { | 713 const char* type) { |
| 714 if (range == nullptr || range->IsEmpty()) return; |
714 int vreg = range->vreg(); | 715 int vreg = range->vreg(); |
715 for (LiveRange* child = range; child != nullptr; child = child->next()) { | 716 for (LiveRange* child = range; child != nullptr; child = child->next()) { |
716 PrintLiveRange(child, type, vreg); | 717 PrintLiveRange(child, type, vreg); |
717 } | 718 } |
718 } | 719 } |
719 | 720 |
720 | 721 |
721 void GraphC1Visualizer::PrintLiveRange(LiveRange* range, const char* type, | 722 void GraphC1Visualizer::PrintLiveRange(LiveRange* range, const char* type, |
722 int vreg) { | 723 int vreg) { |
723 if (range != NULL && !range->IsEmpty()) { | 724 if (range != NULL && !range->IsEmpty()) { |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 os << "#" << SafeId(i) << ":" << SafeMnemonic(i); | 827 os << "#" << SafeId(i) << ":" << SafeMnemonic(i); |
827 } | 828 } |
828 os << ")" << std::endl; | 829 os << ")" << std::endl; |
829 } | 830 } |
830 } | 831 } |
831 return os; | 832 return os; |
832 } | 833 } |
833 } // namespace compiler | 834 } // namespace compiler |
834 } // namespace internal | 835 } // namespace internal |
835 } // namespace v8 | 836 } // namespace v8 |
OLD | NEW |