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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 } // namespace | 183 } // namespace |
184 | 184 |
185 | 185 |
186 TEST_F(CommonOperatorTest, End) { | 186 TEST_F(CommonOperatorTest, End) { |
187 TRACED_FOREACH(size_t, input_count, kInputCounts) { | 187 TRACED_FOREACH(size_t, input_count, kInputCounts) { |
188 const Operator* const op = common()->End(input_count); | 188 const Operator* const op = common()->End(input_count); |
189 EXPECT_EQ(IrOpcode::kEnd, op->opcode()); | 189 EXPECT_EQ(IrOpcode::kEnd, op->opcode()); |
190 EXPECT_EQ(Operator::kKontrol, op->properties()); | 190 EXPECT_EQ(Operator::kKontrol, op->properties()); |
191 EXPECT_EQ(0, op->ValueInputCount()); | 191 EXPECT_EQ(0, op->ValueInputCount()); |
192 EXPECT_EQ(0, op->EffectInputCount()); | 192 EXPECT_EQ(0, op->EffectInputCount()); |
193 EXPECT_EQ(input_count, op->ControlInputCount()); | 193 EXPECT_EQ(input_count, static_cast<uint32_t>(op->ControlInputCount())); |
194 EXPECT_EQ(input_count, OperatorProperties::GetTotalInputCount(op)); | 194 EXPECT_EQ(input_count, static_cast<uint32_t>( |
| 195 OperatorProperties::GetTotalInputCount(op))); |
195 EXPECT_EQ(0, op->ValueOutputCount()); | 196 EXPECT_EQ(0, op->ValueOutputCount()); |
196 EXPECT_EQ(0, op->EffectOutputCount()); | 197 EXPECT_EQ(0, op->EffectOutputCount()); |
197 EXPECT_EQ(0, op->ControlOutputCount()); | 198 EXPECT_EQ(0, op->ControlOutputCount()); |
198 } | 199 } |
199 } | 200 } |
200 | 201 |
201 | 202 |
202 TEST_F(CommonOperatorTest, Branch) { | 203 TEST_F(CommonOperatorTest, Branch) { |
203 TRACED_FOREACH(BranchHint, hint, kBranchHints) { | 204 TRACED_FOREACH(BranchHint, hint, kBranchHints) { |
204 const Operator* const op = common()->Branch(hint); | 205 const Operator* const op = common()->Branch(hint); |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 EXPECT_EQ(arguments + 1, OperatorProperties::GetTotalInputCount(op)); | 375 EXPECT_EQ(arguments + 1, OperatorProperties::GetTotalInputCount(op)); |
375 EXPECT_EQ(0, op->ControlOutputCount()); | 376 EXPECT_EQ(0, op->ControlOutputCount()); |
376 EXPECT_EQ(0, op->EffectOutputCount()); | 377 EXPECT_EQ(0, op->EffectOutputCount()); |
377 EXPECT_EQ(1, op->ValueOutputCount()); | 378 EXPECT_EQ(1, op->ValueOutputCount()); |
378 } | 379 } |
379 } | 380 } |
380 | 381 |
381 } // namespace compiler | 382 } // namespace compiler |
382 } // namespace internal | 383 } // namespace internal |
383 } // namespace v8 | 384 } // namespace v8 |
OLD | NEW |