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

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

Issue 2263273003: [turbofan] Improve fast case of JSInstanceOf lowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Renaming based on comment Created 4 years, 4 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
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('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 72c582525e103c251843997638a7b38922710b71..b66fdaab0b35d93f7cf0c1230cf10cd45b5b0e44 100644
--- a/test/unittests/compiler/js-typed-lowering-unittest.cc
+++ b/test/unittests/compiler/js-typed-lowering-unittest.cc
@@ -1026,43 +1026,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));
}
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698