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

Unified Diff: test/unittests/compiler/js-typed-lowering-unittest.cc

Issue 2596843002: [turbofan] Optimize store to typed arrays only if the value is plain primitive. (Closed)
Patch Set: Remove dead variable Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/compiler/regress-v8-5756.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/js-typed-lowering-unittest.cc
diff --git a/test/unittests/compiler/js-typed-lowering-unittest.cc b/test/unittests/compiler/js-typed-lowering-unittest.cc
index 41717d63549bbcf05f2b67685d743ab4122c1c5c..979d14616425fb63ceb1b935d7222421e12481aa 100644
--- a/test/unittests/compiler/js-typed-lowering-unittest.cc
+++ b/test/unittests/compiler/js-typed-lowering-unittest.cc
@@ -717,7 +717,7 @@ TEST_F(JSTypedLoweringTest, JSStorePropertyToExternalTypedArrayWithConversion) {
Node* key = Parameter(
Type::Range(kMinInt / element_size, kMaxInt / element_size, zone()));
Node* base = HeapConstant(array);
- Node* value = Parameter(Type::Any());
+ Node* value = Parameter(Type::PlainPrimitive());
Node* context = UndefinedConstant();
Node* effect = graph()->start();
Node* control = graph()->start();
@@ -737,10 +737,7 @@ TEST_F(JSTypedLoweringTest, JSStorePropertyToExternalTypedArrayWithConversion) {
: IsNumberShiftLeft(
key, IsNumberConstant(WhichPowerOf2(element_size)));
- Matcher<Node*> value_matcher =
- IsToNumber(value, context, checkpoint, control);
- Matcher<Node*> effect_matcher = value_matcher;
- Matcher<Node*> control_matcher = IsIfSuccess(value_matcher);
+ Matcher<Node*> value_matcher = IsPlainPrimitiveToNumber(value);
ASSERT_TRUE(r.Changed());
EXPECT_THAT(
@@ -749,7 +746,7 @@ TEST_F(JSTypedLoweringTest, JSStorePropertyToExternalTypedArrayWithConversion) {
BufferAccess(type),
IsPointerConstant(bit_cast<intptr_t>(&backing_store[0])),
offset_matcher, IsNumberConstant(array->byte_length()->Number()),
- value_matcher, effect_matcher, control_matcher));
+ value_matcher, checkpoint, control));
}
}
}
« no previous file with comments | « test/mjsunit/compiler/regress-v8-5756.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698