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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 V(v8::Debug::MessageHandler, message_handler, NULL) \ | 350 V(v8::Debug::MessageHandler, message_handler, NULL) \ |
351 /* To distinguish the function templates, so that we can find them in the */ \ | 351 /* To distinguish the function templates, so that we can find them in the */ \ |
352 /* function cache of the native context. */ \ | 352 /* function cache of the native context. */ \ |
353 V(int, next_serial_number, 0) \ | 353 V(int, next_serial_number, 0) \ |
354 V(ExternalReferenceRedirectorPointer*, external_reference_redirector, NULL) \ | 354 V(ExternalReferenceRedirectorPointer*, external_reference_redirector, NULL) \ |
355 V(bool, always_allow_natives_syntax, false) \ | 355 V(bool, always_allow_natives_syntax, false) \ |
356 /* Part of the state of liveedit. */ \ | 356 /* Part of the state of liveedit. */ \ |
357 V(FunctionInfoListener*, active_function_info_listener, NULL) \ | 357 V(FunctionInfoListener*, active_function_info_listener, NULL) \ |
358 /* State for Relocatable. */ \ | 358 /* State for Relocatable. */ \ |
359 V(Relocatable*, relocatable_top, NULL) \ | 359 V(Relocatable*, relocatable_top, NULL) \ |
| 360 /* State for CodeEntry in profile-generator. */ \ |
| 361 V(CodeGenerator*, current_code_generator, NULL) \ |
| 362 V(bool, jump_target_compiling_deferred_code, false) \ |
360 V(DebugObjectCache*, string_stream_debug_object_cache, NULL) \ | 363 V(DebugObjectCache*, string_stream_debug_object_cache, NULL) \ |
361 V(Object*, string_stream_current_security_token, NULL) \ | 364 V(Object*, string_stream_current_security_token, NULL) \ |
362 /* TODO(isolates): Release this on destruction? */ \ | 365 /* TODO(isolates): Release this on destruction? */ \ |
363 V(int*, irregexp_interpreter_backtrack_stack_cache, NULL) \ | 366 V(int*, irregexp_interpreter_backtrack_stack_cache, NULL) \ |
364 /* Serializer state. */ \ | 367 /* Serializer state. */ \ |
365 V(ExternalReferenceTable*, external_reference_table, NULL) \ | 368 V(ExternalReferenceTable*, external_reference_table, NULL) \ |
366 /* AstNode state. */ \ | 369 /* AstNode state. */ \ |
367 V(int, ast_node_id, 0) \ | 370 V(int, ast_node_id, 0) \ |
368 V(unsigned, ast_node_count, 0) \ | 371 V(unsigned, ast_node_count, 0) \ |
369 /* SafeStackFrameIterator activations count. */ \ | 372 /* SafeStackFrameIterator activations count. */ \ |
370 V(int, safe_stack_iterator_counter, 0) \ | 373 V(int, safe_stack_iterator_counter, 0) \ |
| 374 V(CpuProfiler*, cpu_profiler, NULL) \ |
| 375 V(HeapProfiler*, heap_profiler, NULL) \ |
371 V(bool, observer_delivery_pending, false) \ | 376 V(bool, observer_delivery_pending, false) \ |
372 V(HStatistics*, hstatistics, NULL) \ | 377 V(HStatistics*, hstatistics, NULL) \ |
373 V(HTracer*, htracer, NULL) \ | 378 V(HTracer*, htracer, NULL) \ |
374 ISOLATE_DEBUGGER_INIT_LIST(V) | 379 ISOLATE_DEBUGGER_INIT_LIST(V) |
375 | 380 |
376 class Isolate { | 381 class Isolate { |
377 // These forward declarations are required to make the friend declarations in | 382 // These forward declarations are required to make the friend declarations in |
378 // PerIsolateThreadData work on some older versions of gcc. | 383 // PerIsolateThreadData work on some older versions of gcc. |
379 class ThreadDataTable; | 384 class ThreadDataTable; |
380 class EntryStackItem; | 385 class EntryStackItem; |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 // Attempts to compute the current source location, storing the | 777 // Attempts to compute the current source location, storing the |
773 // result in the target out parameter. | 778 // result in the target out parameter. |
774 void ComputeLocation(MessageLocation* target); | 779 void ComputeLocation(MessageLocation* target); |
775 | 780 |
776 // Override command line flag. | 781 // Override command line flag. |
777 void TraceException(bool flag); | 782 void TraceException(bool flag); |
778 | 783 |
779 // Out of resource exception helpers. | 784 // Out of resource exception helpers. |
780 Failure* StackOverflow(); | 785 Failure* StackOverflow(); |
781 Failure* TerminateExecution(); | 786 Failure* TerminateExecution(); |
782 void CancelTerminateExecution(); | |
783 | 787 |
784 // Administration | 788 // Administration |
785 void Iterate(ObjectVisitor* v); | 789 void Iterate(ObjectVisitor* v); |
786 void Iterate(ObjectVisitor* v, ThreadLocalTop* t); | 790 void Iterate(ObjectVisitor* v, ThreadLocalTop* t); |
787 char* Iterate(ObjectVisitor* v, char* t); | 791 char* Iterate(ObjectVisitor* v, char* t); |
788 void IterateThread(ThreadVisitor* v, char* t); | 792 void IterateThread(ThreadVisitor* v, char* t); |
789 | 793 |
790 | 794 |
791 // Returns the current native and global context. | 795 // Returns the current native and global context. |
792 Handle<Context> native_context(); | 796 Handle<Context> native_context(); |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
968 } | 972 } |
969 Debug* debug() { | 973 Debug* debug() { |
970 if (!NoBarrier_Load(&debugger_initialized_)) InitializeDebugger(); | 974 if (!NoBarrier_Load(&debugger_initialized_)) InitializeDebugger(); |
971 return debug_; | 975 return debug_; |
972 } | 976 } |
973 #endif | 977 #endif |
974 | 978 |
975 inline bool IsDebuggerActive(); | 979 inline bool IsDebuggerActive(); |
976 inline bool DebuggerHasBreakPoints(); | 980 inline bool DebuggerHasBreakPoints(); |
977 | 981 |
978 CpuProfiler* cpu_profiler() const { return cpu_profiler_; } | |
979 HeapProfiler* heap_profiler() const { return heap_profiler_; } | |
980 | |
981 #ifdef DEBUG | 982 #ifdef DEBUG |
982 HistogramInfo* heap_histograms() { return heap_histograms_; } | 983 HistogramInfo* heap_histograms() { return heap_histograms_; } |
983 | 984 |
984 JSObject::SpillInformation* js_spill_information() { | 985 JSObject::SpillInformation* js_spill_information() { |
985 return &js_spill_information_; | 986 return &js_spill_information_; |
986 } | 987 } |
987 | 988 |
988 int* code_kind_statistics() { return code_kind_statistics_; } | 989 int* code_kind_statistics() { return code_kind_statistics_; } |
989 | 990 |
990 bool AllowHandleDereference(); | 991 bool AllowHandleDereference(); |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1306 int code_kind_statistics_[Code::NUMBER_OF_KINDS]; | 1307 int code_kind_statistics_[Code::NUMBER_OF_KINDS]; |
1307 | 1308 |
1308 bool allow_compiler_thread_handle_deref_; | 1309 bool allow_compiler_thread_handle_deref_; |
1309 bool allow_execution_thread_handle_deref_; | 1310 bool allow_execution_thread_handle_deref_; |
1310 #endif | 1311 #endif |
1311 | 1312 |
1312 #ifdef ENABLE_DEBUGGER_SUPPORT | 1313 #ifdef ENABLE_DEBUGGER_SUPPORT |
1313 Debugger* debugger_; | 1314 Debugger* debugger_; |
1314 Debug* debug_; | 1315 Debug* debug_; |
1315 #endif | 1316 #endif |
1316 CpuProfiler* cpu_profiler_; | |
1317 HeapProfiler* heap_profiler_; | |
1318 | 1317 |
1319 #define GLOBAL_BACKING_STORE(type, name, initialvalue) \ | 1318 #define GLOBAL_BACKING_STORE(type, name, initialvalue) \ |
1320 type name##_; | 1319 type name##_; |
1321 ISOLATE_INIT_LIST(GLOBAL_BACKING_STORE) | 1320 ISOLATE_INIT_LIST(GLOBAL_BACKING_STORE) |
1322 #undef GLOBAL_BACKING_STORE | 1321 #undef GLOBAL_BACKING_STORE |
1323 | 1322 |
1324 #define GLOBAL_ARRAY_BACKING_STORE(type, name, length) \ | 1323 #define GLOBAL_ARRAY_BACKING_STORE(type, name, length) \ |
1325 type name##_[length]; | 1324 type name##_[length]; |
1326 ISOLATE_INIT_ARRAY_LIST(GLOBAL_ARRAY_BACKING_STORE) | 1325 ISOLATE_INIT_ARRAY_LIST(GLOBAL_ARRAY_BACKING_STORE) |
1327 #undef GLOBAL_ARRAY_BACKING_STORE | 1326 #undef GLOBAL_ARRAY_BACKING_STORE |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1492 | 1491 |
1493 // Mark the native context with out of memory. | 1492 // Mark the native context with out of memory. |
1494 inline void Context::mark_out_of_memory() { | 1493 inline void Context::mark_out_of_memory() { |
1495 native_context()->set_out_of_memory(HEAP->true_value()); | 1494 native_context()->set_out_of_memory(HEAP->true_value()); |
1496 } | 1495 } |
1497 | 1496 |
1498 | 1497 |
1499 } } // namespace v8::internal | 1498 } } // namespace v8::internal |
1500 | 1499 |
1501 #endif // V8_ISOLATE_H_ | 1500 #endif // V8_ISOLATE_H_ |
OLD | NEW |