Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: test/unittests/compiler/instruction-selector-unittest.cc

Issue 1087793002: [turbofan] add MachineType to AllocatedOperand (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: no flag Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/compiler/graph.h" 7 #include "src/compiler/graph.h"
8 #include "src/compiler/schedule.h" 8 #include "src/compiler/schedule.h"
9 #include "src/flags.h" 9 #include "src/flags.h"
10 #include "test/unittests/compiler/compiler-test-utils.h" 10 #include "test/unittests/compiler/compiler-test-utils.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 int index = imm->indexed_value(); 89 int index = imm->indexed_value();
90 s.immediates_.insert( 90 s.immediates_.insert(
91 std::make_pair(index, sequence.GetImmediate(imm))); 91 std::make_pair(index, sequence.GetImmediate(imm)));
92 } 92 }
93 } 93 }
94 } 94 }
95 s.instructions_.push_back(instr); 95 s.instructions_.push_back(instr);
96 } 96 }
97 for (auto i : s.virtual_registers_) { 97 for (auto i : s.virtual_registers_) {
98 int const virtual_register = i.second; 98 int const virtual_register = i.second;
99 if (sequence.IsDouble(virtual_register)) { 99 if (sequence.IsFloat(virtual_register)) {
100 EXPECT_FALSE(sequence.IsReference(virtual_register)); 100 EXPECT_FALSE(sequence.IsReference(virtual_register));
101 s.doubles_.insert(virtual_register); 101 s.doubles_.insert(virtual_register);
102 } 102 }
103 if (sequence.IsReference(virtual_register)) { 103 if (sequence.IsReference(virtual_register)) {
104 EXPECT_FALSE(sequence.IsDouble(virtual_register)); 104 EXPECT_FALSE(sequence.IsFloat(virtual_register));
105 s.references_.insert(virtual_register); 105 s.references_.insert(virtual_register);
106 } 106 }
107 } 107 }
108 for (int i = 0; i < sequence.GetFrameStateDescriptorCount(); i++) { 108 for (int i = 0; i < sequence.GetFrameStateDescriptorCount(); i++) {
109 s.deoptimization_entries_.push_back(sequence.GetFrameStateDescriptor( 109 s.deoptimization_entries_.push_back(sequence.GetFrameStateDescriptor(
110 InstructionSequence::StateId::FromInt(i))); 110 InstructionSequence::StateId::FromInt(i)));
111 } 111 }
112 return s; 112 return s;
113 } 113 }
114 114
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(12))); 586 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(12)));
587 // Continuation. 587 // Continuation.
588 588
589 EXPECT_EQ(kArchRet, s[index++]->arch_opcode()); 589 EXPECT_EQ(kArchRet, s[index++]->arch_opcode());
590 EXPECT_EQ(index, s.size()); 590 EXPECT_EQ(index, s.size());
591 } 591 }
592 592
593 } // namespace compiler 593 } // namespace compiler
594 } // namespace internal 594 } // namespace internal
595 } // namespace v8 595 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-jump-threading.cc ('k') | test/unittests/compiler/move-optimizer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698