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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 class ExternalReferenceTable; | 69 class ExternalReferenceTable; |
70 class Factory; | 70 class Factory; |
71 class FunctionInfoListener; | 71 class FunctionInfoListener; |
72 class HandleScopeImplementer; | 72 class HandleScopeImplementer; |
73 class HeapProfiler; | 73 class HeapProfiler; |
74 class HStatistics; | 74 class HStatistics; |
75 class HTracer; | 75 class HTracer; |
76 class InlineRuntimeFunctionsTable; | 76 class InlineRuntimeFunctionsTable; |
77 class NoAllocationStringAllocator; | 77 class NoAllocationStringAllocator; |
78 class InnerPointerToCodeCache; | 78 class InnerPointerToCodeCache; |
79 class PreallocatedMemoryThread; | |
80 class RandomNumberGenerator; | 79 class RandomNumberGenerator; |
81 class RegExpStack; | 80 class RegExpStack; |
82 class SaveContext; | 81 class SaveContext; |
83 class UnicodeCache; | 82 class UnicodeCache; |
84 class ConsStringIteratorOp; | 83 class ConsStringIteratorOp; |
85 class StringTracker; | 84 class StringTracker; |
86 class StubCache; | 85 class StubCache; |
87 class SweeperThread; | 86 class SweeperThread; |
88 class ThreadManager; | 87 class ThreadManager; |
89 class ThreadState; | 88 class ThreadState; |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 | 323 |
325 #define ISOLATE_INIT_ARRAY_LIST(V) \ | 324 #define ISOLATE_INIT_ARRAY_LIST(V) \ |
326 /* SerializerDeserializer state. */ \ | 325 /* SerializerDeserializer state. */ \ |
327 V(int32_t, jsregexp_static_offsets_vector, kJSRegexpStaticOffsetsVectorSize) \ | 326 V(int32_t, jsregexp_static_offsets_vector, kJSRegexpStaticOffsetsVectorSize) \ |
328 V(int, bad_char_shift_table, kUC16AlphabetSize) \ | 327 V(int, bad_char_shift_table, kUC16AlphabetSize) \ |
329 V(int, good_suffix_shift_table, (kBMMaxShift + 1)) \ | 328 V(int, good_suffix_shift_table, (kBMMaxShift + 1)) \ |
330 V(int, suffix_table, (kBMMaxShift + 1)) \ | 329 V(int, suffix_table, (kBMMaxShift + 1)) \ |
331 V(uint32_t, private_random_seed, 2) \ | 330 V(uint32_t, private_random_seed, 2) \ |
332 ISOLATE_INIT_DEBUG_ARRAY_LIST(V) | 331 ISOLATE_INIT_DEBUG_ARRAY_LIST(V) |
333 | 332 |
334 typedef List<HeapObject*, PreallocatedStorageAllocationPolicy> DebugObjectCache; | 333 typedef List<HeapObject*> DebugObjectCache; |
335 | 334 |
336 #define ISOLATE_INIT_LIST(V) \ | 335 #define ISOLATE_INIT_LIST(V) \ |
337 /* SerializerDeserializer state. */ \ | 336 /* SerializerDeserializer state. */ \ |
338 V(int, serialize_partial_snapshot_cache_length, 0) \ | 337 V(int, serialize_partial_snapshot_cache_length, 0) \ |
339 V(int, serialize_partial_snapshot_cache_capacity, 0) \ | 338 V(int, serialize_partial_snapshot_cache_capacity, 0) \ |
340 V(Object**, serialize_partial_snapshot_cache, NULL) \ | 339 V(Object**, serialize_partial_snapshot_cache, NULL) \ |
341 /* Assembler state. */ \ | 340 /* Assembler state. */ \ |
342 /* A previously allocated buffer of kMinimalBufferSize bytes, or NULL. */ \ | 341 /* A previously allocated buffer of kMinimalBufferSize bytes, or NULL. */ \ |
343 V(byte*, assembler_spare_buffer, NULL) \ | 342 V(byte*, assembler_spare_buffer, NULL) \ |
344 V(FatalErrorCallback, exception_behavior, NULL) \ | 343 V(FatalErrorCallback, exception_behavior, NULL) \ |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
971 return ®exp_macro_assembler_canonicalize_; | 970 return ®exp_macro_assembler_canonicalize_; |
972 } | 971 } |
973 | 972 |
974 RegExpStack* regexp_stack() { return regexp_stack_; } | 973 RegExpStack* regexp_stack() { return regexp_stack_; } |
975 | 974 |
976 unibrow::Mapping<unibrow::Ecma262Canonicalize>* | 975 unibrow::Mapping<unibrow::Ecma262Canonicalize>* |
977 interp_canonicalize_mapping() { | 976 interp_canonicalize_mapping() { |
978 return &interp_canonicalize_mapping_; | 977 return &interp_canonicalize_mapping_; |
979 } | 978 } |
980 | 979 |
981 void* PreallocatedStorageNew(size_t size); | |
982 void PreallocatedStorageDelete(void* p); | |
983 void PreallocatedStorageInit(size_t size); | |
984 | |
985 inline bool IsCodePreAgingActive(); | 980 inline bool IsCodePreAgingActive(); |
986 | 981 |
987 #ifdef ENABLE_DEBUGGER_SUPPORT | 982 #ifdef ENABLE_DEBUGGER_SUPPORT |
988 Debugger* debugger() { | 983 Debugger* debugger() { |
989 if (!NoBarrier_Load(&debugger_initialized_)) InitializeDebugger(); | 984 if (!NoBarrier_Load(&debugger_initialized_)) InitializeDebugger(); |
990 return debugger_; | 985 return debugger_; |
991 } | 986 } |
992 Debug* debug() { | 987 Debug* debug() { |
993 if (!NoBarrier_Load(&debugger_initialized_)) InitializeDebugger(); | 988 if (!NoBarrier_Load(&debugger_initialized_)) InitializeDebugger(); |
994 return debug_; | 989 return debug_; |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1235 // Not thread-safe. Multiple threads should not Enter/Exit the same isolate | 1230 // Not thread-safe. Multiple threads should not Enter/Exit the same isolate |
1236 // at the same time, this should be prevented using external locking. | 1231 // at the same time, this should be prevented using external locking. |
1237 void Enter(); | 1232 void Enter(); |
1238 | 1233 |
1239 // Exits the current thread. The previosuly entered Isolate is restored | 1234 // Exits the current thread. The previosuly entered Isolate is restored |
1240 // for the thread. | 1235 // for the thread. |
1241 // Not thread-safe. Multiple threads should not Enter/Exit the same isolate | 1236 // Not thread-safe. Multiple threads should not Enter/Exit the same isolate |
1242 // at the same time, this should be prevented using external locking. | 1237 // at the same time, this should be prevented using external locking. |
1243 void Exit(); | 1238 void Exit(); |
1244 | 1239 |
1245 void PreallocatedMemoryThreadStart(); | |
1246 void PreallocatedMemoryThreadStop(); | |
1247 void InitializeThreadLocal(); | 1240 void InitializeThreadLocal(); |
1248 | 1241 |
1249 void PrintStackTrace(FILE* out, ThreadLocalTop* thread); | 1242 void PrintStackTrace(FILE* out, ThreadLocalTop* thread); |
1250 void MarkCompactPrologue(bool is_compacting, | 1243 void MarkCompactPrologue(bool is_compacting, |
1251 ThreadLocalTop* archived_thread_data); | 1244 ThreadLocalTop* archived_thread_data); |
1252 void MarkCompactEpilogue(bool is_compacting, | 1245 void MarkCompactEpilogue(bool is_compacting, |
1253 ThreadLocalTop* archived_thread_data); | 1246 ThreadLocalTop* archived_thread_data); |
1254 | 1247 |
1255 void FillCache(); | 1248 void FillCache(); |
1256 | 1249 |
1257 void PropagatePendingExceptionToExternalTryCatch(); | 1250 void PropagatePendingExceptionToExternalTryCatch(); |
1258 | 1251 |
1259 void InitializeDebugger(); | 1252 void InitializeDebugger(); |
1260 | 1253 |
1261 // Traverse prototype chain to find out whether the object is derived from | 1254 // Traverse prototype chain to find out whether the object is derived from |
1262 // the Error object. | 1255 // the Error object. |
1263 bool IsErrorObject(Handle<Object> obj); | 1256 bool IsErrorObject(Handle<Object> obj); |
1264 | 1257 |
1265 Atomic32 id_; | 1258 Atomic32 id_; |
1266 EntryStackItem* entry_stack_; | 1259 EntryStackItem* entry_stack_; |
1267 int stack_trace_nesting_level_; | 1260 int stack_trace_nesting_level_; |
1268 StringStream* incomplete_message_; | 1261 StringStream* incomplete_message_; |
1269 // The preallocated memory thread singleton. | |
1270 PreallocatedMemoryThread* preallocated_memory_thread_; | |
1271 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT | 1262 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT |
1272 NoAllocationStringAllocator* preallocated_message_space_; | |
1273 Bootstrapper* bootstrapper_; | 1263 Bootstrapper* bootstrapper_; |
1274 RuntimeProfiler* runtime_profiler_; | 1264 RuntimeProfiler* runtime_profiler_; |
1275 CompilationCache* compilation_cache_; | 1265 CompilationCache* compilation_cache_; |
1276 Counters* counters_; | 1266 Counters* counters_; |
1277 CodeRange* code_range_; | 1267 CodeRange* code_range_; |
1278 RecursiveMutex break_access_; | 1268 RecursiveMutex break_access_; |
1279 Atomic32 debugger_initialized_; | 1269 Atomic32 debugger_initialized_; |
1280 RecursiveMutex debugger_access_; | 1270 RecursiveMutex debugger_access_; |
1281 Logger* logger_; | 1271 Logger* logger_; |
1282 StackGuard stack_guard_; | 1272 StackGuard stack_guard_; |
1283 StatsTable* stats_table_; | 1273 StatsTable* stats_table_; |
1284 StubCache* stub_cache_; | 1274 StubCache* stub_cache_; |
1285 DeoptimizerData* deoptimizer_data_; | 1275 DeoptimizerData* deoptimizer_data_; |
1286 ThreadLocalTop thread_local_top_; | 1276 ThreadLocalTop thread_local_top_; |
1287 bool capture_stack_trace_for_uncaught_exceptions_; | 1277 bool capture_stack_trace_for_uncaught_exceptions_; |
1288 int stack_trace_for_uncaught_exceptions_frame_limit_; | 1278 int stack_trace_for_uncaught_exceptions_frame_limit_; |
1289 StackTrace::StackTraceOptions stack_trace_for_uncaught_exceptions_options_; | 1279 StackTrace::StackTraceOptions stack_trace_for_uncaught_exceptions_options_; |
1290 TranscendentalCache* transcendental_cache_; | 1280 TranscendentalCache* transcendental_cache_; |
1291 MemoryAllocator* memory_allocator_; | 1281 MemoryAllocator* memory_allocator_; |
1292 KeyedLookupCache* keyed_lookup_cache_; | 1282 KeyedLookupCache* keyed_lookup_cache_; |
1293 ContextSlotCache* context_slot_cache_; | 1283 ContextSlotCache* context_slot_cache_; |
1294 DescriptorLookupCache* descriptor_lookup_cache_; | 1284 DescriptorLookupCache* descriptor_lookup_cache_; |
1295 v8::ImplementationUtilities::HandleScopeData handle_scope_data_; | 1285 v8::ImplementationUtilities::HandleScopeData handle_scope_data_; |
1296 HandleScopeImplementer* handle_scope_implementer_; | 1286 HandleScopeImplementer* handle_scope_implementer_; |
1297 UnicodeCache* unicode_cache_; | 1287 UnicodeCache* unicode_cache_; |
1298 Zone runtime_zone_; | 1288 Zone runtime_zone_; |
1299 PreallocatedStorage in_use_list_; | |
1300 PreallocatedStorage free_list_; | |
1301 bool preallocated_storage_preallocated_; | |
1302 InnerPointerToCodeCache* inner_pointer_to_code_cache_; | 1289 InnerPointerToCodeCache* inner_pointer_to_code_cache_; |
1303 ConsStringIteratorOp* write_iterator_; | 1290 ConsStringIteratorOp* write_iterator_; |
1304 GlobalHandles* global_handles_; | 1291 GlobalHandles* global_handles_; |
1305 EternalHandles* eternal_handles_; | 1292 EternalHandles* eternal_handles_; |
1306 ContextSwitcher* context_switcher_; | 1293 ContextSwitcher* context_switcher_; |
1307 ThreadManager* thread_manager_; | 1294 ThreadManager* thread_manager_; |
1308 RuntimeState runtime_state_; | 1295 RuntimeState runtime_state_; |
1309 bool fp_stubs_generated_; | 1296 bool fp_stubs_generated_; |
1310 Builtins builtins_; | 1297 Builtins builtins_; |
1311 bool has_installed_extensions_; | 1298 bool has_installed_extensions_; |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1587 } | 1574 } |
1588 | 1575 |
1589 EmbeddedVector<char, 128> filename_; | 1576 EmbeddedVector<char, 128> filename_; |
1590 FILE* file_; | 1577 FILE* file_; |
1591 int scope_depth_; | 1578 int scope_depth_; |
1592 }; | 1579 }; |
1593 | 1580 |
1594 } } // namespace v8::internal | 1581 } } // namespace v8::internal |
1595 | 1582 |
1596 #endif // V8_ISOLATE_H_ | 1583 #endif // V8_ISOLATE_H_ |
OLD | NEW |