| OLD | NEW |
| 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/pipeline.h" | 5 #include "src/compiler/pipeline.h" |
| 6 | 6 |
| 7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <sstream> | 9 #include <sstream> |
| 10 | 10 |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 | 786 |
| 787 struct InliningPhase { | 787 struct InliningPhase { |
| 788 static const char* phase_name() { return "inlining"; } | 788 static const char* phase_name() { return "inlining"; } |
| 789 | 789 |
| 790 void Run(PipelineData* data, Zone* temp_zone) { | 790 void Run(PipelineData* data, Zone* temp_zone) { |
| 791 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); | 791 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); |
| 792 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), | 792 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), |
| 793 data->common()); | 793 data->common()); |
| 794 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), | 794 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), |
| 795 data->common(), data->machine()); | 795 data->common(), data->machine()); |
| 796 JSCallReducer call_reducer(data->jsgraph(), | 796 JSCallReducer::Flags call_reducer_flags = JSCallReducer::kNoFlags; |
| 797 data->info()->is_deoptimization_enabled() | 797 if (data->info()->is_bailout_on_uninitialized()) { |
| 798 ? JSCallReducer::kDeoptimizationEnabled | 798 call_reducer_flags |= JSCallReducer::kBailoutOnUninitialized; |
| 799 : JSCallReducer::kNoFlags, | 799 } |
| 800 data->native_context()); | 800 if (data->info()->is_deoptimization_enabled()) { |
| 801 call_reducer_flags |= JSCallReducer::kDeoptimizationEnabled; |
| 802 } |
| 803 JSCallReducer call_reducer(&graph_reducer, data->jsgraph(), |
| 804 call_reducer_flags, data->native_context()); |
| 801 JSContextSpecialization context_specialization( | 805 JSContextSpecialization context_specialization( |
| 802 &graph_reducer, data->jsgraph(), | 806 &graph_reducer, data->jsgraph(), |
| 803 data->info()->is_function_context_specializing() | 807 data->info()->is_function_context_specializing() |
| 804 ? handle(data->info()->context()) | 808 ? handle(data->info()->context()) |
| 805 : MaybeHandle<Context>()); | 809 : MaybeHandle<Context>()); |
| 806 JSFrameSpecialization frame_specialization(data->info()->osr_frame(), | 810 JSFrameSpecialization frame_specialization(data->info()->osr_frame(), |
| 807 data->jsgraph()); | 811 data->jsgraph()); |
| 808 JSGlobalObjectSpecialization global_object_specialization( | 812 JSGlobalObjectSpecialization global_object_specialization( |
| 809 &graph_reducer, data->jsgraph(), data->native_context(), | 813 &graph_reducer, data->jsgraph(), data->native_context(), |
| 810 data->info()->dependencies()); | 814 data->info()->dependencies()); |
| (...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1946 data->DeleteRegisterAllocationZone(); | 1950 data->DeleteRegisterAllocationZone(); |
| 1947 } | 1951 } |
| 1948 | 1952 |
| 1949 CompilationInfo* PipelineImpl::info() const { return data_->info(); } | 1953 CompilationInfo* PipelineImpl::info() const { return data_->info(); } |
| 1950 | 1954 |
| 1951 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } | 1955 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } |
| 1952 | 1956 |
| 1953 } // namespace compiler | 1957 } // namespace compiler |
| 1954 } // namespace internal | 1958 } // namespace internal |
| 1955 } // namespace v8 | 1959 } // namespace v8 |
| OLD | NEW |