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

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

Issue 1479793003: [turbofan] Properly wire effects for JSLoadContext and JSStoreContext. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix unittests. Created 5 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 unified diff | Download patch
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/compiler/access-builder.h" 6 #include "src/compiler/access-builder.h"
7 #include "src/compiler/js-graph.h" 7 #include "src/compiler/js-graph.h"
8 #include "src/compiler/js-operator.h" 8 #include "src/compiler/js-operator.h"
9 #include "src/compiler/js-typed-lowering.h" 9 #include "src/compiler/js-typed-lowering.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 654
655 Reduction const r2 = Reduce( 655 Reduction const r2 = Reduce(
656 graph()->NewNode(javascript()->LoadContext(1, index, immutable), 656 graph()->NewNode(javascript()->LoadContext(1, index, immutable),
657 context, context, effect)); 657 context, context, effect));
658 ASSERT_TRUE(r2.Changed()); 658 ASSERT_TRUE(r2.Changed());
659 EXPECT_THAT(r2.replacement(), 659 EXPECT_THAT(r2.replacement(),
660 IsLoadField(AccessBuilder::ForContextSlot(index), 660 IsLoadField(AccessBuilder::ForContextSlot(index),
661 IsLoadField(AccessBuilder::ForContextSlot( 661 IsLoadField(AccessBuilder::ForContextSlot(
662 Context::PREVIOUS_INDEX), 662 Context::PREVIOUS_INDEX),
663 context, effect, graph()->start()), 663 context, effect, graph()->start()),
664 effect, graph()->start())); 664 _, graph()->start()));
665 } 665 }
666 } 666 }
667 } 667 }
668 668
669 669
670 // ----------------------------------------------------------------------------- 670 // -----------------------------------------------------------------------------
671 // JSStoreContext 671 // JSStoreContext
672 672
673 673
674 TEST_F(JSTypedLoweringTest, JSStoreContext) { 674 TEST_F(JSTypedLoweringTest, JSStoreContext) {
(...skipping 14 matching lines...) Expand all
689 689
690 Reduction const r2 = 690 Reduction const r2 =
691 Reduce(graph()->NewNode(javascript()->StoreContext(1, index), context, 691 Reduce(graph()->NewNode(javascript()->StoreContext(1, index), context,
692 value, context, effect, control)); 692 value, context, effect, control));
693 ASSERT_TRUE(r2.Changed()); 693 ASSERT_TRUE(r2.Changed());
694 EXPECT_THAT(r2.replacement(), 694 EXPECT_THAT(r2.replacement(),
695 IsStoreField(AccessBuilder::ForContextSlot(index), 695 IsStoreField(AccessBuilder::ForContextSlot(index),
696 IsLoadField(AccessBuilder::ForContextSlot( 696 IsLoadField(AccessBuilder::ForContextSlot(
697 Context::PREVIOUS_INDEX), 697 Context::PREVIOUS_INDEX),
698 context, effect, graph()->start()), 698 context, effect, graph()->start()),
699 value, effect, control)); 699 value, _, control));
700 } 700 }
701 } 701 }
702 } 702 }
703 703
704 704
705 // ----------------------------------------------------------------------------- 705 // -----------------------------------------------------------------------------
706 // JSLoadProperty 706 // JSLoadProperty
707 707
708 708
709 TEST_F(JSTypedLoweringTest, JSLoadPropertyFromExternalTypedArray) { 709 TEST_F(JSTypedLoweringTest, JSLoadPropertyFromExternalTypedArray) {
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 Node* dummy = graph()->NewNode(javascript()->ToObject(), instanceOf, context, 1267 Node* dummy = graph()->NewNode(javascript()->ToObject(), instanceOf, context,
1268 frame_state, effect, control); 1268 frame_state, effect, control);
1269 Reduction r = Reduce(instanceOf); 1269 Reduction r = Reduce(instanceOf);
1270 ASSERT_FALSE(r.Changed()); 1270 ASSERT_FALSE(r.Changed());
1271 ASSERT_EQ(instanceOf, dummy->InputAt(0)); 1271 ASSERT_EQ(instanceOf, dummy->InputAt(0));
1272 } 1272 }
1273 1273
1274 } // namespace compiler 1274 } // namespace compiler
1275 } // namespace internal 1275 } // namespace internal
1276 } // namespace v8 1276 } // namespace v8
OLDNEW
« 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