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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 #include "src/compiler/common-operator.h" | 6 #include "src/compiler/common-operator.h" |
7 #include "src/compiler/graph.h" | 7 #include "src/compiler/graph.h" |
8 #include "src/compiler/instruction.h" | 8 #include "src/compiler/instruction.h" |
9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 CHECK_EQ(1u, move->size()); | 262 CHECK_EQ(1u, move->size()); |
263 MoveOperands* cur = move->at(0); | 263 MoveOperands* cur = move->at(0); |
264 CHECK(op1.Equals(cur->source())); | 264 CHECK(op1.Equals(cur->source())); |
265 CHECK(op2.Equals(cur->destination())); | 265 CHECK(op2.Equals(cur->destination())); |
266 } | 266 } |
267 } | 267 } |
268 | 268 |
269 | 269 |
270 TEST(InstructionOperands) { | 270 TEST(InstructionOperands) { |
271 v8::internal::AccountingAllocator allocator; | 271 v8::internal::AccountingAllocator allocator; |
272 Zone zone(&allocator); | 272 Zone zone(&allocator, ZONE_NAME); |
273 | 273 |
274 { | 274 { |
275 TestInstr* i = TestInstr::New(&zone, 101); | 275 TestInstr* i = TestInstr::New(&zone, 101); |
276 CHECK_EQ(0, static_cast<int>(i->OutputCount())); | 276 CHECK_EQ(0, static_cast<int>(i->OutputCount())); |
277 CHECK_EQ(0, static_cast<int>(i->InputCount())); | 277 CHECK_EQ(0, static_cast<int>(i->InputCount())); |
278 CHECK_EQ(0, static_cast<int>(i->TempCount())); | 278 CHECK_EQ(0, static_cast<int>(i->TempCount())); |
279 } | 279 } |
280 | 280 |
281 int vreg = 15; | 281 int vreg = 15; |
282 InstructionOperand outputs[] = { | 282 InstructionOperand outputs[] = { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 CHECK(temps[z].Equals(*m->TempAt(z))); | 318 CHECK(temps[z].Equals(*m->TempAt(z))); |
319 } | 319 } |
320 } | 320 } |
321 } | 321 } |
322 } | 322 } |
323 } | 323 } |
324 | 324 |
325 } // namespace compiler | 325 } // namespace compiler |
326 } // namespace internal | 326 } // namespace internal |
327 } // namespace v8 | 327 } // namespace v8 |
OLD | NEW |