| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // assembler.h, where it is defined, here. | 94 // assembler.h, where it is defined, here. |
| 95 typedef void* ExternalReferenceRedirectorPointer(); | 95 typedef void* ExternalReferenceRedirectorPointer(); |
| 96 | 96 |
| 97 | 97 |
| 98 #ifdef ENABLE_DEBUGGER_SUPPORT | 98 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 99 class Debug; | 99 class Debug; |
| 100 class Debugger; | 100 class Debugger; |
| 101 class DebuggerAgent; | 101 class DebuggerAgent; |
| 102 #endif | 102 #endif |
| 103 | 103 |
| 104 #if !defined(__arm__) && defined(V8_TARGET_ARCH_A64) || \ | 104 #if !defined(__arm__) && V8_TARGET_ARCH_A64 || \ |
| 105 !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \ | 105 !defined(__arm__) && V8_TARGET_ARCH_ARM || \ |
| 106 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS) | 106 !defined(__mips__) && V8_TARGET_ARCH_MIPS |
| 107 class Redirection; | 107 class Redirection; |
| 108 class Simulator; | 108 class Simulator; |
| 109 #endif | 109 #endif |
| 110 | 110 |
| 111 | 111 |
| 112 // Static indirection table for handles to constants. If a frame | 112 // Static indirection table for handles to constants. If a frame |
| 113 // element represents a constant, the data contains an index into | 113 // element represents a constant, the data contains an index into |
| 114 // this table of handles to the actual constants. | 114 // this table of handles to the actual constants. |
| 115 // Static indirection table for handles to constants. If a Result | 115 // Static indirection table for handles to constants. If a Result |
| 116 // represents a constant, the data contains an index into this table | 116 // represents a constant, the data contains an index into this table |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 ASSERT(try_catch_handler_address_ == NULL); | 240 ASSERT(try_catch_handler_address_ == NULL); |
| 241 } | 241 } |
| 242 | 242 |
| 243 Isolate* isolate_; | 243 Isolate* isolate_; |
| 244 // The context where the current execution method is created and for variable | 244 // The context where the current execution method is created and for variable |
| 245 // lookups. | 245 // lookups. |
| 246 Context* context_; | 246 Context* context_; |
| 247 ThreadId thread_id_; | 247 ThreadId thread_id_; |
| 248 MaybeObject* pending_exception_; | 248 MaybeObject* pending_exception_; |
| 249 bool has_pending_message_; | 249 bool has_pending_message_; |
| 250 bool rethrowing_message_; |
| 250 Object* pending_message_obj_; | 251 Object* pending_message_obj_; |
| 251 Script* pending_message_script_; | 252 Object* pending_message_script_; |
| 252 int pending_message_start_pos_; | 253 int pending_message_start_pos_; |
| 253 int pending_message_end_pos_; | 254 int pending_message_end_pos_; |
| 254 // Use a separate value for scheduled exceptions to preserve the | 255 // Use a separate value for scheduled exceptions to preserve the |
| 255 // invariants that hold about pending_exception. We may want to | 256 // invariants that hold about pending_exception. We may want to |
| 256 // unify them later. | 257 // unify them later. |
| 257 MaybeObject* scheduled_exception_; | 258 MaybeObject* scheduled_exception_; |
| 258 bool external_caught_exception_; | 259 bool external_caught_exception_; |
| 259 SaveContext* save_context_; | 260 SaveContext* save_context_; |
| 260 v8::TryCatch* catcher_; | 261 v8::TryCatch* catcher_; |
| 261 | 262 |
| 262 // Stack. | 263 // Stack. |
| 263 Address c_entry_fp_; // the frame pointer of the top c entry frame | 264 Address c_entry_fp_; // the frame pointer of the top c entry frame |
| 264 Address handler_; // try-blocks are chained through the stack | 265 Address handler_; // try-blocks are chained through the stack |
| 265 | 266 |
| 266 #ifdef USE_SIMULATOR | 267 #ifdef USE_SIMULATOR |
| 267 #if defined(V8_TARGET_ARCH_A64) || defined(V8_TARGET_ARCH_ARM) || \ | 268 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_A64 || V8_TARGET_ARCH_MIPS |
| 268 defined(V8_TARGET_ARCH_MIPS) | |
| 269 Simulator* simulator_; | 269 Simulator* simulator_; |
| 270 #endif | 270 #endif |
| 271 #endif // USE_SIMULATOR | 271 #endif // USE_SIMULATOR |
| 272 | 272 |
| 273 Address js_entry_sp_; // the stack pointer of the bottom JS entry frame | 273 Address js_entry_sp_; // the stack pointer of the bottom JS entry frame |
| 274 Address external_callback_; // the external callback we're currently in | 274 Address external_callback_; // the external callback we're currently in |
| 275 StateTag current_vm_state_; | 275 StateTag current_vm_state_; |
| 276 | 276 |
| 277 // Generated code scratch locations. | 277 // Generated code scratch locations. |
| 278 int32_t formal_count_; | 278 int32_t formal_count_; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 // A thread has a PerIsolateThreadData instance for each isolate that it has | 386 // A thread has a PerIsolateThreadData instance for each isolate that it has |
| 387 // entered. That instance is allocated when the isolate is initially entered | 387 // entered. That instance is allocated when the isolate is initially entered |
| 388 // and reused on subsequent entries. | 388 // and reused on subsequent entries. |
| 389 class PerIsolateThreadData { | 389 class PerIsolateThreadData { |
| 390 public: | 390 public: |
| 391 PerIsolateThreadData(Isolate* isolate, ThreadId thread_id) | 391 PerIsolateThreadData(Isolate* isolate, ThreadId thread_id) |
| 392 : isolate_(isolate), | 392 : isolate_(isolate), |
| 393 thread_id_(thread_id), | 393 thread_id_(thread_id), |
| 394 stack_limit_(0), | 394 stack_limit_(0), |
| 395 thread_state_(NULL), | 395 thread_state_(NULL), |
| 396 #if !defined(__arm__) && defined(V8_TARGET_ARCH_A64) || \ | 396 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \ |
| 397 !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \ | 397 !defined(__arm__) && V8_TARGET_ARCH_A64 || \ |
| 398 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS) | 398 !defined(__mips__) && V8_TARGET_ARCH_MIPS |
| 399 simulator_(NULL), | 399 simulator_(NULL), |
| 400 #endif | 400 #endif |
| 401 next_(NULL), | 401 next_(NULL), |
| 402 prev_(NULL) { } | 402 prev_(NULL) { } |
| 403 Isolate* isolate() const { return isolate_; } | 403 Isolate* isolate() const { return isolate_; } |
| 404 ThreadId thread_id() const { return thread_id_; } | 404 ThreadId thread_id() const { return thread_id_; } |
| 405 void set_stack_limit(uintptr_t value) { stack_limit_ = value; } | 405 void set_stack_limit(uintptr_t value) { stack_limit_ = value; } |
| 406 uintptr_t stack_limit() const { return stack_limit_; } | 406 uintptr_t stack_limit() const { return stack_limit_; } |
| 407 ThreadState* thread_state() const { return thread_state_; } | 407 ThreadState* thread_state() const { return thread_state_; } |
| 408 void set_thread_state(ThreadState* value) { thread_state_ = value; } | 408 void set_thread_state(ThreadState* value) { thread_state_ = value; } |
| 409 | 409 |
| 410 #if !defined(__arm__) && defined(V8_TARGET_ARCH_A64) || \ | 410 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \ |
| 411 !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \ | 411 !defined(__arm__) && V8_TARGET_ARCH_A64 || \ |
| 412 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS) | 412 !defined(__mips__) && V8_TARGET_ARCH_MIPS |
| 413 Simulator* simulator() const { return simulator_; } | 413 Simulator* simulator() const { return simulator_; } |
| 414 void set_simulator(Simulator* simulator) { | 414 void set_simulator(Simulator* simulator) { |
| 415 simulator_ = simulator; | 415 simulator_ = simulator; |
| 416 } | 416 } |
| 417 #endif | 417 #endif |
| 418 | 418 |
| 419 bool Matches(Isolate* isolate, ThreadId thread_id) const { | 419 bool Matches(Isolate* isolate, ThreadId thread_id) const { |
| 420 return isolate_ == isolate && thread_id_.Equals(thread_id); | 420 return isolate_ == isolate && thread_id_.Equals(thread_id); |
| 421 } | 421 } |
| 422 | 422 |
| 423 private: | 423 private: |
| 424 Isolate* isolate_; | 424 Isolate* isolate_; |
| 425 ThreadId thread_id_; | 425 ThreadId thread_id_; |
| 426 uintptr_t stack_limit_; | 426 uintptr_t stack_limit_; |
| 427 ThreadState* thread_state_; | 427 ThreadState* thread_state_; |
| 428 | 428 |
| 429 #if !defined(__arm__) && defined(V8_TARGET_ARCH_A64) || \ | 429 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \ |
| 430 !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \ | 430 !defined(__arm__) && V8_TARGET_ARCH_A64 || \ |
| 431 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS) | 431 !defined(__mips__) && V8_TARGET_ARCH_MIPS |
| 432 Simulator* simulator_; | 432 Simulator* simulator_; |
| 433 #endif | 433 #endif |
| 434 | 434 |
| 435 PerIsolateThreadData* next_; | 435 PerIsolateThreadData* next_; |
| 436 PerIsolateThreadData* prev_; | 436 PerIsolateThreadData* prev_; |
| 437 | 437 |
| 438 friend class Isolate; | 438 friend class Isolate; |
| 439 friend class ThreadDataTable; | 439 friend class ThreadDataTable; |
| 440 friend class EntryStackItem; | 440 friend class EntryStackItem; |
| 441 | 441 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 Address get_address_from_id(AddressId id); | 545 Address get_address_from_id(AddressId id); |
| 546 | 546 |
| 547 // Access to top context (where the current function object was created). | 547 // Access to top context (where the current function object was created). |
| 548 Context* context() { return thread_local_top_.context_; } | 548 Context* context() { return thread_local_top_.context_; } |
| 549 void set_context(Context* context) { | 549 void set_context(Context* context) { |
| 550 ASSERT(context == NULL || context->IsContext()); | 550 ASSERT(context == NULL || context->IsContext()); |
| 551 thread_local_top_.context_ = context; | 551 thread_local_top_.context_ = context; |
| 552 } | 552 } |
| 553 Context** context_address() { return &thread_local_top_.context_; } | 553 Context** context_address() { return &thread_local_top_.context_; } |
| 554 | 554 |
| 555 SaveContext* save_context() {return thread_local_top_.save_context_; } | 555 SaveContext* save_context() { return thread_local_top_.save_context_; } |
| 556 void set_save_context(SaveContext* save) { | 556 void set_save_context(SaveContext* save) { |
| 557 thread_local_top_.save_context_ = save; | 557 thread_local_top_.save_context_ = save; |
| 558 } | 558 } |
| 559 | 559 |
| 560 // Access to current thread id. | 560 // Access to current thread id. |
| 561 ThreadId thread_id() { return thread_local_top_.thread_id_; } | 561 ThreadId thread_id() { return thread_local_top_.thread_id_; } |
| 562 void set_thread_id(ThreadId id) { thread_local_top_.thread_id_ = id; } | 562 void set_thread_id(ThreadId id) { thread_local_top_.thread_id_ = id; } |
| 563 | 563 |
| 564 // Interface to pending exception. | 564 // Interface to pending exception. |
| 565 MaybeObject* pending_exception() { | 565 MaybeObject* pending_exception() { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 580 } | 580 } |
| 581 MaybeObject** pending_exception_address() { | 581 MaybeObject** pending_exception_address() { |
| 582 return &thread_local_top_.pending_exception_; | 582 return &thread_local_top_.pending_exception_; |
| 583 } | 583 } |
| 584 bool has_pending_exception() { | 584 bool has_pending_exception() { |
| 585 return !thread_local_top_.pending_exception_->IsTheHole(); | 585 return !thread_local_top_.pending_exception_->IsTheHole(); |
| 586 } | 586 } |
| 587 void clear_pending_message() { | 587 void clear_pending_message() { |
| 588 thread_local_top_.has_pending_message_ = false; | 588 thread_local_top_.has_pending_message_ = false; |
| 589 thread_local_top_.pending_message_obj_ = heap_.the_hole_value(); | 589 thread_local_top_.pending_message_obj_ = heap_.the_hole_value(); |
| 590 thread_local_top_.pending_message_script_ = NULL; | 590 thread_local_top_.pending_message_script_ = heap_.the_hole_value(); |
| 591 } | 591 } |
| 592 v8::TryCatch* try_catch_handler() { | 592 v8::TryCatch* try_catch_handler() { |
| 593 return thread_local_top_.TryCatchHandler(); | 593 return thread_local_top_.TryCatchHandler(); |
| 594 } | 594 } |
| 595 Address try_catch_handler_address() { | 595 Address try_catch_handler_address() { |
| 596 return thread_local_top_.try_catch_handler_address(); | 596 return thread_local_top_.try_catch_handler_address(); |
| 597 } | 597 } |
| 598 bool* external_caught_exception_address() { | 598 bool* external_caught_exception_address() { |
| 599 return &thread_local_top_.external_caught_exception_; | 599 return &thread_local_top_.external_caught_exception_; |
| 600 } | 600 } |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 void ReportFailedAccessCheck(JSObject* receiver, v8::AccessType type); | 758 void ReportFailedAccessCheck(JSObject* receiver, v8::AccessType type); |
| 759 | 759 |
| 760 // Exception throwing support. The caller should use the result | 760 // Exception throwing support. The caller should use the result |
| 761 // of Throw() as its return value. | 761 // of Throw() as its return value. |
| 762 Failure* Throw(Object* exception, MessageLocation* location = NULL); | 762 Failure* Throw(Object* exception, MessageLocation* location = NULL); |
| 763 // Re-throw an exception. This involves no error reporting since | 763 // Re-throw an exception. This involves no error reporting since |
| 764 // error reporting was handled when the exception was thrown | 764 // error reporting was handled when the exception was thrown |
| 765 // originally. | 765 // originally. |
| 766 Failure* ReThrow(MaybeObject* exception); | 766 Failure* ReThrow(MaybeObject* exception); |
| 767 void ScheduleThrow(Object* exception); | 767 void ScheduleThrow(Object* exception); |
| 768 // Re-set pending message, script and positions reported to the TryCatch |
| 769 // back to the TLS for re-use when rethrowing. |
| 770 void RestorePendingMessageFromTryCatch(v8::TryCatch* handler); |
| 768 void ReportPendingMessages(); | 771 void ReportPendingMessages(); |
| 769 // Return pending location if any or unfilled structure. | 772 // Return pending location if any or unfilled structure. |
| 770 MessageLocation GetMessageLocation(); | 773 MessageLocation GetMessageLocation(); |
| 771 Failure* ThrowIllegalOperation(); | 774 Failure* ThrowIllegalOperation(); |
| 772 | 775 |
| 773 // Promote a scheduled exception to pending. Asserts has_scheduled_exception. | 776 // Promote a scheduled exception to pending. Asserts has_scheduled_exception. |
| 774 Failure* PromoteScheduledException(); | 777 Failure* PromoteScheduledException(); |
| 775 void DoThrow(Object* exception, MessageLocation* location); | 778 void DoThrow(Object* exception, MessageLocation* location); |
| 776 // Checks if exception should be reported and finds out if it's | 779 // Checks if exception should be reported and finds out if it's |
| 777 // caught externally. | 780 // caught externally. |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 return descriptor_lookup_cache_; | 893 return descriptor_lookup_cache_; |
| 891 } | 894 } |
| 892 | 895 |
| 893 v8::ImplementationUtilities::HandleScopeData* handle_scope_data() { | 896 v8::ImplementationUtilities::HandleScopeData* handle_scope_data() { |
| 894 return &handle_scope_data_; | 897 return &handle_scope_data_; |
| 895 } | 898 } |
| 896 HandleScopeImplementer* handle_scope_implementer() { | 899 HandleScopeImplementer* handle_scope_implementer() { |
| 897 ASSERT(handle_scope_implementer_); | 900 ASSERT(handle_scope_implementer_); |
| 898 return handle_scope_implementer_; | 901 return handle_scope_implementer_; |
| 899 } | 902 } |
| 903 Zone* runtime_zone() { return &runtime_zone_; } |
| 900 | 904 |
| 901 UnicodeCache* unicode_cache() { | 905 UnicodeCache* unicode_cache() { |
| 902 return unicode_cache_; | 906 return unicode_cache_; |
| 903 } | 907 } |
| 904 | 908 |
| 905 InnerPointerToCodeCache* inner_pointer_to_code_cache() { | 909 InnerPointerToCodeCache* inner_pointer_to_code_cache() { |
| 906 return inner_pointer_to_code_cache_; | 910 return inner_pointer_to_code_cache_; |
| 907 } | 911 } |
| 908 | 912 |
| 909 ConsStringIteratorOp* write_iterator() { return write_iterator_; } | 913 ConsStringIteratorOp* write_iterator() { return write_iterator_; } |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 992 #ifdef DEBUG | 996 #ifdef DEBUG |
| 993 HistogramInfo* heap_histograms() { return heap_histograms_; } | 997 HistogramInfo* heap_histograms() { return heap_histograms_; } |
| 994 | 998 |
| 995 JSObject::SpillInformation* js_spill_information() { | 999 JSObject::SpillInformation* js_spill_information() { |
| 996 return &js_spill_information_; | 1000 return &js_spill_information_; |
| 997 } | 1001 } |
| 998 | 1002 |
| 999 int* code_kind_statistics() { return code_kind_statistics_; } | 1003 int* code_kind_statistics() { return code_kind_statistics_; } |
| 1000 #endif | 1004 #endif |
| 1001 | 1005 |
| 1002 #if defined(V8_TARGET_ARCH_A64) && !defined(__arm__) || \ | 1006 #if V8_TARGET_ARCH_ARM && !defined(__arm__) || \ |
| 1003 defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \ | 1007 V8_TARGET_ARCH_A64 && !defined(__arm__) || \ |
| 1004 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__) | 1008 V8_TARGET_ARCH_MIPS && !defined(__mips__) |
| 1005 bool simulator_initialized() { return simulator_initialized_; } | 1009 bool simulator_initialized() { return simulator_initialized_; } |
| 1006 void set_simulator_initialized(bool initialized) { | 1010 void set_simulator_initialized(bool initialized) { |
| 1007 simulator_initialized_ = initialized; | 1011 simulator_initialized_ = initialized; |
| 1008 } | 1012 } |
| 1009 | 1013 |
| 1010 HashMap* simulator_i_cache() { return simulator_i_cache_; } | 1014 HashMap* simulator_i_cache() { return simulator_i_cache_; } |
| 1011 void set_simulator_i_cache(HashMap* hash_map) { | 1015 void set_simulator_i_cache(HashMap* hash_map) { |
| 1012 simulator_i_cache_ = hash_map; | 1016 simulator_i_cache_ = hash_map; |
| 1013 } | 1017 } |
| 1014 | 1018 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 thread_local_top_.top_lookup_result_ = top; | 1053 thread_local_top_.top_lookup_result_ = top; |
| 1050 } | 1054 } |
| 1051 | 1055 |
| 1052 bool context_exit_happened() { | 1056 bool context_exit_happened() { |
| 1053 return context_exit_happened_; | 1057 return context_exit_happened_; |
| 1054 } | 1058 } |
| 1055 void set_context_exit_happened(bool context_exit_happened) { | 1059 void set_context_exit_happened(bool context_exit_happened) { |
| 1056 context_exit_happened_ = context_exit_happened; | 1060 context_exit_happened_ = context_exit_happened; |
| 1057 } | 1061 } |
| 1058 | 1062 |
| 1063 bool initialized_from_snapshot() { return initialized_from_snapshot_; } |
| 1064 |
| 1059 double time_millis_since_init() { | 1065 double time_millis_since_init() { |
| 1060 return OS::TimeCurrentMillis() - time_millis_at_init_; | 1066 return OS::TimeCurrentMillis() - time_millis_at_init_; |
| 1061 } | 1067 } |
| 1062 | 1068 |
| 1063 DateCache* date_cache() { | 1069 DateCache* date_cache() { |
| 1064 return date_cache_; | 1070 return date_cache_; |
| 1065 } | 1071 } |
| 1066 | 1072 |
| 1067 void set_date_cache(DateCache* date_cache) { | 1073 void set_date_cache(DateCache* date_cache) { |
| 1068 if (date_cache != date_cache_) { | 1074 if (date_cache != date_cache_) { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1108 } | 1114 } |
| 1109 void set_callback_table(CallbackTable* callback_table) { | 1115 void set_callback_table(CallbackTable* callback_table) { |
| 1110 callback_table_ = callback_table; | 1116 callback_table_ = callback_table; |
| 1111 } | 1117 } |
| 1112 | 1118 |
| 1113 int id() const { return static_cast<int>(id_); } | 1119 int id() const { return static_cast<int>(id_); } |
| 1114 | 1120 |
| 1115 HStatistics* GetHStatistics(); | 1121 HStatistics* GetHStatistics(); |
| 1116 HTracer* GetHTracer(); | 1122 HTracer* GetHTracer(); |
| 1117 | 1123 |
| 1124 FunctionEntryHook function_entry_hook() { return function_entry_hook_; } |
| 1125 void set_function_entry_hook(FunctionEntryHook function_entry_hook) { |
| 1126 function_entry_hook_ = function_entry_hook; |
| 1127 } |
| 1128 |
| 1118 private: | 1129 private: |
| 1119 Isolate(); | 1130 Isolate(); |
| 1120 | 1131 |
| 1121 friend struct GlobalState; | 1132 friend struct GlobalState; |
| 1122 friend struct InitializeGlobalState; | 1133 friend struct InitializeGlobalState; |
| 1123 | 1134 |
| 1124 enum State { | 1135 enum State { |
| 1125 UNINITIALIZED, // Some components may not have been allocated. | 1136 UNINITIALIZED, // Some components may not have been allocated. |
| 1126 INITIALIZED // All components are fully initialized. | 1137 INITIALIZED // All components are fully initialized. |
| 1127 }; | 1138 }; |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1258 int stack_trace_for_uncaught_exceptions_frame_limit_; | 1269 int stack_trace_for_uncaught_exceptions_frame_limit_; |
| 1259 StackTrace::StackTraceOptions stack_trace_for_uncaught_exceptions_options_; | 1270 StackTrace::StackTraceOptions stack_trace_for_uncaught_exceptions_options_; |
| 1260 TranscendentalCache* transcendental_cache_; | 1271 TranscendentalCache* transcendental_cache_; |
| 1261 MemoryAllocator* memory_allocator_; | 1272 MemoryAllocator* memory_allocator_; |
| 1262 KeyedLookupCache* keyed_lookup_cache_; | 1273 KeyedLookupCache* keyed_lookup_cache_; |
| 1263 ContextSlotCache* context_slot_cache_; | 1274 ContextSlotCache* context_slot_cache_; |
| 1264 DescriptorLookupCache* descriptor_lookup_cache_; | 1275 DescriptorLookupCache* descriptor_lookup_cache_; |
| 1265 v8::ImplementationUtilities::HandleScopeData handle_scope_data_; | 1276 v8::ImplementationUtilities::HandleScopeData handle_scope_data_; |
| 1266 HandleScopeImplementer* handle_scope_implementer_; | 1277 HandleScopeImplementer* handle_scope_implementer_; |
| 1267 UnicodeCache* unicode_cache_; | 1278 UnicodeCache* unicode_cache_; |
| 1279 Zone runtime_zone_; |
| 1268 PreallocatedStorage in_use_list_; | 1280 PreallocatedStorage in_use_list_; |
| 1269 PreallocatedStorage free_list_; | 1281 PreallocatedStorage free_list_; |
| 1270 bool preallocated_storage_preallocated_; | 1282 bool preallocated_storage_preallocated_; |
| 1271 InnerPointerToCodeCache* inner_pointer_to_code_cache_; | 1283 InnerPointerToCodeCache* inner_pointer_to_code_cache_; |
| 1272 ConsStringIteratorOp* write_iterator_; | 1284 ConsStringIteratorOp* write_iterator_; |
| 1273 GlobalHandles* global_handles_; | 1285 GlobalHandles* global_handles_; |
| 1274 ContextSwitcher* context_switcher_; | 1286 ContextSwitcher* context_switcher_; |
| 1275 ThreadManager* thread_manager_; | 1287 ThreadManager* thread_manager_; |
| 1276 RuntimeState runtime_state_; | 1288 RuntimeState runtime_state_; |
| 1277 bool fp_stubs_generated_; | 1289 bool fp_stubs_generated_; |
| 1278 Builtins builtins_; | 1290 Builtins builtins_; |
| 1279 bool has_installed_extensions_; | 1291 bool has_installed_extensions_; |
| 1280 StringTracker* string_tracker_; | 1292 StringTracker* string_tracker_; |
| 1281 unibrow::Mapping<unibrow::Ecma262UnCanonicalize> jsregexp_uncanonicalize_; | 1293 unibrow::Mapping<unibrow::Ecma262UnCanonicalize> jsregexp_uncanonicalize_; |
| 1282 unibrow::Mapping<unibrow::CanonicalizationRange> jsregexp_canonrange_; | 1294 unibrow::Mapping<unibrow::CanonicalizationRange> jsregexp_canonrange_; |
| 1283 ConsStringIteratorOp objects_string_compare_iterator_a_; | 1295 ConsStringIteratorOp objects_string_compare_iterator_a_; |
| 1284 ConsStringIteratorOp objects_string_compare_iterator_b_; | 1296 ConsStringIteratorOp objects_string_compare_iterator_b_; |
| 1285 StaticResource<ConsStringIteratorOp> objects_string_iterator_; | 1297 StaticResource<ConsStringIteratorOp> objects_string_iterator_; |
| 1286 unibrow::Mapping<unibrow::Ecma262Canonicalize> | 1298 unibrow::Mapping<unibrow::Ecma262Canonicalize> |
| 1287 regexp_macro_assembler_canonicalize_; | 1299 regexp_macro_assembler_canonicalize_; |
| 1288 RegExpStack* regexp_stack_; | 1300 RegExpStack* regexp_stack_; |
| 1289 DateCache* date_cache_; | 1301 DateCache* date_cache_; |
| 1290 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; | 1302 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; |
| 1291 CodeStubInterfaceDescriptor* code_stub_interface_descriptors_; | 1303 CodeStubInterfaceDescriptor* code_stub_interface_descriptors_; |
| 1292 | 1304 |
| 1293 // The garbage collector should be a little more aggressive when it knows | 1305 // The garbage collector should be a little more aggressive when it knows |
| 1294 // that a context was recently exited. | 1306 // that a context was recently exited. |
| 1295 bool context_exit_happened_; | 1307 bool context_exit_happened_; |
| 1296 | 1308 |
| 1309 // True if this isolate was initialized from a snapshot. |
| 1310 bool initialized_from_snapshot_; |
| 1311 |
| 1297 // Time stamp at initialization. | 1312 // Time stamp at initialization. |
| 1298 double time_millis_at_init_; | 1313 double time_millis_at_init_; |
| 1299 | 1314 |
| 1300 #if defined(V8_TARGET_ARCH_A64) && !defined(__arm__) || \ | 1315 #if V8_TARGET_ARCH_ARM && !defined(__arm__) || \ |
| 1301 defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \ | 1316 V8_TARGET_ARCH_A64 && !defined(__arm__) || \ |
| 1302 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__) | 1317 V8_TARGET_ARCH_MIPS && !defined(__mips__) |
| 1303 bool simulator_initialized_; | 1318 bool simulator_initialized_; |
| 1304 HashMap* simulator_i_cache_; | 1319 HashMap* simulator_i_cache_; |
| 1305 Redirection* simulator_redirection_; | 1320 Redirection* simulator_redirection_; |
| 1306 #endif | 1321 #endif |
| 1307 | 1322 |
| 1308 #ifdef DEBUG | 1323 #ifdef DEBUG |
| 1309 // A static array of histogram info for each type. | 1324 // A static array of histogram info for each type. |
| 1310 HistogramInfo heap_histograms_[LAST_TYPE + 1]; | 1325 HistogramInfo heap_histograms_[LAST_TYPE + 1]; |
| 1311 JSObject::SpillInformation js_spill_information_; | 1326 JSObject::SpillInformation js_spill_information_; |
| 1312 int code_kind_statistics_[Code::NUMBER_OF_KINDS]; | 1327 int code_kind_statistics_[Code::NUMBER_OF_KINDS]; |
| 1313 #endif | 1328 #endif |
| 1314 | 1329 |
| 1315 #ifdef ENABLE_DEBUGGER_SUPPORT | 1330 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 1316 Debugger* debugger_; | 1331 Debugger* debugger_; |
| 1317 Debug* debug_; | 1332 Debug* debug_; |
| 1318 #endif | 1333 #endif |
| 1319 CpuProfiler* cpu_profiler_; | 1334 CpuProfiler* cpu_profiler_; |
| 1320 HeapProfiler* heap_profiler_; | 1335 HeapProfiler* heap_profiler_; |
| 1336 FunctionEntryHook function_entry_hook_; |
| 1321 | 1337 |
| 1322 #define GLOBAL_BACKING_STORE(type, name, initialvalue) \ | 1338 #define GLOBAL_BACKING_STORE(type, name, initialvalue) \ |
| 1323 type name##_; | 1339 type name##_; |
| 1324 ISOLATE_INIT_LIST(GLOBAL_BACKING_STORE) | 1340 ISOLATE_INIT_LIST(GLOBAL_BACKING_STORE) |
| 1325 #undef GLOBAL_BACKING_STORE | 1341 #undef GLOBAL_BACKING_STORE |
| 1326 | 1342 |
| 1327 #define GLOBAL_ARRAY_BACKING_STORE(type, name, length) \ | 1343 #define GLOBAL_ARRAY_BACKING_STORE(type, name, length) \ |
| 1328 type name##_[length]; | 1344 type name##_[length]; |
| 1329 ISOLATE_INIT_ARRAY_LIST(GLOBAL_ARRAY_BACKING_STORE) | 1345 ISOLATE_INIT_ARRAY_LIST(GLOBAL_ARRAY_BACKING_STORE) |
| 1330 #undef GLOBAL_ARRAY_BACKING_STORE | 1346 #undef GLOBAL_ARRAY_BACKING_STORE |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1494 | 1510 |
| 1495 // Mark the native context with out of memory. | 1511 // Mark the native context with out of memory. |
| 1496 inline void Context::mark_out_of_memory() { | 1512 inline void Context::mark_out_of_memory() { |
| 1497 native_context()->set_out_of_memory(HEAP->true_value()); | 1513 native_context()->set_out_of_memory(HEAP->true_value()); |
| 1498 } | 1514 } |
| 1499 | 1515 |
| 1500 | 1516 |
| 1501 } } // namespace v8::internal | 1517 } } // namespace v8::internal |
| 1502 | 1518 |
| 1503 #endif // V8_ISOLATE_H_ | 1519 #endif // V8_ISOLATE_H_ |
| OLD | NEW |