Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index bddb327069977370c000f6a82f6e8823638c2e61..7918920562c2e521a55c7db3a565b4b0756aae3d 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -414,7 +414,9 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() { |
compiler::Pipeline pipeline(info()); |
pipeline.GenerateCode(); |
if (!info()->code().is_null()) { |
- info()->context()->native_context()->AddOptimizedCode(*info()->code()); |
+ if (FLAG_turbo_deoptimization) { |
+ info()->context()->native_context()->AddOptimizedCode(*info()->code()); |
+ } |
return SetLastStatus(SUCCEEDED); |
} |
} |