38 #if defined(BUILDING_V8_SHARED) && defined(USING_V8_SHARED)
39 #error both BUILDING_V8_SHARED and USING_V8_SHARED are set - please check the
40 build configuration to ensure that at most one of these is set
43 #ifdef BUILDING_V8_SHARED
44 # define V8_EXPORT __declspec(dllexport)
46 # define V8_EXPORT __declspec(dllimport)
54 #if V8_HAS_ATTRIBUTE_VISIBILITY
55 # ifdef BUILDING_V8_SHARED
56 # define V8_EXPORT __attribute__ ((visibility("default")))
84 class ImplementationUtilities;
94 class ObjectOperationDescriptor;
101 class RawOperationDescriptor;
116 template <
class T>
class Local;
119 template <
class T>
class Eternal;
120 template<
class T>
class NonCopyablePersistentTraits;
122 template <
class T,
class M = NonCopyablePersistentTraits<T> >
127 template <
class K,
class V,
class T>
129 template <
class K,
class V,
class T>
132 template<
class T,
class P>
class WeakCallbackObject;
141 class CallHandlerHelper;
155 struct StreamedSource;
157 class PropertyCallbackArguments;
158 class FunctionCallbackArguments;
172 return data_ == other.data_;
176 return data_ != other.data_;
180 return data_ < other.data_;
189 #define TYPE_CHECK(T, S)
191 *(static_cast<T* volatile*>(0
)) = static_cast<S*>(0
);
226 : val_(
reinterpret_cast<T*>(*that)) {
259 if (a == 0)
return b == 0;
260 if (b == 0)
return false;
268 if (a == 0)
return b == 0;
269 if (b == 0)
return false;
281 return !operator==(that);
286 return !operator==(that);
290 #ifdef V8_ENABLE_CHECKS
293 if (that.IsEmpty())
return Local<T>();
295 return Local<T>(T::Cast(*that));
300 return Local<S>::Cast(*
this);
317 template<
class F>
friend class Local;
333 template <
class F1,
class F2,
class F3>
339 explicit V8_INLINE Local(T* that) : val_(that) {}
345 #if !defined(V8_IMMINENT_DEPRECATION_WARNINGS)
368 : val_(
reinterpret_cast<T*>(*that)) {
376 out->val_ =
IsEmpty() ?
nullptr :
this->val_;
399 Set(isolate, handle);
407 static const int kInitialValue = -1;
412 static const int kInternalFieldsInWeakCallback = 2;
415 template <
typename T>
421 void* internal_fields[kInternalFieldsInWeakCallback],
423 : isolate_(isolate), parameter_(parameter), callback_(callback) {
424 for (
int i = 0; i < kInternalFieldsInWeakCallback; ++i) {
425 internal_fields_[i] = internal_fields[i];
434 void* GetInternalField1()
const) {
435 return internal_fields_[0];
438 void* GetInternalField2()
const) {
439 return internal_fields_[1];
443 bool IsFirstPass()
const) {
444 return callback_ !=
nullptr;
459 void* internal_fields_[kInternalFieldsInWeakCallback];
518 return Local<T>::New(isolate, *
this);
525 if (a == NULL)
return b == NULL;
526 if (b == NULL)
return false;
534 if (a == NULL)
return b == NULL;
535 if (b == NULL)
return false;
541 return !operator==(that);
546 return !operator==(that);
556 template <
typename P>
607 "deprecated optimization, do not use partially dependent groups",
608 void MarkPartiallyDependent());
643 template<
class F>
friend class Local;
649 template <
class F1,
class F2,
class F3>
654 explicit V8_INLINE PersistentBase(T* val) : val_(val) {}
668 class NonCopyablePersistentTraits {
672 template<
class S,
class M>
692 template<
class S,
class M>
729 template <
class S,
class M2>
743 template <
class S,
class M2>
751 template <
class S,
class M2>
762 if (M::kResetInDestructor)
this->Reset();
768 #ifdef V8_ENABLE_CHECKS
771 if (!that.IsEmpty()) T::Cast(*that);
785 template<
class F>
friend class Local;
790 V8_INLINE T* operator*()
const {
return this->val_; }
791 template<
class S,
class M2>
832 other.val_ =
nullptr;
843 this->val_ = rhs.val_;
864 V8_INLINE T* operator*()
const {
return this->val_; }
899 return reinterpret_cast<
Isolate*>(isolate_);
925 template<
class F>
friend class Local;
950 Escape(
reinterpret_cast<
internal::Object**>(*value));
951 return Local<T>(
reinterpret_cast<T*>(slot));
977 int prev_sealed_level_;
999 bool is_shared_cross_origin =
false,
1000 bool is_opaque =
false)
1001 : flags_((is_embedder_debug_script ? kIsEmbedderDebugScript : 0) |
1002 (is_shared_cross_origin ? kIsSharedCrossOrigin : 0) |
1003 (is_opaque ? kIsOpaque : 0)) {}
1006 (kIsEmbedderDebugScript | kIsSharedCrossOrigin | kIsOpaque)) {}
1008 return (flags_ & kIsEmbedderDebugScript) != 0;
1011 return (flags_ & kIsSharedCrossOrigin) != 0;
1013 bool IsOpaque()
const {
return (flags_ & kIsOpaque) != 0; }
1018 kIsEmbedderDebugScript = 1,
1019 kIsSharedCrossOrigin = 1 << 1,
1142 "Use maybe version",
1375 "Use maybe version",
1461 size_t context_extension_count,
1465 Local<
String> arguments[], size_t context_extension_count,
1800 PrivateData* private_;
1887 PrivateData* private_;
2264 V8_INLINE bool QuickIsUndefined()
const;
2267 bool FullIsUndefined()
const;
2268 bool FullIsNull()
const;
2269 bool FullIsString()
const;
2290 static void CheckCast(
v8::
Value* obj);
2310 static void CheckCast(
v8::
Value* obj);
2402 int* nchars_ref = NULL,
2463 virtual const uint16_t*
data()
const = 0;
2493 virtual const char*
data()
const = 0;
2530 "Use maybe version",
2543 "Use maybe version",
2556 "Use maybe version",
2607 "Use maybe version",
2680 static void CheckCast(
v8::
Value* obj);
2719 static void CheckCast(
v8::
Value* obj);
2761 static void CheckCast(
v8::
Value* obj);
2776 static void CheckCast(
v8::
Value* obj);
2790 static void CheckCast(
v8::
Value* obj);
2804 static void CheckCast(
v8::
Value* obj);
2903 bool Set(uint32_t index,
Local<
Value> value));
3197 bool HasRealIndexedProperty(uint32_t index));
3201 bool HasRealNamedCallbackProperty(
Local<
String> key));
3210 "Use maybe version",
3221 "Use maybe version",
3327 static void CheckCast(
Value* obj);
3328 Local<
Value> SlowGetInternalField(
int index);
3329 void* SlowGetAlignedPointerFromInternalField(
int index);
3359 static void CheckCast(
Value* obj);
3395 static void CheckCast(
Value* obj);
3427 static void CheckCast(
Value* obj);
3431 template<
typename T>
3435 : value_(that.value_) {
3439 template <
typename S>
3442 template <
typename S>
3444 template <
typename S>
3459 template <
typename S>
3471 template <
class F,
class G,
class H>
3486 template<
typename T>
3516 internal::Object** values,
int length);
3527 template<
typename T>
3619 friend class MacroAssembler;
3653 "Use maybe version",
3731 static void CheckCast(
Value* obj);
3772 static void CheckCast(
Value* obj);
3801 static void CheckCast(
Value* obj);
3874 PrivateData* private_;
3899 static void CheckCast(
Value* obj);
3912 WasmCompiledModule();
3913 static void CheckCast(
Value* obj);
3916 #ifndef V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT
3918 #define V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT 2
3966 virtual void Free(
void* data, size_t length) = 0;
3990 void*
Data()
const {
return data_; }
3995 size_t byte_length_;
4021 Isolate* isolate,
void* data, size_t byte_length,
4072 static void CheckCast(
Value* obj);
4076 #ifndef V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT
4078 #define V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT 2
4127 static void CheckCast(
Value* obj);
4148 static void CheckCast(
Value* obj);
4159 size_t byte_offset, size_t length);
4161 size_t byte_offset, size_t length);
4166 static void CheckCast(
Value* obj);
4177 size_t byte_offset, size_t length);
4184 Uint8ClampedArray();
4185 static void CheckCast(
Value* obj);
4195 size_t byte_offset, size_t length);
4197 size_t byte_offset, size_t length);
4202 static void CheckCast(
Value* obj);
4213 size_t byte_offset, size_t length);
4215 size_t byte_offset, size_t length);
4220 static void CheckCast(
Value* obj);
4231 size_t byte_offset, size_t length);
4233 size_t byte_offset, size_t length);
4238 static void CheckCast(
Value* obj);
4249 size_t byte_offset, size_t length);
4251 size_t byte_offset, size_t length);
4256 static void CheckCast(
Value* obj);
4267 size_t byte_offset, size_t length);
4269 size_t byte_offset, size_t length);
4274 static void CheckCast(
Value* obj);
4285 size_t byte_offset, size_t length);
4287 size_t byte_offset, size_t length);
4292 static void CheckCast(
Value* obj);
4303 size_t byte_offset, size_t length);
4305 size_t byte_offset, size_t length);
4310 static void CheckCast(
Value* obj);
4321 size_t byte_offset, size_t length);
4323 size_t byte_offset, size_t length);
4328 static void CheckCast(
Value* obj);
4353 void*
Data()
const {
return data_; }
4358 size_t byte_length_;
4384 Isolate* isolate,
void* data, size_t byte_length,
4426 SharedArrayBuffer();
4427 static void CheckCast(
Value* obj);
4464 static void CheckCast(
v8::
Value* obj);
4480 static void CheckCast(
v8::
Value* obj);
4497 static void CheckCast(
v8::
Value* obj);
4513 static void CheckCast(
v8::
Value* obj);
4531 static void CheckCast(
v8::
Value* obj);
4584 static void CheckCast(
v8::
Value* obj);
4598 static void CheckCast(
v8::
Value* obj);
4602 #define V8_INTRINSICS_LIST(F) F(ArrayProto_values, array_values_iterator)
4605 #define V8_DECL_INTRINSIC(name, iname) k##name,
4607 #undef V8_DECL_INTRINSIC
5448 deleter
, enumerator
, data
));
5561 AccessorSignature();
5572 : data_(data), length_(length) {}
5573 const char*
data()
const {
return data_; }
5589 const char* source = 0,
5591 const char** deps = 0,
5592 int source_length = -1);
5599 const char*
name()
const {
return name_; }
5614 size_t source_length_;
5658 uint64_t virtual_memory_limit);
5662 max_semi_space_size_ = limit_in_mb;
5666 max_old_space_size_ = limit_in_mb;
5670 max_executable_size_ = limit_in_mb;
5677 code_range_size_ = limit_in_mb;
5681 int max_semi_space_size_;
5682 int max_old_space_size_;
5683 int max_executable_size_;
5684 uint32_t* stack_limit_;
5685 size_t code_range_size_;
5775 : promise_(promise),
5778 stack_trace_(stack_trace) {}
5786 return stack_trace_;
5931 size_t total_heap_size_;
5932 size_t total_heap_size_executable_;
5933 size_t total_physical_size_;
5934 size_t total_available_size_;
5935 size_t used_heap_size_;
5936 size_t heap_size_limit_;
5937 size_t malloced_memory_;
5938 size_t peak_malloced_memory_;
5939 bool does_zap_garbage_;
5956 const char* space_name_;
5958 size_t space_used_size_;
5959 size_t space_available_size_;
5960 size_t physical_space_size_;
5975 const char* object_type_;
5976 const char* object_sub_type_;
5977 size_t object_count_;
5978 size_t object_size_;
5990 size_t code_and_metadata_size_;
5991 size_t bytecode_and_metadata_size_;
6011 uintptr_t return_addr_location);
6134 uint16_t class_id) {}
6175 const std::vector<std::pair<
void*,
void*> >& internal_fields) = 0;
6366 void* internal_throws_;
6367 void* internal_assert_;
6605 size_t frames_limit,
SampleInfo* sample_info);
6658 "Calling context concept is not compatible with tail calls, and will be "
6703 template<
typename T,
typename S>
6834 "Use callback with parameter",
6842 "Use callback with parameter",
6843 void RemoveCallCompletedCallback(
6874 void SetAutorunMicrotasks(
bool autorun));
6881 bool WillAutorunMicrotasks()
const);
6939 bool IdleNotification(
int idle_time_in_ms));
7074 bool capture,
int frame_limit = 10,
7120 template <
class K,
class V,
class Traits>
7126 void ReportExternalAllocationLimitReached();
7155 typedef uintptr_t (*ReturnAddressLocationResolver)(
7156 uintptr_t return_addr_location);
7166 "Use isolate version",
7174 "Use isolate version",
void SetAllowCodeGenerationFromStringsCallback(
7218 const char* warmup_source);
7230 "Use isolate version",
7238 "Use isolate version",
void RemoveMessageListeners(
MessageCallback that));
7245 "Use isolate version",
7246 void SetCaptureStackTraceForUncaughtExceptions(
7247 bool capture,
int frame_limit = 10,
7267 "Use isolate version",
7281 "Use isolate version",
7282 void AddGCPrologueCallback(
GCCallback callback,
7290 "Use isolate version",
7291 void RemoveGCPrologueCallback(
GCCallback callback));
7304 "Use isolate version",
7305 void AddGCEpilogueCallback(
GCCallback callback,
7313 "Use isolate version",
7314 void RemoveGCEpilogueCallback(
GCCallback callback));
7333 ReturnAddressLocationResolver return_address_resolver);
7345 void TerminateExecution(
Isolate* isolate));
7358 "Use isolate version",
7359 bool IsExecutionTerminating(
Isolate* isolate = NULL));
7378 "Use isolate version",
void CancelTerminateExecution(
Isolate* isolate));
7397 "Use isolate version",
7405 "Use isolate version",
7413 "Use isolate version",
7414 void VisitHandlesWithClassIds(
Isolate* isolate,
7425 "Use isolate version",
7426 void VisitHandlesForPartialDependence(
Isolate* isolate,
7437 "Use version with default location.",
7438 static bool InitializeICU(
const char* icu_data_file =
nullptr));
7453 const char* icu_data_file =
nullptr);
7473 const char* snapshot_blob);
7492 static void DisposeGlobal(
internal::Object** global_handle);
7493 static void MakeWeak(
internal::Object** location,
void* data,
7496 static void MakeWeak(
internal::Object** location,
void* data,
7498 int internal_field_index1,
7500 int internal_field_index2,
7502 static void MakeWeak(
internal::Object*** location_addr);
7503 static void* ClearWeak(
internal::Object** location);
7504 static void Eternalize(
Isolate* isolate,
7509 template <
class K,
class V,
class T>
7512 static void FromJustIsNothing();
7513 static void ToLocalEmpty();
7514 static void InternalFieldOutOfBounds(
int index);
7614 return has_value_ ? value_ : default_value;
7618 return (
IsJust() == other.IsJust()) &&
7627 Maybe() : has_value_(
false) {}
7628 explicit Maybe(
const T& t) : has_value_(
true), value_(t) {}
7780 if (handler == NULL)
return NULL;
7781 return handler->js_stack_comparable_address_;
7790 void ResetInternal();
7796 void* js_stack_comparable_address_;
7797 bool is_verbose_ : 1;
7798 bool can_continue_ : 1;
7799 bool capture_message_ : 1;
7801 bool has_terminated_ : 1;
7817 : name_count_(name_count), names_(names) { }
7819 const char**
begin()
const {
return &names_[0]; }
7820 const char**
end()
const {
return &names_[name_count_]; }
7823 const int name_count_;
7824 const char** names_;
7878 Isolate* isolate, size_t context_snapshot_index,
8032 void* SlowGetAlignedPointerFromEmbedderData(
int index);
8121 void Initialize(
Isolate* isolate);
8152 void Initialize(
Isolate* isolate);
8179 template <size_t ptr_size>
struct SmiTagging;
8181 template<
int kSmiShiftSize>
8184 uintptr_t tagged_value =
8185 (
static_cast<uintptr_t>(value) << smi_shift_bits) |
kSmiTag;
8186 return reinterpret_cast<
internal::Object*>(tagged_value);
8190 template <>
struct SmiTagging<4> {
8197 return static_cast<
int>(
reinterpret_cast<intptr_t>(value)) >> shift_bits;
8214 return static_cast<uintptr_t>(value + 0x40000000U) < 0x80000000U;
8219 template <>
struct SmiTagging<8> {
8226 return static_cast<
int>(
reinterpret_cast<intptr_t>(value) >> shift_bits);
8233 return (value ==
static_cast<int32_t>(value));
8305 #ifdef V8_ENABLE_CHECKS
8306 CheckInitializedImpl(isolate);
8347 return *addr &
static_cast<uint8_t>(1U << shift);
8351 bool value,
int shift) {
8353 uint8_t mask =
static_cast<uint8_t>(1U << shift);
8354 *addr =
static_cast<uint8_t>((*addr & ~mask) | (value << shift));
8371 uint8_t* addr =
reinterpret_cast<uint8_t*>(isolate) +
8373 *
reinterpret_cast<
void**>(addr) = data;
8378 const uint8_t* addr =
reinterpret_cast<
const uint8_t*>(isolate) +
8380 return *
reinterpret_cast<
void*
const*>(addr);
8389 template <
typename T>
8391 const uint8_t* addr =
8393 return *
reinterpret_cast<
const T*>(addr);
8396 template <
typename T>
8400 O* ctx = *
reinterpret_cast<O*
const*>(context);
8406 return I::ReadField<T>(embedder_data, value_offset);
8415 return New(isolate, that.val_);
8420 return New(isolate, that.val_);
8426 if (that == NULL)
return Local<T>();
8430 reinterpret_cast<
internal::Isolate*>(isolate)
, *p
)));
8438 V8::Eternalize(isolate,
reinterpret_cast<
Value*>(*handle), &
this->index_);
8444 return Local<T>(
reinterpret_cast<T*>(
*V8::GetEternal(isolate, index_)));
8451 return Local<T>(val_);
8457 #ifdef V8_ENABLE_CHECKS
8458 if (index < 0 || index >= kInternalFieldsInWeakCallback) {
8459 V8::InternalFieldOutOfBounds(index);
8462 return internal_fields_[index];
8468 if (that == NULL)
return NULL;
8470 return reinterpret_cast<T*>(
8471 V8::GlobalizeReference(
reinterpret_cast<
internal::Isolate*>(isolate),
8476 template <
class T,
class M>
8477 template <
class S,
class M2>
8481 if (that.IsEmpty())
return;
8483 this->val_ =
reinterpret_cast<T*>(
V8::CopyPersistent(p));
8484 M::Copy(that,
this);
8491 if (
this->IsEmpty())
return false;
8500 if (
this->IsEmpty())
return false;
8501 uint8_t node_state =
8511 if (
this->IsEmpty())
return false;
8519 if (
this->IsEmpty())
return;
8520 V8::DisposeGlobal(
reinterpret_cast<
internal::Object**>(
this->val_));
8530 if (other.IsEmpty())
return;
8531 this->val_ = New(isolate, other.val_);
8541 if (other.IsEmpty())
return;
8542 this->val_ = New(isolate, other.val_);
8547 template <
typename P>
8552 V8::MakeWeak(
reinterpret_cast<
internal::Object**>(
this->val_), parameter,
8553 reinterpret_cast<Callback>(callback), type);
8558 V8::MakeWeak(
reinterpret_cast<
internal::Object***>(&
this->val_));
8562 template <
typename P>
8564 return reinterpret_cast<P*>(
8565 V8::ClearWeak(
reinterpret_cast<
internal::Object**>(
this->val_)));
8578 if (
this->IsEmpty())
return;
8588 if (
this->IsEmpty())
return;
8598 if (
this->IsEmpty())
return;
8607 if (
this->IsEmpty())
return;
8610 *
reinterpret_cast<uint16_t*>(addr) = class_id;
8617 if (
this->IsEmpty())
return 0;
8620 return *
reinterpret_cast<uint16_t*>(addr);
8624 template<
typename T>
8627 template<
typename T>
8628 template<
typename S>
8632 *value_ = GetDefaultValue();
8634 *value_ = *
reinterpret_cast<
internal::Object**>(*handle);
8638 template <
typename T>
8639 template <
typename S>
8643 *value_ = GetDefaultValue();
8645 *value_ = *
reinterpret_cast<
internal::Object**>(*handle);
8649 template <
typename T>
8650 template <
typename S>
8654 *value_ = GetDefaultValue();
8656 *value_ = *
reinterpret_cast<
internal::Object**>(*handle);
8660 template<
typename T>
8666 template<
typename T>
8677 template<
typename T>
8681 bool fits_into_int32_t = (i & (1U << 31)) == 0;
8683 Set(
static_cast<int32_t>(i));
8689 template<
typename T>
8702 template<
typename T>
8709 template<
typename T>
8716 template<
typename T>
8723 template <
typename T>
8726 return *
reinterpret_cast<
Isolate**>(&value_[-2]);
8729 template <
typename T>
8737 template <
typename T>
8738 template <
typename S>
8744 template<
typename T>
8750 template <
typename T>
8756 template<
typename T>
8763 template<
typename T>
8770 template<
typename T>
8776 template<
typename T>
8782 template <
typename T>
8788 template <
typename T>
8794 template<
typename T>
8800 template<
typename T>
8806 template<
typename T>
8812 template<
typename T>
8825 : resource_name_(resource_name),
8826 resource_line_offset_(resource_line_offset),
8827 resource_column_offset_(resource_column_offset),
8828 options_
(!resource_is_embedder_debug_script
.IsEmpty() &&
8830 !resource_is_shared_cross_origin
.IsEmpty() &&
8833 script_id_(script_id),
8834 source_map_url_(source_map_url) {}
8840 return resource_line_offset_;
8845 return resource_column_offset_;
8857 : source_string(string),
8863 cached_data(data) {}
8868 : source_string(string), cached_data(data) {}
8895 #ifndef V8_ENABLE_CHECKS
8899 O* obj = *
reinterpret_cast<O**>(
this);
8907 O** result =
HandleScope::CreateHandle(
reinterpret_cast<HO*>(obj), value);
8911 return SlowGetInternalField(index);
8916 #ifndef V8_ENABLE_CHECKS
8919 O* obj = *
reinterpret_cast<O**>(
this);
8929 return SlowGetAlignedPointerFromInternalField(index);
8933 #ifdef V8_ENABLE_CHECKS
8936 return static_cast<
String*>(value);
8952 O* obj = *
reinterpret_cast<O*
const*>(
this);
8960 #ifdef V8_ENABLE_CHECKS
8961 VerifyExternalStringResource(result);
8971 O* obj = *
reinterpret_cast<O*
const*>(
this);
8980 #ifdef V8_ENABLE_CHECKS
8981 VerifyExternalStringResourceBase(resource, *encoding_out);
8988 #ifdef V8_ENABLE_CHECKS
8989 return FullIsUndefined();
8991 return QuickIsUndefined();
8995 bool Value::QuickIsUndefined()
const {
8998 O* obj = *
reinterpret_cast<O*
const*>(
this);
9006 #ifdef V8_ENABLE_CHECKS
9007 return FullIsNull();
9009 return QuickIsNull();
9013 bool Value::QuickIsNull()
const {
9016 O* obj = *
reinterpret_cast<O*
const*>(
this);
9024 #ifdef V8_ENABLE_CHECKS
9025 return FullIsString();
9027 return QuickIsString();
9031 bool Value::QuickIsString()
const {
9034 O* obj = *
reinterpret_cast<O*
const*>(
this);
9041 return static_cast<
Value*>(value);
9094 #ifdef V8_ENABLE_CHECKS
9097 return static_cast<
Boolean*>(value);
9102 #ifdef V8_ENABLE_CHECKS
9105 return static_cast<
Name*>(value);
9110 #ifdef V8_ENABLE_CHECKS
9113 return static_cast<
Symbol*>(value);
9118 #ifdef V8_ENABLE_CHECKS
9121 return static_cast<
Number*>(value);
9126 #ifdef V8_ENABLE_CHECKS
9129 return static_cast<
Integer*>(value);
9134 #ifdef V8_ENABLE_CHECKS
9137 return static_cast<
Int32*>(value);
9142 #ifdef V8_ENABLE_CHECKS
9145 return static_cast<
Uint32*>(value);
9150 #ifdef V8_ENABLE_CHECKS
9153 return static_cast<
Date*>(value);
9158 #ifdef V8_ENABLE_CHECKS
9166 #ifdef V8_ENABLE_CHECKS
9174 #ifdef V8_ENABLE_CHECKS
9182 #ifdef V8_ENABLE_CHECKS
9190 #ifdef V8_ENABLE_CHECKS
9193 return static_cast<
RegExp*>(value);
9198 #ifdef V8_ENABLE_CHECKS
9201 return static_cast<
Object*>(value);
9206 #ifdef V8_ENABLE_CHECKS
9209 return static_cast<
Array*>(value);
9214 #ifdef V8_ENABLE_CHECKS
9217 return static_cast<
Map*>(value);
9222 #ifdef V8_ENABLE_CHECKS
9225 return static_cast<
Set*>(value);
9230 #ifdef V8_ENABLE_CHECKS
9233 return static_cast<
Promise*>(value);
9238 #ifdef V8_ENABLE_CHECKS
9241 return static_cast<
Proxy*>(value);
9245 #ifdef V8_ENABLE_CHECKS
9252 #ifdef V8_ENABLE_CHECKS
9260 #ifdef V8_ENABLE_CHECKS
9268 #ifdef V8_ENABLE_CHECKS
9276 #ifdef V8_ENABLE_CHECKS
9284 #ifdef V8_ENABLE_CHECKS
9292 #ifdef V8_ENABLE_CHECKS
9300 #ifdef V8_ENABLE_CHECKS
9308 #ifdef V8_ENABLE_CHECKS
9316 #ifdef V8_ENABLE_CHECKS
9324 #ifdef V8_ENABLE_CHECKS
9332 #ifdef V8_ENABLE_CHECKS
9340 #ifdef V8_ENABLE_CHECKS
9348 #ifdef V8_ENABLE_CHECKS
9356 #ifdef V8_ENABLE_CHECKS
9359 return static_cast<
DataView*>(value);
9364 #ifdef V8_ENABLE_CHECKS
9372 #ifdef V8_ENABLE_CHECKS
9375 return static_cast<
Function*>(value);
9380 #ifdef V8_ENABLE_CHECKS
9383 return static_cast<
External*>(value);
9387 template<
typename T>
9393 template<
typename T>
9399 template<
typename T>
9405 template<
typename T>
9411 template<
typename T>
9416 template <
typename T>
9478 int64_t change_in_bytes) {
9480 int64_t* external_memory =
reinterpret_cast<int64_t*>(
9482 const int64_t external_memory_limit = *
reinterpret_cast<int64_t*>(
9484 const int64_t amount = *external_memory + change_in_bytes;
9485 *external_memory = amount;
9486 if (change_in_bytes > 0 && amount > external_memory_limit) {
9487 ReportExternalAllocationLimitReached();
9489 return *external_memory;
9493 template<
typename T>
9497 SetObjectGroupId(
reinterpret_cast<
v8::
internal::Object**>(object.val_), id);
9501 template<
typename T>
9505 SetReferenceFromGroup(id,
9506 reinterpret_cast<
v8::
internal::Object**>(object.val_));
9510 template<
typename T,
typename S>
9515 SetReference(
reinterpret_cast<
v8::
internal::Object**>(parent.val_),
9516 reinterpret_cast<
v8::
internal::Object**>(child.val_));
9521 #ifndef V8_ENABLE_CHECKS
9525 HO* context = *
reinterpret_cast<HO**>(
this);
9530 return SlowGetEmbedderData(index);
9536 #ifndef V8_ENABLE_CHECKS
9540 return SlowGetAlignedPointerFromEmbedderData(index);
9545 void V8::SetAllowCodeGenerationFromStringsCallback(
9570 void V8::SetFailedAccessCheckCallbackFunction(
9577 void V8::SetCaptureStackTraceForUncaughtExceptions(
9590 void V8::RemoveGCPrologueCallback(
GCCallback callback) {
9597 void V8::RemoveGCEpilogueCallback(
GCCallback callback) {
9606 bool V8::IsExecutionTerminating(
Isolate* isolate) {
9607 if (isolate == NULL) {
9614 void V8::CancelTerminateExecution(
Isolate* isolate) {
9631 void V8::VisitHandlesWithClassIds(
Isolate* isolate,
9637 void V8::VisitHandlesForPartialDependence(
Isolate* isolate,