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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 CHECK(move); | 261 CHECK(move); |
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 Zone zone; | 271 ZoneForTesting zone; |
272 | 272 |
273 { | 273 { |
274 TestInstr* i = TestInstr::New(&zone, 101); | 274 TestInstr* i = TestInstr::New(&zone, 101); |
275 CHECK_EQ(0, static_cast<int>(i->OutputCount())); | 275 CHECK_EQ(0, static_cast<int>(i->OutputCount())); |
276 CHECK_EQ(0, static_cast<int>(i->InputCount())); | 276 CHECK_EQ(0, static_cast<int>(i->InputCount())); |
277 CHECK_EQ(0, static_cast<int>(i->TempCount())); | 277 CHECK_EQ(0, static_cast<int>(i->TempCount())); |
278 } | 278 } |
279 | 279 |
280 int vreg = 15; | 280 int vreg = 15; |
281 InstructionOperand outputs[] = { | 281 InstructionOperand outputs[] = { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 CHECK(temps[z].Equals(*m->TempAt(z))); | 317 CHECK(temps[z].Equals(*m->TempAt(z))); |
318 } | 318 } |
319 } | 319 } |
320 } | 320 } |
321 } | 321 } |
322 } | 322 } |
323 | 323 |
324 } // namespace compiler | 324 } // namespace compiler |
325 } // namespace internal | 325 } // namespace internal |
326 } // namespace v8 | 326 } // namespace v8 |
OLD | NEW |