| 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 "test/unittests/compiler/instruction-selector-unittest.h" | 5 #include "test/unittests/compiler/instruction-selector-unittest.h" |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/compiler/graph.h" | 8 #include "src/compiler/graph.h" |
| 9 #include "src/compiler/schedule.h" | 9 #include "src/compiler/schedule.h" |
| 10 #include "src/flags.h" | 10 #include "src/flags.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 int index = imm->indexed_value(); | 87 int index = imm->indexed_value(); |
| 88 s.immediates_.insert( | 88 s.immediates_.insert( |
| 89 std::make_pair(index, sequence.GetImmediate(imm))); | 89 std::make_pair(index, sequence.GetImmediate(imm))); |
| 90 } | 90 } |
| 91 } | 91 } |
| 92 } | 92 } |
| 93 s.instructions_.push_back(instr); | 93 s.instructions_.push_back(instr); |
| 94 } | 94 } |
| 95 for (auto i : s.virtual_registers_) { | 95 for (auto i : s.virtual_registers_) { |
| 96 int const virtual_register = i.second; | 96 int const virtual_register = i.second; |
| 97 if (sequence.IsFloat(virtual_register)) { | 97 if (sequence.IsFP(virtual_register)) { |
| 98 EXPECT_FALSE(sequence.IsReference(virtual_register)); | 98 EXPECT_FALSE(sequence.IsReference(virtual_register)); |
| 99 s.doubles_.insert(virtual_register); | 99 s.doubles_.insert(virtual_register); |
| 100 } | 100 } |
| 101 if (sequence.IsReference(virtual_register)) { | 101 if (sequence.IsReference(virtual_register)) { |
| 102 EXPECT_FALSE(sequence.IsFloat(virtual_register)); | 102 EXPECT_FALSE(sequence.IsFP(virtual_register)); |
| 103 s.references_.insert(virtual_register); | 103 s.references_.insert(virtual_register); |
| 104 } | 104 } |
| 105 } | 105 } |
| 106 for (int i = 0; i < sequence.GetFrameStateDescriptorCount(); i++) { | 106 for (int i = 0; i < sequence.GetFrameStateDescriptorCount(); i++) { |
| 107 s.deoptimization_entries_.push_back(sequence.GetFrameStateDescriptor( | 107 s.deoptimization_entries_.push_back(sequence.GetFrameStateDescriptor( |
| 108 InstructionSequence::StateId::FromInt(i))); | 108 InstructionSequence::StateId::FromInt(i))); |
| 109 } | 109 } |
| 110 return s; | 110 return s; |
| 111 } | 111 } |
| 112 | 112 |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14))); | 621 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14))); |
| 622 // Continuation. | 622 // Continuation. |
| 623 | 623 |
| 624 EXPECT_EQ(kArchRet, s[index++]->arch_opcode()); | 624 EXPECT_EQ(kArchRet, s[index++]->arch_opcode()); |
| 625 EXPECT_EQ(index, s.size()); | 625 EXPECT_EQ(index, s.size()); |
| 626 } | 626 } |
| 627 | 627 |
| 628 } // namespace compiler | 628 } // namespace compiler |
| 629 } // namespace internal | 629 } // namespace internal |
| 630 } // namespace v8 | 630 } // namespace v8 |
| OLD | NEW |