OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 | 287 |
288 #else | 288 #else |
289 | 289 |
290 #define ISOLATE_PLATFORM_INIT_LIST(V) | 290 #define ISOLATE_PLATFORM_INIT_LIST(V) |
291 | 291 |
292 #endif | 292 #endif |
293 | 293 |
294 #ifdef ENABLE_DEBUGGER_SUPPORT | 294 #ifdef ENABLE_DEBUGGER_SUPPORT |
295 | 295 |
296 #define ISOLATE_DEBUGGER_INIT_LIST(V) \ | 296 #define ISOLATE_DEBUGGER_INIT_LIST(V) \ |
297 V(uint64_t, enabled_cpu_features, 0) \ | |
298 V(v8::Debug::EventCallback, debug_event_callback, NULL) \ | 297 V(v8::Debug::EventCallback, debug_event_callback, NULL) \ |
299 V(DebuggerAgent*, debugger_agent_instance, NULL) | 298 V(DebuggerAgent*, debugger_agent_instance, NULL) |
300 #else | 299 #else |
301 | 300 |
302 #define ISOLATE_DEBUGGER_INIT_LIST(V) | 301 #define ISOLATE_DEBUGGER_INIT_LIST(V) |
303 | 302 |
304 #endif | 303 #endif |
305 | 304 |
306 #ifdef DEBUG | 305 #ifdef DEBUG |
307 | 306 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 V(Object*, string_stream_current_security_token, NULL) \ | 362 V(Object*, string_stream_current_security_token, NULL) \ |
364 /* TODO(isolates): Release this on destruction? */ \ | 363 /* TODO(isolates): Release this on destruction? */ \ |
365 V(int*, irregexp_interpreter_backtrack_stack_cache, NULL) \ | 364 V(int*, irregexp_interpreter_backtrack_stack_cache, NULL) \ |
366 /* Serializer state. */ \ | 365 /* Serializer state. */ \ |
367 V(ExternalReferenceTable*, external_reference_table, NULL) \ | 366 V(ExternalReferenceTable*, external_reference_table, NULL) \ |
368 /* AstNode state. */ \ | 367 /* AstNode state. */ \ |
369 V(unsigned, ast_node_id, 0) \ | 368 V(unsigned, ast_node_id, 0) \ |
370 V(unsigned, ast_node_count, 0) \ | 369 V(unsigned, ast_node_count, 0) \ |
371 /* SafeStackFrameIterator activations count. */ \ | 370 /* SafeStackFrameIterator activations count. */ \ |
372 V(int, safe_stack_iterator_counter, 0) \ | 371 V(int, safe_stack_iterator_counter, 0) \ |
| 372 V(uint64_t, enabled_cpu_features, 0) \ |
373 ISOLATE_PLATFORM_INIT_LIST(V) \ | 373 ISOLATE_PLATFORM_INIT_LIST(V) \ |
374 ISOLATE_LOGGING_INIT_LIST(V) \ | 374 ISOLATE_LOGGING_INIT_LIST(V) \ |
375 ISOLATE_DEBUGGER_INIT_LIST(V) | 375 ISOLATE_DEBUGGER_INIT_LIST(V) |
376 | 376 |
377 class Isolate { | 377 class Isolate { |
378 // These forward declarations are required to make the friend declarations in | 378 // These forward declarations are required to make the friend declarations in |
379 // PerIsolateThreadData work on some older versions of gcc. | 379 // PerIsolateThreadData work on some older versions of gcc. |
380 class ThreadDataTable; | 380 class ThreadDataTable; |
381 class EntryStackItem; | 381 class EntryStackItem; |
382 public: | 382 public: |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 void TearDown(); | 479 void TearDown(); |
480 | 480 |
481 bool IsDefaultIsolate() const { return this == default_isolate_; } | 481 bool IsDefaultIsolate() const { return this == default_isolate_; } |
482 | 482 |
483 // Ensures that process-wide resources and the default isolate have been | 483 // Ensures that process-wide resources and the default isolate have been |
484 // allocated. It is only necessary to call this method in rare casses, for | 484 // allocated. It is only necessary to call this method in rare casses, for |
485 // example if you are using V8 from within the body of a static initializer. | 485 // example if you are using V8 from within the body of a static initializer. |
486 // Safe to call multiple times. | 486 // Safe to call multiple times. |
487 static void EnsureDefaultIsolate(); | 487 static void EnsureDefaultIsolate(); |
488 | 488 |
| 489 #ifdef ENABLE_DEBUGGER_SUPPORT |
489 // Get the debugger from the default isolate. Preinitializes the | 490 // Get the debugger from the default isolate. Preinitializes the |
490 // default isolate if needed. | 491 // default isolate if needed. |
491 static Debugger* GetDefaultIsolateDebugger(); | 492 static Debugger* GetDefaultIsolateDebugger(); |
| 493 #endif |
492 | 494 |
493 // Get the stack guard from the default isolate. Preinitializes the | 495 // Get the stack guard from the default isolate. Preinitializes the |
494 // default isolate if needed. | 496 // default isolate if needed. |
495 static StackGuard* GetDefaultIsolateStackGuard(); | 497 static StackGuard* GetDefaultIsolateStackGuard(); |
496 | 498 |
497 // Returns the key used to store the pointer to the current isolate. | 499 // Returns the key used to store the pointer to the current isolate. |
498 // Used internally for V8 threads that do not execute JavaScript but still | 500 // Used internally for V8 threads that do not execute JavaScript but still |
499 // are part of the domain of an isolate (like the context switcher). | 501 // are part of the domain of an isolate (like the context switcher). |
500 static Thread::LocalStorageKey isolate_key() { | 502 static Thread::LocalStorageKey isolate_key() { |
501 return isolate_key_; | 503 return isolate_key_; |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
905 | 907 |
906 void* PreallocatedStorageNew(size_t size); | 908 void* PreallocatedStorageNew(size_t size); |
907 void PreallocatedStorageDelete(void* p); | 909 void PreallocatedStorageDelete(void* p); |
908 void PreallocatedStorageInit(size_t size); | 910 void PreallocatedStorageInit(size_t size); |
909 | 911 |
910 #ifdef ENABLE_DEBUGGER_SUPPORT | 912 #ifdef ENABLE_DEBUGGER_SUPPORT |
911 Debugger* debugger() { return debugger_; } | 913 Debugger* debugger() { return debugger_; } |
912 Debug* debug() { return debug_; } | 914 Debug* debug() { return debug_; } |
913 #endif | 915 #endif |
914 | 916 |
| 917 inline bool DebuggerHasBreakPoints(); |
| 918 |
915 #ifdef ENABLE_LOGGING_AND_PROFILING | 919 #ifdef ENABLE_LOGGING_AND_PROFILING |
916 ProducerHeapProfile* producer_heap_profile() { | 920 ProducerHeapProfile* producer_heap_profile() { |
917 return producer_heap_profile_; | 921 return producer_heap_profile_; |
918 } | 922 } |
919 #endif | 923 #endif |
920 | 924 |
921 #ifdef DEBUG | 925 #ifdef DEBUG |
922 HistogramInfo* heap_histograms() { return heap_histograms_; } | 926 HistogramInfo* heap_histograms() { return heap_histograms_; } |
923 | 927 |
924 JSObject::SpillInformation* js_spill_information() { | 928 JSObject::SpillInformation* js_spill_information() { |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1379 | 1383 |
1380 } } // namespace v8::internal | 1384 } } // namespace v8::internal |
1381 | 1385 |
1382 // TODO(isolates): Get rid of these -inl.h includes and place them only where | 1386 // TODO(isolates): Get rid of these -inl.h includes and place them only where |
1383 // they're needed. | 1387 // they're needed. |
1384 #include "allocation-inl.h" | 1388 #include "allocation-inl.h" |
1385 #include "zone-inl.h" | 1389 #include "zone-inl.h" |
1386 #include "frames-inl.h" | 1390 #include "frames-inl.h" |
1387 | 1391 |
1388 #endif // V8_ISOLATE_H_ | 1392 #endif // V8_ISOLATE_H_ |
OLD | NEW |