| 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 30 matching lines...) Expand all Loading... |
| 41 #include "regexp-stack.h" | 41 #include "regexp-stack.h" |
| 42 #include "runtime.h" | 42 #include "runtime.h" |
| 43 #include "zone.h" | 43 #include "zone.h" |
| 44 #include "../include/v8-debug.h" | 44 #include "../include/v8-debug.h" |
| 45 | 45 |
| 46 | 46 |
| 47 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) | 47 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) |
| 48 namespace assembler { | 48 namespace assembler { |
| 49 namespace arm { | 49 namespace arm { |
| 50 class Redirection; | 50 class Redirection; |
| 51 class Simulator; |
| 51 } | 52 } |
| 52 } | 53 } |
| 53 #endif | 54 #endif |
| 54 | 55 |
| 55 | 56 |
| 56 namespace v8 { | 57 namespace v8 { |
| 57 namespace internal { | 58 namespace internal { |
| 58 | 59 |
| 59 class AstSentinels; | 60 class AstSentinels; |
| 60 class Bootstrapper; | 61 class Bootstrapper; |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 // A thread has a PerIsolateThreadData instance for each isolate that it has | 304 // A thread has a PerIsolateThreadData instance for each isolate that it has |
| 304 // entered. That instance is allocated when the isolate is initially entered | 305 // entered. That instance is allocated when the isolate is initially entered |
| 305 // and reused on subsequent entries. | 306 // and reused on subsequent entries. |
| 306 class PerIsolateThreadData { | 307 class PerIsolateThreadData { |
| 307 public: | 308 public: |
| 308 PerIsolateThreadData(Isolate* isolate, ThreadId thread_id) | 309 PerIsolateThreadData(Isolate* isolate, ThreadId thread_id) |
| 309 : isolate_(isolate), | 310 : isolate_(isolate), |
| 310 thread_id_(thread_id), | 311 thread_id_(thread_id), |
| 311 stack_limit_(0), | 312 stack_limit_(0), |
| 312 thread_state_(NULL), | 313 thread_state_(NULL), |
| 314 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) |
| 315 simulator_(NULL), |
| 316 #endif |
| 313 next_(NULL), | 317 next_(NULL), |
| 314 prev_(NULL) { } | 318 prev_(NULL) { } |
| 315 Isolate* isolate() const { return isolate_; } | 319 Isolate* isolate() const { return isolate_; } |
| 316 ThreadId thread_id() const { return thread_id_; } | 320 ThreadId thread_id() const { return thread_id_; } |
| 317 void set_stack_limit(uintptr_t value) { stack_limit_ = value; } | 321 void set_stack_limit(uintptr_t value) { stack_limit_ = value; } |
| 318 uintptr_t stack_limit() const { return stack_limit_; } | 322 uintptr_t stack_limit() const { return stack_limit_; } |
| 319 ThreadState* thread_state() const { return thread_state_; } | 323 ThreadState* thread_state() const { return thread_state_; } |
| 320 void set_thread_state(ThreadState* value) { thread_state_ = value; } | 324 void set_thread_state(ThreadState* value) { thread_state_ = value; } |
| 325 |
| 326 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) |
| 327 assembler::arm::Simulator* simulator() const { return simulator_; } |
| 328 void set_simulator(assembler::arm::Simulator* simulator) { |
| 329 simulator_ = simulator; |
| 330 } |
| 331 #endif |
| 332 |
| 321 bool Matches(Isolate* isolate, ThreadId thread_id) const { | 333 bool Matches(Isolate* isolate, ThreadId thread_id) const { |
| 322 return isolate_ == isolate && thread_id_ == thread_id; | 334 return isolate_ == isolate && thread_id_ == thread_id; |
| 323 } | 335 } |
| 324 | 336 |
| 325 private: | 337 private: |
| 326 Isolate* isolate_; | 338 Isolate* isolate_; |
| 327 ThreadId thread_id_; | 339 ThreadId thread_id_; |
| 328 uintptr_t stack_limit_; | 340 uintptr_t stack_limit_; |
| 329 ThreadState* thread_state_; | 341 ThreadState* thread_state_; |
| 330 | 342 |
| 343 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) |
| 344 assembler::arm::Simulator* simulator_; |
| 345 #endif |
| 346 |
| 331 PerIsolateThreadData* next_; | 347 PerIsolateThreadData* next_; |
| 332 PerIsolateThreadData* prev_; | 348 PerIsolateThreadData* prev_; |
| 333 | 349 |
| 334 friend class Isolate; | 350 friend class Isolate; |
| 335 friend class ThreadDataTable; | 351 friend class ThreadDataTable; |
| 336 friend class EntryStackItem; | 352 friend class EntryStackItem; |
| 337 | 353 |
| 338 DISALLOW_COPY_AND_ASSIGN(PerIsolateThreadData); | 354 DISALLOW_COPY_AND_ASSIGN(PerIsolateThreadData); |
| 339 }; | 355 }; |
| 340 | 356 |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 HistogramInfo* heap_histograms() { return heap_histograms_; } | 800 HistogramInfo* heap_histograms() { return heap_histograms_; } |
| 785 | 801 |
| 786 JSObject::SpillInformation* js_spill_information() { | 802 JSObject::SpillInformation* js_spill_information() { |
| 787 return &js_spill_information_; | 803 return &js_spill_information_; |
| 788 } | 804 } |
| 789 | 805 |
| 790 int* code_kind_statistics() { return code_kind_statistics_; } | 806 int* code_kind_statistics() { return code_kind_statistics_; } |
| 791 #endif | 807 #endif |
| 792 | 808 |
| 793 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) | 809 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) |
| 794 static v8::internal::Thread::LocalStorageKey* simulator_key() { | |
| 795 return &simulator_key_; | |
| 796 } | |
| 797 | |
| 798 bool simulator_initialized() { return simulator_initialized_; } | 810 bool simulator_initialized() { return simulator_initialized_; } |
| 799 void set_simulator_initialized(bool initialized) { | 811 void set_simulator_initialized(bool initialized) { |
| 800 simulator_initialized_ = initialized; | 812 simulator_initialized_ = initialized; |
| 801 } | 813 } |
| 802 | 814 |
| 803 HashMap* simulator_i_cache() { return simulator_i_cache_; } | 815 HashMap* simulator_i_cache() { return simulator_i_cache_; } |
| 804 void set_simulator_i_cache(HashMap* hash_map) { | 816 void set_simulator_i_cache(HashMap* hash_map) { |
| 805 simulator_i_cache_ = hash_map; | 817 simulator_i_cache_ = hash_map; |
| 806 } | 818 } |
| 807 | 819 |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 StaticResource<StringInputBuffer> objects_string_input_buffer_; | 989 StaticResource<StringInputBuffer> objects_string_input_buffer_; |
| 978 unibrow::Mapping<unibrow::Ecma262Canonicalize> | 990 unibrow::Mapping<unibrow::Ecma262Canonicalize> |
| 979 regexp_macro_assembler_canonicalize_; | 991 regexp_macro_assembler_canonicalize_; |
| 980 RegExpStack* regexp_stack_; | 992 RegExpStack* regexp_stack_; |
| 981 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; | 993 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; |
| 982 ZoneObjectList frame_element_constant_list_; | 994 ZoneObjectList frame_element_constant_list_; |
| 983 ZoneObjectList result_constant_list_; | 995 ZoneObjectList result_constant_list_; |
| 984 AtomicWord vm_state_; | 996 AtomicWord vm_state_; |
| 985 | 997 |
| 986 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) | 998 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) |
| 987 // Create one simulator per thread and keep it in thread local storage. | |
| 988 static v8::internal::Thread::LocalStorageKey simulator_key_; | |
| 989 bool simulator_initialized_; | 999 bool simulator_initialized_; |
| 990 HashMap* simulator_i_cache_; | 1000 HashMap* simulator_i_cache_; |
| 991 assembler::arm::Redirection* simulator_redirection_; | 1001 assembler::arm::Redirection* simulator_redirection_; |
| 992 #endif | 1002 #endif |
| 993 | 1003 |
| 994 #ifdef DEBUG | 1004 #ifdef DEBUG |
| 995 // A static array of histogram info for each type. | 1005 // A static array of histogram info for each type. |
| 996 HistogramInfo heap_histograms_[LAST_TYPE + 1]; | 1006 HistogramInfo heap_histograms_[LAST_TYPE + 1]; |
| 997 JSObject::SpillInformation js_spill_information_; | 1007 JSObject::SpillInformation js_spill_information_; |
| 998 int code_kind_statistics_[Code::NUMBER_OF_KINDS]; | 1008 int code_kind_statistics_[Code::NUMBER_OF_KINDS]; |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1164 #define ISOLATED_CLASS class | 1174 #define ISOLATED_CLASS class |
| 1165 | 1175 |
| 1166 } } // namespace v8::internal | 1176 } } // namespace v8::internal |
| 1167 | 1177 |
| 1168 // TODO(isolates): Get rid of these -inl.h includes and place them only where | 1178 // TODO(isolates): Get rid of these -inl.h includes and place them only where |
| 1169 // they're needed. | 1179 // they're needed. |
| 1170 #include "allocation-inl.h" | 1180 #include "allocation-inl.h" |
| 1171 #include "zone-inl.h" | 1181 #include "zone-inl.h" |
| 1172 | 1182 |
| 1173 #endif // V8_ISOLATE_H_ | 1183 #endif // V8_ISOLATE_H_ |
| OLD | NEW |