OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_ISOLATE_H_ | 5 #ifndef V8_ISOLATE_H_ |
6 #define V8_ISOLATE_H_ | 6 #define V8_ISOLATE_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include "include/v8-debug.h" | 9 #include "include/v8-debug.h" |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 /* To distinguish the function templates, so that we can find them in the */ \ | 369 /* To distinguish the function templates, so that we can find them in the */ \ |
370 /* function cache of the native context. */ \ | 370 /* function cache of the native context. */ \ |
371 V(int, next_serial_number, 0) \ | 371 V(int, next_serial_number, 0) \ |
372 V(ExternalReferenceRedirectorPointer*, external_reference_redirector, NULL) \ | 372 V(ExternalReferenceRedirectorPointer*, external_reference_redirector, NULL) \ |
373 /* Part of the state of liveedit. */ \ | 373 /* Part of the state of liveedit. */ \ |
374 V(FunctionInfoListener*, active_function_info_listener, NULL) \ | 374 V(FunctionInfoListener*, active_function_info_listener, NULL) \ |
375 /* State for Relocatable. */ \ | 375 /* State for Relocatable. */ \ |
376 V(Relocatable*, relocatable_top, NULL) \ | 376 V(Relocatable*, relocatable_top, NULL) \ |
377 V(DebugObjectCache*, string_stream_debug_object_cache, NULL) \ | 377 V(DebugObjectCache*, string_stream_debug_object_cache, NULL) \ |
378 V(Object*, string_stream_current_security_token, NULL) \ | 378 V(Object*, string_stream_current_security_token, NULL) \ |
379 /* Serializer state. */ \ | |
380 V(ExternalReferenceTable*, external_reference_table, NULL) \ | 379 V(ExternalReferenceTable*, external_reference_table, NULL) \ |
| 380 V(HashMap*, external_reference_map, NULL) \ |
| 381 V(HashMap*, root_index_map, NULL) \ |
381 V(int, pending_microtask_count, 0) \ | 382 V(int, pending_microtask_count, 0) \ |
382 V(bool, autorun_microtasks, true) \ | 383 V(bool, autorun_microtasks, true) \ |
383 V(HStatistics*, hstatistics, NULL) \ | 384 V(HStatistics*, hstatistics, NULL) \ |
384 V(CompilationStatistics*, turbo_statistics, NULL) \ | 385 V(CompilationStatistics*, turbo_statistics, NULL) \ |
385 V(HTracer*, htracer, NULL) \ | 386 V(HTracer*, htracer, NULL) \ |
386 V(CodeTracer*, code_tracer, NULL) \ | 387 V(CodeTracer*, code_tracer, NULL) \ |
387 V(bool, fp_stubs_generated, false) \ | 388 V(bool, fp_stubs_generated, false) \ |
388 V(int, max_available_threads, 0) \ | 389 V(int, max_available_threads, 0) \ |
389 V(uint32_t, per_isolate_assert_data, 0xFFFFFFFFu) \ | 390 V(uint32_t, per_isolate_assert_data, 0xFFFFFFFFu) \ |
390 V(PromiseRejectCallback, promise_reject_callback, NULL) \ | 391 V(PromiseRejectCallback, promise_reject_callback, NULL) \ |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 // True if at least one thread Enter'ed this isolate. | 521 // True if at least one thread Enter'ed this isolate. |
521 bool IsInUse() { return entry_stack_ != NULL; } | 522 bool IsInUse() { return entry_stack_ != NULL; } |
522 | 523 |
523 // Destroys the non-default isolates. | 524 // Destroys the non-default isolates. |
524 // Sets default isolate into "has_been_disposed" state rather then destroying, | 525 // Sets default isolate into "has_been_disposed" state rather then destroying, |
525 // for legacy API reasons. | 526 // for legacy API reasons. |
526 void TearDown(); | 527 void TearDown(); |
527 | 528 |
528 static void GlobalTearDown(); | 529 static void GlobalTearDown(); |
529 | 530 |
| 531 void ClearSerializerData(); |
| 532 |
530 // Find the PerThread for this particular (isolate, thread) combination | 533 // Find the PerThread for this particular (isolate, thread) combination |
531 // If one does not yet exist, return null. | 534 // If one does not yet exist, return null. |
532 PerIsolateThreadData* FindPerThreadDataForThisThread(); | 535 PerIsolateThreadData* FindPerThreadDataForThisThread(); |
533 | 536 |
534 // Find the PerThread for given (isolate, thread) combination | 537 // Find the PerThread for given (isolate, thread) combination |
535 // If one does not yet exist, return null. | 538 // If one does not yet exist, return null. |
536 PerIsolateThreadData* FindPerThreadDataForThread(ThreadId thread_id); | 539 PerIsolateThreadData* FindPerThreadDataForThread(ThreadId thread_id); |
537 | 540 |
538 // Returns the key used to store the pointer to the current isolate. | 541 // Returns the key used to store the pointer to the current isolate. |
539 // Used internally for V8 threads that do not execute JavaScript but still | 542 // Used internally for V8 threads that do not execute JavaScript but still |
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1563 } | 1566 } |
1564 | 1567 |
1565 EmbeddedVector<char, 128> filename_; | 1568 EmbeddedVector<char, 128> filename_; |
1566 FILE* file_; | 1569 FILE* file_; |
1567 int scope_depth_; | 1570 int scope_depth_; |
1568 }; | 1571 }; |
1569 | 1572 |
1570 } } // namespace v8::internal | 1573 } } // namespace v8::internal |
1571 | 1574 |
1572 #endif // V8_ISOLATE_H_ | 1575 #endif // V8_ISOLATE_H_ |
OLD | NEW |