Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Unified Diff: src/runtime.cc

Issue 12488006: Parallel recompilation: remove interrupt for code generation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime.h ('k') | src/runtime-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index e30b350df3169ec7f58eaeddbcf266efd689d521..f68672d340085c4ef12ce75cbffe5c52593cf1fc 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -7758,7 +7758,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_LazyRecompile) {
RUNTIME_FUNCTION(MaybeObject*, Runtime_ParallelRecompile) {
HandleScope handle_scope(isolate);
- Handle<JSFunction> function = args.at<JSFunction>(0);
+ ASSERT(args.length() == 1);
+ CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
if (!AllowOptimization(isolate, function)) {
function->ReplaceCode(function->shared()->code());
return function->code();
@@ -7770,30 +7771,15 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_ParallelRecompile) {
}
-RUNTIME_FUNCTION(MaybeObject*, Runtime_ForceParallelRecompile) {
- HandleScope handle_scope(isolate);
- if (!V8::UseCrankshaft()) return isolate->heap()->undefined_value();
- ASSERT(FLAG_parallel_recompilation && FLAG_manual_parallel_recompilation);
- if (!isolate->optimizing_compiler_thread()->IsQueueAvailable()) {
- return isolate->Throw(*isolate->factory()->InternalizeOneByteString(
- STATIC_ASCII_VECTOR("Recompile queue is full.")));
- }
- CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
- fun->ReplaceCode(isolate->builtins()->builtin(Builtins::kParallelRecompile));
- Compiler::RecompileParallel(fun);
- return isolate->heap()->undefined_value();
-}
-
-
RUNTIME_FUNCTION(MaybeObject*, Runtime_InstallRecompiledCode) {
HandleScope handle_scope(isolate);
+ ASSERT(args.length() == 1);
+ CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
if (!V8::UseCrankshaft()) return isolate->heap()->undefined_value();
- ASSERT(FLAG_parallel_recompilation && FLAG_manual_parallel_recompilation);
- CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
+ ASSERT(FLAG_parallel_recompilation);
OptimizingCompilerThread* opt_thread = isolate->optimizing_compiler_thread();
- Handle<SharedFunctionInfo> shared(fun->shared());
- while (*opt_thread->InstallNextOptimizedFunction() != *shared) { }
- return isolate->heap()->undefined_value();
+ opt_thread->InstallOptimizedFunctions();
+ return function->code();
}
@@ -7964,6 +7950,19 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_OptimizeFunctionOnNextCall) {
}
+RUNTIME_FUNCTION(MaybeObject*, Runtime_WaitUntilOptimized) {
+ HandleScope scope(isolate);
+ ASSERT(args.length() == 1);
+ CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
+ if (FLAG_parallel_recompilation) {
+ if (V8::UseCrankshaft() && function->IsOptimizable()) {
+ while (!function->IsOptimized()) OS::Sleep(50);
+ }
+ }
+ return isolate->heap()->undefined_value();
+}
+
+
RUNTIME_FUNCTION(MaybeObject*, Runtime_GetOptimizationStatus) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
« no previous file with comments | « src/runtime.h ('k') | src/runtime-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698