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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 int assigned_reg = op->index(); | 718 int assigned_reg = op->index(); |
719 if (op->IsDoubleRegister()) { | 719 if (op->IsDoubleRegister()) { |
720 os_ << " \"" << DoubleRegister::AllocationIndexToString(assigned_reg) | 720 os_ << " \"" << DoubleRegister::AllocationIndexToString(assigned_reg) |
721 << "\""; | 721 << "\""; |
722 } else { | 722 } else { |
723 DCHECK(op->IsRegister()); | 723 DCHECK(op->IsRegister()); |
724 os_ << " \"" << Register::AllocationIndexToString(assigned_reg) << "\""; | 724 os_ << " \"" << Register::AllocationIndexToString(assigned_reg) << "\""; |
725 } | 725 } |
726 } else if (range->IsSpilled()) { | 726 } else if (range->IsSpilled()) { |
727 int index = -1; | 727 int index = -1; |
728 if (range->TopLevel()->GetSpillRange() != nullptr) { | 728 if (range->TopLevel()->HasSpillRange()) { |
729 index = kMaxInt; // This hasn't been set yet. | 729 index = kMaxInt; // This hasn't been set yet. |
730 } else { | 730 } else { |
731 index = range->TopLevel()->GetSpillOperand()->index(); | 731 index = range->TopLevel()->GetSpillOperand()->index(); |
732 } | 732 } |
733 if (range->TopLevel()->Kind() == DOUBLE_REGISTERS) { | 733 if (range->TopLevel()->Kind() == DOUBLE_REGISTERS) { |
734 os_ << " \"double_stack:" << index << "\""; | 734 os_ << " \"double_stack:" << index << "\""; |
735 } else if (range->TopLevel()->Kind() == GENERAL_REGISTERS) { | 735 } else if (range->TopLevel()->Kind() == GENERAL_REGISTERS) { |
736 os_ << " \"stack:" << index << "\""; | 736 os_ << " \"stack:" << index << "\""; |
737 } else { | 737 } else { |
738 os_ << " \"const(nostack):" << index << "\""; | 738 os_ << " \"const(nostack):" << index << "\""; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
823 os << "#" << SafeId(i) << ":" << SafeMnemonic(i); | 823 os << "#" << SafeId(i) << ":" << SafeMnemonic(i); |
824 } | 824 } |
825 os << ")" << std::endl; | 825 os << ")" << std::endl; |
826 } | 826 } |
827 } | 827 } |
828 return os; | 828 return os; |
829 } | 829 } |
830 } | 830 } |
831 } | 831 } |
832 } // namespace v8::internal::compiler | 832 } // namespace v8::internal::compiler |
OLD | NEW |