OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |