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

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

Issue 889843003: [turbofan] Don't allocate UnallocatedOperands in Zone memory during instruction selection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 | « src/compiler/x64/instruction-selector-x64.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 da460d1a0f027a1d6c43575fd3c37cf2fdc40376..0e8056e53e63159d636f60f095d0e1ce399339b4 100644
--- a/test/cctest/compiler/test-instruction.cc
+++ b/test/cctest/compiler/test-instruction.cc
@@ -296,35 +296,23 @@ TEST(InstructionOperands) {
}
int vreg = 15;
- InstructionOperand* outputs[] = {
- new (&zone)
- UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg),
- new (&zone)
- UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg),
- new (&zone)
- UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg),
- new (&zone)
- UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg)};
-
- InstructionOperand* inputs[] = {
- new (&zone)
- UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg),
- new (&zone)
- UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg),
- new (&zone)
- UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg),
- new (&zone)
- UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg)};
-
- InstructionOperand* temps[] = {
- new (&zone)
- UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg),
- new (&zone)
- UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg),
- new (&zone)
- UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg),
- new (&zone)
- UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg)};
+ InstructionOperand outputs[] = {
+ UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg),
+ UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg),
+ UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg),
+ UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg)};
+
+ InstructionOperand inputs[] = {
+ UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg),
+ UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg),
+ UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg),
+ UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg)};
+
+ InstructionOperand temps[] = {
+ UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg),
+ UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg),
+ UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg),
+ UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg)};
for (size_t i = 0; i < arraysize(outputs); i++) {
for (size_t j = 0; j < arraysize(inputs); j++) {
@@ -336,15 +324,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].Equals(m->OutputAt(z)));
}
for (size_t z = 0; z < j; z++) {
- CHECK(inputs[z]->Equals(m->InputAt(z)));
+ CHECK(inputs[z].Equals(m->InputAt(z)));
}
for (size_t z = 0; z < k; z++) {
- CHECK(temps[z]->Equals(m->TempAt(z)));
+ CHECK(temps[z].Equals(m->TempAt(z)));
}
}
}
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | test/cctest/compiler/test-jump-threading.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698