Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index 3cfc19336e306f3ef8c789038246313a88863a0b..92331c6a02d8296ab78b7982651e7a35ae93cd12 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -414,9 +414,6 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() { |
compiler::Pipeline pipeline(info()); |
pipeline.GenerateCode(); |
if (!info()->code().is_null()) { |
- if (FLAG_turbo_deoptimization) { |
- info()->context()->native_context()->AddOptimizedCode(*info()->code()); |
- } |
return SetLastStatus(SUCCEEDED); |
} |
} |
@@ -485,6 +482,9 @@ OptimizedCompileJob::Status OptimizedCompileJob::GenerateCode() { |
DCHECK(last_status() == SUCCEEDED); |
// TODO(turbofan): Currently everything is done in the first phase. |
if (!info()->code().is_null()) { |
+ if (FLAG_turbo_deoptimization) { |
+ info()->context()->native_context()->AddOptimizedCode(*info()->code()); |
+ } |
RecordOptimizationStats(); |
return last_status(); |
} |