31 #include "../include/v8-debug.h"
56 class CompilationCache;
57 class ContextSlotCache;
58 class ContextSwitcher;
62 class DeoptimizerData;
65 class ExternalReferenceTable;
67 class FunctionInfoListener;
68 class HandleScopeImplementer;
70 class InlineRuntimeFunctionsTable;
71 class NoAllocationStringAllocator;
72 class InnerPointerToCodeCache;
73 class PreallocatedMemoryThread;
77 class StringInputBuffer;
91 #ifdef ENABLE_DEBUGGER_SUPPORT
97 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \
98 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS)
112 #define RETURN_IF_SCHEDULED_EXCEPTION(isolate) \
114 Isolate* __isolate__ = (isolate); \
115 if (__isolate__->has_scheduled_exception()) { \
116 return __isolate__->PromoteScheduledException(); \
120 #define RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, value) \
122 if ((call).is_null()) { \
123 ASSERT((isolate)->has_pending_exception()); \
128 #define CHECK_NOT_EMPTY_HANDLE(isolate, call) \
130 ASSERT(!(isolate)->has_pending_exception()); \
131 CHECK(!(call).is_null()); \
132 CHECK(!(isolate)->has_pending_exception()); \
135 #define RETURN_IF_EMPTY_HANDLE(isolate, call) \
136 RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, Failure::Exception())
138 #define FOR_EACH_ISOLATE_ADDRESS_NAME(C) \
139 C(Handler, handler) \
140 C(CEntryFP, c_entry_fp) \
141 C(Context, context) \
142 C(PendingException, pending_exception) \
143 C(ExternalCaughtException, external_caught_exception) \
144 C(JSEntrySP, js_entry_sp)
161 return id_ == other.id_;
166 return id_ != kInvalidId;
178 static const int kInvalidId = -1;
180 explicit ThreadId(
int id) : id_(id) {}
182 static int AllocateThreadId();
184 static int GetCurrentThreadId();
221 return try_catch_handler_address_;
226 try_catch_handler_address_ = address;
230 ASSERT(!has_pending_message_);
231 ASSERT(!external_caught_exception_);
259 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS)
260 Simulator* simulator_;
262 #endif // USE_SIMULATOR
281 void InitializeInternal();
283 Address try_catch_handler_address_;
287 #ifdef ENABLE_DEBUGGER_SUPPORT
289 #define ISOLATE_DEBUGGER_INIT_LIST(V) \
290 V(v8::Debug::EventCallback, debug_event_callback, NULL) \
291 V(DebuggerAgent*, debugger_agent_instance, NULL)
294 #define ISOLATE_DEBUGGER_INIT_LIST(V)
300 #define ISOLATE_INIT_DEBUG_ARRAY_LIST(V) \
301 V(CommentStatistic, paged_space_comments_statistics, \
302 CommentStatistic::kMaxComments + 1)
305 #define ISOLATE_INIT_DEBUG_ARRAY_LIST(V)
309 #define ISOLATE_INIT_ARRAY_LIST(V) \
311 V(int32_t, jsregexp_static_offsets_vector, kJSRegexpStaticOffsetsVectorSize) \
312 V(int, bad_char_shift_table, kUC16AlphabetSize) \
313 V(int, good_suffix_shift_table, (kBMMaxShift + 1)) \
314 V(int, suffix_table, (kBMMaxShift + 1)) \
315 V(uint32_t, private_random_seed, 2) \
316 ISOLATE_INIT_DEBUG_ARRAY_LIST(V)
320 #define ISOLATE_INIT_LIST(V) \
322 V(int, serialize_partial_snapshot_cache_length, 0) \
323 V(int, serialize_partial_snapshot_cache_capacity, 0) \
324 V(Object**, serialize_partial_snapshot_cache, NULL) \
327 V(byte*, assembler_spare_buffer, NULL) \
328 V(FatalErrorCallback, exception_behavior, NULL) \
329 V(AllowCodeGenerationFromStringsCallback, allow_code_gen_callback, NULL) \
330 V(v8::Debug::MessageHandler, message_handler, NULL) \
333 V(int, next_serial_number, 0) \
334 V(ExternalReferenceRedirectorPointer*, external_reference_redirector, NULL) \
335 V(bool, always_allow_natives_syntax, false) \
337 V(FunctionInfoListener*, active_function_info_listener, NULL) \
339 V(Relocatable*, relocatable_top, NULL) \
341 V(CodeGenerator*, current_code_generator, NULL) \
342 V(bool, jump_target_compiling_deferred_code, false) \
343 V(DebugObjectCache*, string_stream_debug_object_cache, NULL) \
344 V(Object*, string_stream_current_security_token, NULL) \
346 V(int*, irregexp_interpreter_backtrack_stack_cache, NULL) \
348 V(ExternalReferenceTable*, external_reference_table, NULL) \
350 V(int, ast_node_id, 0) \
351 V(unsigned, ast_node_count, 0) \
353 V(int, safe_stack_iterator_counter, 0) \
354 V(uint64_t, enabled_cpu_features, 0) \
355 V(CpuProfiler*, cpu_profiler, NULL) \
356 V(HeapProfiler*, heap_profiler, NULL) \
357 ISOLATE_DEBUGGER_INIT_LIST(V)
362 class ThreadDataTable;
363 class EntryStackItem;
374 thread_id_(thread_id),
377 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \
378 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS)
390 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \
391 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS)
399 return isolate_ == isolate && thread_id_.Equals(thread_id);
405 uintptr_t stack_limit_;
408 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \
409 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS)
425 #define DECLARE_ENUM(CamelName, hacker_name) k##CamelName##Address,
481 #ifdef ENABLE_DEBUGGER_SUPPORT
484 static Debugger* GetDefaultIsolateDebugger();
500 return thread_id_key_;
522 ASSERT(context ==
NULL || context->IsContext());
523 thread_local_top_.context_ =
context;
529 thread_local_top_.save_context_ = save;
544 return thread_local_top_.pending_exception_;
547 return thread_local_top_.external_caught_exception_;
550 thread_local_top_.external_caught_exception_ = value;
553 thread_local_top_.pending_exception_ = exception;
556 thread_local_top_.pending_exception_ = heap_.the_hole_value();
559 return &thread_local_top_.pending_exception_;
562 return !thread_local_top_.pending_exception_->IsTheHole();
565 thread_local_top_.has_pending_message_ =
false;
566 thread_local_top_.pending_message_obj_ = heap_.the_hole_value();
567 thread_local_top_.pending_message_script_ =
NULL;
570 return thread_local_top_.TryCatchHandler();
573 return thread_local_top_.try_catch_handler_address();
576 return &thread_local_top_.external_caught_exception_;
579 return thread_local_top_.catcher_;
582 thread_local_top_.catcher_ =
catcher;
586 return &thread_local_top_.scheduled_exception_;
590 return reinterpret_cast<Address>(&thread_local_top_.pending_message_obj_);
594 return reinterpret_cast<Address>(&thread_local_top_.has_pending_message_);
598 return reinterpret_cast<Address>(
599 &thread_local_top_.pending_message_script_);
604 return thread_local_top_.scheduled_exception_;
607 return thread_local_top_.scheduled_exception_ != heap_.the_hole_value();
610 thread_local_top_.scheduled_exception_ = heap_.the_hole_value();
617 (exception !=
heap()->termination_exception());
625 return thread->c_entry_fp_;
630 return &thread_local_top_.c_entry_fp_;
636 return thread->js_entry_sp_;
639 return &thread_local_top_.js_entry_sp_;
699 return thread_local_top_.ignore_out_of_memory_;
702 thread_local_top_.ignore_out_of_memory_ = value;
710 NO_INLINE(
void PushStackTraceAndDie(
unsigned int magic,
713 unsigned int magic2));
750 bool catchable_by_javascript);
764 void Iterate(ObjectVisitor* v);
765 void Iterate(ObjectVisitor* v, ThreadLocalTop* t);
766 char*
Iterate(ObjectVisitor* v,
char* t);
791 #define GLOBAL_ACCESSOR(type, name, initialvalue) \
792 inline type name() const { \
793 ASSERT(OFFSET_OF(Isolate, name##_) == name##_debug_offset_); \
796 inline void set_##name(type value) { \
797 ASSERT(OFFSET_OF(Isolate, name##_) == name##_debug_offset_); \
801 #undef GLOBAL_ACCESSOR
803 #define GLOBAL_ARRAY_ACCESSOR(type, name, length) \
804 inline type* name() { \
805 ASSERT(OFFSET_OF(Isolate, name##_) == name##_debug_offset_); \
806 return &(name##_)[0]; \
809 #undef GLOBAL_ARRAY_ACCESSOR
811 #define NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name) \
812 Handle<type> name() { \
813 return Handle<type>(context()->native_context()->name()); \
816 #undef NATIVE_CONTEXT_FIELD_ACCESSOR
842 return transcendental_cache_;
846 return memory_allocator_;
850 return keyed_lookup_cache_;
854 return context_slot_cache_;
858 return descriptor_lookup_cache_;
862 return &handle_scope_data_;
865 ASSERT(handle_scope_implementer_);
866 return handle_scope_implementer_;
871 return unicode_cache_;
875 return inner_pointer_to_code_cache_;
887 context_switcher_ = switcher;
893 return &jsregexp_uncanonicalize_;
897 return &jsregexp_canonrange_;
901 return &objects_string_compare_buffer_a_;
905 return &objects_string_compare_buffer_b_;
909 return &objects_string_input_buffer_;
915 fp_stubs_generated_ = value;
921 return &compiler_safe_string_input_buffer_;
927 has_installed_extensions_ =
true;
934 return ®exp_macro_assembler_canonicalize_;
941 return &interp_canonicalize_mapping_;
948 #ifdef ENABLE_DEBUGGER_SUPPORT
949 Debugger* debugger() {
950 if (!
NoBarrier_Load(&debugger_initialized_)) InitializeDebugger();
954 if (!
NoBarrier_Load(&debugger_initialized_)) InitializeDebugger();
963 HistogramInfo* heap_histograms() {
return heap_histograms_; }
965 JSObject::SpillInformation* js_spill_information() {
966 return &js_spill_information_;
969 int* code_kind_statistics() {
return code_kind_statistics_; }
972 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \
973 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__)
974 bool simulator_initialized() {
return simulator_initialized_; }
975 void set_simulator_initialized(
bool initialized) {
976 simulator_initialized_ = initialized;
979 HashMap* simulator_i_cache() {
return simulator_i_cache_; }
980 void set_simulator_i_cache(
HashMap* hash_map) {
981 simulator_i_cache_ = hash_map;
984 Redirection* simulator_redirection() {
985 return simulator_redirection_;
987 void set_simulator_redirection(Redirection* redirection) {
988 simulator_redirection_ = redirection;
997 return thread_local_top_.external_callback_;
1000 thread_local_top_.external_callback_ = callback;
1004 return thread_local_top_.current_vm_state_;
1010 ASSERT(thread_local_top_.isolate_ ==
this);
1011 StateTag current_state = thread_local_top_.current_vm_state_;
1012 if (current_state != JS && state == JS) {
1015 }
else if (current_state == JS && state != JS) {
1023 ASSERT((current_state == JS) == (state == JS));
1026 thread_local_top_.current_vm_state_ = state;
1029 void SetData(
void* data) { embedder_data_ = data; }
1033 return thread_local_top_.top_lookup_result_;
1036 thread_local_top_.top_lookup_result_ = top;
1040 return context_exit_happened_;
1055 if (date_cache != date_cache_) {
1066 return &optimizing_compiler_thread_;
1084 void* embedder_data_;
1089 class ThreadDataTable {
1095 void Insert(PerIsolateThreadData* data);
1097 void Remove(PerIsolateThreadData* data);
1098 void RemoveAllThreads(
Isolate* isolate);
1101 PerIsolateThreadData* list_;
1110 class EntryStackItem {
1112 EntryStackItem(PerIsolateThreadData* previous_thread_data,
1114 EntryStackItem* previous_item)
1116 previous_thread_data(previous_thread_data),
1117 previous_isolate(previous_isolate),
1118 previous_item(previous_item) { }
1121 PerIsolateThreadData* previous_thread_data;
1122 Isolate* previous_isolate;
1123 EntryStackItem* previous_item;
1131 static Mutex* process_wide_mutex_;
1136 static Isolate* default_isolate_;
1137 static ThreadDataTable* thread_data_table_;
1141 static void SetIsolateThreadLocals(Isolate* isolate,
1142 PerIsolateThreadData* data);
1150 PerIsolateThreadData* FindOrAllocatePerThreadDataForThisThread();
1154 static Isolate* GetDefaultIsolateForLocking();
1167 void PreallocatedMemoryThreadStart();
1168 void PreallocatedMemoryThreadStop();
1169 void InitializeThreadLocal();
1172 void MarkCompactPrologue(
bool is_compacting,
1173 ThreadLocalTop* archived_thread_data);
1174 void MarkCompactEpilogue(
bool is_compacting,
1175 ThreadLocalTop* archived_thread_data);
1179 void PropagatePendingExceptionToExternalTryCatch();
1181 void InitializeDebugger();
1185 bool IsErrorObject(Handle<Object> obj);
1187 EntryStackItem* entry_stack_;
1188 int stack_trace_nesting_level_;
1189 StringStream* incomplete_message_;
1191 PreallocatedMemoryThread* preallocated_memory_thread_;
1193 NoAllocationStringAllocator* preallocated_message_space_;
1194 Bootstrapper* bootstrapper_;
1195 RuntimeProfiler* runtime_profiler_;
1196 CompilationCache* compilation_cache_;
1197 Counters* counters_;
1198 CodeRange* code_range_;
1199 Mutex* break_access_;
1201 Mutex* debugger_access_;
1204 StatsTable* stats_table_;
1205 StubCache* stub_cache_;
1206 DeoptimizerData* deoptimizer_data_;
1207 ThreadLocalTop thread_local_top_;
1208 bool capture_stack_trace_for_uncaught_exceptions_;
1209 int stack_trace_for_uncaught_exceptions_frame_limit_;
1211 TranscendentalCache* transcendental_cache_;
1212 MemoryAllocator* memory_allocator_;
1213 KeyedLookupCache* keyed_lookup_cache_;
1214 ContextSlotCache* context_slot_cache_;
1215 DescriptorLookupCache* descriptor_lookup_cache_;
1218 UnicodeCache* unicode_cache_;
1220 PreallocatedStorage in_use_list_;
1221 PreallocatedStorage free_list_;
1222 bool preallocated_storage_preallocated_;
1223 InnerPointerToCodeCache* inner_pointer_to_code_cache_;
1224 StringInputBuffer* write_input_buffer_;
1225 GlobalHandles* global_handles_;
1226 ContextSwitcher* context_switcher_;
1228 RuntimeState runtime_state_;
1229 bool fp_stubs_generated_;
1230 StaticResource<SafeStringInputBuffer> compiler_safe_string_input_buffer_;
1232 bool has_installed_extensions_;
1233 StringTracker* string_tracker_;
1236 StringInputBuffer objects_string_compare_buffer_a_;
1237 StringInputBuffer objects_string_compare_buffer_b_;
1238 StaticResource<StringInputBuffer> objects_string_input_buffer_;
1240 regexp_macro_assembler_canonicalize_;
1241 RegExpStack* regexp_stack_;
1242 DateCache* date_cache_;
1247 bool context_exit_happened_;
1250 double time_millis_at_init_;
1252 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \
1253 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__)
1254 bool simulator_initialized_;
1256 Redirection* simulator_redirection_;
1261 HistogramInfo heap_histograms_[
LAST_TYPE + 1];
1262 JSObject::SpillInformation js_spill_information_;
1266 #ifdef ENABLE_DEBUGGER_SUPPORT
1267 Debugger* debugger_;
1271 #define GLOBAL_BACKING_STORE(type, name, initialvalue) \
1274 #undef GLOBAL_BACKING_STORE
1276 #define GLOBAL_ARRAY_BACKING_STORE(type, name, length) \
1277 type name##_[length];
1279 #undef GLOBAL_ARRAY_BACKING_STORE
1285 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
1286 static const intptr_t name##_debug_offset_;
1289 #undef ISOLATE_FIELD_OFFSET
1292 DeferredHandles* deferred_handles_head_;
1317 inline explicit SaveContext(
Isolate* isolate);
1320 if (context_.is_null()) {
1321 Isolate* isolate = Isolate::Current();
1325 Isolate* isolate = context_->GetIsolate();
1332 SaveContext*
prev() {
return prev_; }
1336 return (c_entry_fp_ == 0) || (c_entry_fp_ > frame->sp());
1341 #if __GNUC_VERSION__ >= 40100 && __GNUC_VERSION__ < 40300
1352 AssertNoContextChange() :
1357 ~AssertNoContextChange() {
1358 ASSERT(Isolate::Current()->context() == *context_);
1363 Handle<Context> context_;
1382 return isolate->break_access_->
TryLock();
1396 StackGuard* stack_guard = isolate_->stack_guard();
1401 return (reinterpret_cast<uintptr_t>(
this) < stack_guard->
climit()) &&
1416 : stack_guard_(isolate->stack_guard()) {
1417 stack_guard_->thread_local_.postpone_interrupts_nesting_++;
1418 stack_guard_->DisableInterrupts();
1422 if (--stack_guard_->thread_local_.postpone_interrupts_nesting_ == 0) {
1423 stack_guard_->EnableInterrupts();
1433 #define HEAP (v8::internal::Isolate::Current()->heap())
1434 #define FACTORY (v8::internal::Isolate::Current()->factory())
1435 #define ISOLATE (v8::internal::Isolate::Current())
1436 #define LOGGER (v8::internal::Isolate::Current()->logger())
1453 #endif // V8_ISOLATE_H_
void PrintStackTrace(FILE *out, char *thread_data)
static void Unlock(Isolate *isolate)
ContextSlotCache * context_slot_cache()
void TraceException(bool flag)
friend struct GlobalState
StackLimitCheck(Isolate *isolate)
RuntimeState * runtime_state()
Failure * StackOverflow()
static void * GetThreadLocal(LocalStorageKey key)
TranscendentalCache * transcendental_cache() const
void set_thread_id(ThreadId id)
void set_date_cache(DateCache *date_cache)
friend class OptimizingCompilerThread
#define NATIVE_CONTEXT_FIELDS(V)
StaticResource< SafeStringInputBuffer > * compiler_safe_string_input_buffer()
int pending_message_end_pos_
MaybeObject * pending_exception()
CompilationCache * compilation_cache()
#define NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name)
static Thread::LocalStorageKey per_isolate_thread_data_key()
#define DECLARE_ENUM(CamelName, hacker_name)
static void IsolateEnteredJS(Isolate *isolate)
void ScheduleThrow(Object *exception)
#define GLOBAL_ARRAY_ACCESSOR(type, name, length)
unibrow::Mapping< unibrow::Ecma262UnCanonicalize > * jsregexp_uncanonicalize()
HandleScopeImplementer * handle_scope_implementer()
Address * js_entry_sp_address()
Handle< Context > GetCallingNativeContext()
StateTag current_vm_state()
StringInputBuffer * objects_string_compare_buffer_a()
void ReportFailedAccessCheck(JSObject *receiver, v8::AccessType type)
StatsTable * stats_table()
ExceptionScope(Isolate *isolate)
static Address js_entry_sp(ThreadLocalTop *thread)
static const int kJSRegexpStaticOffsetsVectorSize
bool MayNamedAccess(JSObject *receiver, Object *key, v8::AccessType type)
MaybeObject ** pending_exception_address()
Address get_address_from_id(AddressId id)
static Failure * OutOfMemoryException()
#define GLOBAL_BACKING_STORE(type, name, initialvalue)
#define GLOBAL_ARRAY_BACKING_STORE(type, name, length)
void IterateDeferredHandles(ObjectVisitor *visitor)
MaybeObject * scheduled_exception_
void DoThrow(Object *exception, MessageLocation *location)
bool Init(Deserializer *des)
Handle< Context > context()
bool IsExternallyCaught()
Object * pending_message_obj_
Address try_catch_handler_address()
void mark_out_of_memory()
v8::HandleScope::Data HandleScopeData
Bootstrapper * bootstrapper()
INLINE(static Isolate *Current())
Failure * ReThrow(MaybeObject *exception)
PerIsolateThreadData * FindPerThreadDataForThisThread()
static Address handler(ThreadLocalTop *thread)
RegExpStack * regexp_stack()
#define ASSERT(condition)
static PerIsolateThreadData * CurrentPerIsolateThreadData()
void SetFailedAccessCheckCallback(v8::FailedAccessCheckCallback callback)
static StackGuard * GetDefaultIsolateStackGuard()
KeyedLookupCache * keyed_lookup_cache()
void clear_pending_exception()
void * formal_count_address()
ThreadManager * thread_manager()
void clear_scheduled_exception()
static Thread::LocalStorageKey isolate_key()
int pending_message_start_pos_
bool Matches(Isolate *isolate, ThreadId thread_id) const
INLINE(bool Equals(const ThreadId &other) const)
void PreallocatedStorageInit(size_t size)
void * ExternalReferenceRedirectorPointer()
void LinkDeferredHandles(DeferredHandles *deferred_handles)
List< HeapObject *, PreallocatedStorageAllocationPolicy > DebugObjectCache
Context ** context_address()
bool external_caught_exception()
bool IsDefaultIsolate() const
PerIsolateThreadData(Isolate *isolate, ThreadId thread_id)
void(* FailedAccessCheckCallback)(Local< Object > target, AccessType type, Local< Value > data)
StringInputBuffer * objects_string_compare_buffer_b()
Handle< GlobalObject > global_object()
void clear_pending_message()
void CaptureAndSetCurrentStackTraceFor(Handle< JSObject > error_object)
StackGuard * stack_guard()
void set_context_exit_happened(bool context_exit_happened)
Handle< Context > global_context()
void set_external_callback(Address callback)
bool OptionalRescheduleException(bool is_bottom_call)
GlobalObject * global_object()
UnicodeCache * unicode_cache()
Address try_catch_handler_address()
void FreeThreadResources()
static void EnsureDefaultIsolate()
Address * c_entry_fp_address()
void ReportPendingMessages()
#define ISOLATE_INIT_LIST(V)
INLINE(bool IsValid() const)
static Address c_entry_fp(ThreadLocalTop *thread)
friend class ThreadManager
void set_catcher(v8::TryCatch *catcher)
~PostponeInterruptsScope()
Script * pending_message_script_
v8::TryCatch * try_catch_handler()
StringTracker * string_tracker()
RuntimeProfiler * runtime_profiler()
static ThreadId Current()
Address external_callback_
Context * native_context()
bool context_exit_happened()
void set_context(Context *context)
friend class IsolateInitializer
void ComputeLocation(MessageLocation *target)
JSObject * global_proxy()
static void EnterDefaultIsolate()
unibrow::Mapping< unibrow::Ecma262Canonicalize > * regexp_macro_assembler_canonicalize()
MemoryAllocator * memory_allocator()
void NotifyExtensionInstalled()
MaybeObject * scheduled_exception()
Address has_pending_message_address()
void PrintCurrentStackTrace(FILE *out)
void Iterate(ObjectVisitor *v)
Handle< JSArray > CaptureCurrentStackTrace(int frame_limit, StackTrace::StackTraceOptions options)
GlobalHandles * global_handles()
static void * GetExistingThreadLocal(LocalStorageKey key)
SaveContext * save_context_
void SetCurrentVMState(StateTag state)
static void Lock(Isolate *isolate)
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
friend class ThreadDataTable
bool has_pending_message_
v8::ImplementationUtilities::HandleScopeData * handle_scope_data()
static double TimeCurrentMillis()
bool has_pending_exception()
PostponeInterruptsScope(Isolate *isolate)
Address external_callback()
static const int kUC16AlphabetSize
void * PreallocatedStorageNew(size_t size)
void SetCaptureStackTraceForUncaughtExceptions(bool capture, int frame_limit, StackTrace::StackTraceOptions options)
Handle< JSBuiltinsObject > js_builtins_object()
void UnlinkDeferredHandles(DeferredHandles *deferred_handles)
Failure * Throw(Object *exception, MessageLocation *location=NULL)
DeoptimizerData * deoptimizer_data()
DescriptorLookupCache * descriptor_lookup_cache()
void set_thread_state(ThreadState *value)
void SetTopLookupResult(LookupResult *top)
bool has_installed_extensions()
bool external_caught_exception_
Atomic32 NoBarrier_Load(volatile const Atomic32 *ptr)
bool HasOverflowed() const
void PushToPartialSnapshotCache(Object *obj)
Failure * PromoteScheduledException()
InnerPointerToCodeCache * inner_pointer_to_code_cache()
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 simulator(4 or 8, 8 is default)") DEFINE_bool(trace_exception
v8::FailedAccessCheckCallback failed_access_check_callback_
static Thread::LocalStorageKey thread_id_key()
#define FOR_EACH_ISOLATE_ADDRESS_NAME(C)
void IterateThread(ThreadVisitor *v)
static bool TryLock(Isolate *isolate)
ThreadState * thread_state() const
StaticResource< StringInputBuffer > * objects_string_input_buffer()
static void IsolateExitedJS(Isolate *isolate)
Handle< String > StackTraceString()
static ThreadId FromInteger(int id)
friend class EntryStackItem
#define GLOBAL_ACCESSOR(type, name, initialvalue)
void set_pending_exception(MaybeObject *exception)
LookupResult * top_lookup_result_
bool DebuggerHasBreakPoints()
void set_stack_limit(uintptr_t value)
Address pending_message_obj_address()
TemplateHashMapImpl< FreeStoreAllocationPolicy > HashMap
void set_try_catch_handler_address(Address address)
bool * external_caught_exception_address()
ZoneList< Handle< Object > > ZoneObjectList
bool fp_stubs_generated()
static const int kBMMaxShift
static int ArchiveSpacePerThread()
bool MayIndexedAccess(JSObject *receiver, uint32_t index, v8::AccessType type)
double time_millis_since_init()
void set_ignore_out_of_memory(bool value)
void set_external_caught_exception(bool value)
bool ignore_out_of_memory_
void set_save_context(SaveContext *save)
Isolate * isolate() const
Mutex * debugger_access()
MaybeObject ** scheduled_exception_address()
void InitializeLoggingAndCounters()
ContextSwitcher * context_switcher()
void UnregisterTryCatchHandler(v8::TryCatch *that)
Failure * TerminateExecution()
char * ArchiveThread(char *to)
OptimizingCompilerThread * optimizing_compiler_thread()
unibrow::Mapping< unibrow::CanonicalizationRange > * jsregexp_canonrange()
Failure * ThrowIllegalOperation()
LookupResult * top_lookup_result()
static ThreadId Invalid()
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 NULL
friend class ExecutionAccess
Address pending_message_script_address()
void RegisterTryCatchHandler(v8::TryCatch *that)
bool is_catchable_by_javascript(MaybeObject *exception)
char * RestoreThread(char *from)
MaybeObject * pending_exception_
bool has_scheduled_exception()
void set_context_switcher(ContextSwitcher *switcher)
Handle< Context > native_context()
INLINE(static Isolate *UncheckedCurrent())
StringInputBuffer * write_input_buffer()
SaveContext * save_context()
unibrow::Mapping< unibrow::Ecma262Canonicalize > * interp_canonicalize_mapping()
bool IsBelowFrame(JavaScriptFrame *frame)
bool ShouldReportException(bool *can_be_caught_externally, bool catchable_by_javascript)
friend class HandleScopeImplementer
void set_fp_stubs_generated(bool value)
ThreadLocalTop * thread_local_top()
ExecutionAccess(Isolate *isolate)
bool ignore_out_of_memory()
uintptr_t stack_limit() const
static const char *const kStackOverflowMessage
StateTag current_vm_state_
static bool IsSomeIsolateInJS()
Address * handler_address()
#define ISOLATE_INIT_ARRAY_LIST(V)
ThreadId thread_id() const
friend struct InitializeGlobalState
void PreallocatedStorageDelete(void *p)
NO_INLINE(void PushStackTraceAndDie(unsigned int magic, Object *object, Map *map, unsigned int magic2))
kPropertyAccessorsOffset kNamedPropertyHandlerOffset kInstanceTemplateOffset kAccessCheckInfoOffset kEvalFrominstructionsOffsetOffset kInstanceClassNameOffset flag