Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(516)

Side by Side Diff: src/isolate.h

Issue 1142043003: Use USE_SIMULATOR when appropriate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <queue> 8 #include <queue>
9 #include "include/v8-debug.h" 9 #include "include/v8-debug.h"
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 // 'void function pointer', used to roundtrip the 75 // 'void function pointer', used to roundtrip the
76 // ExternalReference::ExternalReferenceRedirector since we can not include 76 // ExternalReference::ExternalReferenceRedirector since we can not include
77 // assembler.h, where it is defined, here. 77 // assembler.h, where it is defined, here.
78 typedef void* ExternalReferenceRedirectorPointer(); 78 typedef void* ExternalReferenceRedirectorPointer();
79 79
80 80
81 class Debug; 81 class Debug;
82 class Debugger; 82 class Debugger;
83 class PromiseOnStack; 83 class PromiseOnStack;
84
85 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \
86 !defined(__aarch64__) && V8_TARGET_ARCH_ARM64 || \
87 !defined(__PPC__) && V8_TARGET_ARCH_PPC || \
88 !defined(__mips__) && V8_TARGET_ARCH_MIPS || \
89 !defined(__mips__) && V8_TARGET_ARCH_MIPS64
90 class Redirection; 84 class Redirection;
91 class Simulator; 85 class Simulator;
92 #endif
93 86
94 87
95 // Static indirection table for handles to constants. If a frame 88 // Static indirection table for handles to constants. If a frame
96 // element represents a constant, the data contains an index into 89 // element represents a constant, the data contains an index into
97 // this table of handles to the actual constants. 90 // this table of handles to the actual constants.
98 // Static indirection table for handles to constants. If a Result 91 // Static indirection table for handles to constants. If a Result
99 // represents a constant, the data contains an index into this table 92 // represents a constant, the data contains an index into this table
100 // of handles to the actual constants. 93 // of handles to the actual constants.
101 typedef ZoneList<Handle<Object> > ZoneObjectList; 94 typedef ZoneList<Handle<Object> > ZoneObjectList;
102 95
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 // Call back function to report unsafe JS accesses. 307 // Call back function to report unsafe JS accesses.
315 v8::FailedAccessCheckCallback failed_access_check_callback_; 308 v8::FailedAccessCheckCallback failed_access_check_callback_;
316 309
317 private: 310 private:
318 void InitializeInternal(); 311 void InitializeInternal();
319 312
320 v8::TryCatch* try_catch_handler_; 313 v8::TryCatch* try_catch_handler_;
321 }; 314 };
322 315
323 316
324 #if V8_TARGET_ARCH_ARM && !defined(__arm__) || \ 317 #if USE_SIMULATOR
325 V8_TARGET_ARCH_ARM64 && !defined(__aarch64__) || \
326 V8_TARGET_ARCH_PPC && !defined(__PPC__) || \
327 V8_TARGET_ARCH_MIPS && !defined(__mips__) || \
328 V8_TARGET_ARCH_MIPS64 && !defined(__mips__)
329 318
330 #define ISOLATE_INIT_SIMULATOR_LIST(V) \ 319 #define ISOLATE_INIT_SIMULATOR_LIST(V) \
331 V(bool, simulator_initialized, false) \ 320 V(bool, simulator_initialized, false) \
332 V(HashMap*, simulator_i_cache, NULL) \ 321 V(HashMap*, simulator_i_cache, NULL) \
333 V(Redirection*, simulator_redirection, NULL) 322 V(Redirection*, simulator_redirection, NULL)
334 #else 323 #else
335 324
336 #define ISOLATE_INIT_SIMULATOR_LIST(V) 325 #define ISOLATE_INIT_SIMULATOR_LIST(V)
337 326
338 #endif 327 #endif
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 // A thread has a PerIsolateThreadData instance for each isolate that it has 399 // A thread has a PerIsolateThreadData instance for each isolate that it has
411 // entered. That instance is allocated when the isolate is initially entered 400 // entered. That instance is allocated when the isolate is initially entered
412 // and reused on subsequent entries. 401 // and reused on subsequent entries.
413 class PerIsolateThreadData { 402 class PerIsolateThreadData {
414 public: 403 public:
415 PerIsolateThreadData(Isolate* isolate, ThreadId thread_id) 404 PerIsolateThreadData(Isolate* isolate, ThreadId thread_id)
416 : isolate_(isolate), 405 : isolate_(isolate),
417 thread_id_(thread_id), 406 thread_id_(thread_id),
418 stack_limit_(0), 407 stack_limit_(0),
419 thread_state_(NULL), 408 thread_state_(NULL),
420 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \ 409 #if USE_SIMULATOR
421 !defined(__aarch64__) && V8_TARGET_ARCH_ARM64 || \
422 !defined(__PPC__) && V8_TARGET_ARCH_PPC || \
423 !defined(__mips__) && V8_TARGET_ARCH_MIPS || \
424 !defined(__mips__) && V8_TARGET_ARCH_MIPS64
425 simulator_(NULL), 410 simulator_(NULL),
426 #endif 411 #endif
427 next_(NULL), 412 next_(NULL),
428 prev_(NULL) { } 413 prev_(NULL) { }
429 ~PerIsolateThreadData(); 414 ~PerIsolateThreadData();
430 Isolate* isolate() const { return isolate_; } 415 Isolate* isolate() const { return isolate_; }
431 ThreadId thread_id() const { return thread_id_; } 416 ThreadId thread_id() const { return thread_id_; }
432 417
433 FIELD_ACCESSOR(uintptr_t, stack_limit) 418 FIELD_ACCESSOR(uintptr_t, stack_limit)
434 FIELD_ACCESSOR(ThreadState*, thread_state) 419 FIELD_ACCESSOR(ThreadState*, thread_state)
435 420
436 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \ 421 #if USE_SIMULATOR
437 !defined(__aarch64__) && V8_TARGET_ARCH_ARM64 || \
438 !defined(__PPC__) && V8_TARGET_ARCH_PPC || \
439 !defined(__mips__) && V8_TARGET_ARCH_MIPS || \
440 !defined(__mips__) && V8_TARGET_ARCH_MIPS64
441 FIELD_ACCESSOR(Simulator*, simulator) 422 FIELD_ACCESSOR(Simulator*, simulator)
442 #endif 423 #endif
443 424
444 bool Matches(Isolate* isolate, ThreadId thread_id) const { 425 bool Matches(Isolate* isolate, ThreadId thread_id) const {
445 return isolate_ == isolate && thread_id_.Equals(thread_id); 426 return isolate_ == isolate && thread_id_.Equals(thread_id);
446 } 427 }
447 428
448 private: 429 private:
449 Isolate* isolate_; 430 Isolate* isolate_;
450 ThreadId thread_id_; 431 ThreadId thread_id_;
451 uintptr_t stack_limit_; 432 uintptr_t stack_limit_;
452 ThreadState* thread_state_; 433 ThreadState* thread_state_;
453 434
454 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \ 435 #if USE_SIMULATOR
455 !defined(__aarch64__) && V8_TARGET_ARCH_ARM64 || \
456 !defined(__PPC__) && V8_TARGET_ARCH_PPC || \
457 !defined(__mips__) && V8_TARGET_ARCH_MIPS || \
458 !defined(__mips__) && V8_TARGET_ARCH_MIPS64
459 Simulator* simulator_; 436 Simulator* simulator_;
460 #endif 437 #endif
461 438
462 PerIsolateThreadData* next_; 439 PerIsolateThreadData* next_;
463 PerIsolateThreadData* prev_; 440 PerIsolateThreadData* prev_;
464 441
465 friend class Isolate; 442 friend class Isolate;
466 friend class ThreadDataTable; 443 friend class ThreadDataTable;
467 friend class EntryStackItem; 444 friend class EntryStackItem;
468 445
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1601 } 1578 }
1602 1579
1603 EmbeddedVector<char, 128> filename_; 1580 EmbeddedVector<char, 128> filename_;
1604 FILE* file_; 1581 FILE* file_;
1605 int scope_depth_; 1582 int scope_depth_;
1606 }; 1583 };
1607 1584
1608 } } // namespace v8::internal 1585 } } // namespace v8::internal
1609 1586
1610 #endif // V8_ISOLATE_H_ 1587 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698