OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/common-operator.h" | 5 #include "src/compiler/common-operator.h" |
6 #include "src/compiler/graph.h" | 6 #include "src/compiler/graph.h" |
7 #include "src/compiler/instruction.h" | 7 #include "src/compiler/instruction.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
11 namespace compiler { | 11 namespace compiler { |
12 | 12 |
13 std::ostream& operator<<(std::ostream& os, | 13 std::ostream& operator<<(std::ostream& os, |
14 const PrintableInstructionOperand& printable) { | 14 const PrintableInstructionOperand& printable) { |
15 const InstructionOperand& op = *printable.op_; | 15 const InstructionOperand& op = *printable.op_; |
16 const RegisterConfiguration* conf = printable.register_configuration_; | 16 const RegisterConfiguration* conf = printable.register_configuration_; |
17 switch (op.kind()) { | 17 switch (op.kind()) { |
18 case InstructionOperand::INVALID: | |
19 return os << "(0)"; | |
20 case InstructionOperand::UNALLOCATED: { | 18 case InstructionOperand::UNALLOCATED: { |
21 const UnallocatedOperand* unalloc = UnallocatedOperand::cast(&op); | 19 const UnallocatedOperand* unalloc = UnallocatedOperand::cast(&op); |
22 os << "v" << unalloc->virtual_register(); | 20 os << "v" << unalloc->virtual_register(); |
23 if (unalloc->basic_policy() == UnallocatedOperand::FIXED_SLOT) { | 21 if (unalloc->basic_policy() == UnallocatedOperand::FIXED_SLOT) { |
24 return os << "(=" << unalloc->fixed_slot_index() << "S)"; | 22 return os << "(=" << unalloc->fixed_slot_index() << "S)"; |
25 } | 23 } |
26 switch (unalloc->extended_policy()) { | 24 switch (unalloc->extended_policy()) { |
27 case UnallocatedOperand::NONE: | 25 case UnallocatedOperand::NONE: |
28 return os; | 26 return os; |
29 case UnallocatedOperand::FIXED_REGISTER: | 27 case UnallocatedOperand::FIXED_REGISTER: |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 os << " B" << succ_block->id(); | 679 os << " B" << succ_block->id(); |
682 } | 680 } |
683 os << "\n"; | 681 os << "\n"; |
684 } | 682 } |
685 return os; | 683 return os; |
686 } | 684 } |
687 | 685 |
688 } // namespace compiler | 686 } // namespace compiler |
689 } // namespace internal | 687 } // namespace internal |
690 } // namespace v8 | 688 } // namespace v8 |
OLD | NEW |