28 #ifndef V8_EXECUTION_H_
29 #define V8_EXECUTION_H_
73 bool* pending_exception,
74 bool convert_receiver =
false);
86 bool* pending_exception);
96 bool* caught_exception);
128 Isolate* isolate,
double time,
bool* exc);
151 #ifdef ENABLE_DEBUGGER_SUPPORT
153 static void ProcessDebugMessages(
Isolate* isolate,
bool debug_command_only);
167 bool* has_pending_exception);
175 bool* has_pending_exception);
182 class ExecutionAccess;
214 #ifdef ENABLE_DEBUGGER_SUPPORT
217 bool IsDebugCommand();
239 return thread_local_.climit_;
242 return thread_local_.real_climit_;
245 return thread_local_.jslimit_;
248 return thread_local_.real_jslimit_;
251 return reinterpret_cast<Address>(&thread_local_.jslimit_);
254 return reinterpret_cast<Address>(&thread_local_.real_jslimit_);
262 bool has_pending_interrupts(
const ExecutionAccess& lock) {
265 ASSERT(!should_postpone_interrupts(lock));
266 return thread_local_.interrupt_flags_ != 0;
270 bool should_postpone_interrupts(
const ExecutionAccess& lock) {
271 return thread_local_.postpone_interrupts_nesting_ > 0;
275 inline void set_interrupt_limits(
const ExecutionAccess& lock);
279 inline void reset_limits(
const ExecutionAccess& lock);
282 void EnableInterrupts();
283 void DisableInterrupts();
285 #if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM64
286 static const uintptr_t kInterruptLimit =
V8_UINT64_C(0xfffffffffffffffe);
287 static const uintptr_t kIllegalLimit =
V8_UINT64_C(0xfffffffffffffff8);
289 static const uintptr_t kInterruptLimit = 0xfffffffe;
290 static const uintptr_t kIllegalLimit = 0xfffffff8;
295 ThreadLocal() { Clear(); }
301 bool Initialize(
Isolate* isolate);
312 uintptr_t real_jslimit_;
314 uintptr_t real_climit_;
318 int postpone_interrupts_nesting_;
319 int interrupt_flags_;
322 void* interrupt_callback_data_;
328 ThreadLocal thread_local_;
340 #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 > ToNumber(Isolate *isolate, Handle< Object > obj, bool *exc)
static Handle< Object > ToObject(Isolate *isolate, Handle< Object > obj, bool *exc)
friend class PostponeInterruptsScope
static Handle< Object > GetFunctionDelegate(Isolate *isolate, Handle< Object > object)
static Handle< Object > NewDate(Isolate *isolate, double time, bool *exc)
#define ASSERT(condition)
static Handle< Object > TryGetFunctionDelegate(Isolate *isolate, Handle< Object > object, bool *has_pending_exception)
static Handle< Object > ToDetailString(Isolate *isolate, Handle< Object > obj, bool *exc)
bool IsDeoptMarkedAllocationSites()
friend class StackLimitCheck
void InvokeInterruptCallback()
static Handle< Object > GetFunctionFor()
static Handle< Object > CharAt(Handle< String > str, uint32_t index)
char * RestoreStackGuard(char *from)
void ClearThread(const ExecutionAccess &lock)
void RequestInterrupt(InterruptCallback callback, void *data)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization 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 VFP3 instructions if available enable use of NEON instructions if 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 d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long expose natives in global object expose freeBuffer extension expose gc extension under the specified name expose externalize string extension number of stack frames to capture disable builtin natives files print name of functions for which code is generated use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations always try to OSR functions trace optimize function deoptimization minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions trace debugging JSON request response trace out of bounds accesses to external arrays trace_js_array_abuse automatically set the debug break flag when debugger commands are in the queue abort by crashing 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 statistics of the maximum memory committed for the heap in only print modified registers Don t break for ASM_UNIMPLEMENTED_BREAK macros print stack trace when an illegal exception is thrown randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot testing_bool_flag testing_int_flag string flag tmp file in which to serialize heap Print the time it takes to lazily compile hydrogen code stubs concurrent_recompilation concurrent_sweeping Print usage including flags
char * ArchiveStackGuard(char *to)
static MUST_USE_RESULT MaybeObject * HandleStackGuardInterrupt(Isolate *isolate)
bool IsTerminateExecution()
void TerminateExecution()
static void ConfigureInstance(Isolate *isolate, Handle< Object > instance, Handle< Object > data, bool *exc)
Address address_of_jslimit()
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
static Handle< Object > ToInteger(Isolate *isolate, Handle< Object > obj, bool *exc)
void DeoptMarkedAllocationSites()
static Handle< Object > TryGetConstructorDelegate(Isolate *isolate, Handle< Object > object, bool *has_pending_exception)
void CancelTerminateExecution()
static Handle< JSRegExp > NewJSRegExp(Handle< String > pattern, Handle< String > flags, bool *exc)
static void EnqueueMicrotask(Isolate *isolate, Handle< Object > microtask)
Address address_of_real_jslimit()
static int ArchiveSpacePerThread()
static Handle< JSFunction > InstantiateFunction(Handle< FunctionTemplateInfo > data, bool *exc)
bool ShouldPostponeInterrupts()
static Handle< Object > Call(Isolate *isolate, Handle< Object > callable, Handle< Object > receiver, int argc, Handle< Object > argv[], bool *pending_exception, bool convert_receiver=false)
void Continue(InterruptFlag after_what)
static Handle< Object > ToInt32(Isolate *isolate, Handle< Object > obj, bool *exc)
bool IsInstallCodeRequest()
static Handle< Object > GetConstructorDelegate(Isolate *isolate, Handle< Object > object)
void(* InterruptCallback)(Isolate *isolate, void *data)
static Handle< Object > ToUint32(Isolate *isolate, 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)
void FreeThreadResources()
static void RunMicrotasks(Isolate *isolate)
void SetStackLimit(uintptr_t limit)
static Handle< Object > ToString(Isolate *isolate, Handle< Object > obj, bool *exc)
void RequestInstallCode()
void InitThread(const ExecutionAccess &lock)