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 6b418d706d99e21ac50210f27f6fae2c31b9cd2d..fc30a5c6a5347a90c1c5f3cc149b1f4529dbe3be 100644 |
--- a/test/unittests/compiler/js-typed-lowering-unittest.cc |
+++ b/test/unittests/compiler/js-typed-lowering-unittest.cc |
@@ -1025,43 +1025,18 @@ TEST_F(JSTypedLoweringTest, JSSubtractSmis) { |
// Test that instanceOf is reduced if and only if the right-hand side is a |
// function constant. Functional correctness is ensured elsewhere. |
-TEST_F(JSTypedLoweringTest, JSInstanceOfSpecializationWithoutSmiCheck) { |
+TEST_F(JSTypedLoweringTest, JSInstanceOfSpecialization) { |
Node* const context = Parameter(Type::Any()); |
Node* const frame_state = EmptyFrameState(); |
Node* const effect = graph()->start(); |
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* dummy = graph()->NewNode(javascript()->ToObject(), instanceOf, context, |
- frame_state, effect, control); |
- Reduction r = Reduce(instanceOf); |
- ASSERT_TRUE(r.Changed()); |
- ASSERT_EQ(r.replacement(), dummy->InputAt(0)); |
- ASSERT_NE(instanceOf, dummy->InputAt(0)); |
-} |
- |
- |
-TEST_F(JSTypedLoweringTest, JSInstanceOfSpecializationWithSmiCheck) { |
- Node* const context = Parameter(Type::Any()); |
- Node* const frame_state = EmptyFrameState(); |
- Node* const effect = graph()->start(); |
- 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* dummy = graph()->NewNode(javascript()->ToObject(), instanceOf, context, |
- frame_state, effect, control); |
Reduction r = Reduce(instanceOf); |
ASSERT_TRUE(r.Changed()); |
- ASSERT_EQ(r.replacement(), dummy->InputAt(0)); |
- ASSERT_NE(instanceOf, dummy->InputAt(0)); |
} |