| 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 <limits> | 5 #include <limits> |
| 6 | 6 |
| 7 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
| 8 #include "src/compiler/opcodes.h" | 8 #include "src/compiler/opcodes.h" |
| 9 #include "src/compiler/operator.h" | 9 #include "src/compiler/operator.h" |
| 10 #include "src/compiler/operator-properties.h" | 10 #include "src/compiler/operator-properties.h" |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 TEST_F(CommonOperatorTest, FinishRegion) { | 385 TEST_F(CommonOperatorTest, FinishRegion) { |
| 386 const Operator* op = common()->FinishRegion(); | 386 const Operator* op = common()->FinishRegion(); |
| 387 EXPECT_EQ(1, op->ValueInputCount()); | 387 EXPECT_EQ(1, op->ValueInputCount()); |
| 388 EXPECT_EQ(1, op->EffectInputCount()); | 388 EXPECT_EQ(1, op->EffectInputCount()); |
| 389 EXPECT_EQ(2, OperatorProperties::GetTotalInputCount(op)); | 389 EXPECT_EQ(2, OperatorProperties::GetTotalInputCount(op)); |
| 390 EXPECT_EQ(0, op->ControlOutputCount()); | 390 EXPECT_EQ(0, op->ControlOutputCount()); |
| 391 EXPECT_EQ(1, op->EffectOutputCount()); | 391 EXPECT_EQ(1, op->EffectOutputCount()); |
| 392 EXPECT_EQ(1, op->ValueOutputCount()); | 392 EXPECT_EQ(1, op->ValueOutputCount()); |
| 393 } | 393 } |
| 394 | 394 |
| 395 TEST_F(CommonOperatorTest, Projection) { |
| 396 TRACED_FORRANGE(size_t, index, 0, 3) { |
| 397 const Operator* op = common()->Projection(index); |
| 398 EXPECT_EQ(index, ProjectionIndexOf(op)); |
| 399 EXPECT_EQ(1, op->ValueInputCount()); |
| 400 EXPECT_EQ(1, op->ControlInputCount()); |
| 401 EXPECT_EQ(2, OperatorProperties::GetTotalInputCount(op)); |
| 402 EXPECT_EQ(0, op->ControlOutputCount()); |
| 403 EXPECT_EQ(0, op->EffectOutputCount()); |
| 404 EXPECT_EQ(1, op->ValueOutputCount()); |
| 405 } |
| 406 } |
| 407 |
| 395 } // namespace compiler | 408 } // namespace compiler |
| 396 } // namespace internal | 409 } // namespace internal |
| 397 } // namespace v8 | 410 } // namespace v8 |
| OLD | NEW |