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

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

Issue 2035383003: [turbofan] Type feedback for numeric comparisons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
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 f56952344d538f695daf9442f78a411ee1d90829..b31483f80cc2a6d201b8f541b86e682ba1afea06 100644
--- a/test/unittests/compiler/js-typed-lowering-unittest.cc
+++ b/test/unittests/compiler/js-typed-lowering-unittest.cc
@@ -385,8 +385,9 @@ TEST_F(JSTypedLoweringTest, JSStrictEqualWithTheHole) {
Node* const context = UndefinedConstant();
TRACED_FOREACH(Type*, type, kJSTypes) {
Node* const lhs = Parameter(type);
- Reduction r = Reduce(
- graph()->NewNode(javascript()->StrictEqual(), lhs, the_hole, context));
+ Reduction r = Reduce(graph()->NewNode(
+ javascript()->StrictEqual(CompareOperationHints::Any()), lhs, the_hole,
+ context));
ASSERT_TRUE(r.Changed());
EXPECT_THAT(r.replacement(), IsFalseConstant());
}
@@ -397,8 +398,9 @@ TEST_F(JSTypedLoweringTest, JSStrictEqualWithUnique) {
Node* const lhs = Parameter(Type::Unique(), 0);
Node* const rhs = Parameter(Type::Unique(), 1);
Node* const context = Parameter(Type::Any(), 2);
- Reduction r =
- Reduce(graph()->NewNode(javascript()->StrictEqual(), lhs, rhs, context));
+ Reduction r = Reduce(
+ graph()->NewNode(javascript()->StrictEqual(CompareOperationHints::Any()),
+ lhs, rhs, context));
ASSERT_TRUE(r.Changed());
EXPECT_THAT(r.replacement(), IsReferenceEqual(Type::Unique(), lhs, rhs));
}
@@ -900,10 +902,10 @@ TEST_F(JSTypedLoweringTest, JSInstanceOfSpecializationWithoutSmiCheck) {
Node* const control = graph()->start();
// Reduce if left-hand side is known to be an object.
- Node* instanceOf =
- graph()->NewNode(javascript()->InstanceOf(), Parameter(Type::Object(), 0),
- HeapConstant(isolate()->object_function()), context,
- frame_state, effect, control);
+ Node* instanceOf = graph()->NewNode(
+ javascript()->InstanceOf(CompareOperationHints::Any()),
+ Parameter(Type::Object(), 0), HeapConstant(isolate()->object_function()),
+ context, frame_state, effect, control);
Node* dummy = graph()->NewNode(javascript()->ToObject(), instanceOf, context,
frame_state, effect, control);
Reduction r = Reduce(instanceOf);
@@ -920,10 +922,10 @@ TEST_F(JSTypedLoweringTest, JSInstanceOfSpecializationWithSmiCheck) {
Node* const control = graph()->start();
// Reduce if left-hand side could be a Smi.
- Node* instanceOf =
- graph()->NewNode(javascript()->InstanceOf(), Parameter(Type::Any(), 0),
- HeapConstant(isolate()->object_function()), context,
- frame_state, effect, control);
+ Node* instanceOf = graph()->NewNode(
+ javascript()->InstanceOf(CompareOperationHints::Any()),
+ Parameter(Type::Any(), 0), HeapConstant(isolate()->object_function()),
+ context, frame_state, effect, control);
Node* dummy = graph()->NewNode(javascript()->ToObject(), instanceOf, context,
frame_state, effect, control);
Reduction r = Reduce(instanceOf);
@@ -940,9 +942,10 @@ TEST_F(JSTypedLoweringTest, JSInstanceOfNoSpecialization) {
Node* const control = graph()->start();
// Do not reduce if right-hand side is not a function constant.
- Node* instanceOf = graph()->NewNode(
- javascript()->InstanceOf(), Parameter(Type::Any(), 0),
- Parameter(Type::Any()), context, frame_state, effect, control);
+ Node* instanceOf =
+ graph()->NewNode(javascript()->InstanceOf(CompareOperationHints::Any()),
+ Parameter(Type::Any(), 0), Parameter(Type::Any()),
+ context, frame_state, effect, control);
Node* dummy = graph()->NewNode(javascript()->ToObject(), instanceOf, context,
frame_state, effect, control);
Reduction r = Reduce(instanceOf);

Powered by Google App Engine
This is Rietveld 408576698