| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_ISOLATE_H_ | 5 #ifndef V8_ISOLATE_H_ |
| 6 #define V8_ISOLATE_H_ | 6 #define V8_ISOLATE_H_ |
| 7 | 7 |
| 8 #include "include/v8-debug.h" | 8 #include "include/v8-debug.h" |
| 9 #include "src/allocation.h" | 9 #include "src/allocation.h" |
| 10 #include "src/assert-scope.h" | 10 #include "src/assert-scope.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 // ExternalReference::ExternalReferenceRedirector since we can not include | 74 // ExternalReference::ExternalReferenceRedirector since we can not include |
| 75 // assembler.h, where it is defined, here. | 75 // assembler.h, where it is defined, here. |
| 76 typedef void* ExternalReferenceRedirectorPointer(); | 76 typedef void* ExternalReferenceRedirectorPointer(); |
| 77 | 77 |
| 78 | 78 |
| 79 class Debug; | 79 class Debug; |
| 80 class Debugger; | 80 class Debugger; |
| 81 | 81 |
| 82 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \ | 82 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \ |
| 83 !defined(__aarch64__) && V8_TARGET_ARCH_ARM64 || \ | 83 !defined(__aarch64__) && V8_TARGET_ARCH_ARM64 || \ |
| 84 !defined(__mips__) && V8_TARGET_ARCH_MIPS | 84 !defined(__mips__) && V8_TARGET_ARCH_MIPS || \ |
| 85 !defined(__mips__) && V8_TARGET_ARCH_MIPS64 |
| 85 class Redirection; | 86 class Redirection; |
| 86 class Simulator; | 87 class Simulator; |
| 87 #endif | 88 #endif |
| 88 | 89 |
| 89 | 90 |
| 90 // Static indirection table for handles to constants. If a frame | 91 // Static indirection table for handles to constants. If a frame |
| 91 // element represents a constant, the data contains an index into | 92 // element represents a constant, the data contains an index into |
| 92 // this table of handles to the actual constants. | 93 // this table of handles to the actual constants. |
| 93 // Static indirection table for handles to constants. If a Result | 94 // Static indirection table for handles to constants. If a Result |
| 94 // represents a constant, the data contains an index into this table | 95 // represents a constant, the data contains an index into this table |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 | 287 |
| 287 private: | 288 private: |
| 288 void InitializeInternal(); | 289 void InitializeInternal(); |
| 289 | 290 |
| 290 v8::TryCatch* try_catch_handler_; | 291 v8::TryCatch* try_catch_handler_; |
| 291 }; | 292 }; |
| 292 | 293 |
| 293 | 294 |
| 294 #if V8_TARGET_ARCH_ARM && !defined(__arm__) || \ | 295 #if V8_TARGET_ARCH_ARM && !defined(__arm__) || \ |
| 295 V8_TARGET_ARCH_ARM64 && !defined(__aarch64__) || \ | 296 V8_TARGET_ARCH_ARM64 && !defined(__aarch64__) || \ |
| 296 V8_TARGET_ARCH_MIPS && !defined(__mips__) | 297 V8_TARGET_ARCH_MIPS && !defined(__mips__) || \ |
| 298 V8_TARGET_ARCH_MIPS64 && !defined(__mips__) |
| 297 | 299 |
| 298 #define ISOLATE_INIT_SIMULATOR_LIST(V) \ | 300 #define ISOLATE_INIT_SIMULATOR_LIST(V) \ |
| 299 V(bool, simulator_initialized, false) \ | 301 V(bool, simulator_initialized, false) \ |
| 300 V(HashMap*, simulator_i_cache, NULL) \ | 302 V(HashMap*, simulator_i_cache, NULL) \ |
| 301 V(Redirection*, simulator_redirection, NULL) | 303 V(Redirection*, simulator_redirection, NULL) |
| 302 #else | 304 #else |
| 303 | 305 |
| 304 #define ISOLATE_INIT_SIMULATOR_LIST(V) | 306 #define ISOLATE_INIT_SIMULATOR_LIST(V) |
| 305 | 307 |
| 306 #endif | 308 #endif |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 // and reused on subsequent entries. | 387 // and reused on subsequent entries. |
| 386 class PerIsolateThreadData { | 388 class PerIsolateThreadData { |
| 387 public: | 389 public: |
| 388 PerIsolateThreadData(Isolate* isolate, ThreadId thread_id) | 390 PerIsolateThreadData(Isolate* isolate, ThreadId thread_id) |
| 389 : isolate_(isolate), | 391 : isolate_(isolate), |
| 390 thread_id_(thread_id), | 392 thread_id_(thread_id), |
| 391 stack_limit_(0), | 393 stack_limit_(0), |
| 392 thread_state_(NULL), | 394 thread_state_(NULL), |
| 393 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \ | 395 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \ |
| 394 !defined(__aarch64__) && V8_TARGET_ARCH_ARM64 || \ | 396 !defined(__aarch64__) && V8_TARGET_ARCH_ARM64 || \ |
| 395 !defined(__mips__) && V8_TARGET_ARCH_MIPS | 397 !defined(__mips__) && V8_TARGET_ARCH_MIPS || \ |
| 398 !defined(__mips__) && V8_TARGET_ARCH_MIPS64 |
| 396 simulator_(NULL), | 399 simulator_(NULL), |
| 397 #endif | 400 #endif |
| 398 next_(NULL), | 401 next_(NULL), |
| 399 prev_(NULL) { } | 402 prev_(NULL) { } |
| 400 ~PerIsolateThreadData(); | 403 ~PerIsolateThreadData(); |
| 401 Isolate* isolate() const { return isolate_; } | 404 Isolate* isolate() const { return isolate_; } |
| 402 ThreadId thread_id() const { return thread_id_; } | 405 ThreadId thread_id() const { return thread_id_; } |
| 403 | 406 |
| 404 FIELD_ACCESSOR(uintptr_t, stack_limit) | 407 FIELD_ACCESSOR(uintptr_t, stack_limit) |
| 405 FIELD_ACCESSOR(ThreadState*, thread_state) | 408 FIELD_ACCESSOR(ThreadState*, thread_state) |
| 406 | 409 |
| 407 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \ | 410 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \ |
| 408 !defined(__aarch64__) && V8_TARGET_ARCH_ARM64 || \ | 411 !defined(__aarch64__) && V8_TARGET_ARCH_ARM64 || \ |
| 409 !defined(__mips__) && V8_TARGET_ARCH_MIPS | 412 !defined(__mips__) && V8_TARGET_ARCH_MIPS || \ |
| 413 !defined(__mips__) && V8_TARGET_ARCH_MIPS64 |
| 410 FIELD_ACCESSOR(Simulator*, simulator) | 414 FIELD_ACCESSOR(Simulator*, simulator) |
| 411 #endif | 415 #endif |
| 412 | 416 |
| 413 bool Matches(Isolate* isolate, ThreadId thread_id) const { | 417 bool Matches(Isolate* isolate, ThreadId thread_id) const { |
| 414 return isolate_ == isolate && thread_id_.Equals(thread_id); | 418 return isolate_ == isolate && thread_id_.Equals(thread_id); |
| 415 } | 419 } |
| 416 | 420 |
| 417 private: | 421 private: |
| 418 Isolate* isolate_; | 422 Isolate* isolate_; |
| 419 ThreadId thread_id_; | 423 ThreadId thread_id_; |
| 420 uintptr_t stack_limit_; | 424 uintptr_t stack_limit_; |
| 421 ThreadState* thread_state_; | 425 ThreadState* thread_state_; |
| 422 | 426 |
| 423 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \ | 427 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \ |
| 424 !defined(__aarch64__) && V8_TARGET_ARCH_ARM64 || \ | 428 !defined(__aarch64__) && V8_TARGET_ARCH_ARM64 || \ |
| 425 !defined(__mips__) && V8_TARGET_ARCH_MIPS | 429 !defined(__mips__) && V8_TARGET_ARCH_MIPS || \ |
| 430 !defined(__mips__) && V8_TARGET_ARCH_MIPS64 |
| 426 Simulator* simulator_; | 431 Simulator* simulator_; |
| 427 #endif | 432 #endif |
| 428 | 433 |
| 429 PerIsolateThreadData* next_; | 434 PerIsolateThreadData* next_; |
| 430 PerIsolateThreadData* prev_; | 435 PerIsolateThreadData* prev_; |
| 431 | 436 |
| 432 friend class Isolate; | 437 friend class Isolate; |
| 433 friend class ThreadDataTable; | 438 friend class ThreadDataTable; |
| 434 friend class EntryStackItem; | 439 friend class EntryStackItem; |
| 435 | 440 |
| (...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1521 } | 1526 } |
| 1522 | 1527 |
| 1523 EmbeddedVector<char, 128> filename_; | 1528 EmbeddedVector<char, 128> filename_; |
| 1524 FILE* file_; | 1529 FILE* file_; |
| 1525 int scope_depth_; | 1530 int scope_depth_; |
| 1526 }; | 1531 }; |
| 1527 | 1532 |
| 1528 } } // namespace v8::internal | 1533 } } // namespace v8::internal |
| 1529 | 1534 |
| 1530 #endif // V8_ISOLATE_H_ | 1535 #endif // V8_ISOLATE_H_ |
| OLD | NEW |