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 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 PrintLiveRange(range, "object"); | 691 PrintLiveRange(range, "object"); |
692 } | 692 } |
693 } | 693 } |
694 | 694 |
695 | 695 |
696 void GraphC1Visualizer::PrintLiveRange(LiveRange* range, const char* type) { | 696 void GraphC1Visualizer::PrintLiveRange(LiveRange* range, const char* type) { |
697 if (range != NULL && !range->IsEmpty()) { | 697 if (range != NULL && !range->IsEmpty()) { |
698 PrintIndent(); | 698 PrintIndent(); |
699 os_ << range->id() << " " << type; | 699 os_ << range->id() << " " << type; |
700 if (range->HasRegisterAssigned()) { | 700 if (range->HasRegisterAssigned()) { |
701 InstructionOperand* op = range->CreateAssignedOperand(zone()); | 701 InstructionOperand op = range->GetAssignedOperand(); |
702 int assigned_reg = op->index(); | 702 int assigned_reg = op.index(); |
703 if (op->IsDoubleRegister()) { | 703 if (op.IsDoubleRegister()) { |
704 os_ << " \"" << DoubleRegister::AllocationIndexToString(assigned_reg) | 704 os_ << " \"" << DoubleRegister::AllocationIndexToString(assigned_reg) |
705 << "\""; | 705 << "\""; |
706 } else { | 706 } else { |
707 DCHECK(op->IsRegister()); | 707 DCHECK(op.IsRegister()); |
708 os_ << " \"" << Register::AllocationIndexToString(assigned_reg) << "\""; | 708 os_ << " \"" << Register::AllocationIndexToString(assigned_reg) << "\""; |
709 } | 709 } |
710 } else if (range->IsSpilled()) { | 710 } else if (range->IsSpilled()) { |
711 int index = -1; | 711 int index = -1; |
712 if (range->TopLevel()->HasSpillRange()) { | 712 if (range->TopLevel()->HasSpillRange()) { |
713 index = kMaxInt; // This hasn't been set yet. | 713 index = kMaxInt; // This hasn't been set yet. |
714 } else { | 714 } else { |
715 index = range->TopLevel()->GetSpillOperand()->index(); | 715 index = range->TopLevel()->GetSpillOperand()->index(); |
716 } | 716 } |
717 if (range->TopLevel()->Kind() == DOUBLE_REGISTERS) { | 717 if (range->TopLevel()->Kind() == DOUBLE_REGISTERS) { |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 os << "#" << SafeId(i) << ":" << SafeMnemonic(i); | 807 os << "#" << SafeId(i) << ":" << SafeMnemonic(i); |
808 } | 808 } |
809 os << ")" << std::endl; | 809 os << ")" << std::endl; |
810 } | 810 } |
811 } | 811 } |
812 return os; | 812 return os; |
813 } | 813 } |
814 } | 814 } |
815 } | 815 } |
816 } // namespace v8::internal::compiler | 816 } // namespace v8::internal::compiler |
OLD | NEW |