28 #ifndef V8_EXECUTION_H_
29 #define V8_EXECUTION_H_
69 bool* pending_exception,
70 bool convert_receiver =
false);
82 bool* pending_exception);
92 bool* caught_exception);
141 #ifdef ENABLE_DEBUGGER_SUPPORT
142 static Object* DebugBreakHelper();
143 static void ProcessDebugMessages(
bool debug_command_only);
155 bool* has_pending_exception);
161 bool* has_pending_exception);
165 class ExecutionAccess;
198 #ifdef ENABLE_DEBUGGER_SUPPORT
201 bool IsDebugCommand();
212 return thread_local_.climit_;
215 return thread_local_.real_climit_;
218 return thread_local_.jslimit_;
221 return thread_local_.real_jslimit_;
224 return reinterpret_cast<Address>(&thread_local_.jslimit_);
227 return reinterpret_cast<Address>(&thread_local_.real_jslimit_);
235 bool has_pending_interrupts(
const ExecutionAccess& lock) {
238 ASSERT(!should_postpone_interrupts(lock));
239 return thread_local_.interrupt_flags_ != 0;
243 bool should_postpone_interrupts(
const ExecutionAccess& lock) {
244 return thread_local_.postpone_interrupts_nesting_ > 0;
248 inline void set_interrupt_limits(
const ExecutionAccess& lock);
252 inline void reset_limits(
const ExecutionAccess& lock);
255 void EnableInterrupts();
256 void DisableInterrupts();
258 #ifdef V8_TARGET_ARCH_X64
259 static const uintptr_t kInterruptLimit = V8_UINT64_C(0xfffffffffffffffe);
260 static const uintptr_t kIllegalLimit = V8_UINT64_C(0xfffffffffffffff8);
262 static const uintptr_t kInterruptLimit = 0xfffffffe;
263 static const uintptr_t kIllegalLimit = 0xfffffff8;
268 ThreadLocal() { Clear(); }
274 bool Initialize(
Isolate* isolate);
285 uintptr_t real_jslimit_;
287 uintptr_t real_climit_;
291 int postpone_interrupts_nesting_;
292 int interrupt_flags_;
298 ThreadLocal thread_local_;
310 #endif // V8_EXECUTION_H_
static Handle< Object > New(Handle< JSFunction > func, int argc, Handle< Object > argv[], bool *pending_exception)
static Handle< Object > TryCall(Handle< JSFunction > func, Handle< Object > receiver, int argc, Handle< Object > argv[], bool *caught_exception)
static Handle< Object > ToUint32(Handle< Object > obj, bool *exc)
bool IsRuntimeProfilerTick()
friend class PostponeInterruptsScope
static Handle< Object > ToInteger(Handle< Object > obj, bool *exc)
static Handle< Object > GetConstructorDelegate(Handle< Object > object)
static Handle< Object > ToObject(Handle< Object > obj, bool *exc)
static Handle< Object > ToInt32(Handle< Object > obj, bool *exc)
#define ASSERT(condition)
static void ConfigureInstance(Handle< Object > instance, Handle< Object > data, bool *exc)
static Handle< Object > ToDetailString(Handle< Object > obj, bool *exc)
friend class StackLimitCheck
static Handle< Object > GetFunctionFor()
void RequestRuntimeProfilerTick()
static Handle< Object > CharAt(Handle< String > str, uint32_t index)
static Handle< Object > ToBoolean(Handle< Object > obj)
char * RestoreStackGuard(char *from)
void ClearThread(const ExecutionAccess &lock)
char * ArchiveStackGuard(char *to)
static MUST_USE_RESULT MaybeObject * HandleStackGuardInterrupt(Isolate *isolate)
bool IsTerminateExecution()
void TerminateExecution()
Address address_of_jslimit()
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
static Handle< JSRegExp > NewJSRegExp(Handle< String > pattern, Handle< String > flags, bool *exc)
static Handle< Object > NewDate(double time, bool *exc)
static Handle< Object > Call(Handle< Object > callable, Handle< Object > receiver, int argc, Handle< Object > argv[], bool *pending_exception, bool convert_receiver=false)
Address address_of_real_jslimit()
static int ArchiveSpacePerThread()
static Handle< JSFunction > InstantiateFunction(Handle< FunctionTemplateInfo > data, bool *exc)
bool ShouldPostponeInterrupts()
void Continue(InterruptFlag after_what)
static Handle< Object > GetFunctionDelegate(Handle< Object > object)
static Handle< Object > ToNumber(Handle< Object > obj, bool *exc)
static Handle< JSObject > InstantiateObject(Handle< ObjectTemplateInfo > data, bool *exc)
static Handle< String > GetStackTraceLine(Handle< Object > recv, Handle< JSFunction > fun, Handle< Object > pos, Handle< Object > is_global)
static Handle< Object > ToString(Handle< Object > obj, bool *exc)
void FreeThreadResources()
static Handle< Object > TryGetConstructorDelegate(Handle< Object > object, bool *has_pending_exception)
void SetStackLimit(uintptr_t limit)
static Handle< Object > TryGetFunctionDelegate(Handle< Object > object, bool *has_pending_exception)
void InitThread(const ExecutionAccess &lock)