| 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/simplified-operator.h" | 5 #include "src/compiler/simplified-operator.h" |
| 6 | 6 |
| 7 #include "src/compiler/operator-properties-inl.h" | 7 #include "src/compiler/operator-properties-inl.h" |
| 8 #include "test/unittests/test-utils.h" | 8 #include "test/unittests/test-utils.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 SimplifiedOperatorBuilder simplified(zone()); | 170 SimplifiedOperatorBuilder simplified(zone()); |
| 171 const ElementAccess& access = GetParam(); | 171 const ElementAccess& access = GetParam(); |
| 172 const Operator* op = simplified.LoadElement(access); | 172 const Operator* op = simplified.LoadElement(access); |
| 173 | 173 |
| 174 EXPECT_EQ(IrOpcode::kLoadElement, op->opcode()); | 174 EXPECT_EQ(IrOpcode::kLoadElement, op->opcode()); |
| 175 EXPECT_EQ(Operator::kNoThrow | Operator::kNoWrite, op->properties()); | 175 EXPECT_EQ(Operator::kNoThrow | Operator::kNoWrite, op->properties()); |
| 176 EXPECT_EQ(access, ElementAccessOf(op)); | 176 EXPECT_EQ(access, ElementAccessOf(op)); |
| 177 | 177 |
| 178 EXPECT_EQ(3, OperatorProperties::GetValueInputCount(op)); | 178 EXPECT_EQ(3, OperatorProperties::GetValueInputCount(op)); |
| 179 EXPECT_EQ(1, OperatorProperties::GetEffectInputCount(op)); | 179 EXPECT_EQ(1, OperatorProperties::GetEffectInputCount(op)); |
| 180 EXPECT_EQ(0, OperatorProperties::GetControlInputCount(op)); | 180 EXPECT_EQ(1, OperatorProperties::GetControlInputCount(op)); |
| 181 EXPECT_EQ(4, OperatorProperties::GetTotalInputCount(op)); | 181 EXPECT_EQ(5, OperatorProperties::GetTotalInputCount(op)); |
| 182 | 182 |
| 183 EXPECT_EQ(1, OperatorProperties::GetValueOutputCount(op)); | 183 EXPECT_EQ(1, OperatorProperties::GetValueOutputCount(op)); |
| 184 EXPECT_EQ(1, OperatorProperties::GetEffectOutputCount(op)); | 184 EXPECT_EQ(1, OperatorProperties::GetEffectOutputCount(op)); |
| 185 EXPECT_EQ(0, OperatorProperties::GetControlOutputCount(op)); | 185 EXPECT_EQ(0, OperatorProperties::GetControlOutputCount(op)); |
| 186 } | 186 } |
| 187 | 187 |
| 188 | 188 |
| 189 TEST_P(SimplifiedElementAccessOperatorTest, StoreElement) { | 189 TEST_P(SimplifiedElementAccessOperatorTest, StoreElement) { |
| 190 SimplifiedOperatorBuilder simplified(zone()); | 190 SimplifiedOperatorBuilder simplified(zone()); |
| 191 const ElementAccess& access = GetParam(); | 191 const ElementAccess& access = GetParam(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 206 } | 206 } |
| 207 | 207 |
| 208 | 208 |
| 209 INSTANTIATE_TEST_CASE_P(SimplifiedOperatorTest, | 209 INSTANTIATE_TEST_CASE_P(SimplifiedOperatorTest, |
| 210 SimplifiedElementAccessOperatorTest, | 210 SimplifiedElementAccessOperatorTest, |
| 211 ::testing::ValuesIn(kElementAccesses)); | 211 ::testing::ValuesIn(kElementAccesses)); |
| 212 | 212 |
| 213 } // namespace compiler | 213 } // namespace compiler |
| 214 } // namespace internal | 214 } // namespace internal |
| 215 } // namespace v8 | 215 } // namespace v8 |
| OLD | NEW |