Index: src/compiler/pipeline.cc |
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc |
index f89484d08426b5a06f826b0adbec247e79e7ed03..3ea6c2ba812ef824b2ddadd4ee03040b062c3c94 100644 |
--- a/src/compiler/pipeline.cc |
+++ b/src/compiler/pipeline.cc |
@@ -1302,11 +1302,13 @@ |
} |
// Type the graph. |
- Typer typer(isolate(), data->graph(), info()->is_deoptimization_enabled() |
- ? Typer::kDeoptimizationEnabled |
- : Typer::kNoFlags, |
- info()->dependencies()); |
- Run<TyperPhase>(&typer); |
+ base::SmartPointer<Typer> typer; |
+ typer.Reset(new Typer(isolate(), data->graph(), |
+ info()->is_deoptimization_enabled() |
+ ? Typer::kDeoptimizationEnabled |
+ : Typer::kNoFlags, |
+ info()->dependencies())); |
+ Run<TyperPhase>(typer.get()); |
RunPrintAndVerify("Typed"); |
BeginPhaseKind("lowering"); |
@@ -1333,32 +1335,35 @@ |
Run<EarlyOptimizationPhase>(); |
RunPrintAndVerify("Early optimized"); |
- EndPhaseKind(); |
- |
- return true; |
-} |
- |
-bool Pipeline::OptimizeGraph(Linkage* linkage) { |
- PipelineData* data = this->data_; |
- |
- BeginPhaseKind("block building"); |
- |
Run<EffectControlLinearizationPhase>(); |
- RunPrintAndVerify("Effect and control linearized", true); |
+ RunPrintAndVerify("Effect and control linearized"); |
Run<BranchEliminationPhase>(); |
- RunPrintAndVerify("Branch conditions eliminated", true); |
+ RunPrintAndVerify("Branch conditions eliminated"); |
// Optimize control flow. |
if (FLAG_turbo_cf_optimization) { |
Run<ControlFlowOptimizationPhase>(); |
- RunPrintAndVerify("Control flow optimized", true); |
+ RunPrintAndVerify("Control flow optimized"); |
} |
// Lower changes that have been inserted before. |
Run<LateOptimizationPhase>(); |
// TODO(jarin, rossberg): Remove UNTYPED once machine typing works. |
RunPrintAndVerify("Late optimized", true); |
+ |
+ // Kill the Typer and thereby uninstall the decorator (if any). |
+ typer.Reset(nullptr); |
+ |
+ EndPhaseKind(); |
+ |
+ return true; |
+} |
+ |
+bool Pipeline::OptimizeGraph(Linkage* linkage) { |
+ PipelineData* data = this->data_; |
+ |
+ BeginPhaseKind("block building"); |
Run<LateGraphTrimmingPhase>(); |
// TODO(jarin, rossberg): Remove UNTYPED once machine typing works. |