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

Side by Side Diff: test/unittests/compiler/js-type-feedback-unittest.cc

Issue 1136413002: [turbofan] JSTypeFeedbackSpecializer is now an AdvancedReducer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « src/compiler/pipeline.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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.h" 5 #include "src/compiler.h"
6 6
7 #include "src/compiler/access-builder.h" 7 #include "src/compiler/access-builder.h"
8 #include "src/compiler/js-graph.h" 8 #include "src/compiler/js-graph.h"
9 #include "src/compiler/js-operator.h" 9 #include "src/compiler/js-operator.h"
10 #include "src/compiler/js-type-feedback.h" 10 #include "src/compiler/js-type-feedback.h"
(...skipping 23 matching lines...) Expand all
34 ~JSTypeFeedbackTest() override { dependencies_.Rollback(); } 34 ~JSTypeFeedbackTest() override { dependencies_.Rollback(); }
35 35
36 protected: 36 protected:
37 Reduction Reduce(Node* node) { 37 Reduction Reduce(Node* node) {
38 Handle<GlobalObject> global_object( 38 Handle<GlobalObject> global_object(
39 isolate()->native_context()->global_object(), isolate()); 39 isolate()->native_context()->global_object(), isolate());
40 40
41 MachineOperatorBuilder machine(zone()); 41 MachineOperatorBuilder machine(zone());
42 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &machine); 42 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &machine);
43 JSTypeFeedbackTable table(zone()); 43 JSTypeFeedbackTable table(zone());
44 JSTypeFeedbackSpecializer reducer(&jsgraph, &table, nullptr, global_object, 44 // TODO(titzer): mock the GraphReducer here for better unit testing.
45 &dependencies_); 45 GraphReducer graph_reducer(graph(), zone());
46 JSTypeFeedbackSpecializer reducer(&graph_reducer, &jsgraph, &table, nullptr,
47 global_object, &dependencies_);
46 return reducer.Reduce(node); 48 return reducer.Reduce(node);
47 } 49 }
48 50
49 Node* EmptyFrameState() { 51 Node* EmptyFrameState() {
50 MachineOperatorBuilder machine(zone()); 52 MachineOperatorBuilder machine(zone());
51 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &machine); 53 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &machine);
52 return jsgraph.EmptyFrameState(); 54 return jsgraph.EmptyFrameState();
53 } 55 }
54 56
55 JSOperatorBuilder* javascript() { return &javascript_; } 57 JSOperatorBuilder* javascript() { return &javascript_; }
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 dependencies()->Rollback(); 273 dependencies()->Rollback();
272 } else { 274 } else {
273 ASSERT_FALSE(r.Changed()); 275 ASSERT_FALSE(r.Changed());
274 EXPECT_TRUE(dependencies()->IsEmpty()); 276 EXPECT_TRUE(dependencies()->IsEmpty());
275 } 277 }
276 } 278 }
277 } 279 }
278 } 280 }
279 } 281 }
280 } 282 }
OLDNEW
« no previous file with comments | « src/compiler/pipeline.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698