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/v8.h" | 5 #include "src/v8.h" |
6 #include "test/cctest/cctest.h" | 6 #include "test/cctest/cctest.h" |
7 | 7 |
8 #include "src/compiler/code-generator.h" | 8 #include "src/compiler/code-generator.h" |
9 #include "src/compiler/common-operator.h" | 9 #include "src/compiler/common-operator.h" |
10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 new (&zone) UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER), | 317 new (&zone) UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER), |
318 new (&zone) UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER), | 318 new (&zone) UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER), |
319 new (&zone) UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER)}; | 319 new (&zone) UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER)}; |
320 | 320 |
321 InstructionOperand* temps[] = { | 321 InstructionOperand* temps[] = { |
322 new (&zone) UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER), | 322 new (&zone) UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER), |
323 new (&zone) UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER), | 323 new (&zone) UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER), |
324 new (&zone) UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER), | 324 new (&zone) UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER), |
325 new (&zone) UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER)}; | 325 new (&zone) UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER)}; |
326 | 326 |
327 for (size_t i = 0; i < ARRAY_SIZE(outputs); i++) { | 327 for (size_t i = 0; i < arraysize(outputs); i++) { |
328 for (size_t j = 0; j < ARRAY_SIZE(inputs); j++) { | 328 for (size_t j = 0; j < arraysize(inputs); j++) { |
329 for (size_t k = 0; k < ARRAY_SIZE(temps); k++) { | 329 for (size_t k = 0; k < arraysize(temps); k++) { |
330 TestInstr* m = | 330 TestInstr* m = |
331 TestInstr::New(&zone, 101, i, outputs, j, inputs, k, temps); | 331 TestInstr::New(&zone, 101, i, outputs, j, inputs, k, temps); |
332 CHECK(i == m->OutputCount()); | 332 CHECK(i == m->OutputCount()); |
333 CHECK(j == m->InputCount()); | 333 CHECK(j == m->InputCount()); |
334 CHECK(k == m->TempCount()); | 334 CHECK(k == m->TempCount()); |
335 | 335 |
336 for (size_t z = 0; z < i; z++) { | 336 for (size_t z = 0; z < i; z++) { |
337 CHECK_EQ(outputs[z], m->OutputAt(z)); | 337 CHECK_EQ(outputs[z], m->OutputAt(z)); |
338 } | 338 } |
339 | 339 |
340 for (size_t z = 0; z < j; z++) { | 340 for (size_t z = 0; z < j; z++) { |
341 CHECK_EQ(inputs[z], m->InputAt(z)); | 341 CHECK_EQ(inputs[z], m->InputAt(z)); |
342 } | 342 } |
343 | 343 |
344 for (size_t z = 0; z < k; z++) { | 344 for (size_t z = 0; z < k; z++) { |
345 CHECK_EQ(temps[z], m->TempAt(z)); | 345 CHECK_EQ(temps[z], m->TempAt(z)); |
346 } | 346 } |
347 } | 347 } |
348 } | 348 } |
349 } | 349 } |
350 } | 350 } |
OLD | NEW |