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 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 }; | 893 }; |
894 | 894 |
895 | 895 |
896 struct TypedLoweringPhase { | 896 struct TypedLoweringPhase { |
897 static const char* phase_name() { return "typed lowering"; } | 897 static const char* phase_name() { return "typed lowering"; } |
898 | 898 |
899 void Run(PipelineData* data, Zone* temp_zone) { | 899 void Run(PipelineData* data, Zone* temp_zone) { |
900 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); | 900 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); |
901 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), | 901 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), |
902 data->common()); | 902 data->common()); |
903 JSBuiltinReducer builtin_reducer(&graph_reducer, data->jsgraph()); | 903 JSBuiltinReducer builtin_reducer( |
| 904 &graph_reducer, data->jsgraph(), |
| 905 data->info()->is_deoptimization_enabled() |
| 906 ? JSBuiltinReducer::kDeoptimizationEnabled |
| 907 : JSBuiltinReducer::kNoFlags, |
| 908 data->info()->dependencies()); |
904 MaybeHandle<LiteralsArray> literals_array = | 909 MaybeHandle<LiteralsArray> literals_array = |
905 data->info()->is_native_context_specializing() | 910 data->info()->is_native_context_specializing() |
906 ? handle(data->info()->closure()->literals(), data->isolate()) | 911 ? handle(data->info()->closure()->literals(), data->isolate()) |
907 : MaybeHandle<LiteralsArray>(); | 912 : MaybeHandle<LiteralsArray>(); |
908 JSCreateLowering create_lowering( | 913 JSCreateLowering create_lowering( |
909 &graph_reducer, data->info()->dependencies(), data->jsgraph(), | 914 &graph_reducer, data->info()->dependencies(), data->jsgraph(), |
910 literals_array, temp_zone); | 915 literals_array, temp_zone); |
911 JSTypedLowering::Flags typed_lowering_flags = JSTypedLowering::kNoFlags; | 916 JSTypedLowering::Flags typed_lowering_flags = JSTypedLowering::kNoFlags; |
912 if (data->info()->is_deoptimization_enabled()) { | 917 if (data->info()->is_deoptimization_enabled()) { |
913 typed_lowering_flags |= JSTypedLowering::kDeoptimizationEnabled; | 918 typed_lowering_flags |= JSTypedLowering::kDeoptimizationEnabled; |
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1924 data->DeleteRegisterAllocationZone(); | 1929 data->DeleteRegisterAllocationZone(); |
1925 } | 1930 } |
1926 | 1931 |
1927 CompilationInfo* PipelineImpl::info() const { return data_->info(); } | 1932 CompilationInfo* PipelineImpl::info() const { return data_->info(); } |
1928 | 1933 |
1929 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } | 1934 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } |
1930 | 1935 |
1931 } // namespace compiler | 1936 } // namespace compiler |
1932 } // namespace internal | 1937 } // namespace internal |
1933 } // namespace v8 | 1938 } // namespace v8 |
OLD | NEW |