Chromium Code Reviews| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 187 } | 187 } |
| 188 | 188 |
| 189 | 189 |
| 190 TEST_F(CommonOperatorTest, Return) { | 190 TEST_F(CommonOperatorTest, Return) { |
| 191 TRACED_FOREACH(int, input_count, kArguments) { | 191 TRACED_FOREACH(int, input_count, kArguments) { |
| 192 const Operator* const op = common()->Return(input_count); | 192 const Operator* const op = common()->Return(input_count); |
| 193 EXPECT_EQ(IrOpcode::kReturn, op->opcode()); | 193 EXPECT_EQ(IrOpcode::kReturn, op->opcode()); |
| 194 EXPECT_EQ(Operator::kNoThrow, op->properties()); | 194 EXPECT_EQ(Operator::kNoThrow, op->properties()); |
| 195 EXPECT_EQ(input_count, op->ValueInputCount()); | 195 EXPECT_EQ(input_count, op->ValueInputCount()); |
| 196 EXPECT_EQ(1, op->EffectInputCount()); | 196 EXPECT_EQ(1, op->EffectInputCount()); |
| 197 EXPECT_EQ(1, static_cast<uint32_t>(op->ControlInputCount())); | 197 EXPECT_EQ(1u, static_cast<uint32_t>(op->ControlInputCount())); |
|
bradn
2015/10/09 00:19:54
For this one you can just drop the cast.
paul.l...
2015/10/09 00:42:38
Done.
| |
| 198 EXPECT_EQ(2 + input_count, static_cast<uint32_t>( | 198 EXPECT_EQ( |
| 199 OperatorProperties::GetTotalInputCount(op))); | 199 2u + input_count, |
| 200 static_cast<uint32_t>(OperatorProperties::GetTotalInputCount(op))); | |
|
paul.l...
2015/10/09 00:42:37
I removed the cast here was well. input_count and
| |
| 200 EXPECT_EQ(0, op->ValueOutputCount()); | 201 EXPECT_EQ(0, op->ValueOutputCount()); |
| 201 EXPECT_EQ(0, op->EffectOutputCount()); | 202 EXPECT_EQ(0, op->EffectOutputCount()); |
| 202 EXPECT_EQ(1, op->ControlOutputCount()); | 203 EXPECT_EQ(1, op->ControlOutputCount()); |
| 203 } | 204 } |
| 204 } | 205 } |
| 205 | 206 |
| 206 | 207 |
| 207 TEST_F(CommonOperatorTest, Branch) { | 208 TEST_F(CommonOperatorTest, Branch) { |
| 208 TRACED_FOREACH(BranchHint, hint, kBranchHints) { | 209 TRACED_FOREACH(BranchHint, hint, kBranchHints) { |
| 209 const Operator* const op = common()->Branch(hint); | 210 const Operator* const op = common()->Branch(hint); |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 379 EXPECT_EQ(arguments + 1, OperatorProperties::GetTotalInputCount(op)); | 380 EXPECT_EQ(arguments + 1, OperatorProperties::GetTotalInputCount(op)); |
| 380 EXPECT_EQ(0, op->ControlOutputCount()); | 381 EXPECT_EQ(0, op->ControlOutputCount()); |
| 381 EXPECT_EQ(0, op->EffectOutputCount()); | 382 EXPECT_EQ(0, op->EffectOutputCount()); |
| 382 EXPECT_EQ(1, op->ValueOutputCount()); | 383 EXPECT_EQ(1, op->ValueOutputCount()); |
| 383 } | 384 } |
| 384 } | 385 } |
| 385 | 386 |
| 386 } // namespace compiler | 387 } // namespace compiler |
| 387 } // namespace internal | 388 } // namespace internal |
| 388 } // namespace v8 | 389 } // namespace v8 |
| OLD | NEW |