28 #ifndef V8_EXECUTION_H_
29 #define V8_EXECUTION_H_
70 bool* pending_exception,
71 bool convert_receiver =
false);
83 bool* pending_exception);
93 bool* caught_exception);
142 #ifdef ENABLE_DEBUGGER_SUPPORT
143 static Object* DebugBreakHelper();
144 static void ProcessDebugMessages(
bool debug_command_only);
156 bool* has_pending_exception);
162 bool* has_pending_exception);
166 class ExecutionAccess;
201 #ifdef ENABLE_DEBUGGER_SUPPORT
204 bool IsDebugCommand();
215 return thread_local_.climit_;
218 return thread_local_.real_climit_;
221 return thread_local_.jslimit_;
224 return thread_local_.real_jslimit_;
227 return reinterpret_cast<Address>(&thread_local_.jslimit_);
230 return reinterpret_cast<Address>(&thread_local_.real_jslimit_);
238 bool has_pending_interrupts(
const ExecutionAccess& lock) {
241 ASSERT(!should_postpone_interrupts(lock));
242 return thread_local_.interrupt_flags_ != 0;
246 bool should_postpone_interrupts(
const ExecutionAccess& lock) {
247 return thread_local_.postpone_interrupts_nesting_ > 0;
251 inline void set_interrupt_limits(
const ExecutionAccess& lock);
255 inline void reset_limits(
const ExecutionAccess& lock);
258 void EnableInterrupts();
259 void DisableInterrupts();
261 #ifdef V8_TARGET_ARCH_X64
262 static const uintptr_t kInterruptLimit = V8_UINT64_C(0xfffffffffffffffe);
263 static const uintptr_t kIllegalLimit = V8_UINT64_C(0xfffffffffffffff8);
265 static const uintptr_t kInterruptLimit = 0xfffffffe;
266 static const uintptr_t kIllegalLimit = 0xfffffff8;
271 ThreadLocal() { Clear(); }
277 bool Initialize(
Isolate* isolate);
288 uintptr_t real_jslimit_;
290 uintptr_t real_climit_;
294 int postpone_interrupts_nesting_;
295 int interrupt_flags_;
301 ThreadLocal thread_local_;
313 #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)
void RequestCodeReadyEvent()
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)
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination use dead code elimination trace on stack replacement optimize closures cache optimized code for closures functions with arguments object loop weight for representation inference allow uint32 values on optimize frames if they are used only in safe operations track parallel recompilation enable all profiler experiments number of stack frames inspected by the profiler call recompile stub directly when self optimizing trigger profiler ticks based on counting instead of timing weight back edges by jump distance for interrupt triggering percentage of ICs that must have type info to allow optimization watch_ic_patching retry_self_opt interrupt_at_exit extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of SAHF instruction if enable use of VFP3 instructions if available this implies enabling ARMv7 and VFP2 enable use of VFP2 instructions if available enable use of SDIV and UDIV instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of MIPS FPU instructions if expose natives in global object expose gc extension number of stack frames to capture disable builtin natives files print a stack trace if an assertion failure occurs use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations prepare for turning on always opt minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions automatically set the debug break flag when debugger commands are in the queue always cause a debug break before aborting maximum length of function source code printed in a stack trace max size of the new max size of the old max size of executable always perform global GCs print one trace line following each garbage collection do not print trace line after scavenger collection print more details following each garbage collection print amount of external allocated memory after each time it is adjusted flush code that we expect not to use again before full gc do incremental marking steps track object counts and memory usage use caching Perform compaction on every full GC Never perform compaction on full GC testing only Compact code space on full incremental collections Default seed for initializing random allows verbose printing trace parsing and preparsing Check icache flushes in ARM and MIPS simulator Stack alingment in bytes in print stack trace when throwing exceptions randomize hashes to avoid predictable hash Fixed seed to use to hash property activate a timer that switches between V8 threads testing_bool_flag float flag Seed used for threading test randomness A filename with extra code to be included in the Print usage including flags
static Handle< Object > TryGetFunctionDelegate(Handle< Object > object, bool *has_pending_exception)
void InitThread(const ExecutionAccess &lock)