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/js-operator.h" | 5 #include "src/compiler/js-operator.h" |
6 #include "src/compiler/opcodes.h" | 6 #include "src/compiler/opcodes.h" |
7 #include "src/compiler/operator.h" | 7 #include "src/compiler/operator.h" |
8 #include "src/compiler/operator-properties.h" | 8 #include "src/compiler/operator-properties.h" |
9 #include "test/unittests/test-utils.h" | 9 #include "test/unittests/test-utils.h" |
10 | 10 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 EXPECT_EQ(javascript1.StoreProperty(mode), javascript2.StoreProperty(mode)); | 164 EXPECT_EQ(javascript1.StoreProperty(mode), javascript2.StoreProperty(mode)); |
165 } | 165 } |
166 | 166 |
167 | 167 |
168 TEST_P(JSStorePropertyOperatorTest, NumberOfInputsAndOutputs) { | 168 TEST_P(JSStorePropertyOperatorTest, NumberOfInputsAndOutputs) { |
169 JSOperatorBuilder javascript(zone()); | 169 JSOperatorBuilder javascript(zone()); |
170 const LanguageMode mode = GetParam(); | 170 const LanguageMode mode = GetParam(); |
171 const Operator* op = javascript.StoreProperty(mode); | 171 const Operator* op = javascript.StoreProperty(mode); |
172 | 172 |
173 // TODO(jarin): Get rid of this hack. | 173 // TODO(jarin): Get rid of this hack. |
174 const int frame_state_input_count = FLAG_turbo_deoptimization ? 1 : 0; | 174 const int frame_state_input_count = FLAG_turbo_deoptimization ? 2 : 0; |
175 EXPECT_EQ(3, op->ValueInputCount()); | 175 EXPECT_EQ(3, op->ValueInputCount()); |
176 EXPECT_EQ(1, OperatorProperties::GetContextInputCount(op)); | 176 EXPECT_EQ(1, OperatorProperties::GetContextInputCount(op)); |
177 EXPECT_EQ(frame_state_input_count, | 177 EXPECT_EQ(frame_state_input_count, |
178 OperatorProperties::GetFrameStateInputCount(op)); | 178 OperatorProperties::GetFrameStateInputCount(op)); |
179 EXPECT_EQ(1, op->EffectInputCount()); | 179 EXPECT_EQ(1, op->EffectInputCount()); |
180 EXPECT_EQ(1, op->ControlInputCount()); | 180 EXPECT_EQ(1, op->ControlInputCount()); |
181 EXPECT_EQ(6 + frame_state_input_count, | 181 EXPECT_EQ(6 + frame_state_input_count, |
182 OperatorProperties::GetTotalInputCount(op)); | 182 OperatorProperties::GetTotalInputCount(op)); |
183 | 183 |
184 EXPECT_EQ(0, op->ValueOutputCount()); | 184 EXPECT_EQ(0, op->ValueOutputCount()); |
(...skipping 25 matching lines...) Expand all Loading... |
210 EXPECT_EQ(Operator::kNoProperties, op->properties()); | 210 EXPECT_EQ(Operator::kNoProperties, op->properties()); |
211 } | 211 } |
212 | 212 |
213 | 213 |
214 INSTANTIATE_TEST_CASE_P(JSOperatorTest, JSStorePropertyOperatorTest, | 214 INSTANTIATE_TEST_CASE_P(JSOperatorTest, JSStorePropertyOperatorTest, |
215 ::testing::Values(SLOPPY, STRICT)); | 215 ::testing::Values(SLOPPY, STRICT)); |
216 | 216 |
217 } // namespace compiler | 217 } // namespace compiler |
218 } // namespace internal | 218 } // namespace internal |
219 } // namespace v8 | 219 } // namespace v8 |
OLD | NEW |