Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index 8f4be0c08cc172c1859ebe89f92d6d1e809eb0f9..0e6decb9ae3e3820c78bf1637b28ccd27dd4e388 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -396,7 +396,7 @@ OptimizingCompiler::Status OptimizingCompiler::CreateGraph() { |
OptimizingCompiler::Status OptimizingCompiler::OptimizeGraph() { |
AssertNoAllocation no_gc; |
NoHandleAllocation no_handles(isolate()); |
- NoHandleDereference no_deref(isolate()); |
+ HandleDereferenceGuard no_deref(isolate(), HandleDereferenceGuard::DISALLOW); |
ASSERT(last_status() == SUCCEEDED); |
Timer t(this, &time_taken_to_optimize_); |
@@ -943,6 +943,9 @@ void Compiler::RecompileParallel(Handle<JSFunction> closure) { |
new(info->zone()) OptimizingCompiler(*info); |
OptimizingCompiler::Status status = compiler->CreateGraph(); |
if (status == OptimizingCompiler::SUCCEEDED) { |
+ // Do a scavenge to put off the next scavenge as far as possible. |
+ // This may ease the issue that GVN blocks the next scavenge. |
+ isolate->heap()->CollectGarbage(NEW_SPACE, "parallel recompile"); |
closure->MarkInRecompileQueue(); |
shared->code()->set_profiler_ticks(0); |
info.Detach(); |