| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 // assembler.h, where it is defined, here. | 86 // assembler.h, where it is defined, here. |
| 87 typedef void* ExternalReferenceRedirectorPointer(); | 87 typedef void* ExternalReferenceRedirectorPointer(); |
| 88 | 88 |
| 89 | 89 |
| 90 #ifdef ENABLE_DEBUGGER_SUPPORT | 90 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 91 class Debug; | 91 class Debug; |
| 92 class Debugger; | 92 class Debugger; |
| 93 class DebuggerAgent; | 93 class DebuggerAgent; |
| 94 #endif | 94 #endif |
| 95 | 95 |
| 96 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) | 96 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \ |
| 97 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS) |
| 97 class Redirection; | 98 class Redirection; |
| 98 class Simulator; | 99 class Simulator; |
| 99 #endif | 100 #endif |
| 100 | 101 |
| 102 |
| 101 // Static indirection table for handles to constants. If a frame | 103 // Static indirection table for handles to constants. If a frame |
| 102 // element represents a constant, the data contains an index into | 104 // element represents a constant, the data contains an index into |
| 103 // this table of handles to the actual constants. | 105 // this table of handles to the actual constants. |
| 104 // Static indirection table for handles to constants. If a Result | 106 // Static indirection table for handles to constants. If a Result |
| 105 // represents a constant, the data contains an index into this table | 107 // represents a constant, the data contains an index into this table |
| 106 // of handles to the actual constants. | 108 // of handles to the actual constants. |
| 107 typedef ZoneList<Handle<Object> > ZoneObjectList; | 109 typedef ZoneList<Handle<Object> > ZoneObjectList; |
| 108 | 110 |
| 109 #define RETURN_IF_SCHEDULED_EXCEPTION(isolate) \ | 111 #define RETURN_IF_SCHEDULED_EXCEPTION(isolate) \ |
| 110 if (isolate->has_scheduled_exception()) \ | 112 if (isolate->has_scheduled_exception()) \ |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 MaybeObject* scheduled_exception_; | 190 MaybeObject* scheduled_exception_; |
| 189 bool external_caught_exception_; | 191 bool external_caught_exception_; |
| 190 SaveContext* save_context_; | 192 SaveContext* save_context_; |
| 191 v8::TryCatch* catcher_; | 193 v8::TryCatch* catcher_; |
| 192 | 194 |
| 193 // Stack. | 195 // Stack. |
| 194 Address c_entry_fp_; // the frame pointer of the top c entry frame | 196 Address c_entry_fp_; // the frame pointer of the top c entry frame |
| 195 Address handler_; // try-blocks are chained through the stack | 197 Address handler_; // try-blocks are chained through the stack |
| 196 | 198 |
| 197 #ifdef USE_SIMULATOR | 199 #ifdef USE_SIMULATOR |
| 198 #ifdef V8_TARGET_ARCH_ARM | 200 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS) |
| 199 Simulator* simulator_; | 201 Simulator* simulator_; |
| 200 #elif V8_TARGET_ARCH_MIPS | |
| 201 assembler::mips::Simulator* simulator_; | |
| 202 #endif | 202 #endif |
| 203 #endif // USE_SIMULATOR | 203 #endif // USE_SIMULATOR |
| 204 | 204 |
| 205 #ifdef ENABLE_LOGGING_AND_PROFILING | 205 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 206 Address js_entry_sp_; // the stack pointer of the bottom js entry frame | 206 Address js_entry_sp_; // the stack pointer of the bottom js entry frame |
| 207 Address external_callback_; // the external callback we're currently in | 207 Address external_callback_; // the external callback we're currently in |
| 208 #endif | 208 #endif |
| 209 | 209 |
| 210 #ifdef ENABLE_VMSTATE_TRACKING | 210 #ifdef ENABLE_VMSTATE_TRACKING |
| 211 StateTag current_vm_state_; | 211 StateTag current_vm_state_; |
| 212 #endif | 212 #endif |
| 213 | 213 |
| 214 // Generated code scratch locations. | 214 // Generated code scratch locations. |
| 215 int32_t formal_count_; | 215 int32_t formal_count_; |
| 216 | 216 |
| 217 // Call back function to report unsafe JS accesses. | 217 // Call back function to report unsafe JS accesses. |
| 218 v8::FailedAccessCheckCallback failed_access_check_callback_; | 218 v8::FailedAccessCheckCallback failed_access_check_callback_; |
| 219 | 219 |
| 220 private: | 220 private: |
| 221 Address try_catch_handler_address_; | 221 Address try_catch_handler_address_; |
| 222 }; | 222 }; |
| 223 | 223 |
| 224 #if defined(V8_TARGET_ARCH_ARM) | 224 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS) |
| 225 | 225 |
| 226 #define ISOLATE_PLATFORM_INIT_LIST(V) \ | 226 #define ISOLATE_PLATFORM_INIT_LIST(V) \ |
| 227 /* VirtualFrame::SpilledScope state */ \ | 227 /* VirtualFrame::SpilledScope state */ \ |
| 228 V(bool, is_virtual_frame_in_spilled_scope, false) \ | 228 V(bool, is_virtual_frame_in_spilled_scope, false) \ |
| 229 /* CodeGenerator::EmitNamedStore state */ \ | 229 /* CodeGenerator::EmitNamedStore state */ \ |
| 230 V(int, inlined_write_barrier_size, -1) | 230 V(int, inlined_write_barrier_size, -1) |
| 231 | 231 |
| 232 #if !defined(__arm__) | 232 #if !defined(__arm__) && !defined(__mips__) |
| 233 class HashMap; | 233 class HashMap; |
| 234 #endif | 234 #endif |
| 235 | 235 |
| 236 #else | 236 #else |
| 237 | 237 |
| 238 #define ISOLATE_PLATFORM_INIT_LIST(V) | 238 #define ISOLATE_PLATFORM_INIT_LIST(V) |
| 239 | 239 |
| 240 #endif | 240 #endif |
| 241 | 241 |
| 242 #ifdef ENABLE_DEBUGGER_SUPPORT | 242 #ifdef ENABLE_DEBUGGER_SUPPORT |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 // A thread has a PerIsolateThreadData instance for each isolate that it has | 334 // A thread has a PerIsolateThreadData instance for each isolate that it has |
| 335 // entered. That instance is allocated when the isolate is initially entered | 335 // entered. That instance is allocated when the isolate is initially entered |
| 336 // and reused on subsequent entries. | 336 // and reused on subsequent entries. |
| 337 class PerIsolateThreadData { | 337 class PerIsolateThreadData { |
| 338 public: | 338 public: |
| 339 PerIsolateThreadData(Isolate* isolate, ThreadId thread_id) | 339 PerIsolateThreadData(Isolate* isolate, ThreadId thread_id) |
| 340 : isolate_(isolate), | 340 : isolate_(isolate), |
| 341 thread_id_(thread_id), | 341 thread_id_(thread_id), |
| 342 stack_limit_(0), | 342 stack_limit_(0), |
| 343 thread_state_(NULL), | 343 thread_state_(NULL), |
| 344 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) | 344 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \ |
| 345 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS) |
| 345 simulator_(NULL), | 346 simulator_(NULL), |
| 346 #endif | 347 #endif |
| 347 next_(NULL), | 348 next_(NULL), |
| 348 prev_(NULL) { } | 349 prev_(NULL) { } |
| 349 Isolate* isolate() const { return isolate_; } | 350 Isolate* isolate() const { return isolate_; } |
| 350 ThreadId thread_id() const { return thread_id_; } | 351 ThreadId thread_id() const { return thread_id_; } |
| 351 void set_stack_limit(uintptr_t value) { stack_limit_ = value; } | 352 void set_stack_limit(uintptr_t value) { stack_limit_ = value; } |
| 352 uintptr_t stack_limit() const { return stack_limit_; } | 353 uintptr_t stack_limit() const { return stack_limit_; } |
| 353 ThreadState* thread_state() const { return thread_state_; } | 354 ThreadState* thread_state() const { return thread_state_; } |
| 354 void set_thread_state(ThreadState* value) { thread_state_ = value; } | 355 void set_thread_state(ThreadState* value) { thread_state_ = value; } |
| 355 | 356 |
| 356 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) | 357 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \ |
| 358 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS) |
| 357 Simulator* simulator() const { return simulator_; } | 359 Simulator* simulator() const { return simulator_; } |
| 358 void set_simulator(Simulator* simulator) { | 360 void set_simulator(Simulator* simulator) { |
| 359 simulator_ = simulator; | 361 simulator_ = simulator; |
| 360 } | 362 } |
| 361 #endif | 363 #endif |
| 362 | 364 |
| 363 bool Matches(Isolate* isolate, ThreadId thread_id) const { | 365 bool Matches(Isolate* isolate, ThreadId thread_id) const { |
| 364 return isolate_ == isolate && thread_id_ == thread_id; | 366 return isolate_ == isolate && thread_id_ == thread_id; |
| 365 } | 367 } |
| 366 | 368 |
| 367 private: | 369 private: |
| 368 Isolate* isolate_; | 370 Isolate* isolate_; |
| 369 ThreadId thread_id_; | 371 ThreadId thread_id_; |
| 370 uintptr_t stack_limit_; | 372 uintptr_t stack_limit_; |
| 371 ThreadState* thread_state_; | 373 ThreadState* thread_state_; |
| 372 | 374 |
| 373 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) | 375 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \ |
| 376 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS) |
| 374 Simulator* simulator_; | 377 Simulator* simulator_; |
| 375 #endif | 378 #endif |
| 376 | 379 |
| 377 PerIsolateThreadData* next_; | 380 PerIsolateThreadData* next_; |
| 378 PerIsolateThreadData* prev_; | 381 PerIsolateThreadData* prev_; |
| 379 | 382 |
| 380 friend class Isolate; | 383 friend class Isolate; |
| 381 friend class ThreadDataTable; | 384 friend class ThreadDataTable; |
| 382 friend class EntryStackItem; | 385 friend class EntryStackItem; |
| 383 | 386 |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 846 #ifdef DEBUG | 849 #ifdef DEBUG |
| 847 HistogramInfo* heap_histograms() { return heap_histograms_; } | 850 HistogramInfo* heap_histograms() { return heap_histograms_; } |
| 848 | 851 |
| 849 JSObject::SpillInformation* js_spill_information() { | 852 JSObject::SpillInformation* js_spill_information() { |
| 850 return &js_spill_information_; | 853 return &js_spill_information_; |
| 851 } | 854 } |
| 852 | 855 |
| 853 int* code_kind_statistics() { return code_kind_statistics_; } | 856 int* code_kind_statistics() { return code_kind_statistics_; } |
| 854 #endif | 857 #endif |
| 855 | 858 |
| 856 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) | 859 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \ |
| 860 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__) |
| 857 bool simulator_initialized() { return simulator_initialized_; } | 861 bool simulator_initialized() { return simulator_initialized_; } |
| 858 void set_simulator_initialized(bool initialized) { | 862 void set_simulator_initialized(bool initialized) { |
| 859 simulator_initialized_ = initialized; | 863 simulator_initialized_ = initialized; |
| 860 } | 864 } |
| 861 | 865 |
| 862 HashMap* simulator_i_cache() { return simulator_i_cache_; } | 866 HashMap* simulator_i_cache() { return simulator_i_cache_; } |
| 863 void set_simulator_i_cache(HashMap* hash_map) { | 867 void set_simulator_i_cache(HashMap* hash_map) { |
| 864 simulator_i_cache_ = hash_map; | 868 simulator_i_cache_ = hash_map; |
| 865 } | 869 } |
| 866 | 870 |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1068 StringInputBuffer objects_string_compare_buffer_a_; | 1072 StringInputBuffer objects_string_compare_buffer_a_; |
| 1069 StringInputBuffer objects_string_compare_buffer_b_; | 1073 StringInputBuffer objects_string_compare_buffer_b_; |
| 1070 StaticResource<StringInputBuffer> objects_string_input_buffer_; | 1074 StaticResource<StringInputBuffer> objects_string_input_buffer_; |
| 1071 unibrow::Mapping<unibrow::Ecma262Canonicalize> | 1075 unibrow::Mapping<unibrow::Ecma262Canonicalize> |
| 1072 regexp_macro_assembler_canonicalize_; | 1076 regexp_macro_assembler_canonicalize_; |
| 1073 RegExpStack* regexp_stack_; | 1077 RegExpStack* regexp_stack_; |
| 1074 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; | 1078 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; |
| 1075 ZoneObjectList frame_element_constant_list_; | 1079 ZoneObjectList frame_element_constant_list_; |
| 1076 ZoneObjectList result_constant_list_; | 1080 ZoneObjectList result_constant_list_; |
| 1077 | 1081 |
| 1078 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) | 1082 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \ |
| 1083 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__) |
| 1079 bool simulator_initialized_; | 1084 bool simulator_initialized_; |
| 1080 HashMap* simulator_i_cache_; | 1085 HashMap* simulator_i_cache_; |
| 1081 Redirection* simulator_redirection_; | 1086 Redirection* simulator_redirection_; |
| 1082 #endif | 1087 #endif |
| 1083 | 1088 |
| 1084 #ifdef DEBUG | 1089 #ifdef DEBUG |
| 1085 // A static array of histogram info for each type. | 1090 // A static array of histogram info for each type. |
| 1086 HistogramInfo heap_histograms_[LAST_TYPE + 1]; | 1091 HistogramInfo heap_histograms_[LAST_TYPE + 1]; |
| 1087 JSObject::SpillInformation js_spill_information_; | 1092 JSObject::SpillInformation js_spill_information_; |
| 1088 int code_kind_statistics_[Code::NUMBER_OF_KINDS]; | 1093 int code_kind_statistics_[Code::NUMBER_OF_KINDS]; |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1295 | 1300 |
| 1296 } } // namespace v8::internal | 1301 } } // namespace v8::internal |
| 1297 | 1302 |
| 1298 // TODO(isolates): Get rid of these -inl.h includes and place them only where | 1303 // TODO(isolates): Get rid of these -inl.h includes and place them only where |
| 1299 // they're needed. | 1304 // they're needed. |
| 1300 #include "allocation-inl.h" | 1305 #include "allocation-inl.h" |
| 1301 #include "zone-inl.h" | 1306 #include "zone-inl.h" |
| 1302 #include "frames-inl.h" | 1307 #include "frames-inl.h" |
| 1303 | 1308 |
| 1304 #endif // V8_ISOLATE_H_ | 1309 #endif // V8_ISOLATE_H_ |
| OLD | NEW |