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

Unified Diff: test/cctest/compiler/test-instruction.cc

Issue 1081373002: [turbofan] cleanup ParallelMove (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/compiler/test-gap-resolver.cc ('k') | test/cctest/compiler/test-jump-threading.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-instruction.cc
diff --git a/test/cctest/compiler/test-instruction.cc b/test/cctest/compiler/test-instruction.cc
index 3c1f9fb6e83dce55d2ec1c4c41ea54a0c40ac48e..22ee613b64abf190dddcba3947a3adbe5557b6e6 100644
--- a/test/cctest/compiler/test-instruction.cc
+++ b/test/cctest/compiler/test-instruction.cc
@@ -83,8 +83,8 @@ class InstructionTester : public HandleAndZoneScope {
return code->AddInstruction(instr);
}
- UnallocatedOperand* NewUnallocated(int vreg) {
- return UnallocatedOperand(UnallocatedOperand::ANY, vreg).Copy(zone());
+ UnallocatedOperand Unallocated(int vreg) {
+ return UnallocatedOperand(UnallocatedOperand::ANY, vreg);
}
RpoNumber RpoFor(BasicBlock* block) {
@@ -255,17 +255,16 @@ TEST(InstructionAddGapMove) {
int index = 0;
for (auto instr : R.code->instructions()) {
- UnallocatedOperand* op1 = R.NewUnallocated(index++);
- UnallocatedOperand* op2 = R.NewUnallocated(index++);
+ UnallocatedOperand op1 = R.Unallocated(index++);
+ UnallocatedOperand op2 = R.Unallocated(index++);
instr->GetOrCreateParallelMove(TestInstr::START, R.zone())
- ->AddMove(op1, op2, R.zone());
+ ->AddMove(op1, op2);
ParallelMove* move = instr->GetParallelMove(TestInstr::START);
CHECK(move);
- const ZoneList<MoveOperands>* move_operands = move->move_operands();
- CHECK_EQ(1, move_operands->length());
- MoveOperands* cur = &move_operands->at(0);
- CHECK_EQ(op1, cur->source());
- CHECK_EQ(op2, cur->destination());
+ CHECK_EQ(1u, move->size());
+ MoveOperands* cur = move->at(0);
+ CHECK(op1 == cur->source());
+ CHECK(op2 == cur->destination());
}
}
@@ -309,15 +308,15 @@ TEST(InstructionOperands) {
CHECK(k == m->TempCount());
for (size_t z = 0; z < i; z++) {
- CHECK(outputs[z].Equals(m->OutputAt(z)));
+ CHECK(outputs[z] == *m->OutputAt(z));
}
for (size_t z = 0; z < j; z++) {
- CHECK(inputs[z].Equals(m->InputAt(z)));
+ CHECK(inputs[z] == *m->InputAt(z));
}
for (size_t z = 0; z < k; z++) {
- CHECK(temps[z].Equals(m->TempAt(z)));
+ CHECK(temps[z] == *m->TempAt(z));
}
}
}
« no previous file with comments | « test/cctest/compiler/test-gap-resolver.cc ('k') | test/cctest/compiler/test-jump-threading.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698