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)"; |
18 case InstructionOperand::UNALLOCATED: { | 20 case InstructionOperand::UNALLOCATED: { |
19 const UnallocatedOperand* unalloc = UnallocatedOperand::cast(&op); | 21 const UnallocatedOperand* unalloc = UnallocatedOperand::cast(&op); |
20 os << "v" << unalloc->virtual_register(); | 22 os << "v" << unalloc->virtual_register(); |
21 if (unalloc->basic_policy() == UnallocatedOperand::FIXED_SLOT) { | 23 if (unalloc->basic_policy() == UnallocatedOperand::FIXED_SLOT) { |
22 return os << "(=" << unalloc->fixed_slot_index() << "S)"; | 24 return os << "(=" << unalloc->fixed_slot_index() << "S)"; |
23 } | 25 } |
24 switch (unalloc->extended_policy()) { | 26 switch (unalloc->extended_policy()) { |
25 case UnallocatedOperand::NONE: | 27 case UnallocatedOperand::NONE: |
26 return os; | 28 return os; |
27 case UnallocatedOperand::FIXED_REGISTER: | 29 case UnallocatedOperand::FIXED_REGISTER: |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 os << " B" << succ_block->id(); | 681 os << " B" << succ_block->id(); |
680 } | 682 } |
681 os << "\n"; | 683 os << "\n"; |
682 } | 684 } |
683 return os; | 685 return os; |
684 } | 686 } |
685 | 687 |
686 } // namespace compiler | 688 } // namespace compiler |
687 } // namespace internal | 689 } // namespace internal |
688 } // namespace v8 | 690 } // namespace v8 |
OLD | NEW |