V8 Project
isolate.h
Go to the documentation of this file.
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
3 // found in the LICENSE file.
4 
5 #ifndef V8_ISOLATE_H_
6 #define V8_ISOLATE_H_
7 
8 #include "include/v8-debug.h"
9 #include "src/allocation.h"
10 #include "src/assert-scope.h"
11 #include "src/base/atomicops.h"
12 #include "src/builtins.h"
13 #include "src/contexts.h"
14 #include "src/date.h"
15 #include "src/execution.h"
16 #include "src/frames.h"
17 #include "src/global-handles.h"
18 #include "src/handles.h"
19 #include "src/hashmap.h"
20 #include "src/heap/heap.h"
22 #include "src/regexp-stack.h"
23 #include "src/runtime/runtime.h"
24 #include "src/runtime-profiler.h"
25 #include "src/zone.h"
26 
27 namespace v8 {
28 
29 namespace base {
30 class RandomNumberGenerator;
31 }
32 
33 namespace internal {
34 
35 class BasicBlockProfiler;
36 class Bootstrapper;
37 class CallInterfaceDescriptorData;
38 class CodeGenerator;
39 class CodeRange;
40 class CodeStubDescriptor;
41 class CodeTracer;
42 class CompilationCache;
43 class ConsStringIteratorOp;
44 class ContextSlotCache;
45 class Counters;
46 class CpuFeatures;
47 class CpuProfiler;
48 class DeoptimizerData;
49 class Deserializer;
50 class EmptyStatement;
51 class ExternalCallbackScope;
52 class ExternalReferenceTable;
53 class Factory;
54 class FunctionInfoListener;
55 class HandleScopeImplementer;
56 class HeapProfiler;
57 class HStatistics;
58 class HTracer;
59 class InlineRuntimeFunctionsTable;
60 class InnerPointerToCodeCache;
61 class MaterializedObjectStore;
62 class CodeAgingHelper;
63 class RegExpStack;
64 class SaveContext;
65 class StringTracker;
66 class StubCache;
67 class SweeperThread;
68 class ThreadManager;
69 class ThreadState;
70 class ThreadVisitor; // Defined in v8threads.h
71 class UnicodeCache;
72 template <StateTag Tag> class VMState;
73 
74 // 'void function pointer', used to roundtrip the
75 // ExternalReference::ExternalReferenceRedirector since we can not include
76 // assembler.h, where it is defined, here.
78 
79 
80 class Debug;
81 class Debugger;
82 class PromiseOnStack;
83 
84 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \
85  !defined(__aarch64__) && V8_TARGET_ARCH_ARM64 || \
86  !defined(__mips__) && V8_TARGET_ARCH_MIPS || \
87  !defined(__mips__) && V8_TARGET_ARCH_MIPS64
88 class Redirection;
89 class Simulator;
90 #endif
91 
92 
93 // Static indirection table for handles to constants. If a frame
94 // element represents a constant, the data contains an index into
95 // this table of handles to the actual constants.
96 // Static indirection table for handles to constants. If a Result
97 // represents a constant, the data contains an index into this table
98 // of handles to the actual constants.
100 
101 #define RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate) \
102  do { \
103  Isolate* __isolate__ = (isolate); \
104  if (__isolate__->has_scheduled_exception()) { \
105  return __isolate__->PromoteScheduledException(); \
106  } \
107  } while (false)
108 
109 // Macros for MaybeHandle.
110 
111 #define RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, value) \
112  do { \
113  Isolate* __isolate__ = (isolate); \
114  if (__isolate__->has_scheduled_exception()) { \
115  __isolate__->PromoteScheduledException(); \
116  return value; \
117  } \
118  } while (false)
119 
120 #define RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, T) \
121  RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, MaybeHandle<T>())
122 
123 #define ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, dst, call, value) \
124  do { \
125  if (!(call).ToHandle(&dst)) { \
126  DCHECK((isolate)->has_pending_exception()); \
127  return value; \
128  } \
129  } while (false)
130 
131 #define ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, dst, call) \
132  ASSIGN_RETURN_ON_EXCEPTION_VALUE( \
133  isolate, dst, call, isolate->heap()->exception())
134 
135 #define ASSIGN_RETURN_ON_EXCEPTION(isolate, dst, call, T) \
136  ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, dst, call, MaybeHandle<T>())
137 
138 #define THROW_NEW_ERROR(isolate, call, T) \
139  do { \
140  Handle<Object> __error__; \
141  ASSIGN_RETURN_ON_EXCEPTION(isolate, __error__, isolate->factory()->call, \
142  T); \
143  return isolate->Throw<T>(__error__); \
144  } while (false)
145 
146 #define THROW_NEW_ERROR_RETURN_FAILURE(isolate, call) \
147  do { \
148  Handle<Object> __error__; \
149  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, __error__, \
150  isolate->factory()->call); \
151  return isolate->Throw(*__error__); \
152  } while (false)
153 
154 #define RETURN_ON_EXCEPTION_VALUE(isolate, call, value) \
155  do { \
156  if ((call).is_null()) { \
157  DCHECK((isolate)->has_pending_exception()); \
158  return value; \
159  } \
160  } while (false)
161 
162 #define RETURN_FAILURE_ON_EXCEPTION(isolate, call) \
163  RETURN_ON_EXCEPTION_VALUE(isolate, call, isolate->heap()->exception())
164 
165 #define RETURN_ON_EXCEPTION(isolate, call, T) \
166  RETURN_ON_EXCEPTION_VALUE(isolate, call, MaybeHandle<T>())
167 
168 
169 #define FOR_EACH_ISOLATE_ADDRESS_NAME(C) \
170  C(Handler, handler) \
171  C(CEntryFP, c_entry_fp) \
172  C(Context, context) \
173  C(PendingException, pending_exception) \
174  C(ExternalCaughtException, external_caught_exception) \
175  C(JSEntrySP, js_entry_sp)
176 
177 
178 // Platform-independent, reliable thread identifier.
179 class ThreadId {
180  public:
181  // Creates an invalid ThreadId.
183 
184  // Returns ThreadId for current thread.
185  static ThreadId Current() { return ThreadId(GetCurrentThreadId()); }
186 
187  // Returns invalid ThreadId (guaranteed not to be equal to any thread).
188  static ThreadId Invalid() { return ThreadId(kInvalidId); }
189 
190  // Compares ThreadIds for equality.
191  INLINE(bool Equals(const ThreadId& other) const) {
192  return id_ == other.id_;
193  }
194 
195  // Checks whether this ThreadId refers to any thread.
196  INLINE(bool IsValid() const) {
197  return id_ != kInvalidId;
198  }
199 
200  // Converts ThreadId to an integer representation
201  // (required for public API: V8::V8::GetCurrentThreadId).
202  int ToInteger() const { return id_; }
203 
204  // Converts ThreadId to an integer representation
205  // (required for public API: V8::V8::TerminateExecution).
206  static ThreadId FromInteger(int id) { return ThreadId(id); }
207 
208  private:
209  static const int kInvalidId = -1;
210 
211  explicit ThreadId(int id) : id_(id) {}
212 
213  static int AllocateThreadId();
214 
215  static int GetCurrentThreadId();
216 
217  int id_;
218 
220 
221  friend class Isolate;
222 };
223 
224 
225 #define FIELD_ACCESSOR(type, name) \
226  inline void set_##name(type v) { name##_ = v; } \
227  inline type name() const { return name##_; }
228 
229 
230 class ThreadLocalTop BASE_EMBEDDED {
231  public:
232  // Does early low-level initialization that does not depend on the
233  // isolate being present.
235 
236  // Initialize the thread data.
237  void Initialize();
238 
239  // Get the top C++ try catch handler or NULL if none are registered.
240  //
241  // This method is not guaranteed to return an address that can be
242  // used for comparison with addresses into the JS stack. If such an
243  // address is needed, use try_catch_handler_address.
244  FIELD_ACCESSOR(v8::TryCatch*, try_catch_handler)
245 
246  // Get the address of the top C++ try catch handler or NULL if
247  // none are registered.
248  //
249  // This method always returns an address that can be compared to
250  // pointers into the JavaScript stack. When running on actual
251  // hardware, try_catch_handler_address and TryCatchHandler return
252  // the same pointer. When running on a simulator with a separate JS
253  // stack, try_catch_handler_address returns a JS stack address that
254  // corresponds to the place on the JS stack where the C++ handler
255  // would have been if the stack were not separate.
256  Address try_catch_handler_address() {
257  return reinterpret_cast<Address>(
258  v8::TryCatch::JSStackComparableAddress(try_catch_handler()));
259  }
260 
261  void Free();
262 
263  Isolate* isolate_;
264  // The context where the current execution method is created and for variable
265  // lookups.
275  // Use a separate value for scheduled exceptions to preserve the
276  // invariants that hold about pending_exception. We may want to
277  // unify them later.
280  SaveContext* save_context_;
282 
283  // Stack.
284  Address c_entry_fp_; // the frame pointer of the top c entry frame
285  Address handler_; // try-blocks are chained through the stack
286 
287  // Throwing an exception may cause a Promise rejection. For this purpose
288  // we keep track of a stack of nested promises and the corresponding
289  // try-catch handlers.
291 
292 #ifdef USE_SIMULATOR
293  Simulator* simulator_;
294 #endif
295 
296  Address js_entry_sp_; // the stack pointer of the bottom JS entry frame
297  // the external callback we're currently in
298  ExternalCallbackScope* external_callback_scope_;
300 
301  // Generated code scratch locations.
303 
304  // Call back function to report unsafe JS accesses.
306 
307  // Head of the list of live LookupResults.
308  LookupResult* top_lookup_result_;
309 
310  private:
312 
314 };
315 
316 
317 #if V8_TARGET_ARCH_ARM && !defined(__arm__) || \
318  V8_TARGET_ARCH_ARM64 && !defined(__aarch64__) || \
319  V8_TARGET_ARCH_MIPS && !defined(__mips__) || \
320  V8_TARGET_ARCH_MIPS64 && !defined(__mips__)
321 
322 #define ISOLATE_INIT_SIMULATOR_LIST(V) \
323  V(bool, simulator_initialized, false) \
324  V(HashMap*, simulator_i_cache, NULL) \
325  V(Redirection*, simulator_redirection, NULL)
326 #else
327 
328 #define ISOLATE_INIT_SIMULATOR_LIST(V)
329 
330 #endif
331 
332 
333 #ifdef DEBUG
334 
335 #define ISOLATE_INIT_DEBUG_ARRAY_LIST(V) \
336  V(CommentStatistic, paged_space_comments_statistics, \
337  CommentStatistic::kMaxComments + 1) \
338  V(int, code_kind_statistics, Code::NUMBER_OF_KINDS)
339 #else
340 
341 #define ISOLATE_INIT_DEBUG_ARRAY_LIST(V)
342 
343 #endif
344 
345 #define ISOLATE_INIT_ARRAY_LIST(V) \
346  /* SerializerDeserializer state. */ \
347  V(int32_t, jsregexp_static_offsets_vector, kJSRegexpStaticOffsetsVectorSize) \
348  V(int, bad_char_shift_table, kUC16AlphabetSize) \
349  V(int, good_suffix_shift_table, (kBMMaxShift + 1)) \
350  V(int, suffix_table, (kBMMaxShift + 1)) \
351  V(uint32_t, private_random_seed, 2) \
352  ISOLATE_INIT_DEBUG_ARRAY_LIST(V)
353 
355 
356 #define ISOLATE_INIT_LIST(V) \
357  /* SerializerDeserializer state. */ \
358  V(int, serialize_partial_snapshot_cache_length, 0) \
359  V(int, serialize_partial_snapshot_cache_capacity, 0) \
360  V(Object**, serialize_partial_snapshot_cache, NULL) \
361  /* Assembler state. */ \
362  V(FatalErrorCallback, exception_behavior, NULL) \
363  V(LogEventCallback, event_logger, NULL) \
364  V(AllowCodeGenerationFromStringsCallback, allow_code_gen_callback, NULL) \
365  /* To distinguish the function templates, so that we can find them in the */ \
366  /* function cache of the native context. */ \
367  V(int, next_serial_number, 0) \
368  V(ExternalReferenceRedirectorPointer*, external_reference_redirector, NULL) \
369  /* Part of the state of liveedit. */ \
370  V(FunctionInfoListener*, active_function_info_listener, NULL) \
371  /* State for Relocatable. */ \
372  V(Relocatable*, relocatable_top, NULL) \
373  V(DebugObjectCache*, string_stream_debug_object_cache, NULL) \
374  V(Object*, string_stream_current_security_token, NULL) \
375  /* Serializer state. */ \
376  V(ExternalReferenceTable*, external_reference_table, NULL) \
377  V(int, pending_microtask_count, 0) \
378  V(bool, autorun_microtasks, true) \
379  V(HStatistics*, hstatistics, NULL) \
380  V(HStatistics*, tstatistics, NULL) \
381  V(HTracer*, htracer, NULL) \
382  V(CodeTracer*, code_tracer, NULL) \
383  V(bool, fp_stubs_generated, false) \
384  V(int, max_available_threads, 0) \
385  V(uint32_t, per_isolate_assert_data, 0xFFFFFFFFu) \
386  V(InterruptCallback, api_interrupt_callback, NULL) \
387  V(void*, api_interrupt_callback_data, NULL) \
388  ISOLATE_INIT_SIMULATOR_LIST(V)
389 
390 #define THREAD_LOCAL_TOP_ACCESSOR(type, name) \
391  inline void set_##name(type v) { thread_local_top_.name##_ = v; } \
392  inline type name() const { return thread_local_top_.name##_; }
393 
394 
395 class Isolate {
396  // These forward declarations are required to make the friend declarations in
397  // PerIsolateThreadData work on some older versions of gcc.
398  class ThreadDataTable;
399  class EntryStackItem;
400  public:
401  ~Isolate();
402 
403  // A thread has a PerIsolateThreadData instance for each isolate that it has
404  // entered. That instance is allocated when the isolate is initially entered
405  // and reused on subsequent entries.
407  public:
409  : isolate_(isolate),
411  stack_limit_(0),
413 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \
414  !defined(__aarch64__) && V8_TARGET_ARCH_ARM64 || \
415  !defined(__mips__) && V8_TARGET_ARCH_MIPS || \
416  !defined(__mips__) && V8_TARGET_ARCH_MIPS64
417  simulator_(NULL),
418 #endif
419  next_(NULL),
420  prev_(NULL) { }
422  Isolate* isolate() const { return isolate_; }
423  ThreadId thread_id() const { return thread_id_; }
424 
425  FIELD_ACCESSOR(uintptr_t, stack_limit)
426  FIELD_ACCESSOR(ThreadState*, thread_state)
427 
428 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \
429  !defined(__aarch64__) && V8_TARGET_ARCH_ARM64 || \
430  !defined(__mips__) && V8_TARGET_ARCH_MIPS || \
431  !defined(__mips__) && V8_TARGET_ARCH_MIPS64
432  FIELD_ACCESSOR(Simulator*, simulator)
433 #endif
434 
436  return isolate_ == isolate && thread_id_.Equals(thread_id);
437  }
438 
439  private:
444 
445 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \
446  !defined(__aarch64__) && V8_TARGET_ARCH_ARM64 || \
447  !defined(__mips__) && V8_TARGET_ARCH_MIPS || \
448  !defined(__mips__) && V8_TARGET_ARCH_MIPS64
449  Simulator* simulator_;
450 #endif
451 
454 
455  friend class Isolate;
456  friend class ThreadDataTable;
457  friend class EntryStackItem;
458 
460  };
461 
462 
463  enum AddressId {
464 #define DECLARE_ENUM(CamelName, hacker_name) k##CamelName##Address,
466 #undef DECLARE_ENUM
468  };
469 
470  static void InitializeOncePerProcess();
471 
472  // Returns the PerIsolateThreadData for the current thread (or NULL if one is
473  // not currently set).
475  return reinterpret_cast<PerIsolateThreadData*>(
477  }
478 
479  // Returns the isolate inside which the current thread is running.
480  INLINE(static Isolate* Current()) {
481  Isolate* isolate = reinterpret_cast<Isolate*>(
483  DCHECK(isolate != NULL);
484  return isolate;
485  }
486 
487  INLINE(static Isolate* UncheckedCurrent()) {
488  return reinterpret_cast<Isolate*>(
490  }
491 
492  // Like UncheckedCurrent, but skips the check that |isolate_key_| was
493  // initialized. Callers have to ensure that themselves.
494  INLINE(static Isolate* UnsafeCurrent()) {
495  return reinterpret_cast<Isolate*>(
497  }
498 
499  // Usually called by Init(), but can be called early e.g. to allow
500  // testing components that require logging but not the whole
501  // isolate.
502  //
503  // Safe to call more than once.
505 
506  bool Init(Deserializer* des);
507 
508  bool IsInitialized() { return state_ == INITIALIZED; }
509 
510  // True if at least one thread Enter'ed this isolate.
511  bool IsInUse() { return entry_stack_ != NULL; }
512 
513  // Destroys the non-default isolates.
514  // Sets default isolate into "has_been_disposed" state rather then destroying,
515  // for legacy API reasons.
516  void TearDown();
517 
518  static void GlobalTearDown();
519 
520  // Find the PerThread for this particular (isolate, thread) combination
521  // If one does not yet exist, return null.
522  PerIsolateThreadData* FindPerThreadDataForThisThread();
523 
524  // Find the PerThread for given (isolate, thread) combination
525  // If one does not yet exist, return null.
526  PerIsolateThreadData* FindPerThreadDataForThread(ThreadId thread_id);
527 
528  // Returns the key used to store the pointer to the current isolate.
529  // Used internally for V8 threads that do not execute JavaScript but still
530  // are part of the domain of an isolate (like the context switcher).
532  return isolate_key_;
533  }
534 
535  // Returns the key used to store process-wide thread IDs.
537  return thread_id_key_;
538  }
539 
541 
542  // Mutex for serializing access to break control structures.
543  base::RecursiveMutex* break_access() { return &break_access_; }
544 
546 
547  // Access to top context (where the current function object was created).
548  Context* context() { return thread_local_top_.context_; }
550  DCHECK(context == NULL || context->IsContext());
551  thread_local_top_.context_ = context;
552  }
553  Context** context_address() { return &thread_local_top_.context_; }
554 
555  THREAD_LOCAL_TOP_ACCESSOR(SaveContext*, save_context)
556 
557  // Access to current thread id.
559 
560  // Interface to pending exception.
563  DCHECK(!thread_local_top_.pending_exception_->IsException());
564  return thread_local_top_.pending_exception_;
565  }
566 
567  void set_pending_exception(Object* exception_obj) {
568  DCHECK(!exception_obj->IsException());
569  thread_local_top_.pending_exception_ = exception_obj;
570  }
571 
573  DCHECK(!thread_local_top_.pending_exception_->IsException());
574  thread_local_top_.pending_exception_ = heap_.the_hole_value();
575  }
576 
578  return &thread_local_top_.pending_exception_;
579  }
580 
582  DCHECK(!thread_local_top_.pending_exception_->IsException());
583  return !thread_local_top_.pending_exception_->IsTheHole();
584  }
585 
586  THREAD_LOCAL_TOP_ACCESSOR(bool, external_caught_exception)
587 
589  thread_local_top_.has_pending_message_ = false;
590  thread_local_top_.pending_message_obj_ = heap_.the_hole_value();
591  thread_local_top_.pending_message_script_ = heap_.the_hole_value();
592  }
594  return thread_local_top_.try_catch_handler();
595  }
597  return thread_local_top_.try_catch_handler_address();
598  }
600  return &thread_local_top_.external_caught_exception_;
601  }
602 
604 
606  return &thread_local_top_.scheduled_exception_;
607  }
608 
610  return reinterpret_cast<Address>(&thread_local_top_.pending_message_obj_);
611  }
612 
614  return reinterpret_cast<Address>(&thread_local_top_.has_pending_message_);
615  }
616 
618  return reinterpret_cast<Address>(
619  &thread_local_top_.pending_message_script_);
620  }
621 
624  DCHECK(!thread_local_top_.scheduled_exception_->IsException());
625  return thread_local_top_.scheduled_exception_;
626  }
628  DCHECK(!thread_local_top_.scheduled_exception_->IsException());
629  return thread_local_top_.scheduled_exception_ != heap_.the_hole_value();
630  }
632  DCHECK(!thread_local_top_.scheduled_exception_->IsException());
633  thread_local_top_.scheduled_exception_ = heap_.the_hole_value();
634  }
635 
636  bool HasExternalTryCatch();
637  bool IsFinallyOnTop();
638 
640  return exception != heap()->termination_exception();
641  }
642 
643  // Serializer.
645 
646  // JS execution stack (see frames.h).
647  static Address c_entry_fp(ThreadLocalTop* thread) {
648  return thread->c_entry_fp_;
649  }
650  static Address handler(ThreadLocalTop* thread) { return thread->handler_; }
651 
653  return &thread_local_top_.c_entry_fp_;
654  }
655  inline Address* handler_address() { return &thread_local_top_.handler_; }
656 
657  // Bottom JS entry.
659  return thread_local_top_.js_entry_sp_;
660  }
662  return &thread_local_top_.js_entry_sp_;
663  }
664 
665  // Generated code scratch locations.
666  void* formal_count_address() { return &thread_local_top_.formal_count_; }
667 
668  // Returns the global object of the current context. It could be
669  // a builtin object, or a JS global object.
672  }
673 
674  // Returns the global proxy object of the current context.
676  return context()->global_proxy();
677  }
678 
680  return Handle<JSBuiltinsObject>(thread_local_top_.context_->builtins());
681  }
682 
683  static int ArchiveSpacePerThread() { return sizeof(ThreadLocalTop); }
685 
686  // This method is called by the api after operations that may throw
687  // exceptions. If an exception was thrown and not handled by an external
688  // handler the exception is scheduled to be rethrown when we return to running
689  // JavaScript code. If an exception is scheduled true is returned.
690  bool OptionalRescheduleException(bool is_bottom_call);
691 
692  // Push and pop a promise and the current try-catch handler.
693  void PushPromise(Handle<JSObject> promise);
694  void PopPromise();
696 
698  public:
699  explicit ExceptionScope(Isolate* isolate) :
700  // Scope currently can only be used for regular exceptions,
701  // not termination exception.
702  isolate_(isolate),
704  catcher_(isolate_->catcher())
705  { }
706 
708  isolate_->set_catcher(catcher_);
710  }
711 
712  private:
716  };
717 
719  bool capture,
720  int frame_limit,
722 
723  void PrintCurrentStackTrace(FILE* out);
724  void PrintStack(StringStream* accumulator);
725  void PrintStack(FILE* out);
727  NO_INLINE(void PushStackTraceAndDie(unsigned int magic,
728  Object* object,
729  Map* map,
730  unsigned int magic2));
732  int frame_limit,
735  Handle<Object> caller);
738  Handle<Object> caller);
739 
740  // Returns if the top context may access the given global object. If
741  // the result is false, the pending exception is guaranteed to be
742  // set.
743 
744  bool MayNamedAccess(Handle<JSObject> receiver,
745  Handle<Object> key,
746  v8::AccessType type);
747  bool MayIndexedAccess(Handle<JSObject> receiver,
748  uint32_t index,
749  v8::AccessType type);
750 
753 
754  // Exception throwing support. The caller should use the result
755  // of Throw() as its return value.
756  Object* Throw(Object* exception, MessageLocation* location = NULL);
757 
758  template <typename T>
760  MessageLocation* location = NULL) {
761  Throw(*exception, location);
762  return MaybeHandle<T>();
763  }
764 
765  // Re-throw an exception. This involves no error reporting since
766  // error reporting was handled when the exception was thrown
767  // originally.
768  Object* ReThrow(Object* exception);
769  void ScheduleThrow(Object* exception);
770  // Re-set pending message, script and positions reported to the TryCatch
771  // back to the TLS for re-use when rethrowing.
773  // Un-schedule an exception that was caught by a TryCatch handler.
775  void ReportPendingMessages();
776  // Return pending location if any or unfilled structure.
779 
780  // Promote a scheduled exception to pending. Asserts has_scheduled_exception.
782  void DoThrow(Object* exception, MessageLocation* location);
783  // Checks if exception should be reported and finds out if it's
784  // caught externally.
785  bool ShouldReportException(bool* can_be_caught_externally,
786  bool catchable_by_javascript);
787 
788  // Attempts to compute the current source location, storing the
789  // result in the target out parameter.
790  void ComputeLocation(MessageLocation* target);
791 
792  // Out of resource exception helpers.
796 
798 
799  // Administration
800  void Iterate(ObjectVisitor* v);
801  void Iterate(ObjectVisitor* v, ThreadLocalTop* t);
802  char* Iterate(ObjectVisitor* v, char* t);
803  void IterateThread(ThreadVisitor* v, char* t);
804 
805 
806  // Returns the current native and global context.
809 
810  // Returns the native context of the calling JavaScript code. That
811  // is, the native context of the top-most JavaScript frame.
813 
816 
817  char* ArchiveThread(char* to);
818  char* RestoreThread(char* from);
819 
820  static const char* const kStackOverflowMessage;
821 
822  static const int kUC16AlphabetSize = 256; // See StringSearchBase.
823  static const int kBMMaxShift = 250; // See StringSearchBase.
824 
825  // Accessors.
826 #define GLOBAL_ACCESSOR(type, name, initialvalue) \
827  inline type name() const { \
828  DCHECK(OFFSET_OF(Isolate, name##_) == name##_debug_offset_); \
829  return name##_; \
830  } \
831  inline void set_##name(type value) { \
832  DCHECK(OFFSET_OF(Isolate, name##_) == name##_debug_offset_); \
833  name##_ = value; \
834  }
836 #undef GLOBAL_ACCESSOR
837 
838 #define GLOBAL_ARRAY_ACCESSOR(type, name, length) \
839  inline type* name() { \
840  DCHECK(OFFSET_OF(Isolate, name##_) == name##_debug_offset_); \
841  return &(name##_)[0]; \
842  }
844 #undef GLOBAL_ARRAY_ACCESSOR
845 
846 #define NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name) \
847  Handle<type> name() { \
848  return Handle<type>(native_context()->name(), this); \
849  } \
850  bool is_##name(type* value) { \
851  return native_context()->is_##name(value); \
852  }
854 #undef NATIVE_CONTEXT_FIELD_ACCESSOR
855 
856  Bootstrapper* bootstrapper() { return bootstrapper_; }
858  // Call InitializeLoggingAndCounters() if logging is needed before
859  // the isolate is fully initialized.
860  DCHECK(counters_ != NULL);
861  return counters_;
862  }
867  // Call InitializeLoggingAndCounters() if logging is needed before
868  // the isolate is fully initialized.
869  DCHECK(logger_ != NULL);
870  return logger_;
871  }
873  Heap* heap() { return &heap_; }
878  ThreadLocalTop* thread_local_top() { return &thread_local_top_; }
881  }
882 
884  return memory_allocator_;
885  }
886 
888  return keyed_lookup_cache_;
889  }
890 
892  return context_slot_cache_;
893  }
894 
897  }
898 
900 
904  }
906 
908  return unicode_cache_;
909  }
910 
913  }
914 
916 
918 
920 
922 
924 
926  return &jsregexp_uncanonicalize_;
927  }
928 
930  return &jsregexp_canonrange_;
931  }
932 
935  }
936 
939  }
940 
942  return &objects_string_iterator_;
943  }
944 
946 
947  Builtins* builtins() { return &builtins_; }
948 
951  }
952 
954 
958  }
959 
961 
965  }
966 
967  Debug* debug() { return debug_; }
968 
969  inline bool DebuggerHasBreakPoints();
970 
973 
974 #ifdef DEBUG
975  HistogramInfo* heap_histograms() { return heap_histograms_; }
976 
977  JSObject::SpillInformation* js_spill_information() {
978  return &js_spill_information_;
979  }
980 #endif
981 
982  Factory* factory() { return reinterpret_cast<Factory*>(this); }
983 
984  static const int kJSRegexpStaticOffsetsVectorSize = 128;
985 
986  THREAD_LOCAL_TOP_ACCESSOR(ExternalCallbackScope*, external_callback_scope)
987 
988  THREAD_LOCAL_TOP_ACCESSOR(StateTag, current_vm_state)
989 
990  void SetData(uint32_t slot, void* data) {
992  embedder_data_[slot] = data;
993  }
994  void* GetData(uint32_t slot) {
996  return embedder_data_[slot];
997  }
998 
999  THREAD_LOCAL_TOP_ACCESSOR(LookupResult*, top_lookup_result)
1000 
1002  // The serializer can only be enabled before the isolate init.
1004  serializer_enabled_ = true;
1005  }
1006 
1007  bool serializer_enabled() const { return serializer_enabled_; }
1008 
1009  bool IsDead() { return has_fatal_error_; }
1011 
1012  bool use_crankshaft() const;
1013 
1015 
1018  }
1019 
1021  return date_cache_;
1022  }
1023 
1025  if (date_cache != date_cache_) {
1026  delete date_cache_;
1027  }
1029  }
1030 
1032 
1034 
1036 
1037  void IterateDeferredHandles(ObjectVisitor* visitor);
1038  void LinkDeferredHandles(DeferredHandles* deferred_handles);
1039  void UnlinkDeferredHandles(DeferredHandles* deferred_handles);
1040 
1041 #ifdef DEBUG
1042  bool IsDeferredHandle(Object** location);
1043 #endif // DEBUG
1044 
1046  // Thread is only available with flag enabled.
1048  FLAG_concurrent_recompilation);
1050  }
1051 
1052  bool concurrent_osr_enabled() const {
1053  // Thread is only available with flag enabled.
1055  FLAG_concurrent_recompilation);
1056  return optimizing_compiler_thread_ != NULL && FLAG_concurrent_osr;
1057  }
1058 
1061  }
1062 
1063  int num_sweeper_threads() const {
1064  return num_sweeper_threads_;
1065  }
1066 
1068  return sweeper_thread_;
1069  }
1070 
1071  int id() const { return static_cast<int>(id_); }
1072 
1073  HStatistics* GetHStatistics();
1074  HStatistics* GetTStatistics();
1075  HTracer* GetHTracer();
1076  CodeTracer* GetCodeTracer();
1077 
1081  }
1082 
1084 
1085  inline base::RandomNumberGenerator* random_number_generator();
1086 
1087  // Given an address occupied by a live code object, return that object.
1089 
1091  int id = next_optimization_id_++;
1094  }
1095  return id;
1096  }
1097 
1098  // Get (and lazily initialize) the registry for per-isolate symbols.
1100 
1104 
1105  void EnqueueMicrotask(Handle<Object> microtask);
1106  void RunMicrotasks();
1107 
1110 
1113 
1114  static Isolate* NewForTesting() { return new Isolate(); }
1115 
1116  private:
1117  Isolate();
1118 
1119  friend struct GlobalState;
1120  friend struct InitializeGlobalState;
1121 
1122  enum State {
1123  UNINITIALIZED, // Some components may not have been allocated.
1124  INITIALIZED // All components are fully initialized.
1125  };
1126 
1127  // These fields are accessed through the API, offsets must be kept in sync
1128  // with v8::internal::Internals (in include/v8.h) constants. This is also
1129  // verified in Isolate::Init() using runtime checks.
1132  State state_; // Will be padded to kApiPointerSize.
1133 
1134  // The per-process lock should be acquired before the ThreadDataTable is
1135  // modified.
1137  public:
1138  ThreadDataTable();
1139  ~ThreadDataTable();
1140 
1141  PerIsolateThreadData* Lookup(Isolate* isolate, ThreadId thread_id);
1142  void Insert(PerIsolateThreadData* data);
1143  void Remove(PerIsolateThreadData* data);
1144  void RemoveAllThreads(Isolate* isolate);
1145 
1146  private:
1148  };
1149 
1150  // These items form a stack synchronously with threads Enter'ing and Exit'ing
1151  // the Isolate. The top of the stack points to a thread which is currently
1152  // running the Isolate. When the stack is empty, the Isolate is considered
1153  // not entered by any thread and can be Disposed.
1154  // If the same thread enters the Isolate more then once, the entry_count_
1155  // is incremented rather then a new item pushed to the stack.
1157  public:
1161  : entry_count(1),
1165 
1170 
1171  private:
1173  };
1174 
1176 
1181 
1182  // A global counter for all generated Isolates, might overflow.
1184 
1185  void Deinit();
1186 
1187  static void SetIsolateThreadLocals(Isolate* isolate,
1188  PerIsolateThreadData* data);
1189 
1190  // Find the PerThread for this particular (isolate, thread) combination.
1191  // If one does not yet exist, allocate a new one.
1193 
1194  // Initializes the current thread to run this Isolate.
1195  // Not thread-safe. Multiple threads should not Enter/Exit the same isolate
1196  // at the same time, this should be prevented using external locking.
1197  void Enter();
1198 
1199  // Exits the current thread. The previosuly entered Isolate is restored
1200  // for the thread.
1201  // Not thread-safe. Multiple threads should not Enter/Exit the same isolate
1202  // at the same time, this should be prevented using external locking.
1203  void Exit();
1204 
1205  void InitializeThreadLocal();
1206 
1207  void MarkCompactPrologue(bool is_compacting,
1208  ThreadLocalTop* archived_thread_data);
1209  void MarkCompactEpilogue(bool is_compacting,
1210  ThreadLocalTop* archived_thread_data);
1211 
1212  void FillCache();
1213 
1214  // Propagate pending exception message to the v8::TryCatch.
1215  // If there is no external try-catch or message was successfully propagated,
1216  // then return true.
1218 
1219  // Traverse prototype chain to find out whether the object is derived from
1220  // the Error object.
1221  bool IsErrorObject(Handle<Object> obj);
1222 
1226  StringStream* incomplete_message_;
1228  Bootstrapper* bootstrapper_;
1233  base::RecursiveMutex break_access_;
1242  ThreadLocalTop thread_local_top_;
1274  base::RandomNumberGenerator* random_number_generator_;
1275 
1276  // Whether the isolate has been created for snapshotting.
1278 
1279  // True if fatal error has been signaled for this isolate.
1281 
1282  // True if this isolate was initialized from a snapshot.
1284 
1285  // Time stamp at initialization.
1287 
1288 #ifdef DEBUG
1289  // A static array of histogram info for each type.
1290  HistogramInfo heap_histograms_[LAST_TYPE + 1];
1291  JSObject::SpillInformation js_spill_information_;
1292 #endif
1293 
1298 
1299 #define GLOBAL_BACKING_STORE(type, name, initialvalue) \
1300  type name##_;
1302 #undef GLOBAL_BACKING_STORE
1303 
1304 #define GLOBAL_ARRAY_BACKING_STORE(type, name, length) \
1305  type name##_[length];
1307 #undef GLOBAL_ARRAY_BACKING_STORE
1308 
1309 #ifdef DEBUG
1310  // This class is huge and has a number of fields controlled by
1311  // preprocessor defines. Make sure the offsets of these fields agree
1312  // between compilation units.
1313 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
1314  static const intptr_t name##_debug_offset_;
1315  ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
1316  ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
1317 #undef ISOLATE_FIELD_OFFSET
1318 #endif
1319 
1324 
1325  // Counts deopt points if deopt_every_n_times is enabled.
1326  unsigned int stress_deopt_count_;
1327 
1329 
1330  // List of callbacks when a Call completes.
1332 
1335 
1336  friend class ExecutionAccess;
1338  friend class IsolateInitializer;
1340  friend class SweeperThread;
1341  friend class ThreadManager;
1342  friend class Simulator;
1343  friend class StackGuard;
1344  friend class ThreadId;
1346  friend class TestCodeRangeScope;
1347  friend class v8::Isolate;
1348  friend class v8::Locker;
1349  friend class v8::Unlocker;
1350 
1352 };
1353 
1354 
1355 #undef FIELD_ACCESSOR
1356 #undef THREAD_LOCAL_TOP_ACCESSOR
1357 
1358 
1360  public:
1364  StackHandler* handler() { return handler_; }
1366  PromiseOnStack* prev() { return prev_; }
1367 
1368  private:
1369  StackHandler* handler_;
1372 };
1373 
1374 
1375 // If the GCC version is 4.1.x or 4.2.x an additional field is added to the
1376 // class as a work around for a bug in the generated code found with these
1377 // versions of GCC. See V8 issue 122 for details.
1378 class SaveContext BASE_EMBEDDED {
1379  public:
1380  inline explicit SaveContext(Isolate* isolate);
1381 
1383  isolate_->set_context(context_.is_null() ? NULL : *context_);
1384  isolate_->set_save_context(prev_);
1385  }
1386 
1387  Handle<Context> context() { return context_; }
1388  SaveContext* prev() { return prev_; }
1389 
1390  // Returns true if this save context is below a given JavaScript frame.
1392  return (c_entry_fp_ == 0) || (c_entry_fp_ > frame->sp());
1393  }
1394 
1395  private:
1396  Isolate* isolate_;
1398  SaveContext* prev_;
1399  Address c_entry_fp_;
1400 };
1401 
1402 
1403 class AssertNoContextChange BASE_EMBEDDED {
1404 #ifdef DEBUG
1405  public:
1406  explicit AssertNoContextChange(Isolate* isolate)
1407  : isolate_(isolate),
1408  context_(isolate->context(), isolate) { }
1409  ~AssertNoContextChange() {
1410  DCHECK(isolate_->context() == *context_);
1411  }
1412 
1413  private:
1414  Isolate* isolate_;
1415  Handle<Context> context_;
1416 #else
1417  public:
1418  explicit AssertNoContextChange(Isolate* isolate) { }
1419 #endif
1420 };
1421 
1422 
1423 class ExecutionAccess BASE_EMBEDDED {
1424  public:
1425  explicit ExecutionAccess(Isolate* isolate) : isolate_(isolate) {
1426  Lock(isolate);
1427  }
1428  ~ExecutionAccess() { Unlock(isolate_); }
1429 
1430  static void Lock(Isolate* isolate) { isolate->break_access()->Lock(); }
1431  static void Unlock(Isolate* isolate) { isolate->break_access()->Unlock(); }
1432 
1433  static bool TryLock(Isolate* isolate) {
1434  return isolate->break_access()->TryLock();
1435  }
1436 
1437  private:
1438  Isolate* isolate_;
1439 };
1440 
1441 
1442 // Support for checking for stack-overflows.
1443 class StackLimitCheck BASE_EMBEDDED {
1444  public:
1445  explicit StackLimitCheck(Isolate* isolate) : isolate_(isolate) { }
1446 
1447  // Use this to check for stack-overflows in C++ code.
1448  inline bool HasOverflowed() const {
1449  StackGuard* stack_guard = isolate_->stack_guard();
1450  return GetCurrentStackPosition() < stack_guard->real_climit();
1451  }
1452 
1453  // Use this to check for stack-overflow when entering runtime from JS code.
1454  bool JsHasOverflowed() const;
1455 
1456  private:
1457  Isolate* isolate_;
1458 };
1459 
1460 
1461 // Support for temporarily postponing interrupts. When the outermost
1462 // postpone scope is left the interrupts will be re-enabled and any
1463 // interrupts that occurred while in the scope will be taken into
1464 // account.
1465 class PostponeInterruptsScope BASE_EMBEDDED {
1466  public:
1468  int intercept_mask = StackGuard::ALL_INTERRUPTS)
1469  : stack_guard_(isolate->stack_guard()),
1470  intercept_mask_(intercept_mask),
1471  intercepted_flags_(0) {
1472  stack_guard_->PushPostponeInterruptsScope(this);
1473  }
1474 
1476  stack_guard_->PopPostponeInterruptsScope();
1477  }
1478 
1479  // Find the bottom-most scope that intercepts this interrupt.
1480  // Return whether the interrupt has been intercepted.
1481  bool Intercept(StackGuard::InterruptFlag flag);
1482 
1483  private:
1484  StackGuard* stack_guard_;
1487  PostponeInterruptsScope* prev_;
1488 
1489  friend class StackGuard;
1490 };
1491 
1492 
1493 class CodeTracer FINAL : public Malloced {
1494  public:
1495  explicit CodeTracer(int isolate_id)
1496  : file_(NULL),
1497  scope_depth_(0) {
1498  if (!ShouldRedirect()) {
1499  file_ = stdout;
1500  return;
1501  }
1502 
1503  if (FLAG_redirect_code_traces_to == NULL) {
1504  SNPrintF(filename_,
1505  "code-%d-%d.asm",
1507  isolate_id);
1508  } else {
1509  StrNCpy(filename_, FLAG_redirect_code_traces_to, filename_.length());
1510  }
1511 
1512  WriteChars(filename_.start(), "", 0, false);
1513  }
1514 
1515  class Scope {
1516  public:
1517  explicit Scope(CodeTracer* tracer) : tracer_(tracer) { tracer->OpenFile(); }
1518  ~Scope() { tracer_->CloseFile(); }
1519 
1520  FILE* file() const { return tracer_->file(); }
1521 
1522  private:
1523  CodeTracer* tracer_;
1524  };
1525 
1526  void OpenFile() {
1527  if (!ShouldRedirect()) {
1528  return;
1529  }
1530 
1531  if (file_ == NULL) {
1532  file_ = base::OS::FOpen(filename_.start(), "a");
1533  }
1534 
1535  scope_depth_++;
1536  }
1537 
1538  void CloseFile() {
1539  if (!ShouldRedirect()) {
1540  return;
1541  }
1542 
1543  if (--scope_depth_ == 0) {
1544  fclose(file_);
1545  file_ = NULL;
1546  }
1547  }
1548 
1549  FILE* file() const { return file_; }
1550 
1551  private:
1552  static bool ShouldRedirect() {
1553  return FLAG_redirect_code_traces;
1554  }
1555 
1557  FILE* file_;
1559 };
1560 
1561 } } // namespace v8::internal
1562 
1563 #endif // V8_ISOLATE_H_
#define BASE_EMBEDDED
Definition: allocation.h:45
Isolate represents an isolated instance of the V8 engine.
Definition: v8.h:4356
void(* UseCounterCallback)(Isolate *isolate, UseCounterFeature feature)
Definition: v8.h:4491
UseCounterFeature
Features reported via the SetUseCounterCallback callback.
Definition: v8.h:4486
StackTraceOptions
Flags that determine what information is placed captured for each StackFrame when grabbing the curren...
Definition: v8.h:1312
An external exception handler.
Definition: v8.h:5271
static void * JSStackComparableAddress(v8::TryCatch *handler)
There are cases when the raw address of C++ TryCatch object cannot be used for comparisons with addre...
Definition: v8.h:5386
Multiple threads in V8 are allowed, but only one thread at a time is allowed to use any given V8 isol...
Definition: v8.h:5677
static FILE * FOpen(const char *path, const char *mode)
static int GetCurrentProcessId()
static double TimeCurrentMillis()
int32_t LocalStorageKey
Definition: platform.h:416
static void * GetThreadLocal(LocalStorageKey key)
static void * GetExistingThreadLocal(LocalStorageKey key)
Definition: platform.h:481
v8::TryCatch * catcher_
Definition: isolate.h:281
PromiseOnStack * promise_on_stack_
Definition: isolate.h:290
ExternalCallbackScope * external_callback_scope_
Definition: isolate.h:298
bool IsBelowFrame(JavaScriptFrame *frame)
Definition: isolate.h:1391
static void Unlock(Isolate *isolate)
Definition: isolate.h:1431
static bool TryLock(Isolate *isolate)
Definition: isolate.h:1433
ExecutionAccess(Isolate *isolate)
Definition: isolate.h:1425
bool HasOverflowed() const
Definition: isolate.h:1448
PostponeInterruptsScope(Isolate *isolate, int intercept_mask=StackGuard::ALL_INTERRUPTS)
Definition: isolate.h:1467
PostponeInterruptsScope * prev_
Definition: isolate.h:1487
SaveContext * prev()
Definition: isolate.h:1388
AssertNoContextChange(Isolate *isolate)
Definition: isolate.h:1418
bool Intercept(StackGuard::InterruptFlag flag)
Object * pending_message_script_
Definition: isolate.h:272
v8::FailedAccessCheckCallback failed_access_check_callback_
Definition: isolate.h:305
StackLimitCheck(Isolate *isolate)
Definition: isolate.h:1445
Handle< Context > context_
Definition: isolate.h:1397
SaveContext(Isolate *isolate)
StackGuard * stack_guard_
Definition: isolate.h:1484
static void Lock(Isolate *isolate)
Definition: isolate.h:1430
LookupResult * top_lookup_result_
Definition: isolate.h:308
Handle< Context > context()
Definition: isolate.h:1387
SaveContext * save_context_
Definition: isolate.h:280
v8::TryCatch * try_catch_handler_
Definition: isolate.h:313
JSObject * global_proxy()
Definition: contexts.cc:64
FILE * file() const
Definition: isolate.h:1520
Scope(CodeTracer *tracer)
Definition: isolate.h:1517
Source to read snapshot and builtins files from.
Definition: lithium-arm.h:372
FILE * file() const
Definition: isolate.h:1549
CodeTracer(int isolate_id)
Definition: isolate.h:1495
EmbeddedVector< char, 128 > filename_
Definition: isolate.h:1556
static bool ShouldRedirect()
Definition: isolate.h:1552
static const uint32_t kNumIsolateDataSlots
Definition: v8.h:5870
PerIsolateThreadData * previous_thread_data
Definition: isolate.h:1167
EntryStackItem(PerIsolateThreadData *previous_thread_data, Isolate *previous_isolate, EntryStackItem *previous_item)
Definition: isolate.h:1158
ExceptionScope(Isolate *isolate)
Definition: isolate.h:699
Handle< Object > pending_exception_
Definition: isolate.h:714
DISALLOW_COPY_AND_ASSIGN(PerIsolateThreadData)
PerIsolateThreadData(Isolate *isolate, ThreadId thread_id)
Definition: isolate.h:408
bool Matches(Isolate *isolate, ThreadId thread_id) const
Definition: isolate.h:435
PerIsolateThreadData * Lookup(Isolate *isolate, ThreadId thread_id)
Definition: isolate.cc:1414
void Remove(PerIsolateThreadData *data)
Definition: isolate.cc:1430
void Insert(PerIsolateThreadData *data)
Definition: isolate.cc:1423
PerIsolateThreadData * list_
Definition: isolate.h:1147
void RemoveAllThreads(Isolate *isolate)
Definition: isolate.cc:1438
void RestorePendingMessageFromTryCatch(v8::TryCatch *handler)
Definition: isolate.cc:871
PerIsolateThreadData * FindPerThreadDataForThread(ThreadId thread_id)
Definition: isolate.cc:141
friend class StackGuard
Definition: isolate.h:1343
double time_millis_at_init_
Definition: isolate.h:1286
UnicodeCache * unicode_cache_
Definition: isolate.h:1252
int stack_trace_for_uncaught_exceptions_frame_limit_
Definition: isolate.h:1244
double time_millis_since_init()
Definition: isolate.h:1016
StackGuard stack_guard_
Definition: isolate.h:1236
StaticResource< ConsStringIteratorOp > * objects_string_iterator()
Definition: isolate.h:941
static void InitializeOncePerProcess()
Definition: isolate.cc:152
bool initialized_from_snapshot_
Definition: isolate.h:1283
MaterializedObjectStore * materialized_object_store()
Definition: isolate.h:879
void UnlinkDeferredHandles(DeferredHandles *deferred_handles)
Definition: isolate.cc:2115
ContextSlotCache * context_slot_cache_
Definition: isolate.h:1248
Handle< GlobalObject > global_object()
Definition: isolate.h:670
StubCache * stub_cache()
Definition: isolate.h:875
CpuProfiler * cpu_profiler_
Definition: isolate.h:1295
BasicBlockProfiler * GetOrCreateBasicBlockProfiler()
Definition: isolate.cc:2365
NO_INLINE(void PushStackTraceAndDie(unsigned int magic, Object *object, Map *map, unsigned int magic2))
bool serializer_enabled() const
Definition: isolate.h:1007
bool concurrent_osr_enabled() const
Definition: isolate.h:1052
void ReportFailedAccessCheck(Handle< JSObject > receiver, v8::AccessType type)
Definition: isolate.cc:634
base::RandomNumberGenerator * random_number_generator_
Definition: isolate.h:1274
bool ShouldReportException(bool *can_be_caught_externally, bool catchable_by_javascript)
Definition: isolate.cc:950
void clear_scheduled_exception()
Definition: isolate.h:631
EntryStackItem * entry_stack_
Definition: isolate.h:1224
Object * ThrowIllegalOperation()
Definition: isolate.cc:852
bool has_installed_extensions_
Definition: isolate.h:1261
Address * js_entry_sp_address()
Definition: isolate.h:661
static base::Thread::LocalStorageKey thread_id_key()
Definition: isolate.h:536
Handle< Object > CaptureSimpleStackTrace(Handle< JSObject > error_object, Handle< Object > caller)
Definition: isolate.cc:335
INLINE(static Isolate *UnsafeCurrent())
Definition: isolate.h:494
RuntimeState * runtime_state()
Definition: isolate.h:945
ConsStringIteratorOp * objects_string_compare_iterator_b()
Definition: isolate.h:937
bool has_installed_extensions()
Definition: isolate.h:953
RegExpStack * regexp_stack_
Definition: isolate.h:1270
static Address c_entry_fp(ThreadLocalTop *thread)
Definition: isolate.h:647
bool has_scheduled_exception()
Definition: isolate.h:627
void MarkCompactPrologue(bool is_compacting, ThreadLocalTop *archived_thread_data)
Object * scheduled_exception()
Definition: isolate.h:622
int id() const
Definition: isolate.h:1071
DeferredHandles * deferred_handles_head_
Definition: isolate.h:1320
void PrintCurrentStackTrace(FILE *out)
Definition: isolate.cc:904
Object * TerminateExecution()
Definition: isolate.cc:789
void CountUsage(v8::Isolate::UseCounterFeature feature)
Definition: isolate.cc:2358
Counters * counters_
Definition: isolate.h:1231
static const char *const kStackOverflowMessage
Definition: isolate.h:820
CodeRange * code_range()
Definition: isolate.h:863
HandleScopeImplementer * handle_scope_implementer()
Definition: isolate.h:901
bool is_catchable_by_javascript(Object *exception)
Definition: isolate.h:639
DateCache * date_cache_
Definition: isolate.h:1271
HandleScopeImplementer * handle_scope_implementer_
Definition: isolate.h:1251
void EnqueueMicrotask(Handle< Object > microtask)
Definition: isolate.cc:2281
bool DebuggerHasBreakPoints()
Definition: isolate-inl.h:28
Object ** scheduled_exception_address()
Definition: isolate.h:605
HeapProfiler * heap_profiler_
Definition: isolate.h:1296
void SetFailedAccessCheckCallback(v8::FailedAccessCheckCallback callback)
Definition: isolate.cc:615
bool PropagatePendingExceptionToExternalTryCatch()
Definition: isolate.cc:1777
StackGuard * stack_guard()
Definition: isolate.h:872
void clear_pending_message()
Definition: isolate.h:588
HandleScopeData handle_scope_data_
Definition: isolate.h:1250
static const int kUC16AlphabetSize
Definition: isolate.h:822
CallInterfaceDescriptorData * call_descriptor_data(int index)
Definition: isolate.cc:2208
FunctionEntryHook function_entry_hook_
Definition: isolate.h:1297
Object ** pending_exception_address()
Definition: isolate.h:577
unibrow::Mapping< unibrow::CanonicalizationRange > * jsregexp_canonrange()
Definition: isolate.h:929
Handle< Context > GetCallingNativeContext()
Definition: isolate.cc:1349
RuntimeProfiler * runtime_profiler()
Definition: isolate.h:864
static const int kBMMaxShift
Definition: isolate.h:823
OptimizingCompilerThread * optimizing_compiler_thread_
Definition: isolate.h:1321
Object * FindCodeObject(Address a)
Definition: isolate.cc:2214
bool MayIndexedAccess(Handle< JSObject > receiver, uint32_t index, v8::AccessType type)
Definition: isolate.cc:736
void CaptureAndSetSimpleStackTrace(Handle< JSObject > error_object, Handle< Object > caller)
Definition: isolate.cc:430
void * GetData(uint32_t slot)
Definition: isolate.h:994
static base::Thread::LocalStorageKey per_isolate_thread_data_key_
Definition: isolate.h:1177
friend class Simulator
Definition: isolate.h:1342
FunctionEntryHook function_entry_hook()
Definition: isolate.h:1078
bool * external_caught_exception_address()
Definition: isolate.h:599
unibrow::Mapping< unibrow::CanonicalizationRange > jsregexp_canonrange_
Definition: isolate.h:1264
static base::Thread::LocalStorageKey isolate_key()
Definition: isolate.h:531
void UnregisterTryCatchHandler(v8::TryCatch *that)
Definition: isolate.cc:249
Handle< Context > native_context()
Definition: isolate.cc:1339
Object * pending_exception()
Definition: isolate.h:561
void RemoveCallCompletedCallback(CallCompletedCallback callback)
Definition: isolate.cc:2256
void InitializeThreadLocal()
Definition: isolate.cc:1771
void * stress_deopt_count_address()
Definition: isolate.h:1083
static void GlobalTearDown()
Definition: isolate.cc:1585
void PrintStack(StringStream *accumulator)
Definition: isolate.cc:587
void set_date_cache(DateCache *date_cache)
Definition: isolate.h:1024
DeoptimizerData * deoptimizer_data()
Definition: isolate.h:877
void enable_serializer()
Definition: isolate.h:1001
static ThreadDataTable * thread_data_table_
Definition: isolate.h:1180
CompilationCache * compilation_cache_
Definition: isolate.h:1230
void CancelTerminateExecution()
Definition: isolate.cc:795
InnerPointerToCodeCache * inner_pointer_to_code_cache_
Definition: isolate.h:1254
DISALLOW_COPY_AND_ASSIGN(Isolate)
Object * ReThrow(Object *exception)
Definition: isolate.cc:838
BasicBlockProfiler * basic_block_profiler_
Definition: isolate.h:1334
PerIsolateThreadData * FindPerThreadDataForThisThread()
Definition: isolate.cc:135
void CancelScheduledExceptionFromTryCatch(v8::TryCatch *handler)
Definition: isolate.cc:887
void * embedder_data_[Internals::kNumIsolateDataSlots]
Definition: isolate.h:1130
DateCache * date_cache()
Definition: isolate.h:1020
Builtins * builtins()
Definition: isolate.h:947
static base::Thread::LocalStorageKey thread_id_key_
Definition: isolate.h:1179
ConsStringIteratorOp * write_iterator_
Definition: isolate.h:1255
void ScheduleThrow(Object *exception)
Definition: isolate.cc:858
int stack_trace_nesting_level_
Definition: isolate.h:1225
Handle< String > StackTraceString()
Definition: isolate.cc:256
bool initialized_from_snapshot()
Definition: isolate.h:1014
ConsStringIteratorOp objects_string_compare_iterator_a_
Definition: isolate.h:1265
HeapProfiler * heap_profiler() const
Definition: isolate.h:972
MemoryAllocator * memory_allocator()
Definition: isolate.h:883
KeyedLookupCache * keyed_lookup_cache()
Definition: isolate.h:887
SweeperThread ** sweeper_thread_
Definition: isolate.h:1322
friend class IsolateInitializer
Definition: isolate.h:1338
StubCache * stub_cache_
Definition: isolate.h:1238
void PushToPartialSnapshotCache(Object *obj)
Definition: isolate.cc:1656
void SetUseCounterCallback(v8::Isolate::UseCounterCallback callback)
Definition: isolate.cc:2352
static base::Atomic32 isolate_counter_
Definition: isolate.h:1183
void SetCaptureStackTraceForUncaughtExceptions(bool capture, int frame_limit, StackTrace::StackTraceOptions options)
Definition: isolate.cc:1329
static int ArchiveSpacePerThread()
Definition: isolate.h:683
HStatistics * GetTStatistics()
Definition: isolate.cc:2142
ThreadManager * thread_manager_
Definition: isolate.h:1258
void IterateThread(ThreadVisitor *v, char *t)
Definition: isolate.cc:174
void set_context(Context *context)
Definition: isolate.h:549
CodeAgingHelper * code_aging_helper_
Definition: isolate.h:1239
UnicodeCache * unicode_cache()
Definition: isolate.h:907
static PerIsolateThreadData * CurrentPerIsolateThreadData()
Definition: isolate.h:474
void * formal_count_address()
Definition: isolate.h:666
HTracer * GetHTracer()
Definition: isolate.cc:2148
Address js_entry_sp()
Definition: isolate.h:658
Address isolate_addresses_[kIsolateAddressCount+1]
Definition: isolate.h:1227
char * RestoreThread(char *from)
Definition: isolate.cc:1380
void FreeThreadResources()
Definition: isolate.h:684
void Iterate(ObjectVisitor *v)
Definition: isolate.cc:206
void InitializeLoggingAndCounters()
Definition: isolate.cc:1818
DescriptorLookupCache * descriptor_lookup_cache()
Definition: isolate.h:895
HandleScopeData * handle_scope_data()
Definition: isolate.h:899
char * ArchiveThread(char *to)
Definition: isolate.cc:1369
Object * Throw(Object *exception, MessageLocation *location=NULL)
Definition: isolate.cc:832
Context * context()
Definition: isolate.h:548
Handle< JSBuiltinsObject > js_builtins_object()
Definition: isolate.h:679
BasicBlockProfiler * basic_block_profiler()
Definition: isolate.h:1112
static base::Thread::LocalStorageKey isolate_key_
Definition: isolate.h:1178
GlobalHandles * global_handles_
Definition: isolate.h:1256
StringTracker * string_tracker_
Definition: isolate.h:1262
Handle< Context > global_context()
Definition: isolate.cc:1344
RegExpStack * regexp_stack()
Definition: isolate.h:960
v8::TryCatch * try_catch_handler()
Definition: isolate.h:593
PerIsolateThreadData * FindOrAllocatePerThreadDataForThisThread()
Definition: isolate.cc:119
void FireCallCompletedCallback()
Definition: isolate.cc:2265
Counters * counters()
Definition: isolate.h:857
InnerPointerToCodeCache * inner_pointer_to_code_cache()
Definition: isolate.h:911
CodeAgingHelper * code_aging_helper()
Definition: isolate.h:876
static void SetIsolateThreadLocals(Isolate *isolate, PerIsolateThreadData *data)
Definition: isolate.cc:1676
ContextSlotCache * context_slot_cache()
Definition: isolate.h:891
void IterateDeferredHandles(ObjectVisitor *visitor)
Definition: isolate.cc:212
void ReportPendingMessages()
Definition: isolate.cc:1194
Address get_address_from_id(AddressId id)
Definition: isolate.cc:162
MessageLocation GetMessageLocation()
Definition: isolate.cc:1226
OptimizingCompilerThread * optimizing_compiler_thread()
Definition: isolate.h:1059
ThreadLocalTop * thread_local_top()
Definition: isolate.h:878
unibrow::Mapping< unibrow::Ecma262UnCanonicalize > jsregexp_uncanonicalize_
Definition: isolate.h:1263
INLINE(static Isolate *UncheckedCurrent())
Definition: isolate.h:487
void CaptureAndSetDetailedStackTrace(Handle< JSObject > error_object)
Definition: isolate.cc:418
unibrow::Mapping< unibrow::Ecma262Canonicalize > interp_canonicalize_mapping_
Definition: isolate.h:1272
ThreadManager * thread_manager()
Definition: isolate.h:921
bool HasExternalTryCatch()
Definition: isolate.cc:1157
HStatistics * GetHStatistics()
Definition: isolate.cc:2136
CodeTracer * GetCodeTracer()
Definition: isolate.cc:2154
unibrow::Mapping< unibrow::Ecma262Canonicalize > regexp_macro_assembler_canonicalize_
Definition: isolate.h:1269
void SetData(uint32_t slot, void *data)
Definition: isolate.h:990
base::RandomNumberGenerator * random_number_generator()
Definition: isolate-inl.h:33
StackTrace::StackTraceOptions stack_trace_for_uncaught_exceptions_options_
Definition: isolate.h:1245
base::Atomic32 debugger_initialized_
Definition: isolate.h:1234
void MarkCompactEpilogue(bool is_compacting, ThreadLocalTop *archived_thread_data)
void AddCallCompletedCallback(CallCompletedCallback callback)
Definition: isolate.cc:2248
StringStream * incomplete_message_
Definition: isolate.h:1226
ConsStringIteratorOp * objects_string_compare_iterator_a()
Definition: isolate.h:933
unibrow::Mapping< unibrow::Ecma262Canonicalize > * interp_canonicalize_mapping()
Definition: isolate.h:963
void PushPromise(Handle< JSObject > promise)
Definition: isolate.cc:1287
Handle< JSObject > GetSymbolRegistry()
Definition: isolate.cc:2228
bool use_crankshaft() const
Definition: isolate.cc:2174
unibrow::Mapping< unibrow::Ecma262UnCanonicalize > * jsregexp_uncanonicalize()
Definition: isolate.h:925
Handle< JSArray > CaptureCurrentStackTrace(int frame_limit, StackTrace::StackTraceOptions options)
Definition: isolate.cc:439
DescriptorLookupCache * descriptor_lookup_cache_
Definition: isolate.h:1249
Address try_catch_handler_address()
Definition: isolate.h:596
Handle< Object > GetPromiseOnStackOnThrow()
Definition: isolate.cc:1308
static Isolate * NewForTesting()
Definition: isolate.h:1114
unibrow::Mapping< unibrow::Ecma262Canonicalize > * regexp_macro_assembler_canonicalize()
Definition: isolate.h:956
static Address handler(ThreadLocalTop *thread)
Definition: isolate.h:650
void set_pending_exception(Object *exception_obj)
Definition: isolate.h:567
unsigned int stress_deopt_count_
Definition: isolate.h:1326
KeyedLookupCache * keyed_lookup_cache_
Definition: isolate.h:1247
CodeRange * code_range_
Definition: isolate.h:1232
friend struct InitializeGlobalState
Definition: isolate.h:1120
void set_function_entry_hook(FunctionEntryHook function_entry_hook)
Definition: isolate.h:1079
INLINE(static Isolate *Current())
Definition: isolate.h:480
Address pending_message_obj_address()
Definition: isolate.h:609
DeoptimizerData * deoptimizer_data_
Definition: isolate.h:1240
MUST_USE_RESULT MaybeHandle< T > Throw(Handle< Object > exception, MessageLocation *location=NULL)
Definition: isolate.h:759
MemoryAllocator * memory_allocator_
Definition: isolate.h:1246
Object * PromoteScheduledException()
Definition: isolate.cc:896
StringTracker * string_tracker()
Definition: isolate.h:923
Context ** context_address()
Definition: isolate.h:553
JSObject * global_proxy()
Definition: isolate.h:675
bool Init(Deserializer *des)
Definition: isolate.cc:1828
bool concurrent_recompilation_enabled()
Definition: isolate.h:1045
List< CallCompletedCallback > call_completed_callbacks_
Definition: isolate.h:1331
void clear_pending_exception()
Definition: isolate.h:572
ThreadLocalTop thread_local_top_
Definition: isolate.h:1242
void LinkDeferredHandles(DeferredHandles *deferred_handles)
Definition: isolate.cc:2106
CompilationCache * compilation_cache()
Definition: isolate.h:865
MaterializedObjectStore * materialized_object_store_
Definition: isolate.h:1241
void NotifyExtensionInstalled()
Definition: isolate.h:949
base::RecursiveMutex break_access_
Definition: isolate.h:1233
StaticResource< ConsStringIteratorOp > objects_string_iterator_
Definition: isolate.h:1267
base::Atomic32 id_
Definition: isolate.h:1223
Address * handler_address()
Definition: isolate.h:655
friend class TestCodeRangeScope
Definition: isolate.h:1346
StatsTable * stats_table_
Definition: isolate.h:1237
bool MayNamedAccess(Handle< JSObject > receiver, Handle< Object > key, v8::AccessType type)
Definition: isolate.cc:697
void DoThrow(Object *exception, MessageLocation *location)
Definition: isolate.cc:1003
Address pending_message_script_address()
Definition: isolate.h:617
Zone * runtime_zone()
Definition: isolate.h:905
void ComputeLocation(MessageLocation *target)
Definition: isolate.cc:932
RuntimeProfiler * runtime_profiler_
Definition: isolate.h:1229
friend class ExecutionAccess
Definition: isolate.h:1336
static base::Thread::LocalStorageKey per_isolate_thread_data_key()
ConsStringIteratorOp * write_iterator()
Definition: isolate.h:915
CpuProfiler * cpu_profiler() const
Definition: isolate.h:971
CallInterfaceDescriptorData * call_descriptor_data_
Definition: isolate.h:1273
static const int kJSRegexpStaticOffsetsVectorSize
Definition: isolate.h:984
int num_sweeper_threads() const
Definition: isolate.h:1063
bool IsErrorObject(Handle< Object > obj)
Definition: isolate.cc:981
Address * c_entry_fp_address()
Definition: isolate.h:652
friend struct GlobalState
Definition: isolate.h:1119
ConsStringIteratorOp objects_string_compare_iterator_b_
Definition: isolate.h:1266
bool IsFastArrayConstructorPrototypeChainIntact()
Definition: isolate.cc:2181
bool capture_stack_trace_for_uncaught_exceptions_
Definition: isolate.h:1243
StatsTable * stats_table()
Definition: isolate.cc:2039
friend class TestMemoryAllocatorScope
Definition: isolate.h:1345
Object * StackOverflow()
Definition: isolate.cc:773
base::RecursiveMutex * break_access()
Definition: isolate.h:543
bool OptionalRescheduleException(bool is_bottom_call)
Definition: isolate.cc:1244
void RegisterTryCatchHandler(v8::TryCatch *that)
Definition: isolate.cc:244
void InvokeApiInterruptCallback()
Definition: isolate.cc:812
Logger * logger()
Definition: isolate.h:866
EternalHandles * eternal_handles()
Definition: isolate.h:919
Bootstrapper * bootstrapper_
Definition: isolate.h:1228
Factory * factory()
Definition: isolate.h:982
static base::LazyMutex thread_data_table_mutex_
Definition: isolate.h:1175
SweeperThread ** sweeper_threads()
Definition: isolate.h:1067
GlobalHandles * global_handles()
Definition: isolate.h:917
v8::Isolate::UseCounterCallback use_counter_callback_
Definition: isolate.h:1333
Map * get_initial_js_array_map(ElementsKind kind)
Definition: isolate.cc:2160
Address has_pending_message_address()
Definition: isolate.h:613
EternalHandles * eternal_handles_
Definition: isolate.h:1257
RuntimeState runtime_state_
Definition: isolate.h:1259
Bootstrapper * bootstrapper()
Definition: isolate.h:856
bool has_pending_exception()
Definition: isolate.h:581
StackHandler * handler()
Definition: isolate.h:1364
StackHandler * handler_
Definition: isolate.h:1369
PromiseOnStack * prev()
Definition: isolate.h:1366
PromiseOnStack * prev_
Definition: isolate.h:1371
PromiseOnStack(StackHandler *handler, Handle< JSObject > promise, PromiseOnStack *prev)
Definition: isolate.h:1361
Handle< JSObject > promise_
Definition: isolate.h:1370
Handle< JSObject > promise()
Definition: isolate.h:1365
static bool IsValid(intptr_t value)
Definition: objects-inl.h:1334
static ThreadId Invalid()
Definition: isolate.h:188
INLINE(bool IsValid() const)
Definition: isolate.h:196
static int AllocateThreadId()
Definition: isolate.cc:45
static const int kInvalidId
Definition: isolate.h:209
int ToInteger() const
Definition: isolate.h:202
static ThreadId Current()
Definition: isolate.h:185
static int GetCurrentThreadId()
Definition: isolate.cc:51
static ThreadId FromInteger(int id)
Definition: isolate.h:206
static base::Atomic32 highest_thread_id_
Definition: isolate.h:219
INLINE(bool Equals(const ThreadId &other) const)
Definition: isolate.h:191
#define NATIVE_CONTEXT_FIELDS(V)
Definition: contexts.h:76
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf map
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot A filename with extra code to be included in the A file to write the raw snapshot bytes to(mksnapshot only)") DEFINE_STRING(raw_context_file
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define GLOBAL_ARRAY_BACKING_STORE(type, name, length)
Definition: isolate.h:1304
#define NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name)
Definition: isolate.h:846
#define ISOLATE_INIT_ARRAY_LIST(V)
Definition: isolate.h:345
#define GLOBAL_ARRAY_ACCESSOR(type, name, length)
Definition: isolate.h:838
#define GLOBAL_ACCESSOR(type, name, initialvalue)
Definition: isolate.h:826
#define THREAD_LOCAL_TOP_ACCESSOR(type, name)
Definition: isolate.h:390
#define FIELD_ACCESSOR(type, name)
Definition: isolate.h:225
#define ISOLATE_INIT_LIST(V)
Definition: isolate.h:356
#define GLOBAL_BACKING_STORE(type, name, initialvalue)
Definition: isolate.h:1299
#define DECLARE_ENUM(CamelName, hacker_name)
Definition: isolate.h:464
#define FOR_EACH_ISOLATE_ADDRESS_NAME(C)
Definition: isolate.h:169
#define DCHECK(condition)
Definition: logging.h:205
#define MUST_USE_RESULT
Definition: macros.h:266
int int32_t
Definition: unicode.cc:24
int32_t Atomic32
Definition: atomicops.h:44
void StrNCpy(Vector< char > dest, const char *src, size_t n)
Definition: utils.cc:119
int SNPrintF(Vector< char > str, const char *format,...)
Definition: utils.cc:105
DISABLE_ASAN uintptr_t GetCurrentStackPosition()
Definition: utils.h:1460
int WriteChars(const char *filename, const char *str, int size, bool verbose)
Definition: utils.cc:290
ZoneList< Handle< Object > > ZoneObjectList
Definition: ast.h:144
byte * Address
Definition: globals.h:101
kFeedbackVectorOffset flag
Definition: objects-inl.h:5418
void * ExternalReferenceRedirectorPointer()
Definition: isolate.h:77
List< HeapObject * > DebugObjectCache
Definition: isolate.h:354
Debugger support for the V8 JavaScript engine.
Definition: accessors.cc:20
void(* FailedAccessCheckCallback)(Local< Object > target, AccessType type, Local< Value > data)
Definition: v8.h:4182
void(* CallCompletedCallback)()
Definition: v8.h:4176
void(* FunctionEntryHook)(uintptr_t function, uintptr_t return_addr_location)
FunctionEntryHook is the type of the profile entry hook called at entry to any generated function whe...
Definition: v8.h:4263
AccessType
Access type specification.
Definition: v8.h:3519