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

Side by Side Diff: src/compiler/graph-reducer-unittest.cc

Issue 605933002: [turbofan] GraphReducer is more "fixpointish" now. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/compiler/graph-reducer.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/compiler/graph.h" 5 #include "src/compiler/graph.h"
6 #include "src/compiler/graph-reducer.h" 6 #include "src/compiler/graph-reducer.h"
7 #include "src/compiler/operator.h" 7 #include "src/compiler/operator.h"
8 #include "src/test/test-utils.h" 8 #include "src/test/test-utils.h"
9 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gmock/include/gmock/gmock.h"
10 10
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 TEST_F(GraphReducerTest, ReduceOnceForEveryReducer) { 90 TEST_F(GraphReducerTest, ReduceOnceForEveryReducer) {
91 StrictMock<MockReducer> r1, r2; 91 StrictMock<MockReducer> r1, r2;
92 Node* node0 = graph()->NewNode(&OP0); 92 Node* node0 = graph()->NewNode(&OP0);
93 EXPECT_CALL(r1, Reduce(node0)); 93 EXPECT_CALL(r1, Reduce(node0));
94 EXPECT_CALL(r2, Reduce(node0)); 94 EXPECT_CALL(r2, Reduce(node0));
95 ReduceNode(node0, &r1, &r2); 95 ReduceNode(node0, &r1, &r2);
96 } 96 }
97 97
98 98
99 TEST_F(GraphReducerTest, ReduceAgainAfterChanged) { 99 TEST_F(GraphReducerTest, ReduceAgainAfterChanged) {
100 Sequence s1, s2; 100 Sequence s1, s2, s3;
101 StrictMock<MockReducer> r1, r2, r3; 101 StrictMock<MockReducer> r1, r2, r3;
102 Node* node0 = graph()->NewNode(&OP0); 102 Node* node0 = graph()->NewNode(&OP0);
103 EXPECT_CALL(r1, Reduce(node0)); 103 EXPECT_CALL(r1, Reduce(node0));
104 EXPECT_CALL(r2, Reduce(node0)); 104 EXPECT_CALL(r2, Reduce(node0));
105 EXPECT_CALL(r3, Reduce(node0)).InSequence(s1, s2).WillOnce( 105 EXPECT_CALL(r3, Reduce(node0)).InSequence(s1, s2, s3).WillOnce(
106 Return(Reducer::Changed(node0))); 106 Return(Reducer::Changed(node0)));
107 EXPECT_CALL(r1, Reduce(node0)).InSequence(s1); 107 EXPECT_CALL(r1, Reduce(node0)).InSequence(s1);
108 EXPECT_CALL(r2, Reduce(node0)).InSequence(s2); 108 EXPECT_CALL(r2, Reduce(node0)).InSequence(s2);
109 EXPECT_CALL(r3, Reduce(node0)).InSequence(s3);
109 ReduceNode(node0, &r1, &r2, &r3); 110 ReduceNode(node0, &r1, &r2, &r3);
110 } 111 }
111 112
112 } // namespace compiler 113 } // namespace compiler
113 } // namespace internal 114 } // namespace internal
114 } // namespace v8 115 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/graph-reducer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698