| 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 25 matching lines...) Expand all Loading... |
| 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(), &machine); | 43 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &machine); |
| 44 JSTypeFeedbackTable table(zone()); | 44 JSTypeFeedbackTable table(zone()); |
| 45 // TODO(titzer): mock the GraphReducer here for better unit testing. | 45 // TODO(titzer): mock the GraphReducer here for better unit testing. |
| 46 GraphReducer graph_reducer(graph(), zone()); | 46 GraphReducer graph_reducer(graph(), nullptr, nullptr, zone()); |
| 47 JSTypeFeedbackSpecializer reducer(&graph_reducer, &jsgraph, &table, nullptr, | 47 JSTypeFeedbackSpecializer reducer(&graph_reducer, &jsgraph, &table, nullptr, |
| 48 global_object, mode, &dependencies_); | 48 global_object, mode, &dependencies_); |
| 49 return reducer.Reduce(node); | 49 return reducer.Reduce(node); |
| 50 } | 50 } |
| 51 | 51 |
| 52 Node* EmptyFrameState() { | 52 Node* EmptyFrameState() { |
| 53 MachineOperatorBuilder machine(zone()); | 53 MachineOperatorBuilder machine(zone()); |
| 54 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &machine); | 54 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &machine); |
| 55 return jsgraph.EmptyFrameState(); | 55 return jsgraph.EmptyFrameState(); |
| 56 } | 56 } |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 IsReturn(load_field_match, load_field_match, graph()->start())); | 335 IsReturn(load_field_match, load_field_match, graph()->start())); |
| 336 EXPECT_THAT(graph()->end(), IsEnd(ret)); | 336 EXPECT_THAT(graph()->end(), IsEnd(ret)); |
| 337 | 337 |
| 338 EXPECT_FALSE(dependencies()->IsEmpty()); | 338 EXPECT_FALSE(dependencies()->IsEmpty()); |
| 339 dependencies()->Rollback(); | 339 dependencies()->Rollback(); |
| 340 } | 340 } |
| 341 | 341 |
| 342 } // namespace compiler | 342 } // namespace compiler |
| 343 } // namespace internal | 343 } // namespace internal |
| 344 } // namespace v8 | 344 } // namespace v8 |
| OLD | NEW |