31 #include "../include/v8-debug.h"
54 struct CallInterfaceDescriptor;
57 struct CodeStubInterfaceDescriptor;
59 class CompilationCache;
60 class ConsStringIteratorOp;
61 class ContextSlotCache;
65 class DeoptimizerData;
68 class ExternalCallbackScope;
69 class ExternalReferenceTable;
71 class FunctionInfoListener;
72 class HandleScopeImplementer;
76 class InlineRuntimeFunctionsTable;
77 class InnerPointerToCodeCache;
78 class MaterializedObjectStore;
79 class NoAllocationStringAllocator;
80 class RandomNumberGenerator;
98 #ifdef ENABLE_DEBUGGER_SUPPORT
104 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \
105 !defined(__aarch64__) && V8_TARGET_ARCH_ARM64 || \
106 !defined(__mips__) && V8_TARGET_ARCH_MIPS
120 #define RETURN_IF_SCHEDULED_EXCEPTION(isolate) \
122 Isolate* __isolate__ = (isolate); \
123 if (__isolate__->has_scheduled_exception()) { \
124 return __isolate__->PromoteScheduledException(); \
128 #define RETURN_HANDLE_IF_SCHEDULED_EXCEPTION(isolate, T) \
130 Isolate* __isolate__ = (isolate); \
131 if (__isolate__->has_scheduled_exception()) { \
132 __isolate__->PromoteScheduledException(); \
133 return Handle<T>::null(); \
137 #define RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, value) \
139 if ((call).is_null()) { \
140 ASSERT((isolate)->has_pending_exception()); \
145 #define CHECK_NOT_EMPTY_HANDLE(isolate, call) \
147 ASSERT(!(isolate)->has_pending_exception()); \
148 CHECK(!(call).is_null()); \
151 #define RETURN_IF_EMPTY_HANDLE(isolate, call) \
152 RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, Failure::Exception())
154 #define FOR_EACH_ISOLATE_ADDRESS_NAME(C) \
155 C(Handler, handler) \
156 C(CEntryFP, c_entry_fp) \
157 C(Context, context) \
158 C(PendingException, pending_exception) \
159 C(ExternalCaughtException, external_caught_exception) \
160 C(JSEntrySP, js_entry_sp)
177 return id_ == other.id_;
182 return id_ != kInvalidId;
194 static const int kInvalidId = -1;
196 explicit ThreadId(
int id) : id_(id) {}
198 static int AllocateThreadId();
200 static int GetCurrentThreadId();
210 #define FIELD_ACCESSOR(type, name) \
211 inline void set_##name(type v) { name##_ = v; } \
212 inline type name() const { return name##_; }
244 ASSERT(!has_pending_message_);
245 ASSERT(!external_caught_exception_);
274 Simulator* simulator_;
292 void InitializeInternal();
294 Address try_catch_handler_address_;
298 #ifdef ENABLE_DEBUGGER_SUPPORT
300 #define ISOLATE_DEBUGGER_INIT_LIST(V) \
301 V(DebuggerAgent*, debugger_agent_instance, NULL)
304 #define ISOLATE_DEBUGGER_INIT_LIST(V)
309 #if V8_TARGET_ARCH_ARM && !defined(__arm__) || \
310 V8_TARGET_ARCH_ARM64 && !defined(__aarch64__) || \
311 V8_TARGET_ARCH_MIPS && !defined(__mips__)
313 #define ISOLATE_INIT_SIMULATOR_LIST(V) \
314 V(bool, simulator_initialized, false) \
315 V(HashMap*, simulator_i_cache, NULL) \
316 V(Redirection*, simulator_redirection, NULL)
319 #define ISOLATE_INIT_SIMULATOR_LIST(V)
326 #define ISOLATE_INIT_DEBUG_ARRAY_LIST(V) \
327 V(CommentStatistic, paged_space_comments_statistics, \
328 CommentStatistic::kMaxComments + 1) \
329 V(int, code_kind_statistics, Code::NUMBER_OF_KINDS)
332 #define ISOLATE_INIT_DEBUG_ARRAY_LIST(V)
336 #define ISOLATE_INIT_ARRAY_LIST(V) \
338 V(int32_t, jsregexp_static_offsets_vector, kJSRegexpStaticOffsetsVectorSize) \
339 V(int, bad_char_shift_table, kUC16AlphabetSize) \
340 V(int, good_suffix_shift_table, (kBMMaxShift + 1)) \
341 V(int, suffix_table, (kBMMaxShift + 1)) \
342 V(uint32_t, private_random_seed, 2) \
343 ISOLATE_INIT_DEBUG_ARRAY_LIST(V)
347 #define ISOLATE_INIT_LIST(V) \
349 V(int, serialize_partial_snapshot_cache_length, 0) \
350 V(int, serialize_partial_snapshot_cache_capacity, 0) \
351 V(Object**, serialize_partial_snapshot_cache, NULL) \
354 V(byte*, assembler_spare_buffer, NULL) \
355 V(FatalErrorCallback, exception_behavior, NULL) \
356 V(LogEventCallback, event_logger, NULL) \
357 V(AllowCodeGenerationFromStringsCallback, allow_code_gen_callback, NULL) \
360 V(int, next_serial_number, 0) \
361 V(ExternalReferenceRedirectorPointer*, external_reference_redirector, NULL) \
363 V(FunctionInfoListener*, active_function_info_listener, NULL) \
365 V(Relocatable*, relocatable_top, NULL) \
366 V(DebugObjectCache*, string_stream_debug_object_cache, NULL) \
367 V(Object*, string_stream_current_security_token, NULL) \
369 V(ExternalReferenceTable*, external_reference_table, NULL) \
371 V(int, ast_node_id, 0) \
372 V(unsigned, ast_node_count, 0) \
373 V(bool, microtask_pending, false) \
374 V(bool, autorun_microtasks, true) \
375 V(HStatistics*, hstatistics, NULL) \
376 V(HTracer*, htracer, NULL) \
377 V(CodeTracer*, code_tracer, NULL) \
378 V(bool, fp_stubs_generated, false) \
379 V(int, max_available_threads, 0) \
380 V(uint32_t, per_isolate_assert_data, 0xFFFFFFFFu) \
381 ISOLATE_INIT_SIMULATOR_LIST(V) \
382 ISOLATE_DEBUGGER_INIT_LIST(V)
384 #define THREAD_LOCAL_TOP_ACCESSOR(type, name) \
385 inline void set_##name(type v) { thread_local_top_.name##_ = v; } \
386 inline type name() const { return thread_local_top_.name##_; }
392 class ThreadDataTable;
393 class EntryStackItem;
404 thread_id_(thread_id),
407 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \
408 !defined(__aarch64__) && V8_TARGET_ARCH_ARM64 || \
409 !defined(__mips__) && V8_TARGET_ARCH_MIPS
421 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \
422 !defined(__aarch64__) && V8_TARGET_ARCH_ARM64 || \
423 !defined(__mips__) && V8_TARGET_ARCH_MIPS
428 return isolate_ == isolate && thread_id_.Equals(thread_id);
434 uintptr_t stack_limit_;
435 ThreadState* thread_state_;
437 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \
438 !defined(__aarch64__) && V8_TARGET_ARCH_ARM64 || \
439 !defined(__mips__) && V8_TARGET_ARCH_MIPS
455 #define DECLARE_ENUM(CamelName, hacker_name) k##CamelName##Address,
518 #ifdef ENABLE_DEBUGGER_SUPPORT
521 static Debugger* GetDefaultIsolateDebugger();
537 return thread_id_key_;
559 ASSERT(context ==
NULL || context->IsContext());
560 thread_local_top_.context_ =
context;
572 return thread_local_top_.pending_exception_;
576 thread_local_top_.pending_exception_ = exception;
580 thread_local_top_.pending_exception_ = heap_.the_hole_value();
584 return &thread_local_top_.pending_exception_;
588 return !thread_local_top_.pending_exception_->IsTheHole();
594 thread_local_top_.has_pending_message_ =
false;
595 thread_local_top_.pending_message_obj_ = heap_.the_hole_value();
596 thread_local_top_.pending_message_script_ = heap_.the_hole_value();
599 return thread_local_top_.TryCatchHandler();
602 return thread_local_top_.try_catch_handler_address();
605 return &thread_local_top_.external_caught_exception_;
611 return &thread_local_top_.scheduled_exception_;
615 return reinterpret_cast<Address>(&thread_local_top_.pending_message_obj_);
619 return reinterpret_cast<Address>(&thread_local_top_.has_pending_message_);
623 return reinterpret_cast<Address>(
624 &thread_local_top_.pending_message_script_);
629 return thread_local_top_.scheduled_exception_;
632 return thread_local_top_.scheduled_exception_ != heap_.the_hole_value();
635 thread_local_top_.scheduled_exception_ = heap_.the_hole_value();
641 return exception !=
heap()->termination_exception();
649 return thread->c_entry_fp_;
654 return &thread_local_top_.c_entry_fp_;
660 return thread_local_top_.js_entry_sp_;
663 return &thread_local_top_.js_entry_sp_;
701 catcher_(isolate_->catcher())
705 isolate_->set_catcher(catcher_);
724 NO_INLINE(
void PushStackTraceAndDie(
unsigned int magic,
727 unsigned int magic2));
790 bool catchable_by_javascript);
802 void Iterate(ObjectVisitor* v);
803 void Iterate(ObjectVisitor* v, ThreadLocalTop* t);
804 char*
Iterate(ObjectVisitor* v,
char* t);
828 #define GLOBAL_ACCESSOR(type, name, initialvalue) \
829 inline type name() const { \
830 ASSERT(OFFSET_OF(Isolate, name##_) == name##_debug_offset_); \
833 inline void set_##name(type value) { \
834 ASSERT(OFFSET_OF(Isolate, name##_) == name##_debug_offset_); \
838 #undef GLOBAL_ACCESSOR
840 #define GLOBAL_ARRAY_ACCESSOR(type, name, length) \
841 inline type* name() { \
842 ASSERT(OFFSET_OF(Isolate, name##_) == name##_debug_offset_); \
843 return &(name##_)[0]; \
846 #undef GLOBAL_ARRAY_ACCESSOR
848 #define NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name) \
849 Handle<type> name() { \
850 return Handle<type>(context()->native_context()->name(), this); \
852 bool is_##name(type* value) { \
853 return context()->native_context()->is_##name(value); \
856 #undef NATIVE_CONTEXT_FIELD_ACCESSOR
881 return materialized_object_store_;
885 return memory_allocator_;
889 return keyed_lookup_cache_;
893 return context_slot_cache_;
897 return descriptor_lookup_cache_;
903 ASSERT(handle_scope_implementer_);
904 return handle_scope_implementer_;
909 return unicode_cache_;
913 return inner_pointer_to_code_cache_;
927 return &jsregexp_uncanonicalize_;
931 return &jsregexp_canonrange_;
935 return &objects_string_compare_iterator_a_;
939 return &objects_string_compare_iterator_b_;
943 return &objects_string_iterator_;
951 has_installed_extensions_ =
true;
958 return ®exp_macro_assembler_canonicalize_;
965 return &interp_canonicalize_mapping_;
970 #ifdef ENABLE_DEBUGGER_SUPPORT
971 Debugger* debugger() {
972 if (!
NoBarrier_Load(&debugger_initialized_)) InitializeDebugger();
976 if (!
NoBarrier_Load(&debugger_initialized_)) InitializeDebugger();
988 HistogramInfo* heap_histograms() {
return heap_histograms_; }
990 JSObject::SpillInformation* js_spill_information() {
991 return &js_spill_information_;
1005 embedder_data_[slot] = data;
1009 return embedder_data_[slot];
1030 if (date_cache != date_cache_) {
1059 bool IsDeferredHandle(
Object** location);
1064 ASSERT(optimizing_compiler_thread_ ==
NULL ||
1065 FLAG_concurrent_recompilation);
1066 return optimizing_compiler_thread_ !=
NULL;
1071 ASSERT(optimizing_compiler_thread_ ==
NULL ||
1072 FLAG_concurrent_recompilation);
1073 return optimizing_compiler_thread_ !=
NULL && FLAG_concurrent_osr;
1077 return optimizing_compiler_thread_;
1081 return num_sweeper_threads_;
1085 return sweeper_thread_;
1093 int id()
const {
return static_cast<int>(id_); }
1112 int id = next_optimization_id_++;
1114 next_optimization_id_ = 0;
1142 class ThreadDataTable {
1148 void Insert(PerIsolateThreadData* data);
1149 void Remove(PerIsolateThreadData* data);
1150 void RemoveAllThreads(
Isolate* isolate);
1153 PerIsolateThreadData* list_;
1162 class EntryStackItem {
1164 EntryStackItem(PerIsolateThreadData* previous_thread_data,
1166 EntryStackItem* previous_item)
1168 previous_thread_data(previous_thread_data),
1169 previous_isolate(previous_isolate),
1170 previous_item(previous_item) { }
1173 PerIsolateThreadData* previous_thread_data;
1174 Isolate* previous_isolate;
1175 EntryStackItem* previous_item;
1183 static Mutex process_wide_mutex_;
1188 static Isolate* default_isolate_;
1189 static ThreadDataTable* thread_data_table_;
1196 static void SetIsolateThreadLocals(Isolate* isolate,
1197 PerIsolateThreadData* data);
1201 PerIsolateThreadData* FindOrAllocatePerThreadDataForThisThread();
1214 void InitializeThreadLocal();
1216 void MarkCompactPrologue(
bool is_compacting,
1217 ThreadLocalTop* archived_thread_data);
1218 void MarkCompactEpilogue(
bool is_compacting,
1219 ThreadLocalTop* archived_thread_data);
1223 void PropagatePendingExceptionToExternalTryCatch();
1225 void InitializeDebugger();
1229 bool IsErrorObject(Handle<Object>
obj);
1232 EntryStackItem* entry_stack_;
1233 int stack_trace_nesting_level_;
1234 StringStream* incomplete_message_;
1236 Bootstrapper* bootstrapper_;
1237 RuntimeProfiler* runtime_profiler_;
1238 CompilationCache* compilation_cache_;
1239 Counters* counters_;
1240 CodeRange* code_range_;
1241 RecursiveMutex break_access_;
1243 RecursiveMutex debugger_access_;
1246 StatsTable* stats_table_;
1247 StubCache* stub_cache_;
1248 DeoptimizerData* deoptimizer_data_;
1249 MaterializedObjectStore* materialized_object_store_;
1250 ThreadLocalTop thread_local_top_;
1251 bool capture_stack_trace_for_uncaught_exceptions_;
1252 int stack_trace_for_uncaught_exceptions_frame_limit_;
1254 MemoryAllocator* memory_allocator_;
1255 KeyedLookupCache* keyed_lookup_cache_;
1256 ContextSlotCache* context_slot_cache_;
1257 DescriptorLookupCache* descriptor_lookup_cache_;
1258 HandleScopeData handle_scope_data_;
1260 UnicodeCache* unicode_cache_;
1262 InnerPointerToCodeCache* inner_pointer_to_code_cache_;
1263 ConsStringIteratorOp* write_iterator_;
1264 GlobalHandles* global_handles_;
1265 EternalHandles* eternal_handles_;
1267 RuntimeState runtime_state_;
1269 bool has_installed_extensions_;
1270 StringTracker* string_tracker_;
1273 ConsStringIteratorOp objects_string_compare_iterator_a_;
1274 ConsStringIteratorOp objects_string_compare_iterator_b_;
1275 StaticResource<ConsStringIteratorOp> objects_string_iterator_;
1277 regexp_macro_assembler_canonicalize_;
1278 RegExpStack* regexp_stack_;
1279 DateCache* date_cache_;
1281 CodeStubInterfaceDescriptor* code_stub_interface_descriptors_;
1282 CallInterfaceDescriptor* call_descriptors_;
1283 RandomNumberGenerator* random_number_generator_;
1286 bool has_fatal_error_;
1289 bool use_crankshaft_;
1292 bool initialized_from_snapshot_;
1295 double time_millis_at_init_;
1299 HistogramInfo heap_histograms_[
LAST_TYPE + 1];
1300 JSObject::SpillInformation js_spill_information_;
1303 #ifdef ENABLE_DEBUGGER_SUPPORT
1304 Debugger* debugger_;
1307 CpuProfiler* cpu_profiler_;
1308 HeapProfiler* heap_profiler_;
1311 #define GLOBAL_BACKING_STORE(type, name, initialvalue) \
1314 #undef GLOBAL_BACKING_STORE
1316 #define GLOBAL_ARRAY_BACKING_STORE(type, name, length) \
1317 type name##_[length];
1319 #undef GLOBAL_ARRAY_BACKING_STORE
1325 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
1326 static const intptr_t name##_debug_offset_;
1329 #undef ISOLATE_FIELD_OFFSET
1332 DeferredHandles* deferred_handles_head_;
1335 int num_sweeper_threads_;
1338 unsigned int stress_deopt_count_;
1340 int next_optimization_id_;
1361 #undef FIELD_ACCESSOR
1362 #undef THREAD_LOCAL_TOP_ACCESSOR
1370 inline explicit SaveContext(
Isolate* isolate);
1373 isolate_->set_context(context_.is_null() ?
NULL : *context_);
1374 isolate_->set_save_context(prev_);
1378 SaveContext*
prev() {
return prev_; }
1382 return (c_entry_fp_ == 0) || (c_entry_fp_ > frame->sp());
1396 explicit AssertNoContextChange(
Isolate* isolate)
1397 : isolate_(isolate),
1398 context_(isolate->context(), isolate) { }
1399 ~AssertNoContextChange() {
1400 ASSERT(isolate_->context() == *context_);
1405 Handle<Context> context_;
1438 StackGuard* stack_guard = isolate_->stack_guard();
1439 return (reinterpret_cast<uintptr_t>(
this) < stack_guard->
real_climit());
1453 : stack_guard_(isolate->stack_guard()), isolate_(isolate) {
1454 ExecutionAccess access(isolate_);
1455 stack_guard_->thread_local_.postpone_interrupts_nesting_++;
1456 stack_guard_->DisableInterrupts();
1460 ExecutionAccess access(isolate_);
1461 if (--stack_guard_->thread_local_.postpone_interrupts_nesting_ == 0) {
1462 stack_guard_->EnableInterrupts();
1471 class CodeTracer
V8_FINAL :
public Malloced {
1476 if (!ShouldRedirect()) {
1481 if (FLAG_redirect_code_traces_to ==
NULL) {
1487 OS::StrNCpy(filename_, FLAG_redirect_code_traces_to, filename_.length());
1495 explicit Scope(CodeTracer* tracer) : tracer_(tracer) { tracer->OpenFile(); }
1498 FILE*
file()
const {
return tracer_->file(); }
1501 CodeTracer* tracer_;
1505 if (!ShouldRedirect()) {
1509 if (file_ ==
NULL) {
1510 file_ =
OS::FOpen(filename_.start(),
"a");
1517 if (!ShouldRedirect()) {
1521 if (--scope_depth_ == 0) {
1527 FILE*
file()
const {
return file_; }
1530 static bool ShouldRedirect() {
1531 return FLAG_redirect_code_traces;
1534 EmbeddedVector<char, 128> filename_;
1541 #endif // V8_ISOLATE_H_
static void Unlock(Isolate *isolate)
ContextSlotCache * context_slot_cache()
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 NULL
friend struct GlobalState
StackLimitCheck(Isolate *isolate)
friend class SweeperThread
RuntimeState * runtime_state()
Failure * StackOverflow()
static void * GetThreadLocal(LocalStorageKey key)
void set_date_cache(DateCache *date_cache)
friend class OptimizingCompilerThread
#define NATIVE_CONTEXT_FIELDS(V)
AssertNoContextChange(Isolate *isolate)
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()
void PrintStack(StringStream *accumulator)
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 map
#define DECLARE_ENUM(CamelName, hacker_name)
void ScheduleThrow(Object *exception)
CodeTracer * GetCodeTracer()
PerIsolateThreadData * FindPerThreadDataForThread(ThreadId thread_id)
#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()
void ReportFailedAccessCheckWrapper(Handle< JSObject > receiver, v8::AccessType type)
bool concurrent_osr_enabled() const
StaticResource< ConsStringIteratorOp > * objects_string_iterator()
Handle< JSObject > GetSymbolRegistry()
void ReportFailedAccessCheck(JSObject *receiver, v8::AccessType type)
StatsTable * stats_table()
ExceptionScope(Isolate *isolate)
static const uint32_t kNumIsolateDataSlots
static const int kJSRegexpStaticOffsetsVectorSize
bool MayNamedAccess(JSObject *receiver, Object *key, v8::AccessType type)
MaybeObject ** pending_exception_address()
Address get_address_from_id(AddressId id)
#define GLOBAL_BACKING_STORE(type, name, initialvalue)
CallInterfaceDescriptor * call_descriptor(CallDescriptorKey index)
#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)
ExternalCallbackScope * external_callback_scope_
void set_function_entry_hook(FunctionEntryHook function_entry_hook)
Handle< Context > context()
bool IsExternallyCaught()
bool IsCodePreAgingActive()
Object * pending_message_obj_
Bootstrapper * bootstrapper()
INLINE(static Isolate *Current())
Failure * ReThrow(MaybeObject *exception)
bool MayIndexedAccessWrapper(Handle< JSObject > receiver, uint32_t index, v8::AccessType type)
PerIsolateThreadData * FindPerThreadDataForThisThread()
CodeStubInterfaceDescriptor * code_stub_interface_descriptor(int index)
static Address handler(ThreadLocalTop *thread)
Scope(CodeTracer *tracer)
HandleScopeData * handle_scope_data()
RegExpStack * regexp_stack()
RandomNumberGenerator * random_number_generator()
#define ASSERT(condition)
static PerIsolateThreadData * CurrentPerIsolateThreadData()
void SetFailedAccessCheckCallback(v8::FailedAccessCheckCallback callback)
static StackGuard * GetDefaultIsolateStackGuard()
KeyedLookupCache * keyed_lookup_cache()
void clear_pending_exception()
bool concurrent_recompilation_enabled()
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)
Object * pending_message_script_
void * ExternalReferenceRedirectorPointer()
static void SetCrashIfDefaultIsolateInitialized()
CodeTracer(int isolate_id)
void LinkDeferredHandles(DeferredHandles *deferred_handles)
void CaptureAndSetDetailedStackTrace(Handle< JSObject > error_object)
Context ** context_address()
bool IsDefaultIsolate() const
Failure * ThrowInvalidStringLength()
Object * FindCodeObject(Address a)
PerIsolateThreadData(Isolate *isolate, ThreadId thread_id)
bool MayNamedAccessWrapper(Handle< JSObject > receiver, Handle< Object > key, v8::AccessType type)
void(* FailedAccessCheckCallback)(Local< Object > target, AccessType type, Local< Value > data)
Handle< GlobalObject > global_object()
void clear_pending_message()
StackGuard * stack_guard()
int num_sweeper_threads() const
RecursiveMutex * break_access()
Handle< Context > global_context()
bool OptionalRescheduleException(bool is_bottom_call)
GlobalObject * global_object()
void(* FunctionEntryHook)(uintptr_t function, uintptr_t return_addr_location)
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)
bool initialized_from_snapshot()
ConsStringIteratorOp * write_iterator()
INLINE(bool IsValid() const)
#define THREAD_LOCAL_TOP_ACCESSOR(type, name)
static Address c_entry_fp(ThreadLocalTop *thread)
friend class ThreadManager
~PostponeInterruptsScope()
FunctionEntryHook function_entry_hook()
v8::TryCatch * try_catch_handler()
StringTracker * string_tracker()
RuntimeProfiler * runtime_profiler()
static ThreadId Current()
static bool IsValid(intptr_t value)
void set_context(Context *context)
SweeperThread ** sweeper_threads()
friend class IsolateInitializer
void ComputeLocation(MessageLocation *target)
JSObject * global_proxy()
ConsStringIteratorOp * objects_string_compare_iterator_b()
static void EnterDefaultIsolate()
unibrow::Mapping< unibrow::Ecma262Canonicalize > * regexp_macro_assembler_canonicalize()
MemoryAllocator * memory_allocator()
void NotifyExtensionInstalled()
MaybeObject * scheduled_exception()
EternalHandles * eternal_handles()
Address has_pending_message_address()
static FILE * FOpen(const char *path, const char *mode)
void PrintCurrentStackTrace(FILE *out)
void IterateThread(ThreadVisitor *v, char *t)
void Iterate(ObjectVisitor *v)
Handle< JSArray > CaptureCurrentStackTrace(int frame_limit, StackTrace::StackTraceOptions options)
void RestorePendingMessageFromTryCatch(v8::TryCatch *handler)
GlobalHandles * global_handles()
static void * GetExistingThreadLocal(LocalStorageKey key)
SaveContext * save_context_
static v8::Isolate * GetDefaultIsolateForLocking()
static void Lock(Isolate *isolate)
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
static int GetCurrentProcessId()
friend class ThreadDataTable
bool has_pending_message_
static double TimeCurrentMillis()
bool has_pending_exception()
PostponeInterruptsScope(Isolate *isolate)
static const int kUC16AlphabetSize
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()
bool IsFastArrayConstructorPrototypeChainIntact()
bool use_crankshaft() const
bool has_installed_extensions()
bool external_caught_exception_
Atomic32 NoBarrier_Load(volatile const Atomic32 *ptr)
bool HasOverflowed() const
void PushToPartialSnapshotCache(Object *obj)
static int SNPrintF(Vector< char > str, const char *format,...)
int WriteChars(const char *filename, const char *str, int size, bool verbose)
Failure * PromoteScheduledException()
HeapProfiler * heap_profiler() const
InnerPointerToCodeCache * inner_pointer_to_code_cache()
MessageLocation GetMessageLocation()
static void GlobalTearDown()
ConsStringIteratorOp * objects_string_compare_iterator_a()
v8::FailedAccessCheckCallback failed_access_check_callback_
static Thread::LocalStorageKey thread_id_key()
#define FOR_EACH_ISOLATE_ADDRESS_NAME(C)
static bool TryLock(Isolate *isolate)
CpuProfiler * cpu_profiler() const
Handle< JSArray > CaptureSimpleStackTrace(Handle< JSObject > error_object, Handle< Object > caller, int limit)
Map * get_initial_js_array_map(ElementsKind kind)
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()
Address pending_message_obj_address()
void * stress_deopt_count_address()
bool * external_caught_exception_address()
ZoneList< Handle< Object > > ZoneObjectList
static const int kBMMaxShift
MaterializedObjectStore * materialized_object_store()
static int ArchiveSpacePerThread()
bool MayIndexedAccess(JSObject *receiver, uint32_t index, v8::AccessType type)
HStatistics * GetHStatistics()
double time_millis_since_init()
static void StrNCpy(Vector< char > dest, const char *src, size_t n)
Isolate * isolate() const
MaybeObject ** scheduled_exception_address()
void InitializeLoggingAndCounters()
void UnregisterTryCatchHandler(v8::TryCatch *that)
Failure * TerminateExecution()
char * ArchiveThread(char *to)
OptimizingCompilerThread * optimizing_compiler_thread()
void SetData(uint32_t slot, void *data)
unibrow::Mapping< unibrow::CanonicalizationRange > * jsregexp_canonrange()
void * GetData(uint32_t slot)
Failure * ThrowIllegalOperation()
static ThreadId Invalid()
friend class ExecutionAccess
RecursiveMutex * debugger_access()
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()
Handle< Context > native_context()
INLINE(static Isolate *UncheckedCurrent())
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
ThreadLocalTop * thread_local_top()
ExecutionAccess(Isolate *isolate)
List< HeapObject * > DebugObjectCache
static const char *const kStackOverflowMessage
StateTag current_vm_state_
Address * handler_address()
#define ISOLATE_INIT_ARRAY_LIST(V)
void CancelTerminateExecution()
#define FIELD_ACCESSOR(type, name)
ThreadId thread_id() const
friend struct InitializeGlobalState
NO_INLINE(void PushStackTraceAndDie(unsigned int magic, Object *object, Map *map, unsigned int magic2))