diff options
Diffstat (limited to 'deps/v8/src/execution.cc')
-rw-r--r-- | deps/v8/src/execution.cc | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/deps/v8/src/execution.cc b/deps/v8/src/execution.cc index 03017d017..32dde9e4c 100644 --- a/deps/v8/src/execution.cc +++ b/deps/v8/src/execution.cc @@ -32,10 +32,12 @@ #include "api.h" #include "codegen-inl.h" -#ifdef ARM -#include "simulator-arm.h" -#else // ia32 -#include "simulator-ia32.h" +#if V8_TARGET_ARCH_IA32 +#include "ia32/simulator-ia32.h" +#elif V8_TARGET_ARCH_X64 +#include "x64/simulator-x64.h" +#elif V8_TARGET_ARCH_ARM +#include "arm/simulator-arm.h" #endif #include "debug.h" @@ -305,6 +307,7 @@ void StackGuard::Preempt() { } +#ifdef ENABLE_DEBUGGER_SUPPORT bool StackGuard::IsDebugBreak() { ExecutionAccess access; return thread_local_.interrupt_flags_ & DEBUGBREAK; @@ -331,7 +334,7 @@ void StackGuard::DebugCommand() { set_limits(kInterruptLimit, access); } } - +#endif void StackGuard::Continue(InterruptFlag after_what) { ExecutionAccess access; @@ -539,6 +542,7 @@ static Object* RuntimePreempt() { ContextSwitcher::PreemptionReceived(); +#ifdef ENABLE_DEBUGGER_SUPPORT if (Debug::InDebugger()) { // If currently in the debugger don't do any actual preemption but record // that preemption occoured while in the debugger. @@ -548,11 +552,17 @@ static Object* RuntimePreempt() { v8::Unlocker unlocker; Thread::YieldCPU(); } +#else + // Perform preemption. + v8::Unlocker unlocker; + Thread::YieldCPU(); +#endif return Heap::undefined_value(); } +#ifdef ENABLE_DEBUGGER_SUPPORT Object* Execution::DebugBreakHelper() { // Just continue if breaks are disabled. if (Debug::disable_break()) { @@ -598,12 +608,14 @@ Object* Execution::DebugBreakHelper() { // Return to continue execution. return Heap::undefined_value(); } - +#endif Object* Execution::HandleStackGuardInterrupt() { +#ifdef ENABLE_DEBUGGER_SUPPORT if (StackGuard::IsDebugBreak() || StackGuard::IsDebugCommand()) { DebugBreakHelper(); } +#endif if (StackGuard::IsPreempted()) RuntimePreempt(); if (StackGuard::IsInterrupted()) { // interrupt @@ -626,7 +638,7 @@ v8::Handle<v8::FunctionTemplate> GCExtension::GetNativeFunction( v8::Handle<v8::Value> GCExtension::GC(const v8::Arguments& args) { // All allocation spaces other than NEW_SPACE have the same effect. - Heap::CollectGarbage(0, OLD_DATA_SPACE); + Heap::CollectAllGarbage(); return v8::Undefined(); } |