| 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 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 } | 942 } |
| 943 }; | 943 }; |
| 944 | 944 |
| 945 | 945 |
| 946 struct EscapeAnalysisPhase { | 946 struct EscapeAnalysisPhase { |
| 947 static const char* phase_name() { return "escape analysis"; } | 947 static const char* phase_name() { return "escape analysis"; } |
| 948 | 948 |
| 949 void Run(PipelineData* data, Zone* temp_zone) { | 949 void Run(PipelineData* data, Zone* temp_zone) { |
| 950 EscapeAnalysis escape_analysis(data->graph(), data->jsgraph()->common(), | 950 EscapeAnalysis escape_analysis(data->graph(), data->jsgraph()->common(), |
| 951 temp_zone); | 951 temp_zone); |
| 952 escape_analysis.Run(); | 952 if (!escape_analysis.Run()) return; |
| 953 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); | 953 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); |
| 954 EscapeAnalysisReducer escape_reducer(&graph_reducer, data->jsgraph(), | 954 EscapeAnalysisReducer escape_reducer(&graph_reducer, data->jsgraph(), |
| 955 &escape_analysis, temp_zone); | 955 &escape_analysis, temp_zone); |
| 956 AddReducer(data, &graph_reducer, &escape_reducer); | 956 AddReducer(data, &graph_reducer, &escape_reducer); |
| 957 graph_reducer.ReduceGraph(); | 957 graph_reducer.ReduceGraph(); |
| 958 if (escape_reducer.compilation_failed()) { | 958 if (escape_reducer.compilation_failed()) { |
| 959 data->set_compilation_failed(); | 959 data->set_compilation_failed(); |
| 960 return; | 960 return; |
| 961 } | 961 } |
| 962 escape_reducer.VerifyReplacement(); | 962 escape_reducer.VerifyReplacement(); |
| (...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2027 data->DeleteRegisterAllocationZone(); | 2027 data->DeleteRegisterAllocationZone(); |
| 2028 } | 2028 } |
| 2029 | 2029 |
| 2030 CompilationInfo* PipelineImpl::info() const { return data_->info(); } | 2030 CompilationInfo* PipelineImpl::info() const { return data_->info(); } |
| 2031 | 2031 |
| 2032 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } | 2032 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } |
| 2033 | 2033 |
| 2034 } // namespace compiler | 2034 } // namespace compiler |
| 2035 } // namespace internal | 2035 } // namespace internal |
| 2036 } // namespace v8 | 2036 } // namespace v8 |
| OLD | NEW |