| Index: src/execution.cc
|
| diff --git a/src/execution.cc b/src/execution.cc
|
| index 690a4e3f4e6cd8570a0b052ee643b8fedb24aa69..b967e9f8ff6eb717deeca4ef303236645a33f259 100644
|
| --- a/src/execution.cc
|
| +++ b/src/execution.cc
|
| @@ -503,6 +503,22 @@ void StackGuard::RequestInstallCode() {
|
| }
|
|
|
|
|
| +bool StackGuard::IsCompilerSyncRequest() {
|
| + ExecutionAccess access(isolate_);
|
| + return (thread_local_.interrupt_flags_ & COMPILER_SYNC) != 0;
|
| +}
|
| +
|
| +
|
| +void StackGuard::RequestCompilerSync() {
|
| + ExecutionAccess access(isolate_);
|
| + thread_local_.interrupt_flags_ |= COMPILER_SYNC;
|
| + if (thread_local_.postpone_interrupts_nesting_ == 0) {
|
| + thread_local_.jslimit_ = thread_local_.climit_ = kInterruptLimit;
|
| + isolate_->heap()->SetStackLimits();
|
| + }
|
| +}
|
| +
|
| +
|
| bool StackGuard::IsFullDeopt() {
|
| ExecutionAccess access(isolate_);
|
| return (thread_local_.interrupt_flags_ & FULL_DEOPT) != 0;
|
| @@ -1049,7 +1065,13 @@ MaybeObject* Execution::HandleStackGuardInterrupt(Isolate* isolate) {
|
| stack_guard->Continue(INSTALL_CODE);
|
| isolate->optimizing_compiler_thread()->InstallOptimizedFunctions();
|
| }
|
| - isolate->runtime_profiler()->OptimizeNow();
|
| + if (stack_guard->IsCompilerSyncRequest()) {
|
| + ASSERT(isolate->concurrent_recompilation_enabled());
|
| + stack_guard->Continue(COMPILER_SYNC);
|
| + isolate->optimizing_compiler_thread()->YieldToCompilerThread();
|
| + } else {
|
| + isolate->runtime_profiler()->OptimizeNow();
|
| + }
|
| return isolate->heap()->undefined_value();
|
| }
|
|
|
|
|