Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: test/unittests/compiler/js-operator-unittest.cc

Issue 997983004: [turbofan] Support lazy deopt for truncating store to a typed array. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweaks Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « test/mjsunit/compiler/truncating-store-deopt.js ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698