Index: src/compiler/pipeline.cc |
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc |
index 934f4be17df9ba94d75435a79e9d8e23e8d557cd..9af3398742e40716bfd8a8b0ea813fe00f1c859b 100644 |
--- a/src/compiler/pipeline.cc |
+++ b/src/compiler/pipeline.cc |
@@ -936,6 +936,10 @@ struct EscapeAnalysisPhase { |
&escape_analysis, temp_zone); |
AddReducer(data, &graph_reducer, &escape_reducer); |
graph_reducer.ReduceGraph(); |
+ if (escape_reducer.compilation_failed()) { |
+ data->set_compilation_failed(); |
+ return; |
+ } |
escape_reducer.VerifyReplacement(); |
} |
}; |
@@ -1550,6 +1554,11 @@ bool PipelineImpl::CreateGraph() { |
if (FLAG_turbo_escape) { |
Run<EscapeAnalysisPhase>(); |
+ if (data->compilation_failed()) { |
+ info()->AbortOptimization(kEscapeAnalysisFailed); |
+ data->EndPhaseKind(); |
+ return false; |
+ } |
RunPrintAndVerify("Escape Analysed"); |
} |
} |