| 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_ARM) || \ | 104 #if !defined(__arm__) && defined(V8_TARGET_ARCH_A64) || \ |
| 105 !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \ |
| 105 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS) | 106 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS) |
| 106 class Redirection; | 107 class Redirection; |
| 107 class Simulator; | 108 class Simulator; |
| 108 #endif | 109 #endif |
| 109 | 110 |
| 110 | 111 |
| 111 // Static indirection table for handles to constants. If a frame | 112 // Static indirection table for handles to constants. If a frame |
| 112 // element represents a constant, the data contains an index into | 113 // element represents a constant, the data contains an index into |
| 113 // this table of handles to the actual constants. | 114 // this table of handles to the actual constants. |
| 114 // Static indirection table for handles to constants. If a Result | 115 // Static indirection table for handles to constants. If a Result |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 MaybeObject* scheduled_exception_; | 257 MaybeObject* scheduled_exception_; |
| 257 bool external_caught_exception_; | 258 bool external_caught_exception_; |
| 258 SaveContext* save_context_; | 259 SaveContext* save_context_; |
| 259 v8::TryCatch* catcher_; | 260 v8::TryCatch* catcher_; |
| 260 | 261 |
| 261 // Stack. | 262 // Stack. |
| 262 Address c_entry_fp_; // the frame pointer of the top c entry frame | 263 Address c_entry_fp_; // the frame pointer of the top c entry frame |
| 263 Address handler_; // try-blocks are chained through the stack | 264 Address handler_; // try-blocks are chained through the stack |
| 264 | 265 |
| 265 #ifdef USE_SIMULATOR | 266 #ifdef USE_SIMULATOR |
| 266 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS) | 267 #if defined(V8_TARGET_ARCH_A64) || defined(V8_TARGET_ARCH_ARM) || \ |
| 268 defined(V8_TARGET_ARCH_MIPS) |
| 267 Simulator* simulator_; | 269 Simulator* simulator_; |
| 268 #endif | 270 #endif |
| 269 #endif // USE_SIMULATOR | 271 #endif // USE_SIMULATOR |
| 270 | 272 |
| 271 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 |
| 272 Address external_callback_; // the external callback we're currently in | 274 Address external_callback_; // the external callback we're currently in |
| 273 StateTag current_vm_state_; | 275 StateTag current_vm_state_; |
| 274 | 276 |
| 275 // Generated code scratch locations. | 277 // Generated code scratch locations. |
| 276 int32_t formal_count_; | 278 int32_t formal_count_; |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 // A thread has a PerIsolateThreadData instance for each isolate that it has | 388 // A thread has a PerIsolateThreadData instance for each isolate that it has |
| 387 // entered. That instance is allocated when the isolate is initially entered | 389 // entered. That instance is allocated when the isolate is initially entered |
| 388 // and reused on subsequent entries. | 390 // and reused on subsequent entries. |
| 389 class PerIsolateThreadData { | 391 class PerIsolateThreadData { |
| 390 public: | 392 public: |
| 391 PerIsolateThreadData(Isolate* isolate, ThreadId thread_id) | 393 PerIsolateThreadData(Isolate* isolate, ThreadId thread_id) |
| 392 : isolate_(isolate), | 394 : isolate_(isolate), |
| 393 thread_id_(thread_id), | 395 thread_id_(thread_id), |
| 394 stack_limit_(0), | 396 stack_limit_(0), |
| 395 thread_state_(NULL), | 397 thread_state_(NULL), |
| 396 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \ | 398 #if !defined(__arm__) && defined(V8_TARGET_ARCH_A64) || \ |
| 399 !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \ |
| 397 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS) | 400 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS) |
| 398 simulator_(NULL), | 401 simulator_(NULL), |
| 399 #endif | 402 #endif |
| 400 next_(NULL), | 403 next_(NULL), |
| 401 prev_(NULL) { } | 404 prev_(NULL) { } |
| 402 Isolate* isolate() const { return isolate_; } | 405 Isolate* isolate() const { return isolate_; } |
| 403 ThreadId thread_id() const { return thread_id_; } | 406 ThreadId thread_id() const { return thread_id_; } |
| 404 void set_stack_limit(uintptr_t value) { stack_limit_ = value; } | 407 void set_stack_limit(uintptr_t value) { stack_limit_ = value; } |
| 405 uintptr_t stack_limit() const { return stack_limit_; } | 408 uintptr_t stack_limit() const { return stack_limit_; } |
| 406 ThreadState* thread_state() const { return thread_state_; } | 409 ThreadState* thread_state() const { return thread_state_; } |
| 407 void set_thread_state(ThreadState* value) { thread_state_ = value; } | 410 void set_thread_state(ThreadState* value) { thread_state_ = value; } |
| 408 | 411 |
| 409 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \ | 412 #if !defined(__arm__) && defined(V8_TARGET_ARCH_A64) || \ |
| 413 !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \ |
| 410 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS) | 414 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS) |
| 411 Simulator* simulator() const { return simulator_; } | 415 Simulator* simulator() const { return simulator_; } |
| 412 void set_simulator(Simulator* simulator) { | 416 void set_simulator(Simulator* simulator) { |
| 413 simulator_ = simulator; | 417 simulator_ = simulator; |
| 414 } | 418 } |
| 415 #endif | 419 #endif |
| 416 | 420 |
| 417 bool Matches(Isolate* isolate, ThreadId thread_id) const { | 421 bool Matches(Isolate* isolate, ThreadId thread_id) const { |
| 418 return isolate_ == isolate && thread_id_.Equals(thread_id); | 422 return isolate_ == isolate && thread_id_.Equals(thread_id); |
| 419 } | 423 } |
| 420 | 424 |
| 421 private: | 425 private: |
| 422 Isolate* isolate_; | 426 Isolate* isolate_; |
| 423 ThreadId thread_id_; | 427 ThreadId thread_id_; |
| 424 uintptr_t stack_limit_; | 428 uintptr_t stack_limit_; |
| 425 ThreadState* thread_state_; | 429 ThreadState* thread_state_; |
| 426 | 430 |
| 427 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \ | 431 #if !defined(__arm__) && defined(V8_TARGET_ARCH_A64) || \ |
| 432 !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \ |
| 428 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS) | 433 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS) |
| 429 Simulator* simulator_; | 434 Simulator* simulator_; |
| 430 #endif | 435 #endif |
| 431 | 436 |
| 432 PerIsolateThreadData* next_; | 437 PerIsolateThreadData* next_; |
| 433 PerIsolateThreadData* prev_; | 438 PerIsolateThreadData* prev_; |
| 434 | 439 |
| 435 friend class Isolate; | 440 friend class Isolate; |
| 436 friend class ThreadDataTable; | 441 friend class ThreadDataTable; |
| 437 friend class EntryStackItem; | 442 friend class EntryStackItem; |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 990 #ifdef DEBUG | 995 #ifdef DEBUG |
| 991 HistogramInfo* heap_histograms() { return heap_histograms_; } | 996 HistogramInfo* heap_histograms() { return heap_histograms_; } |
| 992 | 997 |
| 993 JSObject::SpillInformation* js_spill_information() { | 998 JSObject::SpillInformation* js_spill_information() { |
| 994 return &js_spill_information_; | 999 return &js_spill_information_; |
| 995 } | 1000 } |
| 996 | 1001 |
| 997 int* code_kind_statistics() { return code_kind_statistics_; } | 1002 int* code_kind_statistics() { return code_kind_statistics_; } |
| 998 #endif | 1003 #endif |
| 999 | 1004 |
| 1000 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \ | 1005 #if defined(V8_TARGET_ARCH_A64) && !defined(__arm__) || \ |
| 1006 defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \ |
| 1001 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__) | 1007 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__) |
| 1002 bool simulator_initialized() { return simulator_initialized_; } | 1008 bool simulator_initialized() { return simulator_initialized_; } |
| 1003 void set_simulator_initialized(bool initialized) { | 1009 void set_simulator_initialized(bool initialized) { |
| 1004 simulator_initialized_ = initialized; | 1010 simulator_initialized_ = initialized; |
| 1005 } | 1011 } |
| 1006 | 1012 |
| 1007 HashMap* simulator_i_cache() { return simulator_i_cache_; } | 1013 HashMap* simulator_i_cache() { return simulator_i_cache_; } |
| 1008 void set_simulator_i_cache(HashMap* hash_map) { | 1014 void set_simulator_i_cache(HashMap* hash_map) { |
| 1009 simulator_i_cache_ = hash_map; | 1015 simulator_i_cache_ = hash_map; |
| 1010 } | 1016 } |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1288 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; | 1294 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; |
| 1289 CodeStubInterfaceDescriptor* code_stub_interface_descriptors_; | 1295 CodeStubInterfaceDescriptor* code_stub_interface_descriptors_; |
| 1290 | 1296 |
| 1291 // The garbage collector should be a little more aggressive when it knows | 1297 // The garbage collector should be a little more aggressive when it knows |
| 1292 // that a context was recently exited. | 1298 // that a context was recently exited. |
| 1293 bool context_exit_happened_; | 1299 bool context_exit_happened_; |
| 1294 | 1300 |
| 1295 // Time stamp at initialization. | 1301 // Time stamp at initialization. |
| 1296 double time_millis_at_init_; | 1302 double time_millis_at_init_; |
| 1297 | 1303 |
| 1298 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \ | 1304 #if defined(V8_TARGET_ARCH_A64) && !defined(__arm__) || \ |
| 1305 defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \ |
| 1299 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__) | 1306 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__) |
| 1300 bool simulator_initialized_; | 1307 bool simulator_initialized_; |
| 1301 HashMap* simulator_i_cache_; | 1308 HashMap* simulator_i_cache_; |
| 1302 Redirection* simulator_redirection_; | 1309 Redirection* simulator_redirection_; |
| 1303 #endif | 1310 #endif |
| 1304 | 1311 |
| 1305 #ifdef DEBUG | 1312 #ifdef DEBUG |
| 1306 // A static array of histogram info for each type. | 1313 // A static array of histogram info for each type. |
| 1307 HistogramInfo heap_histograms_[LAST_TYPE + 1]; | 1314 HistogramInfo heap_histograms_[LAST_TYPE + 1]; |
| 1308 JSObject::SpillInformation js_spill_information_; | 1315 JSObject::SpillInformation js_spill_information_; |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1491 | 1498 |
| 1492 // Mark the native context with out of memory. | 1499 // Mark the native context with out of memory. |
| 1493 inline void Context::mark_out_of_memory() { | 1500 inline void Context::mark_out_of_memory() { |
| 1494 native_context()->set_out_of_memory(HEAP->true_value()); | 1501 native_context()->set_out_of_memory(HEAP->true_value()); |
| 1495 } | 1502 } |
| 1496 | 1503 |
| 1497 | 1504 |
| 1498 } } // namespace v8::internal | 1505 } } // namespace v8::internal |
| 1499 | 1506 |
| 1500 #endif // V8_ISOLATE_H_ | 1507 #endif // V8_ISOLATE_H_ |
| OLD | NEW |