Revision: 19791
Author:   [email protected]
Date:     Tue Mar 11 11:37:02 2014 UTC
Log:      Do not overwrite already optimized code.

BUG=
[email protected]

Review URL: https://codereview.chromium.org/189603006
http://code.google.com/p/v8/source/detail?r=19791

Modified:
 /branches/bleeding_edge/src/optimizing-compiler-thread.cc
 /branches/bleeding_edge/src/runtime.cc

=======================================
--- /branches/bleeding_edge/src/optimizing-compiler-thread.cc Mon Dec 23 14:30:35 2013 UTC +++ /branches/bleeding_edge/src/optimizing-compiler-thread.cc Tue Mar 11 11:37:02 2014 UTC
@@ -258,9 +258,13 @@
       uint32_t offset = code->TranslateAstIdToPcOffset(info->osr_ast_id());
       BackEdgeTable::RemoveStackCheck(code, offset);
     } else {
-      Handle<Code> code = Compiler::GetConcurrentlyOptimizedCode(job);
-      function->ReplaceCode(
-          code.is_null() ? function->shared()->code() : *code);
+      if (function->IsOptimized()) {
+        DisposeOptimizedCompileJob(job, false);
+      } else {
+        Handle<Code> code = Compiler::GetConcurrentlyOptimizedCode(job);
+        function->ReplaceCode(
+            code.is_null() ? function->shared()->code() : *code);
+      }
     }
   }
 }
=======================================
--- /branches/bleeding_edge/src/runtime.cc      Tue Mar 11 09:04:14 2014 UTC
+++ /branches/bleeding_edge/src/runtime.cc      Tue Mar 11 11:37:02 2014 UTC
@@ -8735,7 +8735,9 @@
     PrintF(" at AST id %d]\n", ast_id.ToInt());
   }

-  function->ReplaceCode(function->shared()->code());
+  if (!function->IsOptimized()) {
+    function->ReplaceCode(function->shared()->code());
+  }
   return NULL;
 }

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to