| 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 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 if (range->HasRegisterAssigned()) { | 719 if (range->HasRegisterAssigned()) { |
| 720 AllocatedOperand op = AllocatedOperand::cast(range->GetAssignedOperand()); | 720 AllocatedOperand op = AllocatedOperand::cast(range->GetAssignedOperand()); |
| 721 int assigned_reg = op.index(); | 721 int assigned_reg = op.index(); |
| 722 if (op.IsDoubleRegister()) { | 722 if (op.IsDoubleRegister()) { |
| 723 os_ << " \"" << DoubleRegister::AllocationIndexToString(assigned_reg) | 723 os_ << " \"" << DoubleRegister::AllocationIndexToString(assigned_reg) |
| 724 << "\""; | 724 << "\""; |
| 725 } else { | 725 } else { |
| 726 DCHECK(op.IsRegister()); | 726 DCHECK(op.IsRegister()); |
| 727 os_ << " \"" << Register::AllocationIndexToString(assigned_reg) << "\""; | 727 os_ << " \"" << Register::AllocationIndexToString(assigned_reg) << "\""; |
| 728 } | 728 } |
| 729 } else if (range->IsSpilled()) { | 729 } else if (range->spilled()) { |
| 730 auto top = range->TopLevel(); | 730 auto top = range->TopLevel(); |
| 731 int index = -1; | 731 int index = -1; |
| 732 if (top->HasSpillRange()) { | 732 if (top->HasSpillRange()) { |
| 733 index = kMaxInt; // This hasn't been set yet. | 733 index = kMaxInt; // This hasn't been set yet. |
| 734 } else if (top->GetSpillOperand()->IsConstant()) { | 734 } else if (top->GetSpillOperand()->IsConstant()) { |
| 735 os_ << " \"const(nostack):" | 735 os_ << " \"const(nostack):" |
| 736 << ConstantOperand::cast(top->GetSpillOperand())->virtual_register() | 736 << ConstantOperand::cast(top->GetSpillOperand())->virtual_register() |
| 737 << "\""; | 737 << "\""; |
| 738 } else { | 738 } else { |
| 739 index = AllocatedOperand::cast(top->GetSpillOperand())->index(); | 739 index = AllocatedOperand::cast(top->GetSpillOperand())->index(); |
| 740 if (top->Kind() == DOUBLE_REGISTERS) { | 740 if (top->kind() == DOUBLE_REGISTERS) { |
| 741 os_ << " \"double_stack:" << index << "\""; | 741 os_ << " \"double_stack:" << index << "\""; |
| 742 } else if (top->Kind() == GENERAL_REGISTERS) { | 742 } else if (top->kind() == GENERAL_REGISTERS) { |
| 743 os_ << " \"stack:" << index << "\""; | 743 os_ << " \"stack:" << index << "\""; |
| 744 } | 744 } |
| 745 } | 745 } |
| 746 } | 746 } |
| 747 int parent_index = -1; | 747 int parent_index = -1; |
| 748 if (range->IsChild()) { | 748 if (range->IsChild()) { |
| 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 } |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 os << "#" << SafeId(i) << ":" << SafeMnemonic(i); | 824 os << "#" << SafeId(i) << ":" << SafeMnemonic(i); |
| 825 } | 825 } |
| 826 os << ")" << std::endl; | 826 os << ")" << std::endl; |
| 827 } | 827 } |
| 828 } | 828 } |
| 829 return os; | 829 return os; |
| 830 } | 830 } |
| 831 } | 831 } |
| 832 } | 832 } |
| 833 } // namespace v8::internal::compiler | 833 } // namespace v8::internal::compiler |
| OLD | NEW |