| Index: src/execution.cc
|
| diff --git a/src/execution.cc b/src/execution.cc
|
| index dee31126829f55095662a3e1e6e9b402ff6b478f..f343868060da516624815c727dbe526ebc116c7a 100644
|
| --- a/src/execution.cc
|
| +++ b/src/execution.cc
|
| @@ -33,6 +33,7 @@
|
| #include "bootstrapper.h"
|
| #include "codegen.h"
|
| #include "debug.h"
|
| +#include "deoptimizer.h"
|
| #include "isolate-inl.h"
|
| #include "runtime-profiler.h"
|
| #include "simulator.h"
|
| @@ -448,6 +449,19 @@ void StackGuard::RequestGC() {
|
| }
|
|
|
|
|
| +bool StackGuard::IsFullDeopt() {
|
| + ExecutionAccess access(isolate_);
|
| + return (thread_local_.interrupt_flags_ & FULL_DEOPT) != 0;
|
| +}
|
| +
|
| +
|
| +void StackGuard::FullDeopt() {
|
| + ExecutionAccess access(isolate_);
|
| + thread_local_.interrupt_flags_ |= FULL_DEOPT;
|
| + set_interrupt_limits(access);
|
| +}
|
| +
|
| +
|
| #ifdef ENABLE_DEBUGGER_SUPPORT
|
| bool StackGuard::IsDebugBreak() {
|
| ExecutionAccess access(isolate_);
|
| @@ -880,7 +894,6 @@ MaybeObject* Execution::HandleStackGuardInterrupt(Isolate* isolate) {
|
| stack_guard->Continue(GC_REQUEST);
|
| }
|
|
|
| -
|
| isolate->counters()->stack_interrupts()->Increment();
|
| isolate->counters()->runtime_profiler_ticks()->Increment();
|
| isolate->runtime_profiler()->OptimizeNow();
|
| @@ -898,6 +911,10 @@ MaybeObject* Execution::HandleStackGuardInterrupt(Isolate* isolate) {
|
| stack_guard->Continue(INTERRUPT);
|
| return isolate->StackOverflow();
|
| }
|
| + if (stack_guard->IsFullDeopt()) {
|
| + stack_guard->Continue(FULL_DEOPT);
|
| + Deoptimizer::DeoptimizeAll(isolate);
|
| + }
|
| return isolate->heap()->undefined_value();
|
| }
|
|
|
|
|