Revision: 19100
Author:   [email protected]
Date:     Wed Feb  5 12:19:29 2014 UTC
Log:      Fix %OptimizeFunctionOnNextCall wrt concurrent compilation.

If a function is marked or queued for concurrent compilation,
%OptimizeFunctionOnNextCall becomes a no-op. That can be wrong
if concurrent recompilation does not complete at the time we
expect the function to have been optimized.

[email protected]

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

Modified:
 /branches/bleeding_edge/src/runtime.cc

=======================================
--- /branches/bleeding_edge/src/runtime.cc      Tue Feb  4 19:58:49 2014 UTC
+++ /branches/bleeding_edge/src/runtime.cc      Wed Feb  5 12:19:29 2014 UTC
@@ -8503,7 +8503,12 @@
   RUNTIME_ASSERT(args.length() == 1 || args.length() == 2);
   CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);

- if (!function->IsOptimizable()) return isolate->heap()->undefined_value();
+  if (!function->IsOptimizable() &&
+      !function->IsMarkedForConcurrentOptimization() &&
+      !function->IsInOptimizationQueue()) {
+    return isolate->heap()->undefined_value();
+  }
+
   function->MarkForOptimization();

   Code* unoptimized = function->shared()->code();

--
--
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/groups/opt_out.

Reply via email to