| 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 27 matching lines...) Expand all Loading... |
| 38 #include "frames.h" | 38 #include "frames.h" |
| 39 #include "global-handles.h" | 39 #include "global-handles.h" |
| 40 #include "handles.h" | 40 #include "handles.h" |
| 41 #include "heap.h" | 41 #include "heap.h" |
| 42 #include "regexp-stack.h" | 42 #include "regexp-stack.h" |
| 43 #include "runtime-profiler.h" | 43 #include "runtime-profiler.h" |
| 44 #include "runtime.h" | 44 #include "runtime.h" |
| 45 #include "zone.h" | 45 #include "zone.h" |
| 46 | 46 |
| 47 | 47 |
| 48 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) | |
| 49 namespace assembler { | |
| 50 namespace arm { | |
| 51 class Redirection; | |
| 52 class Simulator; | |
| 53 } | |
| 54 } | |
| 55 #endif | |
| 56 | |
| 57 | |
| 58 namespace v8 { | 48 namespace v8 { |
| 59 namespace internal { | 49 namespace internal { |
| 60 | 50 |
| 61 class AstSentinels; | 51 class AstSentinels; |
| 62 class Bootstrapper; | 52 class Bootstrapper; |
| 63 class CodeGenerator; | 53 class CodeGenerator; |
| 64 class CodeRange; | 54 class CodeRange; |
| 65 class CompilationCache; | 55 class CompilationCache; |
| 66 class ContextSlotCache; | 56 class ContextSlotCache; |
| 67 class ContextSwitcher; | 57 class ContextSwitcher; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 94 | 84 |
| 95 typedef void* ExternalReferenceRedirector(void* original, bool fp_return); | 85 typedef void* ExternalReferenceRedirector(void* original, bool fp_return); |
| 96 | 86 |
| 97 | 87 |
| 98 #ifdef ENABLE_DEBUGGER_SUPPORT | 88 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 99 class Debug; | 89 class Debug; |
| 100 class Debugger; | 90 class Debugger; |
| 101 class DebuggerAgent; | 91 class DebuggerAgent; |
| 102 #endif | 92 #endif |
| 103 | 93 |
| 94 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) |
| 95 class Redirection; |
| 96 class Simulator; |
| 97 #endif |
| 104 | 98 |
| 105 // Static indirection table for handles to constants. If a frame | 99 // Static indirection table for handles to constants. If a frame |
| 106 // element represents a constant, the data contains an index into | 100 // element represents a constant, the data contains an index into |
| 107 // this table of handles to the actual constants. | 101 // this table of handles to the actual constants. |
| 108 // Static indirection table for handles to constants. If a Result | 102 // Static indirection table for handles to constants. If a Result |
| 109 // represents a constant, the data contains an index into this table | 103 // represents a constant, the data contains an index into this table |
| 110 // of handles to the actual constants. | 104 // of handles to the actual constants. |
| 111 typedef ZoneList<Handle<Object> > ZoneObjectList; | 105 typedef ZoneList<Handle<Object> > ZoneObjectList; |
| 112 | 106 |
| 113 #define RETURN_IF_SCHEDULED_EXCEPTION(isolate) \ | 107 #define RETURN_IF_SCHEDULED_EXCEPTION(isolate) \ |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 bool external_caught_exception_; | 178 bool external_caught_exception_; |
| 185 SaveContext* save_context_; | 179 SaveContext* save_context_; |
| 186 v8::TryCatch* catcher_; | 180 v8::TryCatch* catcher_; |
| 187 | 181 |
| 188 // Stack. | 182 // Stack. |
| 189 Address c_entry_fp_; // the frame pointer of the top c entry frame | 183 Address c_entry_fp_; // the frame pointer of the top c entry frame |
| 190 Address handler_; // try-blocks are chained through the stack | 184 Address handler_; // try-blocks are chained through the stack |
| 191 | 185 |
| 192 #ifdef USE_SIMULATOR | 186 #ifdef USE_SIMULATOR |
| 193 #ifdef V8_TARGET_ARCH_ARM | 187 #ifdef V8_TARGET_ARCH_ARM |
| 194 assembler::arm::Simulator* simulator_; | 188 Simulator* simulator_; |
| 195 #elif V8_TARGET_ARCH_MIPS | 189 #elif V8_TARGET_ARCH_MIPS |
| 196 assembler::mips::Simulator* simulator_; | 190 assembler::mips::Simulator* simulator_; |
| 197 #endif | 191 #endif |
| 198 #endif // USE_SIMULATOR | 192 #endif // USE_SIMULATOR |
| 199 | 193 |
| 200 #ifdef ENABLE_LOGGING_AND_PROFILING | 194 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 201 Address js_entry_sp_; // the stack pointer of the bottom js entry frame | 195 Address js_entry_sp_; // the stack pointer of the bottom js entry frame |
| 202 Address external_callback_; // the external callback we're currently in | 196 Address external_callback_; // the external callback we're currently in |
| 203 #endif | 197 #endif |
| 204 | 198 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 next_(NULL), | 336 next_(NULL), |
| 343 prev_(NULL) { } | 337 prev_(NULL) { } |
| 344 Isolate* isolate() const { return isolate_; } | 338 Isolate* isolate() const { return isolate_; } |
| 345 ThreadId thread_id() const { return thread_id_; } | 339 ThreadId thread_id() const { return thread_id_; } |
| 346 void set_stack_limit(uintptr_t value) { stack_limit_ = value; } | 340 void set_stack_limit(uintptr_t value) { stack_limit_ = value; } |
| 347 uintptr_t stack_limit() const { return stack_limit_; } | 341 uintptr_t stack_limit() const { return stack_limit_; } |
| 348 ThreadState* thread_state() const { return thread_state_; } | 342 ThreadState* thread_state() const { return thread_state_; } |
| 349 void set_thread_state(ThreadState* value) { thread_state_ = value; } | 343 void set_thread_state(ThreadState* value) { thread_state_ = value; } |
| 350 | 344 |
| 351 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) | 345 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) |
| 352 assembler::arm::Simulator* simulator() const { return simulator_; } | 346 Simulator* simulator() const { return simulator_; } |
| 353 void set_simulator(assembler::arm::Simulator* simulator) { | 347 void set_simulator(Simulator* simulator) { |
| 354 simulator_ = simulator; | 348 simulator_ = simulator; |
| 355 } | 349 } |
| 356 #endif | 350 #endif |
| 357 | 351 |
| 358 bool Matches(Isolate* isolate, ThreadId thread_id) const { | 352 bool Matches(Isolate* isolate, ThreadId thread_id) const { |
| 359 return isolate_ == isolate && thread_id_ == thread_id; | 353 return isolate_ == isolate && thread_id_ == thread_id; |
| 360 } | 354 } |
| 361 | 355 |
| 362 private: | 356 private: |
| 363 Isolate* isolate_; | 357 Isolate* isolate_; |
| 364 ThreadId thread_id_; | 358 ThreadId thread_id_; |
| 365 uintptr_t stack_limit_; | 359 uintptr_t stack_limit_; |
| 366 ThreadState* thread_state_; | 360 ThreadState* thread_state_; |
| 367 | 361 |
| 368 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) | 362 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) |
| 369 assembler::arm::Simulator* simulator_; | 363 Simulator* simulator_; |
| 370 #endif | 364 #endif |
| 371 | 365 |
| 372 PerIsolateThreadData* next_; | 366 PerIsolateThreadData* next_; |
| 373 PerIsolateThreadData* prev_; | 367 PerIsolateThreadData* prev_; |
| 374 | 368 |
| 375 friend class Isolate; | 369 friend class Isolate; |
| 376 friend class ThreadDataTable; | 370 friend class ThreadDataTable; |
| 377 friend class EntryStackItem; | 371 friend class EntryStackItem; |
| 378 | 372 |
| 379 DISALLOW_COPY_AND_ASSIGN(PerIsolateThreadData); | 373 DISALLOW_COPY_AND_ASSIGN(PerIsolateThreadData); |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 bool simulator_initialized() { return simulator_initialized_; } | 827 bool simulator_initialized() { return simulator_initialized_; } |
| 834 void set_simulator_initialized(bool initialized) { | 828 void set_simulator_initialized(bool initialized) { |
| 835 simulator_initialized_ = initialized; | 829 simulator_initialized_ = initialized; |
| 836 } | 830 } |
| 837 | 831 |
| 838 HashMap* simulator_i_cache() { return simulator_i_cache_; } | 832 HashMap* simulator_i_cache() { return simulator_i_cache_; } |
| 839 void set_simulator_i_cache(HashMap* hash_map) { | 833 void set_simulator_i_cache(HashMap* hash_map) { |
| 840 simulator_i_cache_ = hash_map; | 834 simulator_i_cache_ = hash_map; |
| 841 } | 835 } |
| 842 | 836 |
| 843 assembler::arm::Redirection* simulator_redirection() { | 837 Redirection* simulator_redirection() { |
| 844 return simulator_redirection_; | 838 return simulator_redirection_; |
| 845 } | 839 } |
| 846 void set_simulator_redirection(assembler::arm::Redirection* redirection) { | 840 void set_simulator_redirection(Redirection* redirection) { |
| 847 simulator_redirection_ = redirection; | 841 simulator_redirection_ = redirection; |
| 848 } | 842 } |
| 849 #endif | 843 #endif |
| 850 | 844 |
| 851 Factory* factory() { return reinterpret_cast<Factory*>(this); } | 845 Factory* factory() { return reinterpret_cast<Factory*>(this); } |
| 852 | 846 |
| 853 // SerializerDeserializer state. | 847 // SerializerDeserializer state. |
| 854 static const int kPartialSnapshotCacheCapacity = 1400; | 848 static const int kPartialSnapshotCacheCapacity = 1400; |
| 855 | 849 |
| 856 static const int kJSRegexpStaticOffsetsVectorSize = 50; | 850 static const int kJSRegexpStaticOffsetsVectorSize = 50; |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 unibrow::Mapping<unibrow::Ecma262Canonicalize> | 1041 unibrow::Mapping<unibrow::Ecma262Canonicalize> |
| 1048 regexp_macro_assembler_canonicalize_; | 1042 regexp_macro_assembler_canonicalize_; |
| 1049 RegExpStack* regexp_stack_; | 1043 RegExpStack* regexp_stack_; |
| 1050 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; | 1044 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; |
| 1051 ZoneObjectList frame_element_constant_list_; | 1045 ZoneObjectList frame_element_constant_list_; |
| 1052 ZoneObjectList result_constant_list_; | 1046 ZoneObjectList result_constant_list_; |
| 1053 | 1047 |
| 1054 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) | 1048 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) |
| 1055 bool simulator_initialized_; | 1049 bool simulator_initialized_; |
| 1056 HashMap* simulator_i_cache_; | 1050 HashMap* simulator_i_cache_; |
| 1057 assembler::arm::Redirection* simulator_redirection_; | 1051 Redirection* simulator_redirection_; |
| 1058 #endif | 1052 #endif |
| 1059 | 1053 |
| 1060 #ifdef DEBUG | 1054 #ifdef DEBUG |
| 1061 // A static array of histogram info for each type. | 1055 // A static array of histogram info for each type. |
| 1062 HistogramInfo heap_histograms_[LAST_TYPE + 1]; | 1056 HistogramInfo heap_histograms_[LAST_TYPE + 1]; |
| 1063 JSObject::SpillInformation js_spill_information_; | 1057 JSObject::SpillInformation js_spill_information_; |
| 1064 int code_kind_statistics_[Code::NUMBER_OF_KINDS]; | 1058 int code_kind_statistics_[Code::NUMBER_OF_KINDS]; |
| 1065 #endif | 1059 #endif |
| 1066 | 1060 |
| 1067 #ifdef ENABLE_DEBUGGER_SUPPORT | 1061 #ifdef ENABLE_DEBUGGER_SUPPORT |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1259 | 1253 |
| 1260 } } // namespace v8::internal | 1254 } } // namespace v8::internal |
| 1261 | 1255 |
| 1262 // TODO(isolates): Get rid of these -inl.h includes and place them only where | 1256 // TODO(isolates): Get rid of these -inl.h includes and place them only where |
| 1263 // they're needed. | 1257 // they're needed. |
| 1264 #include "allocation-inl.h" | 1258 #include "allocation-inl.h" |
| 1265 #include "zone-inl.h" | 1259 #include "zone-inl.h" |
| 1266 #include "frames-inl.h" | 1260 #include "frames-inl.h" |
| 1267 | 1261 |
| 1268 #endif // V8_ISOLATE_H_ | 1262 #endif // V8_ISOLATE_H_ |
| OLD | NEW |