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

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

Issue 1410003002: [turbofan] Remove locally constructed simplified builders. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
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 22 matching lines...) Expand all
33 dependencies_(isolate(), zone()) {} 33 dependencies_(isolate(), zone()) {}
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 JSTypeFeedbackSpecializer::DeoptimizationMode mode) { 38 JSTypeFeedbackSpecializer::DeoptimizationMode mode) {
39 Handle<GlobalObject> global_object( 39 Handle<GlobalObject> global_object(
40 isolate()->native_context()->global_object(), isolate()); 40 isolate()->native_context()->global_object(), isolate());
41 41
42 MachineOperatorBuilder machine(zone()); 42 MachineOperatorBuilder machine(zone());
43 JSGraph jsgraph(isolate(), graph(), common(), javascript(), nullptr, 43 SimplifiedOperatorBuilder simplified(zone());
44 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &simplified,
44 &machine); 45 &machine);
45 JSTypeFeedbackTable table(zone()); 46 JSTypeFeedbackTable table(zone());
46 // TODO(titzer): mock the GraphReducer here for better unit testing. 47 // TODO(titzer): mock the GraphReducer here for better unit testing.
47 GraphReducer graph_reducer(zone(), graph()); 48 GraphReducer graph_reducer(zone(), graph());
48 JSTypeFeedbackSpecializer reducer(&graph_reducer, &jsgraph, &table, nullptr, 49 JSTypeFeedbackSpecializer reducer(&graph_reducer, &jsgraph, &table, nullptr,
49 global_object, mode, &dependencies_); 50 global_object, mode, &dependencies_);
50 return reducer.Reduce(node); 51 return reducer.Reduce(node);
51 } 52 }
52 53
53 Node* EmptyFrameState() { 54 Node* EmptyFrameState() {
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 IsReturn(load_field_match, load_field_match, graph()->start())); 329 IsReturn(load_field_match, load_field_match, graph()->start()));
329 EXPECT_THAT(graph()->end(), IsEnd(ret)); 330 EXPECT_THAT(graph()->end(), IsEnd(ret));
330 331
331 EXPECT_FALSE(dependencies()->IsEmpty()); 332 EXPECT_FALSE(dependencies()->IsEmpty());
332 dependencies()->Rollback(); 333 dependencies()->Rollback();
333 } 334 }
334 335
335 } // namespace compiler 336 } // namespace compiler
336 } // namespace internal 337 } // namespace internal
337 } // namespace v8 338 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/js-intrinsic-lowering-unittest.cc ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698