| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 namespace v8 { | 53 namespace v8 { |
| 54 namespace internal { | 54 namespace internal { |
| 55 | 55 |
| 56 class Bootstrapper; | 56 class Bootstrapper; |
| 57 class CodeGenerator; | 57 class CodeGenerator; |
| 58 class CodeRange; | 58 class CodeRange; |
| 59 struct CodeStubInterfaceDescriptor; | 59 struct CodeStubInterfaceDescriptor; |
| 60 class CodeTracer; | 60 class CodeTracer; |
| 61 class CompilationCache; | 61 class CompilationCache; |
| 62 class ContextSlotCache; | 62 class ContextSlotCache; |
| 63 class ContextSwitcher; | |
| 64 class Counters; | 63 class Counters; |
| 65 class CpuFeatures; | 64 class CpuFeatures; |
| 66 class CpuProfiler; | 65 class CpuProfiler; |
| 67 class DeoptimizerData; | 66 class DeoptimizerData; |
| 68 class Deserializer; | 67 class Deserializer; |
| 69 class EmptyStatement; | 68 class EmptyStatement; |
| 70 class ExternalCallbackScope; | 69 class ExternalCallbackScope; |
| 71 class ExternalReferenceTable; | 70 class ExternalReferenceTable; |
| 72 class Factory; | 71 class Factory; |
| 73 class FunctionInfoListener; | 72 class FunctionInfoListener; |
| 74 class HandleScopeImplementer; | 73 class HandleScopeImplementer; |
| 75 class HeapProfiler; | 74 class HeapProfiler; |
| 76 class HStatistics; | 75 class HStatistics; |
| 77 class HTracer; | 76 class HTracer; |
| 78 class InlineRuntimeFunctionsTable; | 77 class InlineRuntimeFunctionsTable; |
| 79 class NoAllocationStringAllocator; | 78 class NoAllocationStringAllocator; |
| 80 class InnerPointerToCodeCache; | 79 class InnerPointerToCodeCache; |
| 81 class PreallocatedMemoryThread; | |
| 82 class RandomNumberGenerator; | 80 class RandomNumberGenerator; |
| 83 class RegExpStack; | 81 class RegExpStack; |
| 84 class SaveContext; | 82 class SaveContext; |
| 85 class UnicodeCache; | 83 class UnicodeCache; |
| 86 class ConsStringIteratorOp; | 84 class ConsStringIteratorOp; |
| 87 class ScannerBase; | 85 class ScannerBase; |
| 88 class StringTracker; | 86 class StringTracker; |
| 89 class StubCache; | 87 class StubCache; |
| 90 class SweeperThread; | 88 class SweeperThread; |
| 91 class ThreadManager; | 89 class ThreadManager; |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 // Whether out of memory exceptions should be ignored. | 295 // Whether out of memory exceptions should be ignored. |
| 298 bool ignore_out_of_memory_; | 296 bool ignore_out_of_memory_; |
| 299 | 297 |
| 300 private: | 298 private: |
| 301 void InitializeInternal(); | 299 void InitializeInternal(); |
| 302 | 300 |
| 303 Address try_catch_handler_address_; | 301 Address try_catch_handler_address_; |
| 304 }; | 302 }; |
| 305 | 303 |
| 306 | 304 |
| 307 class SystemThreadManager { | |
| 308 public: | |
| 309 enum ParallelSystemComponent { | |
| 310 PARALLEL_SWEEPING, | |
| 311 CONCURRENT_SWEEPING, | |
| 312 CONCURRENT_RECOMPILATION | |
| 313 }; | |
| 314 | |
| 315 static int NumberOfParallelSystemThreads(ParallelSystemComponent type); | |
| 316 | |
| 317 static const int kMaxThreads = 4; | |
| 318 }; | |
| 319 | |
| 320 | |
| 321 #ifdef ENABLE_DEBUGGER_SUPPORT | 305 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 322 | 306 |
| 323 #define ISOLATE_DEBUGGER_INIT_LIST(V) \ | 307 #define ISOLATE_DEBUGGER_INIT_LIST(V) \ |
| 324 V(DebuggerAgent*, debugger_agent_instance, NULL) | 308 V(DebuggerAgent*, debugger_agent_instance, NULL) |
| 325 #else | 309 #else |
| 326 | 310 |
| 327 #define ISOLATE_DEBUGGER_INIT_LIST(V) | 311 #define ISOLATE_DEBUGGER_INIT_LIST(V) |
| 328 | 312 |
| 329 #endif | 313 #endif |
| 330 | 314 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 341 | 325 |
| 342 #define ISOLATE_INIT_ARRAY_LIST(V) \ | 326 #define ISOLATE_INIT_ARRAY_LIST(V) \ |
| 343 /* SerializerDeserializer state. */ \ | 327 /* SerializerDeserializer state. */ \ |
| 344 V(int32_t, jsregexp_static_offsets_vector, kJSRegexpStaticOffsetsVectorSize) \ | 328 V(int32_t, jsregexp_static_offsets_vector, kJSRegexpStaticOffsetsVectorSize) \ |
| 345 V(int, bad_char_shift_table, kUC16AlphabetSize) \ | 329 V(int, bad_char_shift_table, kUC16AlphabetSize) \ |
| 346 V(int, good_suffix_shift_table, (kBMMaxShift + 1)) \ | 330 V(int, good_suffix_shift_table, (kBMMaxShift + 1)) \ |
| 347 V(int, suffix_table, (kBMMaxShift + 1)) \ | 331 V(int, suffix_table, (kBMMaxShift + 1)) \ |
| 348 V(uint32_t, private_random_seed, 2) \ | 332 V(uint32_t, private_random_seed, 2) \ |
| 349 ISOLATE_INIT_DEBUG_ARRAY_LIST(V) | 333 ISOLATE_INIT_DEBUG_ARRAY_LIST(V) |
| 350 | 334 |
| 351 typedef List<HeapObject*, PreallocatedStorageAllocationPolicy> DebugObjectCache; | 335 typedef List<HeapObject*> DebugObjectCache; |
| 352 | 336 |
| 353 #define ISOLATE_INIT_LIST(V) \ | 337 #define ISOLATE_INIT_LIST(V) \ |
| 354 /* SerializerDeserializer state. */ \ | 338 /* SerializerDeserializer state. */ \ |
| 355 V(int, serialize_partial_snapshot_cache_length, 0) \ | 339 V(int, serialize_partial_snapshot_cache_length, 0) \ |
| 356 V(int, serialize_partial_snapshot_cache_capacity, 0) \ | 340 V(int, serialize_partial_snapshot_cache_capacity, 0) \ |
| 357 V(Object**, serialize_partial_snapshot_cache, NULL) \ | 341 V(Object**, serialize_partial_snapshot_cache, NULL) \ |
| 358 /* Assembler state. */ \ | 342 /* Assembler state. */ \ |
| 359 /* A previously allocated buffer of kMinimalBufferSize bytes, or NULL. */ \ | 343 /* A previously allocated buffer of kMinimalBufferSize bytes, or NULL. */ \ |
| 360 V(byte*, assembler_spare_buffer, NULL) \ | 344 V(byte*, assembler_spare_buffer, NULL) \ |
| 361 V(FatalErrorCallback, exception_behavior, NULL) \ | 345 V(FatalErrorCallback, exception_behavior, NULL) \ |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 // exception. | 711 // exception. |
| 728 bool is_out_of_memory(); | 712 bool is_out_of_memory(); |
| 729 bool ignore_out_of_memory() { | 713 bool ignore_out_of_memory() { |
| 730 return thread_local_top_.ignore_out_of_memory_; | 714 return thread_local_top_.ignore_out_of_memory_; |
| 731 } | 715 } |
| 732 void set_ignore_out_of_memory(bool value) { | 716 void set_ignore_out_of_memory(bool value) { |
| 733 thread_local_top_.ignore_out_of_memory_ = value; | 717 thread_local_top_.ignore_out_of_memory_ = value; |
| 734 } | 718 } |
| 735 | 719 |
| 736 void PrintCurrentStackTrace(FILE* out); | 720 void PrintCurrentStackTrace(FILE* out); |
| 737 void PrintStackTrace(FILE* out, char* thread_data); | |
| 738 void PrintStack(StringStream* accumulator); | 721 void PrintStack(StringStream* accumulator); |
| 739 void PrintStack(FILE* out); | 722 void PrintStack(FILE* out); |
| 740 void PrintStack(); | |
| 741 Handle<String> StackTraceString(); | 723 Handle<String> StackTraceString(); |
| 742 NO_INLINE(void PushStackTraceAndDie(unsigned int magic, | 724 NO_INLINE(void PushStackTraceAndDie(unsigned int magic, |
| 743 Object* object, | 725 Object* object, |
| 744 Map* map, | 726 Map* map, |
| 745 unsigned int magic2)); | 727 unsigned int magic2)); |
| 746 Handle<JSArray> CaptureCurrentStackTrace( | 728 Handle<JSArray> CaptureCurrentStackTrace( |
| 747 int frame_limit, | 729 int frame_limit, |
| 748 StackTrace::StackTraceOptions options); | 730 StackTrace::StackTraceOptions options); |
| 749 | 731 |
| 750 Handle<JSArray> CaptureSimpleStackTrace(Handle<JSObject> error_object, | 732 Handle<JSArray> CaptureSimpleStackTrace(Handle<JSObject> error_object, |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 } | 914 } |
| 933 | 915 |
| 934 ConsStringIteratorOp* write_iterator() { return write_iterator_; } | 916 ConsStringIteratorOp* write_iterator() { return write_iterator_; } |
| 935 | 917 |
| 936 GlobalHandles* global_handles() { return global_handles_; } | 918 GlobalHandles* global_handles() { return global_handles_; } |
| 937 | 919 |
| 938 EternalHandles* eternal_handles() { return eternal_handles_; } | 920 EternalHandles* eternal_handles() { return eternal_handles_; } |
| 939 | 921 |
| 940 ThreadManager* thread_manager() { return thread_manager_; } | 922 ThreadManager* thread_manager() { return thread_manager_; } |
| 941 | 923 |
| 942 ContextSwitcher* context_switcher() { return context_switcher_; } | |
| 943 | |
| 944 void set_context_switcher(ContextSwitcher* switcher) { | |
| 945 context_switcher_ = switcher; | |
| 946 } | |
| 947 | |
| 948 StringTracker* string_tracker() { return string_tracker_; } | 924 StringTracker* string_tracker() { return string_tracker_; } |
| 949 | 925 |
| 950 unibrow::Mapping<unibrow::Ecma262UnCanonicalize>* jsregexp_uncanonicalize() { | 926 unibrow::Mapping<unibrow::Ecma262UnCanonicalize>* jsregexp_uncanonicalize() { |
| 951 return &jsregexp_uncanonicalize_; | 927 return &jsregexp_uncanonicalize_; |
| 952 } | 928 } |
| 953 | 929 |
| 954 unibrow::Mapping<unibrow::CanonicalizationRange>* jsregexp_canonrange() { | 930 unibrow::Mapping<unibrow::CanonicalizationRange>* jsregexp_canonrange() { |
| 955 return &jsregexp_canonrange_; | 931 return &jsregexp_canonrange_; |
| 956 } | 932 } |
| 957 | 933 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 988 return ®exp_macro_assembler_canonicalize_; | 964 return ®exp_macro_assembler_canonicalize_; |
| 989 } | 965 } |
| 990 | 966 |
| 991 RegExpStack* regexp_stack() { return regexp_stack_; } | 967 RegExpStack* regexp_stack() { return regexp_stack_; } |
| 992 | 968 |
| 993 unibrow::Mapping<unibrow::Ecma262Canonicalize>* | 969 unibrow::Mapping<unibrow::Ecma262Canonicalize>* |
| 994 interp_canonicalize_mapping() { | 970 interp_canonicalize_mapping() { |
| 995 return &interp_canonicalize_mapping_; | 971 return &interp_canonicalize_mapping_; |
| 996 } | 972 } |
| 997 | 973 |
| 998 void* PreallocatedStorageNew(size_t size); | |
| 999 void PreallocatedStorageDelete(void* p); | |
| 1000 void PreallocatedStorageInit(size_t size); | |
| 1001 | |
| 1002 inline bool IsCodePreAgingActive(); | 974 inline bool IsCodePreAgingActive(); |
| 1003 | 975 |
| 1004 #ifdef ENABLE_DEBUGGER_SUPPORT | 976 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 1005 Debugger* debugger() { | 977 Debugger* debugger() { |
| 1006 if (!NoBarrier_Load(&debugger_initialized_)) InitializeDebugger(); | 978 if (!NoBarrier_Load(&debugger_initialized_)) InitializeDebugger(); |
| 1007 return debugger_; | 979 return debugger_; |
| 1008 } | 980 } |
| 1009 Debug* debug() { | 981 Debug* debug() { |
| 1010 if (!NoBarrier_Load(&debugger_initialized_)) InitializeDebugger(); | 982 if (!NoBarrier_Load(&debugger_initialized_)) InitializeDebugger(); |
| 1011 return debug_; | 983 return debug_; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1060 } | 1032 } |
| 1061 | 1033 |
| 1062 StateTag current_vm_state() { | 1034 StateTag current_vm_state() { |
| 1063 return thread_local_top_.current_vm_state_; | 1035 return thread_local_top_.current_vm_state_; |
| 1064 } | 1036 } |
| 1065 | 1037 |
| 1066 void set_current_vm_state(StateTag state) { | 1038 void set_current_vm_state(StateTag state) { |
| 1067 thread_local_top_.current_vm_state_ = state; | 1039 thread_local_top_.current_vm_state_ = state; |
| 1068 } | 1040 } |
| 1069 | 1041 |
| 1070 void SetData(void* data) { embedder_data_ = data; } | 1042 void SetData(uint32_t slot, void* data) { |
| 1071 void* GetData() { return embedder_data_; } | 1043 ASSERT(slot < Internals::kNumIsolateDataSlots); |
| 1044 embedder_data_[slot] = data; |
| 1045 } |
| 1046 void* GetData(uint32_t slot) { |
| 1047 ASSERT(slot < Internals::kNumIsolateDataSlots); |
| 1048 return embedder_data_[slot]; |
| 1049 } |
| 1072 | 1050 |
| 1073 LookupResult* top_lookup_result() { | 1051 LookupResult* top_lookup_result() { |
| 1074 return thread_local_top_.top_lookup_result_; | 1052 return thread_local_top_.top_lookup_result_; |
| 1075 } | 1053 } |
| 1076 void SetTopLookupResult(LookupResult* top) { | 1054 void SetTopLookupResult(LookupResult* top) { |
| 1077 thread_local_top_.top_lookup_result_ = top; | 1055 thread_local_top_.top_lookup_result_ = top; |
| 1078 } | 1056 } |
| 1079 | 1057 |
| 1080 bool IsDead() { return has_fatal_error_; } | 1058 bool IsDead() { return has_fatal_error_; } |
| 1081 void SignalFatalError() { has_fatal_error_ = true; } | 1059 void SignalFatalError() { has_fatal_error_ = true; } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1107 code_stub_interface_descriptor(int index); | 1085 code_stub_interface_descriptor(int index); |
| 1108 | 1086 |
| 1109 void IterateDeferredHandles(ObjectVisitor* visitor); | 1087 void IterateDeferredHandles(ObjectVisitor* visitor); |
| 1110 void LinkDeferredHandles(DeferredHandles* deferred_handles); | 1088 void LinkDeferredHandles(DeferredHandles* deferred_handles); |
| 1111 void UnlinkDeferredHandles(DeferredHandles* deferred_handles); | 1089 void UnlinkDeferredHandles(DeferredHandles* deferred_handles); |
| 1112 | 1090 |
| 1113 #ifdef DEBUG | 1091 #ifdef DEBUG |
| 1114 bool IsDeferredHandle(Object** location); | 1092 bool IsDeferredHandle(Object** location); |
| 1115 #endif // DEBUG | 1093 #endif // DEBUG |
| 1116 | 1094 |
| 1095 void set_max_available_threads(int value) { |
| 1096 max_available_threads_ = value; |
| 1097 } |
| 1098 |
| 1099 bool concurrent_recompilation_enabled() { |
| 1100 // Thread is only available with flag enabled. |
| 1101 ASSERT(optimizing_compiler_thread_ == NULL || |
| 1102 FLAG_concurrent_recompilation); |
| 1103 return optimizing_compiler_thread_ != NULL; |
| 1104 } |
| 1105 |
| 1106 bool concurrent_osr_enabled() const { |
| 1107 // Thread is only available with flag enabled. |
| 1108 ASSERT(optimizing_compiler_thread_ == NULL || |
| 1109 FLAG_concurrent_recompilation); |
| 1110 return optimizing_compiler_thread_ != NULL && FLAG_concurrent_osr; |
| 1111 } |
| 1112 |
| 1117 OptimizingCompilerThread* optimizing_compiler_thread() { | 1113 OptimizingCompilerThread* optimizing_compiler_thread() { |
| 1118 return optimizing_compiler_thread_; | 1114 return optimizing_compiler_thread_; |
| 1119 } | 1115 } |
| 1120 | 1116 |
| 1117 int num_sweeper_threads() const { |
| 1118 return num_sweeper_threads_; |
| 1119 } |
| 1120 |
| 1121 SweeperThread** sweeper_threads() { |
| 1122 return sweeper_thread_; |
| 1123 } |
| 1124 |
| 1121 // PreInits and returns a default isolate. Needed when a new thread tries | 1125 // PreInits and returns a default isolate. Needed when a new thread tries |
| 1122 // to create a Locker for the first time (the lock itself is in the isolate). | 1126 // to create a Locker for the first time (the lock itself is in the isolate). |
| 1123 // TODO(svenpanne) This method is on death row... | 1127 // TODO(svenpanne) This method is on death row... |
| 1124 static v8::Isolate* GetDefaultIsolateForLocking(); | 1128 static v8::Isolate* GetDefaultIsolateForLocking(); |
| 1125 | 1129 |
| 1126 SweeperThread** sweeper_threads() { | |
| 1127 return sweeper_thread_; | |
| 1128 } | |
| 1129 | |
| 1130 int id() const { return static_cast<int>(id_); } | 1130 int id() const { return static_cast<int>(id_); } |
| 1131 | 1131 |
| 1132 HStatistics* GetHStatistics(); | 1132 HStatistics* GetHStatistics(); |
| 1133 HTracer* GetHTracer(); | 1133 HTracer* GetHTracer(); |
| 1134 CodeTracer* GetCodeTracer(); | 1134 CodeTracer* GetCodeTracer(); |
| 1135 | 1135 |
| 1136 FunctionEntryHook function_entry_hook() { return function_entry_hook_; } | 1136 FunctionEntryHook function_entry_hook() { return function_entry_hook_; } |
| 1137 void set_function_entry_hook(FunctionEntryHook function_entry_hook) { | 1137 void set_function_entry_hook(FunctionEntryHook function_entry_hook) { |
| 1138 function_entry_hook_ = function_entry_hook; | 1138 function_entry_hook_ = function_entry_hook; |
| 1139 } | 1139 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1155 friend struct InitializeGlobalState; | 1155 friend struct InitializeGlobalState; |
| 1156 | 1156 |
| 1157 enum State { | 1157 enum State { |
| 1158 UNINITIALIZED, // Some components may not have been allocated. | 1158 UNINITIALIZED, // Some components may not have been allocated. |
| 1159 INITIALIZED // All components are fully initialized. | 1159 INITIALIZED // All components are fully initialized. |
| 1160 }; | 1160 }; |
| 1161 | 1161 |
| 1162 // These fields are accessed through the API, offsets must be kept in sync | 1162 // These fields are accessed through the API, offsets must be kept in sync |
| 1163 // with v8::internal::Internals (in include/v8.h) constants. This is also | 1163 // with v8::internal::Internals (in include/v8.h) constants. This is also |
| 1164 // verified in Isolate::Init() using runtime checks. | 1164 // verified in Isolate::Init() using runtime checks. |
| 1165 void* embedder_data_[Internals::kNumIsolateDataSlots]; |
| 1166 Heap heap_; |
| 1165 State state_; // Will be padded to kApiPointerSize. | 1167 State state_; // Will be padded to kApiPointerSize. |
| 1166 void* embedder_data_; | |
| 1167 Heap heap_; | |
| 1168 | 1168 |
| 1169 // The per-process lock should be acquired before the ThreadDataTable is | 1169 // The per-process lock should be acquired before the ThreadDataTable is |
| 1170 // modified. | 1170 // modified. |
| 1171 class ThreadDataTable { | 1171 class ThreadDataTable { |
| 1172 public: | 1172 public: |
| 1173 ThreadDataTable(); | 1173 ThreadDataTable(); |
| 1174 ~ThreadDataTable(); | 1174 ~ThreadDataTable(); |
| 1175 | 1175 |
| 1176 PerIsolateThreadData* Lookup(Isolate* isolate, ThreadId thread_id); | 1176 PerIsolateThreadData* Lookup(Isolate* isolate, ThreadId thread_id); |
| 1177 void Insert(PerIsolateThreadData* data); | 1177 void Insert(PerIsolateThreadData* data); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1233 // Not thread-safe. Multiple threads should not Enter/Exit the same isolate | 1233 // Not thread-safe. Multiple threads should not Enter/Exit the same isolate |
| 1234 // at the same time, this should be prevented using external locking. | 1234 // at the same time, this should be prevented using external locking. |
| 1235 void Enter(); | 1235 void Enter(); |
| 1236 | 1236 |
| 1237 // Exits the current thread. The previosuly entered Isolate is restored | 1237 // Exits the current thread. The previosuly entered Isolate is restored |
| 1238 // for the thread. | 1238 // for the thread. |
| 1239 // Not thread-safe. Multiple threads should not Enter/Exit the same isolate | 1239 // Not thread-safe. Multiple threads should not Enter/Exit the same isolate |
| 1240 // at the same time, this should be prevented using external locking. | 1240 // at the same time, this should be prevented using external locking. |
| 1241 void Exit(); | 1241 void Exit(); |
| 1242 | 1242 |
| 1243 void PreallocatedMemoryThreadStart(); | |
| 1244 void PreallocatedMemoryThreadStop(); | |
| 1245 void InitializeThreadLocal(); | 1243 void InitializeThreadLocal(); |
| 1246 | 1244 |
| 1247 void PrintStackTrace(FILE* out, ThreadLocalTop* thread); | |
| 1248 void MarkCompactPrologue(bool is_compacting, | 1245 void MarkCompactPrologue(bool is_compacting, |
| 1249 ThreadLocalTop* archived_thread_data); | 1246 ThreadLocalTop* archived_thread_data); |
| 1250 void MarkCompactEpilogue(bool is_compacting, | 1247 void MarkCompactEpilogue(bool is_compacting, |
| 1251 ThreadLocalTop* archived_thread_data); | 1248 ThreadLocalTop* archived_thread_data); |
| 1252 | 1249 |
| 1253 void FillCache(); | 1250 void FillCache(); |
| 1254 | 1251 |
| 1255 void PropagatePendingExceptionToExternalTryCatch(); | 1252 void PropagatePendingExceptionToExternalTryCatch(); |
| 1256 | 1253 |
| 1257 void InitializeDebugger(); | 1254 void InitializeDebugger(); |
| 1258 | 1255 |
| 1259 // Traverse prototype chain to find out whether the object is derived from | 1256 // Traverse prototype chain to find out whether the object is derived from |
| 1260 // the Error object. | 1257 // the Error object. |
| 1261 bool IsErrorObject(Handle<Object> obj); | 1258 bool IsErrorObject(Handle<Object> obj); |
| 1262 | 1259 |
| 1263 static void UpdateScannersAfterGC(v8::Isolate*, GCType, GCCallbackFlags); | 1260 static void UpdateScannersAfterGC(v8::Isolate*, GCType, GCCallbackFlags); |
| 1264 void UpdateScannersAfterGC(); | 1261 void UpdateScannersAfterGC(); |
| 1265 | 1262 |
| 1266 Atomic32 id_; | 1263 Atomic32 id_; |
| 1267 EntryStackItem* entry_stack_; | 1264 EntryStackItem* entry_stack_; |
| 1268 int stack_trace_nesting_level_; | 1265 int stack_trace_nesting_level_; |
| 1269 StringStream* incomplete_message_; | 1266 StringStream* incomplete_message_; |
| 1270 // The preallocated memory thread singleton. | |
| 1271 PreallocatedMemoryThread* preallocated_memory_thread_; | |
| 1272 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT | 1267 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT |
| 1273 NoAllocationStringAllocator* preallocated_message_space_; | |
| 1274 Bootstrapper* bootstrapper_; | 1268 Bootstrapper* bootstrapper_; |
| 1275 RuntimeProfiler* runtime_profiler_; | 1269 RuntimeProfiler* runtime_profiler_; |
| 1276 CompilationCache* compilation_cache_; | 1270 CompilationCache* compilation_cache_; |
| 1277 Counters* counters_; | 1271 Counters* counters_; |
| 1278 CodeRange* code_range_; | 1272 CodeRange* code_range_; |
| 1279 RecursiveMutex break_access_; | 1273 RecursiveMutex break_access_; |
| 1280 Atomic32 debugger_initialized_; | 1274 Atomic32 debugger_initialized_; |
| 1281 RecursiveMutex debugger_access_; | 1275 RecursiveMutex debugger_access_; |
| 1282 Logger* logger_; | 1276 Logger* logger_; |
| 1283 StackGuard stack_guard_; | 1277 StackGuard stack_guard_; |
| 1284 StatsTable* stats_table_; | 1278 StatsTable* stats_table_; |
| 1285 StubCache* stub_cache_; | 1279 StubCache* stub_cache_; |
| 1286 DeoptimizerData* deoptimizer_data_; | 1280 DeoptimizerData* deoptimizer_data_; |
| 1287 ThreadLocalTop thread_local_top_; | 1281 ThreadLocalTop thread_local_top_; |
| 1288 bool capture_stack_trace_for_uncaught_exceptions_; | 1282 bool capture_stack_trace_for_uncaught_exceptions_; |
| 1289 int stack_trace_for_uncaught_exceptions_frame_limit_; | 1283 int stack_trace_for_uncaught_exceptions_frame_limit_; |
| 1290 StackTrace::StackTraceOptions stack_trace_for_uncaught_exceptions_options_; | 1284 StackTrace::StackTraceOptions stack_trace_for_uncaught_exceptions_options_; |
| 1291 TranscendentalCache* transcendental_cache_; | 1285 TranscendentalCache* transcendental_cache_; |
| 1292 MemoryAllocator* memory_allocator_; | 1286 MemoryAllocator* memory_allocator_; |
| 1293 KeyedLookupCache* keyed_lookup_cache_; | 1287 KeyedLookupCache* keyed_lookup_cache_; |
| 1294 ContextSlotCache* context_slot_cache_; | 1288 ContextSlotCache* context_slot_cache_; |
| 1295 DescriptorLookupCache* descriptor_lookup_cache_; | 1289 DescriptorLookupCache* descriptor_lookup_cache_; |
| 1296 v8::ImplementationUtilities::HandleScopeData handle_scope_data_; | 1290 v8::ImplementationUtilities::HandleScopeData handle_scope_data_; |
| 1297 HandleScopeImplementer* handle_scope_implementer_; | 1291 HandleScopeImplementer* handle_scope_implementer_; |
| 1298 UnicodeCache* unicode_cache_; | 1292 UnicodeCache* unicode_cache_; |
| 1299 Zone runtime_zone_; | 1293 Zone runtime_zone_; |
| 1300 PreallocatedStorage in_use_list_; | |
| 1301 PreallocatedStorage free_list_; | |
| 1302 bool preallocated_storage_preallocated_; | |
| 1303 InnerPointerToCodeCache* inner_pointer_to_code_cache_; | 1294 InnerPointerToCodeCache* inner_pointer_to_code_cache_; |
| 1304 ConsStringIteratorOp* write_iterator_; | 1295 ConsStringIteratorOp* write_iterator_; |
| 1305 GlobalHandles* global_handles_; | 1296 GlobalHandles* global_handles_; |
| 1306 EternalHandles* eternal_handles_; | 1297 EternalHandles* eternal_handles_; |
| 1307 ContextSwitcher* context_switcher_; | |
| 1308 ThreadManager* thread_manager_; | 1298 ThreadManager* thread_manager_; |
| 1309 RuntimeState runtime_state_; | 1299 RuntimeState runtime_state_; |
| 1310 bool fp_stubs_generated_; | 1300 bool fp_stubs_generated_; |
| 1311 Builtins builtins_; | 1301 Builtins builtins_; |
| 1312 bool has_installed_extensions_; | 1302 bool has_installed_extensions_; |
| 1313 StringTracker* string_tracker_; | 1303 StringTracker* string_tracker_; |
| 1314 unibrow::Mapping<unibrow::Ecma262UnCanonicalize> jsregexp_uncanonicalize_; | 1304 unibrow::Mapping<unibrow::Ecma262UnCanonicalize> jsregexp_uncanonicalize_; |
| 1315 unibrow::Mapping<unibrow::CanonicalizationRange> jsregexp_canonrange_; | 1305 unibrow::Mapping<unibrow::CanonicalizationRange> jsregexp_canonrange_; |
| 1316 ConsStringIteratorOp objects_string_compare_iterator_a_; | 1306 ConsStringIteratorOp objects_string_compare_iterator_a_; |
| 1317 ConsStringIteratorOp objects_string_compare_iterator_b_; | 1307 ConsStringIteratorOp objects_string_compare_iterator_b_; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1375 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 1365 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
| 1376 static const intptr_t name##_debug_offset_; | 1366 static const intptr_t name##_debug_offset_; |
| 1377 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 1367 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
| 1378 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 1368 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
| 1379 #undef ISOLATE_FIELD_OFFSET | 1369 #undef ISOLATE_FIELD_OFFSET |
| 1380 #endif | 1370 #endif |
| 1381 | 1371 |
| 1382 DeferredHandles* deferred_handles_head_; | 1372 DeferredHandles* deferred_handles_head_; |
| 1383 OptimizingCompilerThread* optimizing_compiler_thread_; | 1373 OptimizingCompilerThread* optimizing_compiler_thread_; |
| 1384 SweeperThread** sweeper_thread_; | 1374 SweeperThread** sweeper_thread_; |
| 1375 int num_sweeper_threads_; |
| 1376 |
| 1377 // TODO(yangguo): This will become obsolete once ResourceConstraints |
| 1378 // becomes an argument to Isolate constructor. |
| 1379 int max_available_threads_; |
| 1385 | 1380 |
| 1386 // Counts deopt points if deopt_every_n_times is enabled. | 1381 // Counts deopt points if deopt_every_n_times is enabled. |
| 1387 unsigned int stress_deopt_count_; | 1382 unsigned int stress_deopt_count_; |
| 1388 | 1383 |
| 1389 // Stores information about the ScannerBase objects currently alive, so that | 1384 // Stores information about the ScannerBase objects currently alive, so that |
| 1390 // we can update the raw string pointers they hold after GC. | 1385 // we can update the raw string pointers they hold after GC. |
| 1391 std::set<ScannerBase*> scanners_; | 1386 std::set<ScannerBase*> scanners_; |
| 1392 | 1387 |
| 1393 friend class ExecutionAccess; | 1388 friend class ExecutionAccess; |
| 1394 friend class HandleScopeImplementer; | 1389 friend class HandleScopeImplementer; |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1587 } | 1582 } |
| 1588 | 1583 |
| 1589 EmbeddedVector<char, 128> filename_; | 1584 EmbeddedVector<char, 128> filename_; |
| 1590 FILE* file_; | 1585 FILE* file_; |
| 1591 int scope_depth_; | 1586 int scope_depth_; |
| 1592 }; | 1587 }; |
| 1593 | 1588 |
| 1594 } } // namespace v8::internal | 1589 } } // namespace v8::internal |
| 1595 | 1590 |
| 1596 #endif // V8_ISOLATE_H_ | 1591 #endif // V8_ISOLATE_H_ |
| OLD | NEW |