38#ifdef BUILDING_V8_SHARED
39# define V8_EXPORT __declspec(dllexport)
41# define V8_EXPORT __declspec(dllimport)
49#if V8_HAS_ATTRIBUTE_VISIBILITY
50# ifdef BUILDING_V8_SHARED
51# define V8_EXPORT __attribute__ ((visibility("default")))
66class AccessorSignature;
77class FunctionTemplate;
79class ImplementationUtilities;
89class ObjectOperationDescriptor;
94class PropertyDescriptor;
96class RawOperationDescriptor;
98class SharedArrayBuffer;
111class WasmCompiledModule;
112template <
class T>
class Local;
115template <
class T>
class Eternal;
116template<
class T>
class NonCopyablePersistentTraits;
117template<
class T>
class PersistentBase;
118template <
class T,
class M = NonCopyablePersistentTraits<T> >
122template<
class K,
class V,
class T>
class PersistentValueMap;
123template <
class K,
class V,
class T>
124class PersistentValueMapBase;
125template <
class K,
class V,
class T>
127template<
class V,
class T>
class PersistentValueVector;
136class CallHandlerHelper;
142class DeferredHandles;
147struct StreamedSource;
149class PropertyCallbackArguments;
150class FunctionCallbackArguments;
155class ConsoleCallArguments;
160#define TYPE_CHECK(T, S) \
162 *(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
202 : val_(reinterpret_cast<T*>(*that)) {
233 internal::Object** a =
reinterpret_cast<internal::Object**
>(this->val_);
234 internal::Object** b =
reinterpret_cast<internal::Object**
>(that.val_);
235 if (a == 0)
return b == 0;
236 if (b == 0)
return false;
242 internal::Object** a =
reinterpret_cast<internal::Object**
>(this->val_);
243 internal::Object** b =
reinterpret_cast<internal::Object**
>(that.val_);
244 if (a == 0)
return b == 0;
245 if (b == 0)
return false;
271#ifdef V8_ENABLE_CHECKS
303 template<
class F>
friend class Local;
319 template <
class F1,
class F2,
class F3>
331#if !defined(V8_IMMINENT_DEPRECATION_WARNINGS)
354 : val_(reinterpret_cast<T*>(*that)) {
366 out->val_ =
IsEmpty() ? nullptr : this->val_;
398 Set(isolate, handle);
410static const int kInternalFieldsInWeakCallback = 2;
411static const int kEmbedderFieldsInWeakCallback = 2;
419 void* embedder_fields[kEmbedderFieldsInWeakCallback],
421 : isolate_(isolate), parameter_(parameter), callback_(callback) {
422 for (
int i = 0; i < kEmbedderFieldsInWeakCallback; ++i) {
423 embedder_fields_[i] = embedder_fields[i];
433 return embedder_fields_[0];
437 return embedder_fields_[1];
440 V8_DEPRECATED(
"Not realiable once SetSecondPassCallback() was used.",
442 return callback_ !=
nullptr;
457 void* embedder_fields_[kEmbedderFieldsInWeakCallback];
511 internal::Object** a =
reinterpret_cast<internal::Object**
>(this->val_);
512 internal::Object** b =
reinterpret_cast<internal::Object**
>(that.val_);
513 if (a == NULL)
return b == NULL;
514 if (b == NULL)
return false;
520 internal::Object** a =
reinterpret_cast<internal::Object**
>(this->val_);
521 internal::Object** b =
reinterpret_cast<internal::Object**
>(that.val_);
522 if (a == NULL)
return b == NULL;
523 if (b == NULL)
return false;
544 template <
typename P>
612 template<
class F>
friend class Local;
618 template <
class F1,
class F2,
class F3>
641 template<
class S,
class M>
644 Uncompilable<Object>();
661 template<
class S,
class M>
698 template <
class S,
class M2>
712 template <
class S,
class M2>
720 template <
class S,
class M2>
731 if (M::kResetInDestructor) this->
Reset();
737#ifdef V8_ENABLE_CHECKS
740 if (!that.
IsEmpty()) T::Cast(*that);
754 template<
class F>
friend class Local;
759 V8_INLINE T* operator*()
const {
return this->val_; }
760 template<
class S,
class M2>
761 V8_INLINE void Copy(
const Persistent<S, M2>& that);
801 other.val_ =
nullptr;
812 this->val_ = rhs.val_;
833 V8_INLINE T* operator*()
const {
return this->val_; }
868 return reinterpret_cast<Isolate*
>(isolate_);
880 internal::Object* value);
885 void*
operator new(
size_t size);
886 void*
operator new[](
size_t size);
887 void operator delete(
void*, size_t);
888 void operator delete[](
void*, size_t);
891 static internal::Object** CreateHandle(internal::HeapObject* heap_object,
892 internal::Object* value);
894 internal::Isolate* isolate_;
895 internal::Object** prev_next_;
896 internal::Object** prev_limit_;
899 template<
class F>
friend class Local;
923 internal::Object** slot =
924 Escape(
reinterpret_cast<internal::Object**
>(*value));
925 return Local<T>(
reinterpret_cast<T*
>(slot));
934 void*
operator new(
size_t size);
935 void*
operator new[](
size_t size);
936 void operator delete(
void*, size_t);
937 void operator delete[](
void*, size_t);
939 internal::Object** Escape(internal::Object** escape_value);
940 internal::Object** escape_slot_;
959 void*
operator new(
size_t size);
960 void*
operator new[](
size_t size);
961 void operator delete(
void*, size_t);
962 void operator delete[](
void*, size_t);
964 internal::Isolate*
const isolate_;
965 internal::Object** prev_limit_;
966 int prev_sealed_level_;
988 bool is_opaque =
false,
bool is_wasm =
false,
989 bool is_module =
false)
990 : flags_((is_shared_cross_origin ? kIsSharedCrossOrigin : 0) |
991 (is_wasm ? kIsWasm : 0) | (is_opaque ? kIsOpaque : 0) |
992 (is_module ? kIsModule : 0)) {}
995 (kIsSharedCrossOrigin | kIsOpaque | kIsWasm | kIsModule)) {}
998 return (flags_ & kIsSharedCrossOrigin) != 0;
1000 bool IsOpaque()
const {
return (flags_ & kIsOpaque) != 0; }
1001 bool IsWasm()
const {
return (flags_ & kIsWasm) != 0; }
1002 bool IsModule()
const {
return (flags_ & kIsModule) != 0; }
1008 kIsSharedCrossOrigin = 1,
1076 static const int kNoScriptId = 0;
1088 : line_number_(line_number), column_number_(column_number) {}
1160 ResolveCallback callback));
1162 ResolveCallback callback);
1189 "Use maybe version",
1237 buffer_policy(BufferNotOwned) {}
1363 internal::StreamedSource*
impl()
const {
return impl_; }
1370 internal::StreamedSource* impl_;
1384 kNoCompileOptions = 0,
1406 Isolate* isolate, Source* source,
1424 "Use maybe version",
1510 size_t context_extension_count,
1600 static const int kNoLineNumberInfo = 0;
1601 static const int kNoColumnInfo = 0;
1602 static const int kNoScriptIdInfo = 0;
1621 kColumnOffset = 1 << 1 | kLineNumber,
1622 kScriptName = 1 << 2,
1623 kFunctionName = 1 << 3,
1625 kIsConstructor = 1 << 5,
1626 kScriptNameOrSourceURL = 1 << 6,
1628 kExposeFramesAcrossSecurityOrigins = 1 << 8,
1629 kOverview = kLineNumber | kColumnOffset | kScriptName | kFunctionName,
1630 kDetailed = kOverview | kIsEval | kIsConstructor | kScriptNameOrSourceURL
1769 static V8_DEPRECATED(
"Use the maybe version taking context",
1842 size_t* actual_size);
1891 void TransferSharedArrayBuffer(
1892 uint32_t transfer_id,
1919 PrivateData* private_;
1948 Isolate* isolate, uint32_t transfer_id);
2018 PrivateData* private_;
2061 V8_INLINE bool IsNullOrUndefined()
const;
2379 V8_INLINE bool QuickIsUndefined()
const;
2381 V8_INLINE bool QuickIsNullOrUndefined()
const;
2383 bool FullIsUndefined()
const;
2384 bool FullIsNull()
const;
2385 bool FullIsString()
const;
2427 static void CheckCast(
Value* obj);
2455 static constexpr int kMaxLength =
2456 sizeof(
void*) == 4 ? (1 << 28) - 16 : (1 << 30) - 1 - 24;
2459 UNKNOWN_ENCODING = 0x1,
2460 TWO_BYTE_ENCODING = 0x0,
2461 ONE_BYTE_ENCODING = 0x8
2516 HINT_MANY_WRITES_EXPECTED = 1,
2517 NO_NULL_TERMINATION = 2,
2518 PRESERVE_ONE_BYTE_NULL = 4,
2522 REPLACE_INVALID_UTF8 = 8
2529 int options = NO_OPTIONS)
const;
2534 int options = NO_OPTIONS)
const;
2538 int* nchars_ref = NULL,
2539 int options = NO_OPTIONS)
const;
2578 friend class internal::Heap;
2600 virtual const uint16_t*
data()
const = 0;
2630 virtual const char*
data()
const = 0;
2642 V8_INLINE ExternalStringResourceBase* GetExternalStringResourceBase(
2643 Encoding* encoding_out)
const;
2649 V8_INLINE ExternalStringResource* GetExternalStringResource()
const;
2667 "Use maybe version",
2680 "Use maybe version",
2693 "Use maybe version",
2744 "Use maybe version",
2872 static void CheckCast(
Value* obj);
3178 AccessorGetterCallback getter,
3179 AccessorSetterCallback setter = 0,
3185 AccessorNameGetterCallback getter,
3186 AccessorNameSetterCallback setter = 0,
3192 AccessorNameGetterCallback getter,
3193 AccessorNameSetterCallback setter = 0,
3209 AccessorNameGetterCallback getter,
3210 AccessorNameSetterCallback setter =
nullptr,
3303 return object.val_->InternalFieldCount();
3317 V8_INLINE void* GetAlignedPointerFromInternalField(
int index);
3322 return object.val_->GetAlignedPointerFromInternalField(index);
3377 "Use maybe version",
3388 "Use maybe version",
3446 return object.val_->CreationContext();
3494 static void CheckCast(
Value* obj);
3496 void* SlowGetAlignedPointerFromInternalField(
int index);
3526 static void CheckCast(
Value* obj);
3562 static void CheckCast(
Value* obj);
3594 static void CheckCast(
Value* obj);
3602 : value_(that.value_) {
3606 template <
typename S>
3609 template <
typename S>
3611 template <
typename S>
3626 template <
typename S>
3638 template <
class F,
class G,
class H>
3640 V8_INLINE void SetInternal(internal::Object* value) { *value_ = value; }
3641 V8_INLINE internal::Object* GetDefaultValue();
3643 internal::Object** value_;
3702 internal::Object** values,
int length);
3839 "Use maybe version",
3851 return NewInstance(context, 0,
nullptr);
3917 static void CheckCast(
Value* obj);
3920#ifndef V8_PROMISE_INTERNAL_FIELD_COUNT
3922#define V8_PROMISE_INTERNAL_FIELD_COUNT 0
3967 static void CheckCast(
Value* obj);
4009 static void CheckCast(
Value* obj);
4082 PrivateData* private_;
4107 static void CheckCast(
Value* obj);
4129 typedef std::pair<std::unique_ptr<const uint8_t[]>,
size_t> OwnedBuffer;
4132 : compiled_code(std::move(code)), wire_bytes(std::move(bytes)) {}
4134 OwnedBuffer compiled_code = {
nullptr, 0};
4135 OwnedBuffer wire_bytes = {
nullptr, 0};
4171 const uint8_t* start,
4174 const TransferrableModule::OwnedBuffer& buff) {
4175 return {buff.first.get(), buff.second};
4178 WasmCompiledModule();
4179 static void CheckCast(Value* obj);
4196 typedef std::pair<std::unique_ptr<const uint8_t[]>,
size_t> Buffer;
4218 std::vector<Buffer> received_buffers_;
4219 size_t total_size_ = 0;
4233 typedef std::pair<std::unique_ptr<const uint8_t[]>,
size_t> Buffer;
4242 std::vector<Buffer> received_buffers_;
4243 size_t total_size_ = 0;
4246#ifndef V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT
4248#define V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT 2
4302 virtual void Free(
void* data,
size_t length) = 0;
4349 allocation_base_(nullptr),
4350 allocation_length_(0),
4356 return allocation_mode_;
4359 void*
Data()
const {
return data_; }
4364 size_t byte_length_;
4365 void* allocation_base_;
4366 size_t allocation_length_;
4396 Isolate* isolate,
void* data,
size_t byte_length,
4448 static void CheckCast(
Value* obj);
4452#ifndef V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT
4454#define V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT 2
4496 static const int kInternalFieldCount =
4498 static const int kEmbedderFieldCount =
4503 static void CheckCast(
Value* obj);
4516 static constexpr size_t kMaxLength =
4517 sizeof(
void*) == 4 ? (1u << 30) - 1 : (1u << 31) - 1;
4529 static void CheckCast(
Value* obj);
4539 size_t byte_offset,
size_t length);
4541 size_t byte_offset,
size_t length);
4546 static void CheckCast(
Value* obj);
4556 size_t byte_offset,
size_t length);
4564 static void CheckCast(
Value* obj);
4573 size_t byte_offset,
size_t length);
4575 size_t byte_offset,
size_t length);
4580 static void CheckCast(
Value* obj);
4590 size_t byte_offset,
size_t length);
4592 size_t byte_offset,
size_t length);
4597 static void CheckCast(
Value* obj);
4607 size_t byte_offset,
size_t length);
4609 size_t byte_offset,
size_t length);
4614 static void CheckCast(
Value* obj);
4624 size_t byte_offset,
size_t length);
4626 size_t byte_offset,
size_t length);
4631 static void CheckCast(
Value* obj);
4641 size_t byte_offset,
size_t length);
4643 size_t byte_offset,
size_t length);
4648 static void CheckCast(
Value* obj);
4658 size_t byte_offset,
size_t length);
4660 size_t byte_offset,
size_t length);
4665 static void CheckCast(
Value* obj);
4675 size_t byte_offset,
size_t length);
4677 size_t byte_offset,
size_t length);
4682 static void CheckCast(
Value* obj);
4692 size_t byte_offset,
size_t length);
4694 size_t byte_offset,
size_t length);
4699 static void CheckCast(
Value* obj);
4725 allocation_base_(nullptr),
4726 allocation_length_(0),
4732 return allocation_mode_;
4735 void*
Data()
const {
return data_; }
4740 size_t byte_length_;
4741 void* allocation_base_;
4742 size_t allocation_length_;
4769 Isolate* isolate,
void* data,
size_t byte_length,
4812 static void CheckCast(
Value* obj);
4849 static void CheckCast(
Value* obj);
4865 static void CheckCast(
Value* obj);
4882 static void CheckCast(
Value* obj);
4898 static void CheckCast(
Value* obj);
4914 static void CheckCast(
Value* obj);
4930 kIgnoreCase = 1 << 1,
4931 kMultiline = 1 << 2,
4968 static void CheckCast(
Value* obj);
4985#define V8_INTRINSICS_LIST(F) \
4986 F(ArrayProto_entries, array_entries_iterator) \
4987 F(ArrayProto_forEach, array_for_each_iterator) \
4988 F(ArrayProto_keys, array_keys_iterator) \
4989 F(ArrayProto_values, array_values_iterator) \
4990 F(ErrorPrototype, initial_error_prototype) \
4991 F(IteratorPrototype, initial_iterator_prototype)
4994#define V8_DECL_INTRINSIC(name, iname) k##name,
4996#undef V8_DECL_INTRINSIC
5013 void Set(Local<Name> name, Local<Data> value,
5019 void SetAccessorProperty(
5053 void SetNativeDataProperty(
5055 AccessorSetterCallback setter = 0,
5060 void SetNativeDataProperty(
5061 Local<Name> name, AccessorNameGetterCallback getter,
5062 AccessorNameSetterCallback setter = 0,
5072 void SetLazyDataProperty(
Local<Name> name, AccessorNameGetterCallback getter,
5370 Local<Object> accessed_object,
5472class V8_EXPORT FunctionTemplate :
public Template {
5475 static Local<FunctionTemplate> New(
5476 Isolate* isolate, FunctionCallback callback = 0,
5477 Local<Value> data = Local<Value>(),
5478 Local<Signature> signature = Local<Signature>(),
int length = 0,
5479 ConstructorBehavior behavior = ConstructorBehavior::kAllow);
5482 static MaybeLocal<FunctionTemplate> FromSnapshot(Isolate* isolate,
5488 static Local<FunctionTemplate> NewWithCache(
5489 Isolate* isolate, FunctionCallback callback,
5490 Local<Private> cache_property, Local<Value> data = Local<Value>(),
5491 Local<Signature> signature = Local<Signature>(),
int length = 0);
5512 void SetCallHandler(FunctionCallback callback,
5516 void SetLength(
int length);
5554 void SetAcceptAnyReceiver(
bool value);
5568 void SetHiddenPrototype(
bool value);
5574 void ReadOnlyPrototype();
5580 void RemovePrototype();
5781 Local<Name> name, AccessorNameGetterCallback getter,
5809 void SetNamedPropertyHandler(NamedPropertyGetterCallback getter,
5810 NamedPropertySetterCallback setter = 0,
5811 NamedPropertyQueryCallback query = 0,
5812 NamedPropertyDeleterCallback deleter = 0,
5813 NamedPropertyEnumeratorCallback enumerator = 0,
5846 void SetIndexedPropertyHandler(
5847 IndexedPropertyGetterCallback getter,
5848 IndexedPropertySetterCallback setter = 0,
5849 IndexedPropertyQueryCallback query = 0,
5850 IndexedPropertyDeleterCallback deleter = 0,
5851 IndexedPropertyEnumeratorCallback enumerator = 0,
5854 deleter, enumerator, data));
5875 void SetCallAsFunctionHandler(FunctionCallback callback,
5886 void MarkAsUndetectable();
5896 void SetAccessCheckCallback(AccessCheckCallback callback,
5905 void SetAccessCheckCallbackAndHandler(
5906 AccessCheckCallback callback,
5915 int InternalFieldCount();
5921 void SetInternalFieldCount(
int value);
5926 bool IsImmutableProto();
5932 void SetImmutableProto();
5982 : data_(data), length_(length) {}
5983 const char* data()
const {
return data_; }
5984 size_t length()
const {
return length_; }
5999 const char* source = 0,
6001 const char** deps = 0,
6002 int source_length = -1);
6009 const char* name()
const {
return name_; }
6010 size_t source_length()
const {
return source_length_; }
6013 int dependency_count() {
return dep_count_; }
6014 const char** dependencies() {
return deps_; }
6015 void set_auto_enable(
bool value) { auto_enable_ = value; }
6016 bool auto_enable() {
return auto_enable_; }
6020 void operator=(
const Extension&) =
delete;
6024 size_t source_length_;
6069 void ConfigureDefaults(uint64_t physical_memory,
6070 uint64_t virtual_memory_limit);
6074 int max_semi_space_size()) {
6075 return static_cast<int>(max_semi_space_size_in_kb_ / 1024);
6080 void set_max_semi_space_size(
int limit_in_mb)) {
6081 max_semi_space_size_in_kb_ = limit_in_mb * 1024;
6085 size_t max_semi_space_size_in_kb()
const {
6086 return max_semi_space_size_in_kb_;
6090 void set_max_semi_space_size_in_kb(
size_t limit_in_kb) {
6091 max_semi_space_size_in_kb_ = limit_in_kb;
6094 int max_old_space_size()
const {
return max_old_space_size_; }
6095 void set_max_old_space_size(
int limit_in_mb) {
6096 max_old_space_size_ = limit_in_mb;
6099 int max_executable_size()
const) {
6100 return max_executable_size_;
6103 void set_max_executable_size(
int limit_in_mb)) {
6104 max_executable_size_ = limit_in_mb;
6106 uint32_t* stack_limit()
const {
return stack_limit_; }
6108 void set_stack_limit(uint32_t* value) { stack_limit_ = value; }
6109 size_t code_range_size()
const {
return code_range_size_; }
6110 void set_code_range_size(
size_t limit_in_mb) {
6111 code_range_size_ = limit_in_mb;
6113 size_t max_zone_pool_size()
const {
return max_zone_pool_size_; }
6114 void set_max_zone_pool_size(
const size_t bytes) {
6115 max_zone_pool_size_ = bytes;
6120 size_t max_semi_space_size_in_kb_;
6123 int max_old_space_size_;
6124 int max_executable_size_;
6125 uint32_t* stack_limit_;
6126 size_t code_range_size_;
6127 size_t max_zone_pool_size_;
6175typedef int* (*CounterLookupCallback)(
const char* name);
6177typedef void* (*CreateHistogramCallback)(
const char* name,
6261 : promise_(promise),
6264 stack_trace_(stack_trace) {}
6272 return stack_trace_;
6310 enum Type { kRunMicrotasks, kDoNotRunMicrotasks };
6318 static void PerformCheckpoint(
Isolate* isolate);
6323 static int GetCurrentDepth(
Isolate* isolate);
6328 static bool IsRunningMicrotasks(
Isolate* isolate);
6335 internal::Isolate*
const isolate_;
6417 size_t total_heap_size() {
return total_heap_size_; }
6418 size_t total_heap_size_executable() {
return total_heap_size_executable_; }
6419 size_t total_physical_size() {
return total_physical_size_; }
6420 size_t total_available_size() {
return total_available_size_; }
6421 size_t used_heap_size() {
return used_heap_size_; }
6422 size_t heap_size_limit() {
return heap_size_limit_; }
6423 size_t malloced_memory() {
return malloced_memory_; }
6424 size_t peak_malloced_memory() {
return peak_malloced_memory_; }
6430 size_t does_zap_garbage() {
return does_zap_garbage_; }
6433 size_t total_heap_size_;
6434 size_t total_heap_size_executable_;
6435 size_t total_physical_size_;
6436 size_t total_available_size_;
6437 size_t used_heap_size_;
6438 size_t heap_size_limit_;
6439 size_t malloced_memory_;
6440 size_t peak_malloced_memory_;
6441 bool does_zap_garbage_;
6451 const char* space_name() {
return space_name_; }
6452 size_t space_size() {
return space_size_; }
6453 size_t space_used_size() {
return space_used_size_; }
6454 size_t space_available_size() {
return space_available_size_; }
6455 size_t physical_space_size() {
return physical_space_size_; }
6458 const char* space_name_;
6460 size_t space_used_size_;
6461 size_t space_available_size_;
6462 size_t physical_space_size_;
6471 const char* object_type() {
return object_type_; }
6472 const char* object_sub_type() {
return object_sub_type_; }
6473 size_t object_count() {
return object_count_; }
6474 size_t object_size() {
return object_size_; }
6477 const char* object_type_;
6478 const char* object_sub_type_;
6479 size_t object_count_;
6480 size_t object_size_;
6488 size_t code_and_metadata_size() {
return code_and_metadata_size_; }
6489 size_t bytecode_and_metadata_size() {
return bytecode_and_metadata_size_; }
6492 size_t code_and_metadata_size_;
6493 size_t bytecode_and_metadata_size_;
6513 uintptr_t return_addr_location);
6622class V8_EXPORT ExternalResourceVisitor {
6632class V8_EXPORT PersistentHandleVisitor {
6636 uint16_t class_id) {}
6666 : force_completion(force_completion_) {}
6677 virtual void RegisterV8References(
6678 const std::vector<std::pair<void*, void*> >& embedder_fields) = 0;
6683 virtual void TracePrologue() = 0;
6695 virtual bool AdvanceTracing(
double deadline_in_ms,
6703 virtual void TraceEpilogue() = 0;
6709 virtual void EnterFinalPause() = 0;
6717 virtual void AbortTracing() = 0;
6722 virtual size_t NumberOfWrappersToTrace() {
return 0; }
6736 void* data_arg =
nullptr)
6753 void* data_arg =
nullptr)
6776 : entry_hook(
nullptr),
6777 code_event_handler(
nullptr),
6778 snapshot_blob(
nullptr),
6779 counter_lookup_callback(
nullptr),
6780 create_histogram_callback(
nullptr),
6781 add_histogram_sample_callback(
nullptr),
6782 array_buffer_allocator(
nullptr),
6783 external_references(
nullptr),
6784 allow_atomics_wait(
true) {}
6840 const intptr_t* external_references;
6846 bool allow_atomics_wait;
6860 ~Scope() { isolate_->Exit(); }
6876 enum OnFailure { CRASH_ON_FAILURE, THROW_ON_FAILURE };
6908 void* internal_throws_;
6909 void* internal_assert_;
6928 internal::Isolate*
const isolate_;
6936 kFullGarbageCollection,
6937 kMinorGarbageCollection
6949 kMarkDequeOverflow = 3,
6950 kStoreBufferOverflow = 4,
6951 kSlotsBufferOverflow = 5,
6957 kRegExpPrototypeStickyGetter = 11,
6958 kRegExpPrototypeToString = 12,
6959 kRegExpPrototypeUnicodeGetter = 13,
6964 kPromiseAccept = 18,
6966 kHtmlCommentInExternalScript = 20,
6968 kSloppyModeBlockScopedFunctionRedefinition = 22,
6969 kForInInitializer = 23,
6970 kArrayProtectorDirtied = 24,
6971 kArraySpeciesModified = 25,
6972 kArrayPrototypeConstructorModified = 26,
6973 kArrayInstanceProtoModified = 27,
6974 kArrayInstanceConstructorModified = 28,
6975 kLegacyFunctionDeclaration = 29,
6976 kRegExpPrototypeSourceGetter = 30,
6977 kRegExpPrototypeOldFlagGetter = 31,
6978 kDecimalWithLeadingZeroInStrictMode = 32,
6979 kLegacyDateParser = 33,
6980 kDefineGetterOrSetterWouldThrow = 34,
6981 kFunctionConstructorReturnedUndefined = 35,
6982 kAssigmentExpressionLHSIsCallInSloppy = 36,
6983 kAssigmentExpressionLHSIsCallInStrict = 37,
6984 kPromiseConstructorReturnedUndefined = 38,
6985 kConstructorNonUndefinedPrimitiveReturn = 39,
6986 kLabeledExpressionStatement = 40,
6990 kUseCounterFeatureCount
6994 kMessageLog = (1 << 0),
6995 kMessageDebug = (1 << 1),
6996 kMessageInfo = (1 << 2),
6997 kMessageError = (1 << 3),
6998 kMessageWarning = (1 << 4),
6999 kMessageAll = kMessageLog | kMessageDebug | kMessageInfo | kMessageError |
7003 typedef void (*UseCounterCallback)(
Isolate* isolate,
7035 typedef bool (*AbortOnUncaughtExceptionCallback)(
Isolate*);
7036 void SetAbortOnUncaughtExceptionCallback(
7037 AbortOnUncaughtExceptionCallback callback);
7046 void SetHostImportModuleDynamicallyCallback(
7047 HostImportModuleDynamicallyCallback callback);
7088 void DumpAndResetStats();
7097 void DiscardThreadSpecificMetadata();
7103 V8_INLINE void SetData(uint32_t slot,
void* data);
7115 V8_INLINE static uint32_t GetNumberOfDataSlots();
7125 size_t NumberOfHeapSpaces();
7142 size_t NumberOfTrackedHeapObjectTypes();
7177 void GetStackSample(
const RegisterState& state,
void** frames,
7178 size_t frames_limit,
SampleInfo* sample_info);
7194 AdjustAmountOfExternalAllocatedMemory(int64_t change_in_bytes);
7200 size_t NumberOfPhantomHandleResetsSinceLastCall();
7231 "Calling context concept is not compatible with tail calls, and will be "
7272 void AddGCPrologueCallback(GCCallback callback,
7273 GCType gc_type_filter = kGCTypeAll);
7279 void RemoveGCPrologueCallback(GCCallback callback);
7295 void AddGCEpilogueCallback(GCCallback callback,
7296 GCType gc_type_filter = kGCTypeAll);
7302 void RemoveGCEpilogueCallback(GCCallback callback);
7304 typedef size_t (*GetExternallyAllocatedMemoryInBytesCallback)();
7312 void SetGetExternallyAllocatedMemoryInBytesCallback(
7313 GetExternallyAllocatedMemoryInBytesCallback callback);
7322 void TerminateExecution();
7332 bool IsExecutionTerminating();
7348 void CancelTerminateExecution();
7358 void RequestInterrupt(InterruptCallback callback,
void* data);
7375 void SetEventLogger(LogEventCallback that);
7383 void AddBeforeCallEnteredCallback(BeforeCallEnteredCallback callback);
7388 void RemoveBeforeCallEnteredCallback(BeforeCallEnteredCallback callback);
7397 void AddCallCompletedCallback(CallCompletedCallback callback);
7399 "Use callback with parameter",
7400 void AddCallCompletedCallback(DeprecatedCallCompletedCallback callback));
7405 void RemoveCallCompletedCallback(CallCompletedCallback callback);
7407 "Use callback with parameter",
7409 DeprecatedCallCompletedCallback callback));
7415 void SetPromiseHook(PromiseHook hook);
7421 void SetPromiseRejectCallback(PromiseRejectCallback callback);
7427 void RunMicrotasks();
7437 void EnqueueMicrotask(MicrotaskCallback microtask,
void* data = NULL);
7445 void SetAutorunMicrotasks(
bool autorun));
7452 bool WillAutorunMicrotasks()
const);
7466 void AddMicrotasksCompletedCallback(MicrotasksCompletedCallback callback);
7471 void RemoveMicrotasksCompletedCallback(MicrotasksCompletedCallback callback);
7476 void SetUseCounterCallback(UseCounterCallback callback);
7482 void SetCounterFunction(CounterLookupCallback);
7490 void SetCreateHistogramFunction(CreateHistogramCallback);
7491 void SetAddHistogramSampleFunction(AddHistogramSampleCallback);
7507 bool IdleNotificationDeadline(
double deadline_in_seconds);
7510 bool IdleNotification(
int idle_time_in_ms));
7516 void LowMemoryNotification();
7527 int ContextDisposedNotification(
bool dependant_context =
true);
7533 void IsolateInForegroundNotification();
7539 void IsolateInBackgroundNotification();
7548 void SetRAILMode(
RAILMode rail_mode);
7554 void IncreaseHeapLimitForDebugging();
7559 void RestoreOriginalHeapLimit();
7565 bool IsHeapLimitIncreasedForDebugging();
7590 JitCodeEventHandler event_handler);
7601 void SetStackLimit(uintptr_t stack_limit);
7616 void GetCodeRange(
void** start,
size_t* length_in_bytes);
7619 void SetFatalErrorHandler(FatalErrorCallback that);
7622 void SetOOMErrorHandler(OOMErrorCallback that);
7628 void SetAllowCodeGenerationFromStringsCallback(
7629 AllowCodeGenerationFromStringsCallback callback);
7635 void SetWasmModuleCallback(ExtensionCallback callback);
7636 void SetWasmInstanceCallback(ExtensionCallback callback);
7638 void SetWasmCompileStreamingCallback(ApiImplementationCallback callback);
7655 bool AddMessageListener(MessageCallback that,
7669 bool AddMessageListenerWithErrorLevel(MessageCallback that,
7676 void RemoveMessageListeners(MessageCallback that);
7679 void SetFailedAccessCheckCallbackFunction(FailedAccessCheckCallback);
7685 void SetCaptureStackTraceForUncaughtExceptions(
7686 bool capture,
int frame_limit = 10,
7729 void SetAllowAtomicsWait(
bool allow);
7737 void*
operator new(
size_t size) =
delete;
7738 void*
operator new[](
size_t size) =
delete;
7739 void operator delete(
void*, size_t) =
delete;
7740 void operator delete[](
void*, size_t) =
delete;
7743 template <
class K,
class V,
class Traits>
7746 void ReportExternalAllocationLimitReached();
7747 void CheckMemoryPressure();
7761typedef bool (*
EntropySource)(
unsigned char* buffer,
size_t length);
7777 uintptr_t return_addr_location);
7787 "Use isolate version",
7812 static void SetSnapshotDataBlob(
StartupData* startup_blob);
7820 static StartupData CreateSnapshotDataBlob(
const char* embedded_source = NULL);
7831 const char* warmup_source);
7843 "Use isolate version",
7844 bool AddMessageListener(MessageCallback that,
7851 "Use isolate version",
void RemoveMessageListeners(MessageCallback that));
7858 "Use isolate version",
7859 void SetCaptureStackTraceForUncaughtExceptions(
7860 bool capture,
int frame_limit = 10,
7866 static void SetFlagsFromString(
const char* str,
int length);
7871 static void SetFlagsFromCommandLine(
int* argc,
7876 static const char* GetVersion();
7880 "Use isolate version",
7881 void SetFailedAccessCheckCallbackFunction(FailedAccessCheckCallback));
7894 "Use isolate version",
7896 GCType gc_type_filter = kGCTypeAll));
7903 "Use isolate version",
7904 void RemoveGCPrologueCallback(GCCallback callback));
7917 "Use isolate version",
7919 GCType gc_type_filter = kGCTypeAll));
7926 "Use isolate version",
7927 void RemoveGCEpilogueCallback(GCCallback callback));
7933 static bool Initialize();
7939 static void SetEntropySource(EntropySource source);
7945 static void SetReturnAddressLocationResolver(
7946 ReturnAddressLocationResolver return_address_resolver);
7958 void TerminateExecution(
Isolate* isolate));
7971 "Use isolate version",
7972 bool IsExecutionTerminating(
Isolate* isolate = NULL));
7991 "Use isolate version",
void CancelTerminateExecution(
Isolate* isolate));
8002 static bool Dispose();
8010 "Use isolate version",
8018 "Use isolate version",
8026 "Use isolate version",
8027 void VisitHandlesWithClassIds(
Isolate* isolate,
8038 "Use isolate version",
8039 void VisitHandlesForPartialDependence(
Isolate* isolate,
8050 "Use version with default location.",
8051 static bool InitializeICU(
const char* icu_data_file =
nullptr));
8065 static bool InitializeICUDefaultLocation(
const char* exec_path,
8066 const char* icu_data_file =
nullptr);
8085 static void InitializeExternalStartupData(
const char* natives_blob,
8086 const char* snapshot_blob);
8091 static void InitializePlatform(
Platform* platform);
8097 static void ShutdownPlatform();
8119 static bool TryHandleSignal(
int signal_number,
void* info,
void* context);
8126 static bool RegisterDefaultSignalHandler();
8131 static internal::Object** GlobalizeReference(internal::Isolate* isolate,
8132 internal::Object** handle);
8133 static internal::Object** CopyPersistent(internal::Object** handle);
8134 static void DisposeGlobal(internal::Object** global_handle);
8135 static void MakeWeak(internal::Object** location,
void* data,
8138 static void MakeWeak(internal::Object** location,
void* data,
8140 int internal_field_index1,
8142 int internal_field_index2,
8144 static void MakeWeak(internal::Object*** location_addr);
8145 static void* ClearWeak(internal::Object** location);
8148 static void RegisterExternallyReferencedObject(internal::Object**
object,
8149 internal::Isolate* isolate);
8151 template <
class K,
class V,
class T>
8154 static void FromJustIsNothing();
8155 static void ToLocalEmpty();
8156 static void InternalFieldOutOfBounds(
int index);
8157 template <
class T>
friend class Local;
8286 return has_value_ ? value_ : default_value;
8299 Maybe() : has_value_(false) {}
8300 explicit Maybe(
const T& t) : has_value_(true), value_(t) {}
8341 TryCatch(Isolate* isolate);
8351 bool HasCaught()
const;
8361 bool CanContinue()
const;
8375 bool HasTerminated()
const;
8384 Local<Value> ReThrow();
8392 Local<Value> Exception()
const;
8431 void SetVerbose(
bool value);
8436 bool IsVerbose()
const;
8443 void SetCaptureMessage(
bool value);
8456 static void* JSStackComparableAddress(
TryCatch* handler) {
8457 if (handler == NULL)
return NULL;
8458 return handler->js_stack_comparable_address_;
8462 void operator=(
const TryCatch&) =
delete;
8467 void*
operator new(
size_t size);
8468 void*
operator new[](
size_t size);
8469 void operator delete(
void*, size_t);
8470 void operator delete[](
void*, size_t);
8472 void ResetInternal();
8474 internal::Isolate* isolate_;
8478 void* js_stack_comparable_address_;
8479 bool is_verbose_ : 1;
8480 bool can_continue_ : 1;
8481 bool capture_message_ : 1;
8483 bool has_terminated_ : 1;
8485 friend class internal::Isolate;
8499 : name_count_(name_count), names_(names) { }
8501 const char** begin()
const {
return &names_[0]; }
8502 const char** end()
const {
return &names_[name_count_]; }
8505 const int name_count_;
8506 const char** names_;
8527 Local<Object> Global();
8533 void DetachGlobal();
8553 static Local<Context> New(
8554 Isolate* isolate, ExtensionConfiguration* extensions = NULL,
8555 MaybeLocal<ObjectTemplate> global_template = MaybeLocal<ObjectTemplate>(),
8556 MaybeLocal<Value> global_object = MaybeLocal<Value>(),
8557 DeserializeInternalFieldsCallback internal_fields_deserializer =
8558 DeserializeInternalFieldsCallback());
8579 static MaybeLocal<Context> FromSnapshot(
8580 Isolate* isolate,
size_t context_snapshot_index,
8581 DeserializeInternalFieldsCallback embedder_fields_deserializer =
8582 DeserializeInternalFieldsCallback(),
8583 ExtensionConfiguration* extensions =
nullptr,
8584 MaybeLocal<Value> global_object = MaybeLocal<Value>());
8603 static MaybeLocal<Object> NewRemoteContext(
8604 Isolate* isolate, Local<ObjectTemplate> global_template,
8605 MaybeLocal<Value> global_object = MaybeLocal<Value>());
8611 void SetSecurityToken(Local<Value> token);
8614 void UseDefaultSecurityToken();
8617 Local<Value> GetSecurityToken();
8634 Isolate* GetIsolate();
8640 enum EmbedderDataFields { kDebugIdIndex = 0 };
8646 V8_INLINE Local<Value> GetEmbedderData(
int index);
8654 Local<Object> GetExtrasBindingObject();
8661 void SetEmbedderData(
int index, Local<Value> value);
8669 V8_INLINE void* GetAlignedPointerFromEmbedderData(
int index);
8676 void SetAlignedPointerInEmbedderData(
int index,
void* value);
8691 void AllowCodeGenerationFromStrings(
bool allow);
8697 bool IsCodeGenerationFromStringsAllowed();
8704 void SetErrorMessageForCodeGenerationFromStrings(Local<String> message);
8709 V8_DEPRECATED(
"no longer supported",
size_t EstimatedSize());
8731 class BackupIncumbentScope {
8741 friend class internal::Isolate;
8754 void* SlowGetAlignedPointerFromEmbedderData(
int index);
8843 void Initialize(
Isolate* isolate);
8845 internal::Isolate* isolate_;
8862 static bool IsLocked(
Isolate* isolate);
8867 static bool IsActive();
8871 void operator=(
const Locker&) =
delete;
8874 void Initialize(
Isolate* isolate);
8878 internal::Isolate* isolate_;
8903template<
int kSmiShiftSize>
8906 uintptr_t tagged_value =
8907 (
static_cast<uintptr_t
>(value) << smi_shift_bits) |
kSmiTag;
8908 return reinterpret_cast<internal::Object*
>(tagged_value);
8916 V8_INLINE static int SmiToInt(
const internal::Object* value) {
8919 return static_cast<int>(
reinterpret_cast<intptr_t
>(value)) >> shift_bits;
8922 return internal::IntToSmi<kSmiShiftSize>(value);
8924 V8_INLINE static bool IsValidSmi(intptr_t value) {
8936 return static_cast<uintptr_t
>(value + 0x40000000U) < 0x80000000U;
8945 V8_INLINE static int SmiToInt(
const internal::Object* value) {
8948 return static_cast<int>(
reinterpret_cast<intptr_t
>(value) >> shift_bits);
8951 return internal::IntToSmi<kSmiShiftSize>(value);
8953 V8_INLINE static bool IsValidSmi(intptr_t value) {
8955 return (value ==
static_cast<int32_t
>(value));
9028#ifdef V8_ENABLE_CHECKS
9039 return PlatformSmiTagging::SmiToInt(value);
9043 return PlatformSmiTagging::IntToSmi(value);
9047 return PlatformSmiTagging::IsValidSmi(value);
9051 typedef internal::Object O;
9059 typedef internal::Object O;
9070 return *addr &
static_cast<uint8_t
>(1U << shift);
9074 bool value,
int shift) {
9076 uint8_t mask =
static_cast<uint8_t
>(1U << shift);
9077 *addr =
static_cast<uint8_t
>((*addr & ~mask) | (value << shift));
9088 *addr =
static_cast<uint8_t
>((*addr & ~kNodeStateMask) | value);
9094 uint8_t* addr =
reinterpret_cast<uint8_t*
>(isolate) +
9096 *
reinterpret_cast<void**
>(addr) = data;
9101 const uint8_t* addr =
reinterpret_cast<const uint8_t*
>(isolate) +
9103 return *
reinterpret_cast<void* const*
>(addr);
9109 return reinterpret_cast<internal::Object**
>(addr + index *
kApiPointerSize);
9112 template <
typename T>
9114 const uint8_t* addr =
9116 return *
reinterpret_cast<const T*
>(addr);
9119 template <
typename T>
9121 typedef internal::Object O;
9123 O* ctx = *
reinterpret_cast<O* const*
>(context);
9124 int embedder_data_offset = I::kContextHeaderSize +
9126 O* embedder_data = I::ReadField<O*>(ctx, embedder_data_offset);
9129 return I::ReadField<T>(embedder_data, value_offset);
9138 return New(isolate, that.val_);
9143 return New(isolate, that.val_);
9149 if (that == NULL)
return Local<T>();
9151 internal::Object** p =
reinterpret_cast<internal::Object**
>(that_ptr);
9153 reinterpret_cast<internal::Isolate*
>(isolate), *p)));
9161 val_ =
reinterpret_cast<T*
>(
9162 V8::Eternalize(isolate,
reinterpret_cast<Value*
>(*handle)));
9175 if (
V8_UNLIKELY(val_ ==
nullptr)) V8::ToLocalEmpty();
9182#ifdef V8_ENABLE_CHECKS
9183 if (index < 0 || index >= kEmbedderFieldsInWeakCallback) {
9184 V8::InternalFieldOutOfBounds(index);
9187 return embedder_fields_[index];
9193 if (that == NULL)
return NULL;
9194 internal::Object** p =
reinterpret_cast<internal::Object**
>(that);
9195 return reinterpret_cast<T*
>(
9196 V8::GlobalizeReference(
reinterpret_cast<internal::Isolate*
>(isolate),
9201template <
class T,
class M>
9202template <
class S,
class M2>
9203void Persistent<T, M>::Copy(
const Persistent<S, M2>& that) {
9206 if (that.IsEmpty())
return;
9207 internal::Object** p =
reinterpret_cast<internal::Object**
>(that.val_);
9208 this->val_ =
reinterpret_cast<T*
>(V8::CopyPersistent(p));
9209 M::Copy(that,
this);
9216 if (this->IsEmpty())
return false;
9217 return I::GetNodeFlag(
reinterpret_cast<internal::Object**
>(this->val_),
9218 I::kNodeIsIndependentShift);
9225 if (this->IsEmpty())
return false;
9226 uint8_t node_state =
9227 I::GetNodeState(
reinterpret_cast<internal::Object**
>(this->val_));
9228 return node_state == I::kNodeStateIsNearDeathValue ||
9229 node_state == I::kNodeStateIsPendingValue;
9236 if (this->IsEmpty())
return false;
9237 return I::GetNodeState(
reinterpret_cast<internal::Object**
>(this->val_)) ==
9238 I::kNodeStateIsWeakValue;
9244 if (this->IsEmpty())
return;
9245 V8::DisposeGlobal(
reinterpret_cast<internal::Object**
>(this->val_));
9256 this->val_ = New(isolate, other.val_);
9267 this->val_ = New(isolate, other.val_);
9272template <
typename P>
9277 V8::MakeWeak(
reinterpret_cast<internal::Object**
>(this->val_), parameter,
9278 reinterpret_cast<Callback
>(callback), type);
9283 V8::MakeWeak(
reinterpret_cast<internal::Object***
>(&this->val_));
9287template <
typename P>
9289 return reinterpret_cast<P*
>(
9290 V8::ClearWeak(
reinterpret_cast<internal::Object**
>(this->val_)));
9295 if (IsEmpty())
return;
9296 V8::RegisterExternallyReferencedObject(
9297 reinterpret_cast<internal::Object**
>(this->val_),
9298 reinterpret_cast<internal::Isolate*
>(isolate));
9304 if (this->IsEmpty())
return;
9305 I::UpdateNodeFlag(
reinterpret_cast<internal::Object**
>(this->val_),
9307 I::kNodeIsIndependentShift);
9313 if (this->IsEmpty())
return;
9314 I::UpdateNodeFlag(
reinterpret_cast<internal::Object**
>(this->val_),
true,
9315 I::kNodeIsActiveShift);
9322 if (this->IsEmpty())
return;
9323 internal::Object** obj =
reinterpret_cast<internal::Object**
>(this->val_);
9324 uint8_t* addr =
reinterpret_cast<uint8_t*
>(obj) + I::kNodeClassIdOffset;
9325 *
reinterpret_cast<uint16_t*
>(addr) = class_id;
9332 if (this->IsEmpty())
return 0;
9333 internal::Object** obj =
reinterpret_cast<internal::Object**
>(this->val_);
9334 uint8_t* addr =
reinterpret_cast<uint8_t*
>(obj) + I::kNodeClassIdOffset;
9335 return *
reinterpret_cast<uint16_t*
>(addr);
9347 *value_ = GetDefaultValue();
9349 *value_ = *
reinterpret_cast<internal::Object**
>(*handle);
9353template <
typename T>
9354template <
typename S>
9358 *value_ = GetDefaultValue();
9360 *value_ = *
reinterpret_cast<internal::Object**
>(*handle);
9364template <
typename T>
9365template <
typename S>
9369 *value_ = GetDefaultValue();
9371 *value_ = *
reinterpret_cast<internal::Object**
>(*handle);
9386 *value_ = I::IntToSmi(i);
9396 bool fits_into_int32_t = (i & (1U << 31)) == 0;
9398 Set(
static_cast<int32_t
>(i));
9410 root_index = I::kTrueValueRootIndex;
9412 root_index = I::kFalseValueRootIndex;
9414 *value_ = *I::GetRoot(GetIsolate(), root_index);
9421 *value_ = *I::GetRoot(GetIsolate(), I::kNullValueRootIndex);
9428 *value_ = *I::GetRoot(GetIsolate(), I::kUndefinedValueRootIndex);
9435 *value_ = *I::GetRoot(GetIsolate(), I::kEmptyStringRootIndex);
9438template <
typename T>
9441 return *
reinterpret_cast<Isolate**
>(&value_[-2]);
9444template <
typename T>
9447 if (*value_ == *I::GetRoot(GetIsolate(), I::kTheHoleValueRootIndex))
9452template <
typename T>
9453template <
typename S>
9465template <
typename T>
9467 internal::Object** values,
9469 : implicit_args_(implicit_args), values_(values), length_(length) {}
9481 &implicit_args_[kCalleeIndex]));
9494 &implicit_args_[kHolderIndex]));
9497template <
typename T>
9500 reinterpret_cast<Value*
>(&implicit_args_[kNewTargetIndex]));
9503template <
typename T>
9511 return *
reinterpret_cast<Isolate**
>(&implicit_args_[kIsolateIndex]);
9523 return !NewTarget()->IsUndefined();
9540 : resource_name_(resource_name),
9541 resource_line_offset_(resource_line_offset),
9542 resource_column_offset_(resource_column_offset),
9543 options_(!resource_is_shared_cross_origin.IsEmpty() &&
9544 resource_is_shared_cross_origin->IsTrue(),
9545 !resource_is_opaque.IsEmpty() && resource_is_opaque->IsTrue(),
9546 !is_wasm.IsEmpty() && is_wasm->IsTrue(),
9547 !is_module.IsEmpty() && is_module->IsTrue()),
9548 script_id_(script_id),
9549 source_map_url_(source_map_url) {}
9555 return resource_line_offset_;
9560 return resource_column_offset_;
9572 : source_string(string),
9573 resource_name(origin.ResourceName()),
9574 resource_line_offset(origin.ResourceLineOffset()),
9575 resource_column_offset(origin.ResourceColumnOffset()),
9576 resource_options(origin.Options()),
9577 source_map_url(origin.SourceMapUrl()),
9578 cached_data(data) {}
9583 : source_string(string), cached_data(data) {}
9597 return resource_options;
9601 return value ?
True(isolate) :
False(isolate);
9612#ifndef V8_ENABLE_CHECKS
9613 typedef internal::Object O;
9614 typedef internal::HeapObject HO;
9616 O* obj = *
reinterpret_cast<O**
>(
this);
9619 auto instance_type = I::GetInstanceType(obj);
9620 if (instance_type == I::kJSObjectType ||
9621 instance_type == I::kJSApiObjectType) {
9623 O* value = I::ReadField<O*>(obj, offset);
9628 return SlowGetInternalField(index);
9633#ifndef V8_ENABLE_CHECKS
9634 typedef internal::Object O;
9636 O* obj = *
reinterpret_cast<O**
>(
this);
9639 auto instance_type = I::GetInstanceType(obj);
9640 if (
V8_LIKELY(instance_type == I::kJSObjectType ||
9641 instance_type == I::kJSApiObjectType)) {
9643 return I::ReadField<void*>(obj, offset);
9646 return SlowGetAlignedPointerFromInternalField(index);
9650#ifdef V8_ENABLE_CHECKS
9653 return static_cast<String*
>(value);
9658 typedef internal::Object* S;
9660 I::CheckInitialized(isolate);
9661 S* slot = I::GetRoot(isolate, I::kEmptyStringRootIndex);
9667 typedef internal::Object O;
9669 O* obj = *
reinterpret_cast<O* const*
>(
this);
9671 if (I::IsExternalTwoByteString(I::GetInstanceType(obj))) {
9672 void* value = I::ReadField<void*>(obj, I::kStringResourceOffset);
9677#ifdef V8_ENABLE_CHECKS
9678 VerifyExternalStringResource(result);
9686 typedef internal::Object O;
9688 O* obj = *
reinterpret_cast<O* const*
>(
this);
9689 int type = I::GetInstanceType(obj) & I::kFullStringRepresentationMask;
9690 *encoding_out =
static_cast<Encoding>(type & I::kStringEncodingMask);
9692 if (type == I::kExternalOneByteRepresentationTag ||
9693 type == I::kExternalTwoByteRepresentationTag) {
9694 void* value = I::ReadField<void*>(obj, I::kStringResourceOffset);
9697#ifdef V8_ENABLE_CHECKS
9698 VerifyExternalStringResourceBase(resource, *encoding_out);
9705#ifdef V8_ENABLE_CHECKS
9706 return FullIsUndefined();
9708 return QuickIsUndefined();
9712bool Value::QuickIsUndefined()
const {
9713 typedef internal::Object O;
9715 O* obj = *
reinterpret_cast<O* const*
>(
this);
9716 if (!I::HasHeapObjectTag(obj))
return false;
9717 if (I::GetInstanceType(obj) != I::kOddballType)
return false;
9718 return (I::GetOddballKind(obj) == I::kUndefinedOddballKind);
9723#ifdef V8_ENABLE_CHECKS
9724 return FullIsNull();
9726 return QuickIsNull();
9730bool Value::QuickIsNull()
const {
9731 typedef internal::Object O;
9733 O* obj = *
reinterpret_cast<O* const*
>(
this);
9734 if (!I::HasHeapObjectTag(obj))
return false;
9735 if (I::GetInstanceType(obj) != I::kOddballType)
return false;
9736 return (I::GetOddballKind(obj) == I::kNullOddballKind);
9740#ifdef V8_ENABLE_CHECKS
9741 return FullIsNull() || FullIsUndefined();
9743 return QuickIsNullOrUndefined();
9747bool Value::QuickIsNullOrUndefined()
const {
9748 typedef internal::Object O;
9750 O* obj = *
reinterpret_cast<O* const*
>(
this);
9751 if (!I::HasHeapObjectTag(obj))
return false;
9752 if (I::GetInstanceType(obj) != I::kOddballType)
return false;
9753 int kind = I::GetOddballKind(obj);
9754 return kind == I::kNullOddballKind || kind == I::kUndefinedOddballKind;
9758#ifdef V8_ENABLE_CHECKS
9759 return FullIsString();
9761 return QuickIsString();
9765bool Value::QuickIsString()
const {
9766 typedef internal::Object O;
9768 O* obj = *
reinterpret_cast<O* const*
>(
this);
9769 if (!I::HasHeapObjectTag(obj))
return false;
9770 return (I::GetInstanceType(obj) < I::kFirstNonstringType);
9775 return static_cast<Value*
>(value);
9828#ifdef V8_ENABLE_CHECKS
9831 return static_cast<Boolean*
>(value);
9836#ifdef V8_ENABLE_CHECKS
9839 return static_cast<Name*
>(value);
9844#ifdef V8_ENABLE_CHECKS
9847 return static_cast<Symbol*
>(value);
9852#ifdef V8_ENABLE_CHECKS
9855 return static_cast<Number*
>(value);
9860#ifdef V8_ENABLE_CHECKS
9863 return static_cast<Integer*
>(value);
9868#ifdef V8_ENABLE_CHECKS
9871 return static_cast<Int32*
>(value);
9876#ifdef V8_ENABLE_CHECKS
9879 return static_cast<Uint32*
>(value);
9884#ifdef V8_ENABLE_CHECKS
9887 return static_cast<Date*
>(value);
9892#ifdef V8_ENABLE_CHECKS
9900#ifdef V8_ENABLE_CHECKS
9908#ifdef V8_ENABLE_CHECKS
9916#ifdef V8_ENABLE_CHECKS
9924#ifdef V8_ENABLE_CHECKS
9927 return static_cast<RegExp*
>(value);
9932#ifdef V8_ENABLE_CHECKS
9935 return static_cast<Object*
>(value);
9940#ifdef V8_ENABLE_CHECKS
9943 return static_cast<Array*
>(value);
9948#ifdef V8_ENABLE_CHECKS
9951 return static_cast<Map*
>(value);
9956#ifdef V8_ENABLE_CHECKS
9959 return static_cast<Set*
>(value);
9964#ifdef V8_ENABLE_CHECKS
9967 return static_cast<Promise*
>(value);
9972#ifdef V8_ENABLE_CHECKS
9975 return static_cast<Proxy*
>(value);
9979#ifdef V8_ENABLE_CHECKS
9986#ifdef V8_ENABLE_CHECKS
9994#ifdef V8_ENABLE_CHECKS
10002#ifdef V8_ENABLE_CHECKS
10010#ifdef V8_ENABLE_CHECKS
10018#ifdef V8_ENABLE_CHECKS
10026#ifdef V8_ENABLE_CHECKS
10034#ifdef V8_ENABLE_CHECKS
10042#ifdef V8_ENABLE_CHECKS
10050#ifdef V8_ENABLE_CHECKS
10058#ifdef V8_ENABLE_CHECKS
10066#ifdef V8_ENABLE_CHECKS
10074#ifdef V8_ENABLE_CHECKS
10082#ifdef V8_ENABLE_CHECKS
10090#ifdef V8_ENABLE_CHECKS
10093 return static_cast<DataView*
>(value);
10098#ifdef V8_ENABLE_CHECKS
10106#ifdef V8_ENABLE_CHECKS
10109 return static_cast<Function*
>(value);
10114#ifdef V8_ENABLE_CHECKS
10117 return static_cast<External*
>(value);
10121template<
typename T>
10123 return *
reinterpret_cast<Isolate**
>(&args_[kIsolateIndex]);
10127template<
typename T>
10133template<
typename T>
10139template<
typename T>
10145template<
typename T>
10150template <
typename T>
10153 return args_[kShouldThrowOnErrorIndex] != I::IntToSmi(0);
10158 typedef internal::Object* S;
10160 I::CheckInitialized(isolate);
10161 S* slot = I::GetRoot(isolate, I::kUndefinedValueRootIndex);
10167 typedef internal::Object* S;
10169 I::CheckInitialized(isolate);
10170 S* slot = I::GetRoot(isolate, I::kNullValueRootIndex);
10176 typedef internal::Object* S;
10178 I::CheckInitialized(isolate);
10179 S* slot = I::GetRoot(isolate, I::kTrueValueRootIndex);
10185 typedef internal::Object* S;
10187 I::CheckInitialized(isolate);
10188 S* slot = I::GetRoot(isolate, I::kFalseValueRootIndex);
10195 I::SetEmbedderData(
this, slot, data);
10201 return I::GetEmbedderData(
this, slot);
10207 return I::kNumIsolateDataSlots;
10212 int64_t change_in_bytes) {
10214 const int64_t kMemoryReducerActivationLimit = 32 * 1024 * 1024;
10215 int64_t* external_memory =
reinterpret_cast<int64_t*
>(
10216 reinterpret_cast<uint8_t*
>(
this) + I::kExternalMemoryOffset);
10217 int64_t* external_memory_limit =
reinterpret_cast<int64_t*
>(
10218 reinterpret_cast<uint8_t*
>(
this) + I::kExternalMemoryLimitOffset);
10219 int64_t* external_memory_at_last_mc =
10220 reinterpret_cast<int64_t*
>(
reinterpret_cast<uint8_t*
>(
this) +
10221 I::kExternalMemoryAtLastMarkCompactOffset);
10222 const int64_t amount = *external_memory + change_in_bytes;
10224 *external_memory = amount;
10226 int64_t allocation_diff_since_last_mc =
10227 *external_memory_at_last_mc - *external_memory;
10228 allocation_diff_since_last_mc = allocation_diff_since_last_mc < 0
10229 ? -allocation_diff_since_last_mc
10230 : allocation_diff_since_last_mc;
10231 if (allocation_diff_since_last_mc > kMemoryReducerActivationLimit) {
10232 CheckMemoryPressure();
10235 if (change_in_bytes < 0) {
10236 *external_memory_limit += change_in_bytes;
10239 if (change_in_bytes > 0 && amount > *external_memory_limit) {
10240 ReportExternalAllocationLimitReached();
10242 return *external_memory;
10246#ifndef V8_ENABLE_CHECKS
10247 typedef internal::Object O;
10248 typedef internal::HeapObject HO;
10250 HO* context = *
reinterpret_cast<HO**
>(
this);
10255 return SlowGetEmbedderData(index);
10261#ifndef V8_ENABLE_CHECKS
10263 return I::ReadEmbedderData<void*>(
this, index);
10265 return SlowGetAlignedPointerFromEmbedderData(index);
10271 return isolate->
IsDead();
10324 if (isolate == NULL) {
Local< ArrayBuffer > Buffer()
static ArrayBufferView * Cast(Value *obj)
Definition: v8.h:10000
size_t CopyContents(void *dest, size_t byte_length)
virtual void Free(void *data, size_t length)=0
static Allocator * NewDefaultAllocator()
virtual void * AllocateUninitialized(size_t length)=0
virtual void SetProtection(void *data, size_t length, Protection protection)
AllocationMode
Definition: v8.h:4304
virtual void Free(void *data, size_t length, AllocationMode mode)
virtual void * Allocate(size_t length)=0
virtual void * Reserve(size_t length)
Protection
Definition: v8.h:4314
virtual ~Allocator()
Definition: v8.h:4277
void * Data() const
Definition: v8.h:4359
Contents()
Definition: v8.h:4346
Allocator::AllocationMode AllocationMode() const
Definition: v8.h:4355
size_t AllocationLength() const
Definition: v8.h:4354
size_t ByteLength() const
Definition: v8.h:4360
void * AllocationBase() const
Definition: v8.h:4353
static ArrayBuffer * Cast(Value *obj)
Definition: v8.h:9992
static Local< ArrayBuffer > New(Isolate *isolate, size_t byte_length)
bool IsNeuterable() const
static Local< ArrayBuffer > New(Isolate *isolate, void *data, size_t byte_length, ArrayBufferCreationMode mode=ArrayBufferCreationMode::kExternalized)
size_t ByteLength() const
Local< Object > CloneElementAt(uint32_t index)
static Local< Array > New(Isolate *isolate, int length=0)
static Array * Cast(Value *obj)
Definition: v8.h:9938
static BooleanObject * Cast(Value *obj)
Definition: v8.h:9914
static Local< Value > New(Isolate *isolate, bool value)
static Local< Value > New(bool value)
static Boolean * Cast(v8::Value *obj)
Definition: v8.h:9826
static Local< Boolean > New(Isolate *isolate, bool value)
Definition: v8.h:9599
Local< Value > GetEmbedderData(int index)
Definition: v8.h:10244
void * GetAlignedPointerFromEmbedderData(int index)
Definition: v8.h:10259
Definition: v8-profiler.h:280
static Local< DataView > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static Local< DataView > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static DataView * Cast(Value *obj)
Definition: v8.h:10088
static MaybeLocal< Value > New(Local< Context > context, double time)
static void DateTimeConfigurationChangeNotification(Isolate *isolate)
static Local< Value > New(Isolate *isolate, double time)
static Date * Cast(Value *obj)
Definition: v8.h:9882
ForceCompletionAction
Definition: v8.h:6661
EscapableHandleScope(const EscapableHandleScope &)=delete
Local< T > Escape(Local< T > value)
Definition: v8.h:922
void operator=(const EscapableHandleScope &)=delete
~EscapableHandleScope()
Definition: v8.h:915
EscapableHandleScope(Isolate *isolate)
Local< T > Get(Isolate *isolate) const
Definition: v8.h:9165
void Set(Isolate *isolate, Local< S > handle)
Definition: v8.h:9158
Eternal()
Definition: v8.h:395
bool IsEmpty() const
Definition: v8.h:402
Eternal(Isolate *isolate, Local< S > handle)
Definition: v8.h:397
ExtensionConfiguration(int name_count, const char *names[])
Definition: v8.h:8497
ExternalOneByteStringResourceImpl(const char *data, size_t length)
Definition: v8.h:5980
static External * Cast(Value *obj)
Definition: v8.h:10112
static Local< External > New(Isolate *isolate, void *value)
static Local< Float32Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static Local< Float32Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static Float32Array * Cast(Value *obj)
Definition: v8.h:10064
static Local< Float64Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static Local< Float64Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static Float64Array * Cast(Value *obj)
Definition: v8.h:10072
static const int kHolderIndex
Definition: v8.h:3692
static const int kCalleeIndex
Definition: v8.h:3697
static const int kReturnValueDefaultValueIndex
Definition: v8.h:3694
static const int kIsolateIndex
Definition: v8.h:3693
static const int kDataIndex
Definition: v8.h:3696
static const int kArgsLength
Definition: v8.h:3686
internal::Object ** values_
Definition: v8.h:3704
static const int kNewTargetIndex
Definition: v8.h:3699
ReturnValue< T > GetReturnValue() const
Definition: v8.h:9515
Local< Object > This() const
Definition: v8.h:9485
Local< Object > Holder() const
Definition: v8.h:9491
Local< Value > operator[](int i) const
Definition: v8.h:9471
Isolate * GetIsolate() const
Definition: v8.h:9509
static const int kContextSaveIndex
Definition: v8.h:3698
Local< Value > NewTarget() const
Definition: v8.h:9497
friend class debug::ConsoleCallArguments
Definition: v8.h:3691
friend class internal::FunctionCallbackArguments
Definition: v8.h:3689
Local< Value > Data() const
Definition: v8.h:9503
int length_
Definition: v8.h:3705
internal::Object ** implicit_args_
Definition: v8.h:3703
static const int kReturnValueIndex
Definition: v8.h:3695
bool IsConstructCall() const
Definition: v8.h:9521
FunctionCallbackInfo(internal::Object **implicit_args, internal::Object **values, int length)
Definition: v8.h:9465
Local< Function > Callee() const
Definition: v8.h:9478
int Length() const
Definition: v8.h:9527
MaybeLocal< Function > GetFunction(Local< Context > context)
MaybeLocal< Value > Call(Local< Context > context, Local< Value > recv, int argc, Local< Value > argv[])
Local< Value > GetName() const
Local< Value > GetInferredName() const
Local< Value > GetDisplayName() const
int GetScriptLineNumber() const
MaybeLocal< Object > NewInstance(Local< Context > context) const
Definition: v8.h:3849
ScriptOrigin GetScriptOrigin() const
int GetScriptColumnNumber() const
static MaybeLocal< Function > New(Local< Context > context, FunctionCallback callback, Local< Value > data=Local< Value >(), int length=0, ConstructorBehavior behavior=ConstructorBehavior::kAllow)
Local< Object > NewInstance(int argc, Local< Value > argv[]) const
void SetName(Local< String > name)
static const int kLineOffsetNotFound
Definition: v8.h:3913
MaybeLocal< Object > NewInstance(Local< Context > context, int argc, Local< Value > argv[]) const
Local< Object > NewInstance() const
Local< Value > GetBoundFunction() const
static Function * Cast(Value *obj)
Definition: v8.h:10104
Local< Value > GetDebugName() const
void MoveOnlyTypeForCPP03
Definition: v8.h:825
Global(Isolate *isolate, const PersistentBase< S > &that)
Definition: v8.h:793
Global & operator=(Global< S > &&rhs)
Definition: v8.h:808
void operator=(const Global &)=delete
~Global()
Definition: v8.h:803
Global Pass()
Definition: v8.h:820
Global(Isolate *isolate, Local< S > that)
Definition: v8.h:783
Global(Global &&other)
Definition: v8.h:800
Global()
Definition: v8.h:776
Global(const Global &)=delete
void operator=(const HandleScope &)=delete
static internal::Object ** CreateHandle(internal::Isolate *isolate, internal::Object *value)
HandleScope()
Definition: v8.h:875
void Initialize(Isolate *isolate)
HandleScope(const HandleScope &)=delete
Isolate * GetIsolate() const
Definition: v8.h:867
static int NumberOfHandles(Isolate *isolate)
HandleScope(Isolate *isolate)
Definition: v8-profiler.h:626
static Local< Int16Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static Int16Array * Cast(Value *obj)
Definition: v8.h:10040
static Local< Int16Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static Local< Int32Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static Int32Array * Cast(Value *obj)
Definition: v8.h:10056
static Local< Int32Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static Int32 * Cast(v8::Value *obj)
Definition: v8.h:9866
static Int8Array * Cast(Value *obj)
Definition: v8.h:10024
static Local< Int8Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static Local< Int8Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static Local< Integer > New(Isolate *isolate, int32_t value)
static Integer * Cast(v8::Value *obj)
Definition: v8.h:9858
static Local< Integer > NewFromUnsigned(Isolate *isolate, uint32_t value)
OnFailure
Definition: v8.h:6875
void RemoveMessageListeners(MessageCallback that)
void RemoveGCEpilogueCallback(GCCallback callback)
void SetCaptureStackTraceForUncaughtExceptions(bool capture, int frame_limit=10, StackTrace::StackTraceOptions options=StackTrace::kOverview)
void SetFatalErrorHandler(FatalErrorCallback that)
bool AddMessageListener(MessageCallback that, Local< Value > data=Local< Value >())
void SetData(uint32_t slot, void *data)
Definition: v8.h:10192
void VisitExternalResources(ExternalResourceVisitor *visitor)
static Isolate * GetCurrent()
GarbageCollectionType
Definition: v8.h:6934
static uint32_t GetNumberOfDataSlots()
Definition: v8.h:10204
void CancelTerminateExecution()
void RemoveGCPrologueCallback(GCCallback callback)
void RemoveCallCompletedCallback(DeprecatedCallCompletedCallback callback)
void VisitHandlesWithClassIds(PersistentHandleVisitor *visitor)
int64_t AdjustAmountOfExternalAllocatedMemory(int64_t change_in_bytes)
Definition: v8.h:10210
void SetFailedAccessCheckCallbackFunction(FailedAccessCheckCallback)
void(* GCCallback)(Isolate *isolate, GCType type, GCCallbackFlags flags)
Definition: v8.h:7259
void VisitHandlesForPartialDependence(PersistentHandleVisitor *visitor)
MessageErrorLevel
Definition: v8.h:6992
void TerminateExecution()
UseCounterFeature
Definition: v8.h:6944
void * GetData(uint32_t slot)
Definition: v8.h:10198
bool IsExecutionTerminating()
static Local< Value > Parse(Local< String > json_string)
static MaybeLocal< String > Stringify(Local< Context > context, Local< Object > json_object, Local< String > gap=Local< String >())
static MaybeLocal< Value > Parse(Local< Context > context, Local< String > json_string)
friend Local< Primitive > Null(Isolate *isolate)
Definition: v8.h:10165
static Local< T > New(Isolate *isolate, Local< T > that)
Definition: v8.h:9136
bool IsEmpty() const
Definition: v8.h:214
friend Local< Boolean > False(Isolate *isolate)
Definition: v8.h:10183
friend Local< Primitive > Undefined(Isolate *isolate)
Definition: v8.h:10156
T * operator*() const
Definition: v8.h:223
static Local< T > Cast(Local< S > that)
Definition: v8.h:270
Local< S > As() const
Definition: v8.h:285
bool operator!=(const Local< S > &that) const
Definition: v8.h:256
bool operator==(const PersistentBase< S > &that) const
Definition: v8.h:240
friend Local< Boolean > True(Isolate *isolate)
Definition: v8.h:10174
static Local< T > New(Isolate *isolate, const PersistentBase< T > &that)
Definition: v8.h:9141
void Clear()
Definition: v8.h:219
bool operator!=(const Persistent< S > &that) const
Definition: v8.h:260
friend class Utils
Definition: v8.h:299
Local()
Definition: v8.h:199
T * operator->() const
Definition: v8.h:221
bool operator==(const Local< S > &that) const
Definition: v8.h:232
Local(Local< S > that)
Definition: v8.h:201
friend class Local
Definition: v8.h:303
int GetLineNumber()
Definition: v8.h:1084
Location(int line_number, int column_number)
Definition: v8.h:1087
int GetColumnNumber()
Definition: v8.h:1085
Local< Array > AsArray() const
static Local< Map > New(Isolate *isolate)
Maybe< bool > Delete(Local< Context > context, Local< Value > key)
MaybeLocal< Value > Get(Local< Context > context, Local< Value > key)
Maybe< bool > Has(Local< Context > context, Local< Value > key)
MaybeLocal< Map > Set(Local< Context > context, Local< Value > key, Local< Value > value)
static Map * Cast(Value *obj)
Definition: v8.h:9946
bool ToLocal(Local< S > *out) const
Definition: v8.h:365
Local< T > ToLocalChecked()
Definition: v8.h:9173
Local< S > FromMaybe(Local< S > default_value) const
Definition: v8.h:381
MaybeLocal()
Definition: v8.h:351
bool IsEmpty() const
Definition: v8.h:358
MaybeLocal(Local< S > that)
Definition: v8.h:353
friend Maybe< U > Nothing()
Definition: v8.h:8312
T FromMaybe(const T &default_value) const
Definition: v8.h:8284
bool operator!=(const Maybe &other) const
Definition: v8.h:8293
bool IsNothing() const
Definition: v8.h:8254
T FromJust() const
Definition: v8.h:8275
bool To(T *out) const
Definition: v8.h:8266
friend Maybe< U > Just(const U &u)
bool IsJust() const
Definition: v8.h:8255
bool operator==(const Maybe &other) const
Definition: v8.h:8288
T ToChecked() const
Definition: v8.h:8260
Local< String > GetSourceLine() const
ScriptOrigin GetScriptOrigin() const
int GetStartColumn() const
MaybeLocal< String > GetSourceLine(Local< Context > context) const
Local< String > Get() const
bool IsSharedCrossOrigin() const
Local< StackTrace > GetStackTrace() const
int GetStartPosition() const
int GetEndPosition() const
Maybe< int > GetLineNumber(Local< Context > context) const
Maybe< int > GetEndColumn(Local< Context > context) const
static void PrintCurrentStackTrace(Isolate *isolate, FILE *out)
int GetLineNumber() const
Maybe< int > GetStartColumn(Local< Context > context) const
Local< Value > GetScriptResourceName() const
Type
Definition: v8.h:6309
Maybe< bool > InstantiateModule(Local< Context > context, ResolveCallback callback)
MaybeLocal< Value > Evaluate(Local< Context > context)
Local< Value > GetModuleNamespace()
int GetModuleRequestsLength() const
Local< Value > GetException() const
Location GetModuleRequestLocation(int i) const
Status
Definition: v8.h:1106
@ kInstantiating
Definition: v8.h:1108
@ kInstantiated
Definition: v8.h:1109
@ kUninstantiated
Definition: v8.h:1107
@ kEvaluating
Definition: v8.h:1110
@ kEvaluated
Definition: v8.h:1111
int GetIdentityHash() const
Local< String > GetModuleRequest(int i) const
static Name * Cast(Value *obj)
Definition: v8.h:9834
static Local< NativeWeakMap > New(Isolate *isolate)
bool Has(Local< Value > key)
Local< Value > Get(Local< Value > key) const
void Set(Local< Value > key, Local< Value > value)
bool Delete(Local< Value > key)
static void Uncompilable()
Definition: v8.h:647
static const bool kResetInDestructor
Definition: v8.h:640
static void Copy(const Persistent< S, M > &source, NonCopyablePersistent *dest)
Definition: v8.h:642
Persistent< T, NonCopyablePersistentTraits< T > > NonCopyablePersistent
Definition: v8.h:639
static NumberObject * Cast(Value *obj)
Definition: v8.h:9906
static Local< Value > New(Isolate *isolate, double value)
static Number * Cast(v8::Value *obj)
Definition: v8.h:9850
static Local< Number > New(Isolate *isolate, double value)
MaybeLocal< Object > NewInstance(Local< Context > context)
Local< Value > Get(uint32_t index)
bool HasOwnProperty(Local< String > key)
Maybe< PropertyAttribute > GetRealNamedPropertyAttributesInPrototypeChain(Local< Context > context, Local< Name > key)
Maybe< PropertyAttribute > GetPropertyAttributes(Local< Context > context, Local< Value > key)
void SetAlignedPointerInInternalField(int index, void *value)
Maybe< bool > CreateDataProperty(Local< Context > context, uint32_t index, Local< Value > value)
Local< Context > CreationContext()
MaybeLocal< Value > GetOwnPropertyDescriptor(Local< Context > context, Local< Name > key)
bool HasNamedLookupInterceptor()
static Object * Cast(Value *obj)
Definition: v8.h:9930
Maybe< bool > SetPrivate(Local< Context > context, Local< Private > key, Local< Value > value)
Maybe< bool > HasRealNamedProperty(Local< Context > context, Local< Name > key)
MaybeLocal< Array > GetPropertyNames(Local< Context > context)
bool HasIndexedLookupInterceptor()
Maybe< bool > Delete(Local< Context > context, uint32_t index)
void SetAccessorProperty(Local< Name > name, Local< Function > getter, Local< Function > setter=Local< Function >(), PropertyAttribute attribute=None, AccessControl settings=DEFAULT)
bool HasRealIndexedProperty(uint32_t index)
MaybeLocal< Value > GetRealNamedProperty(Local< Context > context, Local< Name > key)
Maybe< bool > DefineProperty(Local< Context > context, Local< Name > key, PropertyDescriptor &descriptor)
bool Has(Local< Value > key)
Maybe< bool > SetPrototype(Local< Context > context, Local< Value > prototype)
Maybe< bool > Delete(Local< Context > context, Local< Value > key)
MaybeLocal< Value > CallAsFunction(Local< Context > context, Local< Value > recv, int argc, Local< Value > argv[])
Maybe< bool > DefineOwnProperty(Local< Context > context, Local< Name > key, Local< Value > value, PropertyAttribute attributes=None)
Local< Value > GetRealNamedPropertyInPrototypeChain(Local< String > key)
void * GetAlignedPointerFromInternalField(int index)
Definition: v8.h:9631
static int InternalFieldCount(const PersistentBase< Object > &object)
Definition: v8.h:3301
MaybeLocal< Value > GetRealNamedPropertyInPrototypeChain(Local< Context > context, Local< Name > key)
Maybe< bool > Has(Local< Context > context, Local< Value > key)
MaybeLocal< Array > GetOwnPropertyNames(Local< Context > context)
bool HasRealNamedCallbackProperty(Local< String > key)
MaybeLocal< Array > GetOwnPropertyNames(Local< Context > context, PropertyFilter filter)
Maybe< bool > Set(Local< Context > context, Local< Value > key, Local< Value > value)
bool Delete(uint32_t index)
MaybeLocal< Value > CallAsConstructor(Local< Context > context, int argc, Local< Value > argv[])
static void * GetAlignedPointerFromInternalField(const PersistentBase< Object > &object, int index)
Definition: v8.h:3320
Local< Value > GetPrototype()
Maybe< bool > SetNativeDataProperty(Local< Context > context, Local< Name > name, AccessorNameGetterCallback getter, AccessorNameSetterCallback setter=nullptr, Local< Value > data=Local< Value >(), PropertyAttribute attributes=None)
bool SetPrototype(Local< Value > prototype)
MaybeLocal< Value > GetPrivate(Local< Context > context, Local< Private > key)
Local< Array > GetOwnPropertyNames()
MaybeLocal< Array > GetPropertyNames(Local< Context > context, KeyCollectionMode mode, PropertyFilter property_filter, IndexFilter index_filter)
Maybe< bool > CreateDataProperty(Local< Context > context, Local< Name > key, Local< Value > value)
Maybe< bool > SetAccessor(Local< Context > context, Local< Name > name, AccessorNameGetterCallback getter, AccessorNameSetterCallback setter=0, MaybeLocal< Value > data=MaybeLocal< Value >(), AccessControl settings=DEFAULT, PropertyAttribute attribute=None)
Local< Value > Get(Local< Value > key)
bool HasRealNamedProperty(Local< String > key)
Maybe< bool > HasRealIndexedProperty(Local< Context > context, uint32_t index)
MaybeLocal< String > ObjectProtoToString(Local< Context > context)
Local< Value > GetOwnPropertyDescriptor(Local< Name > key)
Local< String > ObjectProtoToString()
MaybeLocal< Value > Get(Local< Context > context, uint32_t index)
Maybe< bool > SetIntegrityLevel(Local< Context > context, IntegrityLevel level)
Local< Value > GetInternalField(int index)
Definition: v8.h:9610
Maybe< PropertyAttribute > GetRealNamedPropertyAttributes(Local< Context > context, Local< Name > key)
Maybe< bool > HasPrivate(Local< Context > context, Local< Private > key)
Local< Value > CallAsConstructor(int argc, Local< Value > argv[])
Local< Object > FindInstanceInPrototypeChain(Local< FunctionTemplate > tmpl)
MaybeLocal< Value > Get(Local< Context > context, Local< Value > key)
static Local< Object > New(Isolate *isolate)
Maybe< bool > Set(Local< Context > context, uint32_t index, Local< Value > value)
Maybe< bool > HasOwnProperty(Local< Context > context, Local< Name > key)
bool Delete(Local< Value > key)
Maybe< bool > Has(Local< Context > context, uint32_t index)
Maybe< bool > DeletePrivate(Local< Context > context, Local< Private > key)
Local< String > GetConstructorName()
PropertyAttribute GetPropertyAttributes(Local< Value > key)
void SetInternalField(int index, Local< Value > value)
static Local< Context > CreationContext(const PersistentBase< Object > &object)
Definition: v8.h:3444
void SetAlignedPointerInInternalFields(int argc, int indices[], void *values[])
Maybe< bool > HasRealNamedCallbackProperty(Local< Context > context, Local< Name > key)
bool Set(uint32_t index, Local< Value > value)
Local< Value > GetRealNamedProperty(Local< String > key)
Local< Array > GetPropertyNames()
bool Set(Local< Value > key, Local< Value > value)
Maybe< bool > HasOwnProperty(Local< Context > context, uint32_t index)
void SetWeak(P *parameter, typename WeakCallbackInfo< P >::Callback callback, WeakCallbackType type)
Definition: v8.h:9272
void SetWeak()
Definition: v8.h:9281
void Reset()
Definition: v8.h:9242
void ClearWeak()
Definition: v8.h:562
Local< T > Get(Isolate *isolate) const
Definition: v8.h:505
void RegisterExternalReference(Isolate *isolate) const
Definition: v8.h:9293
bool IsWeak() const
Definition: v8.h:9233
void Empty()
Definition: v8.h:503
bool IsIndependent() const
Definition: v8.h:9213
bool IsNearDeath() const
Definition: v8.h:9222
void Reset(Isolate *isolate, const PersistentBase< S > &other)
Definition: v8.h:9261
void MarkActive()
Definition: v8.h:9310
bool operator==(const Local< S > &that) const
Definition: v8.h:519
P * ClearWeak()
Definition: v8.h:9287
PersistentBase(const PersistentBase &other)=delete
bool operator!=(const PersistentBase< S > &that) const
Definition: v8.h:528
void Reset(Isolate *isolate, const Local< S > &other)
Definition: v8.h:9251
bool operator==(const PersistentBase< S > &that) const
Definition: v8.h:510
friend class PersistentBase
Definition: v8.h:616
friend class Utils
Definition: v8.h:611
bool IsEmpty() const
Definition: v8.h:502
void SetWrapperClassId(uint16_t class_id)
Definition: v8.h:9319
uint16_t WrapperClassId() const
Definition: v8.h:9329
bool operator!=(const Local< S > &that) const
Definition: v8.h:533
void operator=(const PersistentBase &)=delete
void MarkIndependent()
Definition: v8.h:9301
Definition: v8-util.h:162
Definition: v8-util.h:574
Persistent(Isolate *isolate, Local< S > that)
Definition: v8.h:689
~Persistent()
Definition: v8.h:730
Persistent(const Persistent< S, M2 > &that)
Definition: v8.h:713
Persistent()
Definition: v8.h:682
Persistent< S > & As() const
Definition: v8.h:747
static Persistent< T > & Cast(const Persistent< S > &that)
Definition: v8.h:736
Persistent & operator=(const Persistent< S, M2 > &that)
Definition: v8.h:721
Persistent & operator=(const Persistent &that)
Definition: v8.h:716
friend class Utils
Definition: v8.h:753
friend class Persistent
Definition: v8.h:755
Persistent(Isolate *isolate, const Persistent< S, M2 > &that)
Definition: v8.h:699
Persistent(const Persistent &that)
Definition: v8.h:709
Local< Value > Name() const
static Local< Private > ForApi(Isolate *isolate, Local< String > name)
static Local< Private > New(Isolate *isolate, Local< String > name=Local< String >())
Local< Promise > GetPromise() const
Definition: v8.h:6265
PromiseRejectEvent GetEvent() const
Definition: v8.h:6266
Local< Value > GetValue() const
Definition: v8.h:6267
Local< StackTrace > GetStackTrace() const
Definition: v8.h:6270
static MaybeLocal< Resolver > New(Local< Context > context)
Maybe< bool > Resolve(Local< Context > context, Local< Value > value)
void Reject(Local< Value > value)
Local< Promise > GetPromise()
static Local< Resolver > New(Isolate *isolate)
static Resolver * Cast(Value *obj)
Definition: v8.h:9984
Maybe< bool > Reject(Local< Context > context, Local< Value > value)
void Resolve(Local< Value > value)
Local< Promise > Catch(Local< Function > handler)
PromiseState
Definition: v8.h:3934
@ kFulfilled
Definition: v8.h:3934
MaybeLocal< Promise > Catch(Local< Context > context, Local< Function > handler)
Local< Promise > Then(Local< Function > handler)
static Promise * Cast(Value *obj)
Definition: v8.h:9962
MaybeLocal< Promise > Then(Local< Context > context, Local< Function > handler)
static const int kReturnValueDefaultValueIndex
Definition: v8.h:3811
Local< Value > Data() const
Definition: v8.h:10127
friend class internal::PropertyCallbackArguments
Definition: v8.h:3806
static const int kDataIndex
Definition: v8.h:3813
PropertyCallbackInfo(internal::Object **args)
Definition: v8.h:3816
internal::Object ** args_
Definition: v8.h:3817
static const int kIsolateIndex
Definition: v8.h:3810
Local< Object > Holder() const
Definition: v8.h:10139
static const int kThisIndex
Definition: v8.h:3814
bool ShouldThrowOnError() const
Definition: v8.h:10150
static const int kHolderIndex
Definition: v8.h:3809
static const int kArgsLength
Definition: v8.h:3802
ReturnValue< T > GetReturnValue() const
Definition: v8.h:10145
static const int kShouldThrowOnErrorIndex
Definition: v8.h:3808
static const int kReturnValueIndex
Definition: v8.h:3812
friend class MacroAssembler
Definition: v8.h:3805
Local< Object > This() const
Definition: v8.h:10133
Isolate * GetIsolate() const
Definition: v8.h:10121
void set_enumerable(bool enumerable)
bool has_writable() const
Local< Value > get() const
Local< Value > set() const
PropertyDescriptor(Local< Value > get, Local< Value > set)
bool has_enumerable() const
PropertyDescriptor(Local< Value > value)
PrivateData * get_private() const
Definition: v8.h:4076
void operator=(const PropertyDescriptor &)=delete
Local< Value > value() const
PropertyDescriptor(Local< Value > value, bool writable)
void set_configurable(bool configurable)
PropertyDescriptor(const PropertyDescriptor &)=delete
bool has_configurable() const
bool configurable() const
Local< Value > GetHandler()
static Proxy * Cast(Value *obj)
Definition: v8.h:9970
Local< Object > GetTarget()
static MaybeLocal< Proxy > New(Local< Context > context, Local< Object > local_target, Local< Object > local_handler)
Flags
Definition: v8.h:4927
Local< String > GetSource() const
static RegExp * Cast(Value *obj)
Definition: v8.h:9922
static MaybeLocal< RegExp > New(Local< Context > context, Local< String > pattern, Flags flags)
Definition: v8-profiler.h:843
void Set(const Persistent< S > &handle)
Definition: v8.h:9343
void SetEmptyString()
Definition: v8.h:9431
friend class ReturnValue
Definition: v8.h:3635
ReturnValue(const ReturnValue< S > &that)
Definition: v8.h:3601
Local< Value > Get() const
Definition: v8.h:9444
void SetNull()
Definition: v8.h:9417
Isolate * GetIsolate() const
Definition: v8.h:9438
void SetUndefined()
Definition: v8.h:9424
virtual void ResetToBookmark()
virtual ~ExternalSourceStream()
Definition: v8.h:1305
virtual bool SetBookmark()
virtual size_t GetMoreData(const uint8_t **src)=0
virtual ~ScriptStreamingTask()
Definition: v8.h:1379
~Source()
Definition: v8.h:9585
Source(const Source &)=delete
Source & operator=(const Source &)=delete
const CachedData * GetCachedData() const
Definition: v8.h:9590
const ScriptOriginOptions & GetResourceOptions() const
Definition: v8.h:9595
Source(Local< String > source_string, const ScriptOrigin &origin, CachedData *cached_data=NULL)
Definition: v8.h:9569
const CachedData * GetCachedData() const
Encoding
Definition: v8.h:1353
StreamedSource(ExternalSourceStream *source_stream, Encoding encoding)
StreamedSource & operator=(const StreamedSource &)=delete
internal::StreamedSource * impl() const
Definition: v8.h:1363
StreamedSource(const StreamedSource &)=delete
static MaybeLocal< Module > CompileModule(Isolate *isolate, Source *source)
static MaybeLocal< UnboundScript > CompileUnboundScript(Isolate *isolate, Source *source, CompileOptions options=kNoCompileOptions)
static MaybeLocal< Function > CompileFunctionInContext(Local< Context > context, Source *source, size_t arguments_count, Local< String > arguments[], size_t context_extension_count, Local< Object > context_extensions[])
static ScriptStreamingTask * StartStreamingScript(Isolate *isolate, StreamedSource *source, CompileOptions options=kNoCompileOptions)
CompileOptions
Definition: v8.h:1383
@ kProduceParserCache
Definition: v8.h:1385
@ kConsumeParserCache
Definition: v8.h:1386
@ kProduceCodeCache
Definition: v8.h:1387
static MaybeLocal< Script > Compile(Local< Context > context, StreamedSource *source, Local< String > full_source_string, const ScriptOrigin &origin)
static MaybeLocal< Script > Compile(Local< Context > context, Source *source, CompileOptions options=kNoCompileOptions)
static uint32_t CachedDataVersionTag()
bool IsModule() const
Definition: v8.h:1002
bool IsWasm() const
Definition: v8.h:1001
ScriptOriginOptions(bool is_shared_cross_origin=false, bool is_opaque=false, bool is_wasm=false, bool is_module=false)
Definition: v8.h:987
bool IsOpaque() const
Definition: v8.h:1000
int Flags() const
Definition: v8.h:1004
ScriptOriginOptions(int flags)
Definition: v8.h:993
bool IsSharedCrossOrigin() const
Definition: v8.h:997
Local< Integer > ResourceColumnOffset() const
Definition: v8.h:9558
ScriptOriginOptions Options() const
Definition: v8.h:1037
ScriptOrigin(Local< Value > resource_name, Local< Integer > resource_line_offset=Local< Integer >(), Local< Integer > resource_column_offset=Local< Integer >(), Local< Boolean > resource_is_shared_cross_origin=Local< Boolean >(), Local< Integer > script_id=Local< Integer >(), Local< Value > source_map_url=Local< Value >(), Local< Boolean > resource_is_opaque=Local< Boolean >(), Local< Boolean > is_wasm=Local< Boolean >(), Local< Boolean > is_module=Local< Boolean >())
Definition: v8.h:9531
Local< Value > ResourceName() const
Definition: v8.h:9550
Local< Value > SourceMapUrl() const
Definition: v8.h:9566
Local< Integer > ScriptID() const
Definition: v8.h:9563
Local< Integer > ResourceLineOffset() const
Definition: v8.h:9553
static MaybeLocal< Script > Compile(Local< Context > context, Local< String > source, ScriptOrigin *origin=nullptr)
MaybeLocal< Value > Run(Local< Context > context)
Local< UnboundScript > GetUnboundScript()
SealHandleScope(const SealHandleScope &)=delete
void operator=(const SealHandleScope &)=delete
SealHandleScope(Isolate *isolate)
static Set * Cast(Value *obj)
Definition: v8.h:9954
static Local< Set > New(Isolate *isolate)
Maybe< bool > Delete(Local< Context > context, Local< Value > key)
Local< Array > AsArray() const
Maybe< bool > Has(Local< Context > context, Local< Value > key)
MaybeLocal< Set > Add(Local< Context > context, Local< Value > key)
Contents()
Definition: v8.h:4722
void * AllocationBase() const
Definition: v8.h:4729
size_t ByteLength() const
Definition: v8.h:4736
size_t AllocationLength() const
Definition: v8.h:4730
void * Data() const
Definition: v8.h:4735
ArrayBuffer::Allocator::AllocationMode AllocationMode() const
Definition: v8.h:4731
size_t ByteLength() const
static SharedArrayBuffer * Cast(Value *obj)
Definition: v8.h:10096
static Local< SharedArrayBuffer > New(Isolate *isolate, void *data, size_t byte_length, ArrayBufferCreationMode mode=ArrayBufferCreationMode::kExternalized)
static Local< SharedArrayBuffer > New(Isolate *isolate, size_t byte_length)
FunctionCodeHandling
Definition: v8.h:8174
int GetLineNumber() const
Local< String > GetScriptName() const
Local< String > GetScriptNameOrSourceURL() const
bool IsConstructor() const
Local< String > GetFunctionName() const
static Local< StackTrace > CurrentStackTrace(Isolate *isolate, int frame_limit, StackTraceOptions options=kDetailed)
Local< StackFrame > GetFrame(uint32_t index) const
StackTraceOptions
Definition: v8.h:1619
int GetFrameCount() const
Local< String > ValueOf() const
static StringObject * Cast(Value *obj)
Definition: v8.h:9890
static Local< Value > New(Local< String > value)
virtual ~ExternalOneByteStringResource()
Definition: v8.h:2628
ExternalOneByteStringResource()
Definition: v8.h:2634
virtual size_t length() const =0
virtual const char * data() const =0
virtual ~ExternalStringResourceBase()
Definition: v8.h:2558
void operator=(const ExternalStringResourceBase &)=delete
ExternalStringResourceBase(const ExternalStringResourceBase &)=delete
ExternalStringResourceBase()
Definition: v8.h:2563
virtual bool IsCompressible() const
Definition: v8.h:2560
virtual void Dispose()
Definition: v8.h:2571
virtual ~ExternalStringResource()
Definition: v8.h:2595
virtual const uint16_t * data() const =0
ExternalStringResource()
Definition: v8.h:2608
virtual size_t length() const =0
char * operator*()
Definition: v8.h:2779
Utf8Value(Isolate *isolate, Local< v8::Value > obj)
Utf8Value(const Utf8Value &)=delete
const char * operator*() const
Definition: v8.h:2780
Utf8Value(Local< v8::Value > obj)
void operator=(const Utf8Value &)=delete
int length() const
Definition: v8.h:2781
const uint16_t * operator*() const
Definition: v8.h:2805
uint16_t * operator*()
Definition: v8.h:2804
Value(Local< v8::Value > obj)
Value(Isolate *isolate, Local< v8::Value > obj)
Value(const Value &)=delete
void operator=(const Value &)=delete
int length() const
Definition: v8.h:2806
int WriteOneByte(uint8_t *buffer, int start=0, int length=-1, int options=NO_OPTIONS) const
bool IsExternalOneByte() const
bool ContainsOnlyOneByte() const
Encoding
Definition: v8.h:2458
ExternalStringResourceBase * GetExternalStringResourceBase(Encoding *encoding_out) const
Definition: v8.h:9683
NewStringType
Definition: v8.h:2660
static MaybeLocal< String > NewExternalOneByte(Isolate *isolate, ExternalOneByteStringResource *resource)
int Write(uint16_t *buffer, int start=0, int length=-1, int options=NO_OPTIONS) const
bool MakeExternal(ExternalStringResource *resource)
bool MakeExternal(ExternalOneByteStringResource *resource)
static MaybeLocal< String > NewFromTwoByte(Isolate *isolate, const uint16_t *data, v8::NewStringType type, int length=-1)
static MaybeLocal< String > NewFromUtf8(Isolate *isolate, const char *data, v8::NewStringType type, int length=-1)
const ExternalOneByteStringResource * GetExternalOneByteStringResource() const
static String * Cast(v8::Value *obj)
Definition: v8.h:9648
static MaybeLocal< String > NewExternalTwoByte(Isolate *isolate, ExternalStringResource *resource)
static MaybeLocal< String > NewFromOneByte(Isolate *isolate, const uint8_t *data, v8::NewStringType type, int length=-1)
static Local< String > NewFromUtf8(Isolate *isolate, const char *data, NewStringType type=kNormalString, int length=-1)
WriteOptions
Definition: v8.h:2514
int WriteUtf8(char *buffer, int length=-1, int *nchars_ref=NULL, int options=NO_OPTIONS) const
static Local< String > Empty(Isolate *isolate)
Definition: v8.h:9656
static Local< String > Concat(Local< String > left, Local< String > right)
ExternalStringResource * GetExternalStringResource() const
Definition: v8.h:9665
static SymbolObject * Cast(Value *obj)
Definition: v8.h:9898
Local< Symbol > ValueOf() const
static Local< Value > New(Isolate *isolate, Local< Symbol > value)
static Local< Symbol > GetMatch(Isolate *isolate)
static Local< Symbol > GetIterator(Isolate *isolate)
static Local< Symbol > GetSearch(Isolate *isolate)
static Local< Symbol > GetToPrimitive(Isolate *isolate)
static Local< Symbol > For(Isolate *isolate, Local< String > name)
static Local< Symbol > GetIsConcatSpreadable(Isolate *isolate)
static Local< Symbol > New(Isolate *isolate, Local< String > name=Local< String >())
Local< Value > Name() const
static Local< Symbol > GetReplace(Isolate *isolate)
static Symbol * Cast(Value *obj)
Definition: v8.h:9842
static Local< Symbol > GetToStringTag(Isolate *isolate)
static Local< Symbol > GetSplit(Isolate *isolate)
static Local< Symbol > GetUnscopables(Isolate *isolate)
static Local< Symbol > ForApi(Isolate *isolate, Local< String > name)
static Local< Symbol > GetHasInstance(Isolate *isolate)
void Set(Local< Name > name, Local< Data > value, PropertyAttribute attributes=None)
MaybeLocal< Value > StackTrace(Local< Context > context) const
static TypedArray * Cast(Value *obj)
Definition: v8.h:10008
static Local< Uint16Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static Uint16Array * Cast(Value *obj)
Definition: v8.h:10032
static Local< Uint16Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static Uint32Array * Cast(Value *obj)
Definition: v8.h:10048
static Local< Uint32Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static Local< Uint32Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static Uint32 * Cast(v8::Value *obj)
Definition: v8.h:9874
static Uint8Array * Cast(Value *obj)
Definition: v8.h:10016
static Local< Uint8Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static Local< Uint8Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static Local< Uint8ClampedArray > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static Local< Uint8ClampedArray > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static Uint8ClampedArray * Cast(Value *obj)
Definition: v8.h:10080
int GetLineNumber(int code_pos)
Local< Value > GetSourceMappingURL()
Local< Value > GetScriptName()
Local< Value > GetSourceURL()
Local< Script > BindToCurrentContext()
static void RemoveMessageListeners(MessageCallback that)
Definition: v8.h:10280
static void InitializeExternalStartupData(const char *natives_blob, const char *snapshot_blob)
static void TerminateExecution(Isolate *isolate)
Definition: v8.h:10319
static void SetFatalErrorHandler(FatalErrorCallback that)
Definition: v8.h:10301
static void SetCaptureStackTraceForUncaughtExceptions(bool capture, int frame_limit=10, StackTrace::StackTraceOptions options=StackTrace::kOverview)
Definition: v8.h:10293
static void VisitExternalResources(ExternalResourceVisitor *visitor)
Definition: v8.h:10335
static bool AddMessageListener(MessageCallback that, Local< Value > data=Local< Value >())
Definition: v8.h:10274
static void VisitHandlesWithClassIds(PersistentHandleVisitor *visitor)
Definition: v8.h:10341
static void AddGCPrologueCallback(GCCallback callback, GCType gc_type_filter=kGCTypeAll)
static void RemoveGCEpilogueCallback(GCCallback callback)
Definition: v8.h:10313
static void AddGCEpilogueCallback(GCCallback callback, GCType gc_type_filter=kGCTypeAll)
static bool IsExecutionTerminating(Isolate *isolate=NULL)
Definition: v8.h:10322
static bool IsDead()
Definition: v8.h:10268
static void RemoveGCPrologueCallback(GCCallback callback)
Definition: v8.h:10306
static void VisitHandlesForPartialDependence(Isolate *isolate, PersistentHandleVisitor *visitor)
Definition: v8.h:10353
static void CancelTerminateExecution(Isolate *isolate)
Definition: v8.h:10330
static void SetFailedAccessCheckCallbackFunction(FailedAccessCheckCallback)
Definition: v8.h:10286
virtual MaybeLocal< Object > ReadHostObject(Isolate *isolate)
virtual ~Delegate()
Definition: v8.h:1934
virtual MaybeLocal< WasmCompiledModule > GetWasmModuleFromId(Isolate *isolate, uint32_t transfer_id)
bool ReadUint64(uint64_t *value)
void SetSupportsLegacyWireFormat(bool supports_legacy_wire_format)
ValueDeserializer(Isolate *isolate, const uint8_t *data, size_t size, Delegate *delegate)
void SetExpectInlineWasm(bool allow_inline_wasm)
void TransferSharedArrayBuffer(uint32_t id, Local< SharedArrayBuffer > shared_array_buffer)
bool ReadDouble(double *value)
bool ReadUint32(uint32_t *value)
void TransferArrayBuffer(uint32_t transfer_id, Local< ArrayBuffer > array_buffer)
ValueDeserializer(Isolate *isolate, const uint8_t *data, size_t size)
Maybe< bool > ReadHeader(Local< Context > context)
MaybeLocal< Value > ReadValue(Local< Context > context)
uint32_t GetWireFormatVersion() const
bool ReadRawBytes(size_t length, const void **data)
virtual void * ReallocateBufferMemory(void *old_buffer, size_t size, size_t *actual_size)
virtual Maybe< uint32_t > GetSharedArrayBufferId(Isolate *isolate, Local< SharedArrayBuffer > shared_array_buffer)
virtual void ThrowDataCloneError(Local< String > message)=0
virtual ~Delegate()
Definition: v8.h:1801
virtual void FreeBufferMemory(void *buffer)
virtual Maybe< uint32_t > GetWasmModuleTransferId(Isolate *isolate, Local< WasmCompiledModule > module)
virtual Maybe< bool > WriteHostObject(Isolate *isolate, Local< Object > object)
void TransferArrayBuffer(uint32_t transfer_id, Local< ArrayBuffer > array_buffer)
std::vector< uint8_t > ReleaseBuffer()
void WriteUint64(uint64_t value)
void WriteDouble(double value)
ValueSerializer(Isolate *isolate)
std::pair< uint8_t *, size_t > Release()
ValueSerializer(Isolate *isolate, Delegate *delegate)
void WriteUint32(uint32_t value)
Maybe< bool > WriteValue(Local< Context > context, Local< Value > value)
void WriteRawBytes(const void *source, size_t length)
void SetTreatArrayBufferViewsAsHostObjects(bool mode)
MaybeLocal< String > ToDetailString(Local< Context > context) const
bool IsTypedArray() const
Local< Number > ToNumber(Isolate *isolate) const
MaybeLocal< Boolean > ToBoolean(Local< Context > context) const
Maybe< int32_t > Int32Value(Local< Context > context) const
double NumberValue() const
bool Equals(Local< Value > that) const
Local< Uint32 > ToArrayIndex() const
Local< Boolean > ToBoolean() const
Definition: v8.h:9778
Local< String > ToString() const
Definition: v8.h:9790
Local< String > ToDetailString(Isolate *isolate) const
bool IsSymbolObject() const
bool IsSharedArrayBuffer() const
static Value * Cast(T *value)
Definition: v8.h:9773
Local< String > TypeOf(Isolate *)
Local< Uint32 > ToUint32(Isolate *isolate) const
Local< String > ToDetailString() const
Definition: v8.h:9796
MaybeLocal< Int32 > ToInt32(Local< Context > context) const
Maybe< double > NumberValue(Local< Context > context) const
bool IsStringObject() const
bool BooleanValue() const
Local< Integer > ToInteger(Isolate *isolate) const
bool IsNullOrUndefined() const
Definition: v8.h:9738
bool IsNumberObject() const
bool IsBooleanObject() const
bool IsUint32Array() const
Local< Boolean > ToBoolean(Isolate *isolate) const
Local< Integer > ToInteger() const
Definition: v8.h:9808
bool IsArrayBuffer() const
bool IsUint8ClampedArray() const
Local< Uint32 > ToUint32() const
Definition: v8.h:9814
Maybe< bool > BooleanValue(Local< Context > context) const
bool IsString() const
Definition: v8.h:9756
MaybeLocal< Uint32 > ToArrayIndex(Local< Context > context) const
bool IsMapIterator() const
bool IsNull() const
Definition: v8.h:9721
Local< String > ToString(Isolate *isolate) const
int64_t IntegerValue() const
bool SameValue(Local< Value > that) const
bool IsNativeError() const
bool IsFloat64Array() const
Maybe< int64_t > IntegerValue(Local< Context > context) const
Local< Int32 > ToInt32(Isolate *isolate) const
bool IsInt16Array() const
bool IsSetIterator() const
MaybeLocal< String > ToString(Local< Context > context) const
Local< Int32 > ToInt32() const
Definition: v8.h:9820
int32_t Int32Value() const
Local< Object > ToObject(Isolate *isolate) const
Maybe< uint32_t > Uint32Value(Local< Context > context) const
Maybe< bool > Equals(Local< Context > context, Local< Value > that) const
bool IsFloat32Array() const
bool IsArrayBufferView() const
bool IsGeneratorFunction() const
Local< Object > ToObject() const
Definition: v8.h:9802
bool StrictEquals(Local< Value > that) const
MaybeLocal< Uint32 > ToUint32(Local< Context > context) const
bool IsUndefined() const
Definition: v8.h:9703
MaybeLocal< Number > ToNumber(Local< Context > context) const
Maybe< bool > InstanceOf(Local< Context > context, Local< Object > object)
bool IsArgumentsObject() const
bool IsAsyncFunction() const
MaybeLocal< Integer > ToInteger(Local< Context > context) const
uint32_t Uint32Value() const
MaybeLocal< Object > ToObject(Local< Context > context) const
Local< Number > ToNumber() const
Definition: v8.h:9784
bool IsUint8Array() const
bool IsUint16Array() const
bool IsGeneratorObject() const
bool IsWebAssemblyCompiledModule() const
bool IsInt32Array() const
TransferrableModule & operator=(TransferrableModule &&src)=default
TransferrableModule(TransferrableModule &&src)=default
TransferrableModule(const TransferrableModule &src)=delete
TransferrableModule & operator=(const TransferrableModule &src)=delete
static MaybeLocal< WasmCompiledModule > DeserializeOrCompile(Isolate *isolate, const CallerOwnedBuffer &serialized_module, const CallerOwnedBuffer &wire_bytes)
SerializedModule Serialize()
TransferrableModule GetTransferrableModule()
static WasmCompiledModule * Cast(Value *obj)
Definition: v8.h:9977
Local< String > GetWasmWireBytes()
std::pair< const uint8_t *, size_t > CallerOwnedBuffer
Definition: v8.h:4116
static MaybeLocal< WasmCompiledModule > FromTransferrableModule(Isolate *isolate, const TransferrableModule &)
std::pair< std::unique_ptr< const uint8_t[]>, size_t > SerializedModule
Definition: v8.h:4114
~WasmModuleObjectBuilderStreaming()
WasmModuleObjectBuilderStreaming(Isolate *isolate)
void Abort(Local< Value > exception)
Local< Promise > GetPromise()
void OnBytesReceived(const uint8_t *, size_t size)
WasmModuleObjectBuilder(Isolate *isolate)
Definition: v8.h:4224
void OnBytesReceived(const uint8_t *, size_t size)
MaybeLocal< WasmCompiledModule > Finish()
void * GetInternalField(int index) const
Definition: v8.h:9180
void * GetInternalField2() const
Definition: v8.h:436
Isolate * GetIsolate() const
Definition: v8.h:427
T * GetParameter() const
Definition: v8.h:428
void * GetInternalField1() const
Definition: v8.h:432
void(* Callback)(const WeakCallbackInfo< T > &data)
Definition: v8.h:416
WeakCallbackInfo(Isolate *isolate, T *parameter, void *embedder_fields[kEmbedderFieldsInWeakCallback], Callback *callback)
Definition: v8.h:418
void SetSecondPassCallback(Callback callback) const
Definition: v8.h:451
bool IsFirstPass() const
Definition: v8.h:441
static bool IsExternalTwoByteString(int instance_type)
Definition: v8.h:9062
static const int kHeapObjectMapOffset
Definition: v8.h:8973
static int GetOddballKind(const internal::Object *obj)
Definition: v8.h:9057
static const int kOddballType
Definition: v8.h:9017
static const int kNodeStateIsNearDeathValue
Definition: v8.h:9010
static const int kStringEncodingMask
Definition: v8.h:8985
static internal::Object * IntToSmi(int value)
Definition: v8.h:9041
static const int kNodeIsIndependentShift
Definition: v8.h:9011
static const uint32_t kNumIsolateDataSlots
Definition: v8.h:9023
static uint8_t GetNodeFlag(internal::Object **obj, int shift)
Definition: v8.h:9067
static const int kForeignType
Definition: v8.h:9018
static const int kExternalMemoryOffset
Definition: v8.h:8990
static int GetInstanceType(const internal::Object *obj)
Definition: v8.h:9049
static const int kIsolateRootsOffset
Definition: v8.h:8995
static const int kNodeIsActiveShift
Definition: v8.h:9012
static T ReadEmbedderData(const v8::Context *context, int index)
Definition: v8.h:9119
static const int kUndefinedOddballKind
Definition: v8.h:9020
static void UpdateNodeState(internal::Object **obj, uint8_t value)
Definition: v8.h:9084
static void CheckInitialized(v8::Isolate *isolate)
Definition: v8.h:9026
static const int kJSObjectType
Definition: v8.h:9015
static const int kFullStringRepresentationMask
Definition: v8.h:8984
static T ReadField(const internal::Object *ptr, int offset)
Definition: v8.h:9112
static const int kFirstNonstringType
Definition: v8.h:9016
static const int kEmptyStringRootIndex
Definition: v8.h:9003
static const int kFixedArrayHeaderSize
Definition: v8.h:8981
static const int kNullOddballKind
Definition: v8.h:9021
static const int kUndefinedValueRootIndex
Definition: v8.h:8998
static const int kExternalTwoByteRepresentationTag
Definition: v8.h:8986
static void CheckInitializedImpl(v8::Isolate *isolate)
static void * GetEmbedderData(const v8::Isolate *isolate, uint32_t slot)
Definition: v8.h:9098
static const int kNodeStateIsPendingValue
Definition: v8.h:9009
static const int kNodeStateMask
Definition: v8.h:9007
static uint8_t GetNodeState(internal::Object **obj)
Definition: v8.h:9079
static const int kNodeStateIsWeakValue
Definition: v8.h:9008
static const int kStringResourceOffset
Definition: v8.h:8976
static const int kFalseValueRootIndex
Definition: v8.h:9002
static const int kTrueValueRootIndex
Definition: v8.h:9001
static const int kOddballKindOffset
Definition: v8.h:8978
static int SmiValue(const internal::Object *value)
Definition: v8.h:9037
static const int kContextHeaderSize
Definition: v8.h:8982
static void UpdateNodeFlag(internal::Object **obj, bool value, int shift)
Definition: v8.h:9072
static const int kNullValueRootIndex
Definition: v8.h:9000
static void SetEmbedderData(v8::Isolate *isolate, uint32_t slot, void *data)
Definition: v8.h:9090
static const int kTheHoleValueRootIndex
Definition: v8.h:8999
static const int kExternalMemoryLimitOffset
Definition: v8.h:8991
static internal::Object ** GetRoot(v8::Isolate *isolate, int index)
Definition: v8.h:9105
static const int kExternalOneByteRepresentationTag
Definition: v8.h:8987
static bool IsValidSmi(intptr_t value)
Definition: v8.h:9045
static const int kForeignAddressOffset
Definition: v8.h:8979
static const int kIsolateEmbedderDataOffset
Definition: v8.h:8989
static const int kExternalMemoryAtLastMarkCompactOffset
Definition: v8.h:8993
static const int kMapInstanceTypeAndBitFieldOffset
Definition: v8.h:8974
static const int kNodeFlagsOffset
Definition: v8.h:9006
static const int kJSApiObjectType
Definition: v8.h:9014
static const int kNodeClassIdOffset
Definition: v8.h:9005
static const int kJSObjectHeaderSize
Definition: v8.h:8980
static bool HasHeapObjectTag(const internal::Object *value)
Definition: v8.h:9032
static const int kContextEmbedderDataIndex
Definition: v8.h:8983
const intptr_t kHeapObjectTagMask
Definition: v8.h:8893
SmiTagging< kApiPointerSize > PlatformSmiTagging
Definition: v8.h:8958
const int kSmiTagSize
Definition: v8.h:8897
const int kApiInt64Size
Definition: v8.h:8888
const int kApiIntSize
Definition: v8.h:8887
const int kApiPointerSize
Definition: v8.h:8886
const int kHeapObjectTag
Definition: v8.h:8891
const int kSmiShiftSize
Definition: v8.h:8959
const int kSmiValueSize
Definition: v8.h:8960
const intptr_t kSmiTagMask
Definition: v8.h:8898
const int kHeapObjectTagSize
Definition: v8.h:8892
const int kSmiTag
Definition: v8.h:8896
internal::Object * IntToSmi(int value)
Definition: v8.h:8903
Definition: libplatform.h:12
IntegrityLevel
Definition: v8.h:3049
PropertyAttribute
Definition: v8.h:2969
@ DontEnum
Definition: v8.h:2975
@ None
Definition: v8.h:2971
@ DontDelete
Definition: v8.h:2977
@ ReadOnly
Definition: v8.h:2973
JitCodeEventOptions
Definition: v8.h:6603
@ kJitCodeEventEnumExisting
Definition: v8.h:6606
@ kJitCodeEventDefault
Definition: v8.h:6604
KeyCollectionMode
Definition: v8.h:3038
bool(* AccessCheckCallback)(Local< Context > accessing_context, Local< Object > accessed_object, Local< Value > data)
Definition: v8.h:5368
void(* FailedAccessCheckCallback)(Local< Object > target, AccessType type, Local< Value > data)
Definition: v8.h:6340
void(* LogEventCallback)(const char *name, int event)
Definition: v8.h:6141
void(* MessageCallback)(Local< Message > message, Local< Value > data)
Definition: v8.h:6137
void *(* CreateHistogramCallback)(const char *name, int min, int max, size_t buckets)
Definition: v8.h:6176
void(* GenericNamedPropertyEnumeratorCallback)(const PropertyCallbackInfo< Array > &info)
Definition: v8.h:5255
GCCallbackFlags
Definition: v8.h:6392
@ kGCCallbackScheduleIdleGarbageCollection
Definition: v8.h:6399
@ kGCCallbackFlagConstructRetainedObjectInfos
Definition: v8.h:6394
@ kGCCallbackFlagForced
Definition: v8.h:6395
@ kNoGCCallbackFlags
Definition: v8.h:6393
@ kGCCallbackFlagCollectAllExternalMemory
Definition: v8.h:6398
@ kGCCallbackFlagSynchronousPhantomCallbackProcessing
Definition: v8.h:6396
@ kGCCallbackFlagCollectAllAvailableGarbage
Definition: v8.h:6397
void(* GenericNamedPropertyGetterCallback)(Local< Name > property, const PropertyCallbackInfo< Value > &info)
Definition: v8.h:5175
Local< Primitive > Null(Isolate *isolate)
Definition: v8.h:10165
SerializeInternalFieldsCallback SerializeEmbedderFieldsCallback
Definition: v8.h:6742
MicrotasksPolicy
Definition: v8.h:6295
PromiseRejectEvent
Definition: v8.h:6251
@ kPromiseHandlerAddedAfterReject
Definition: v8.h:6253
@ kPromiseRejectWithNoHandler
Definition: v8.h:6252
RAILMode
Definition: v8.h:6583
@ PERFORMANCE_IDLE
Definition: v8.h:6594
@ PERFORMANCE_LOAD
Definition: v8.h:6597
@ PERFORMANCE_ANIMATION
Definition: v8.h:6591
@ PERFORMANCE_RESPONSE
Definition: v8.h:6587
AccessControl
Definition: v8.h:3012
@ PROHIBITS_OVERWRITING
Definition: v8.h:3016
@ ALL_CAN_WRITE
Definition: v8.h:3015
@ ALL_CAN_READ
Definition: v8.h:3014
@ DEFAULT
Definition: v8.h:3013
void(* PromiseRejectCallback)(PromiseRejectMessage message)
Definition: v8.h:6281
void(* JitCodeEventHandler)(const JitCodeEvent *event)
Definition: v8.h:6615
Maybe< T > Nothing()
Definition: v8.h:8312
IndexFilter
Definition: v8.h:3044
void(* AccessorNameSetterCallback)(Local< Name > property, Local< Value > value, const PropertyCallbackInfo< void > &info)
Definition: v8.h:2997
void(* IndexedPropertyGetterCallback)(uint32_t index, const PropertyCallbackInfo< Value > &info)
Definition: v8.h:5307
void(* IndexedPropertySetterCallback)(uint32_t index, Local< Value > value, const PropertyCallbackInfo< Value > &info)
Definition: v8.h:5314
void(* CallCompletedCallback)(Isolate *)
Definition: v8.h:6203
void(* NamedPropertyGetterCallback)(Local< String > property, const PropertyCallbackInfo< Value > &info)
Definition: v8.h:5094
void(* IndexedPropertyDeleterCallback)(uint32_t index, const PropertyCallbackInfo< Boolean > &info)
Definition: v8.h:5329
void(* AddHistogramSampleCallback)(void *histogram, int sample)
Definition: v8.h:6181
void(* NamedPropertyEnumeratorCallback)(const PropertyCallbackInfo< Array > &info)
Definition: v8.h:5132
Local< Primitive > Undefined(Isolate *isolate)
Definition: v8.h:10156
void(* MicrotaskCallback)(void *data)
Definition: v8.h:6285
void(* GenericNamedPropertyDefinerCallback)(Local< Name > property, const PropertyDescriptor &desc, const PropertyCallbackInfo< Value > &info)
Definition: v8.h:5278
Intrinsic
Definition: v8.h:4993
WeakCallbackType
Definition: v8.h:466
void(* AccessorGetterCallback)(Local< String > property, const PropertyCallbackInfo< Value > &info)
Definition: v8.h:2985
ConstructorBehavior
Definition: v8.h:3823
void(* IndexedPropertyDescriptorCallback)(uint32_t index, const PropertyCallbackInfo< Value > &info)
Definition: v8.h:5349
DeserializeInternalFieldsCallback DeserializeEmbedderFieldsCallback
Definition: v8.h:6758
int *(* CounterLookupCallback)(const char *name)
Definition: v8.h:6174
void(* DeprecatedCallCompletedCallback)()
Definition: v8.h:6204
MaybeLocal< Promise >(* HostImportModuleDynamicallyCallback)(Local< Context > context, Local< String > referrer, Local< String > specifier)
Definition: v8.h:6226
uintptr_t(* ReturnAddressLocationResolver)(uintptr_t return_addr_location)
Definition: v8.h:7775
void(* GenericNamedPropertyDescriptorCallback)(Local< Name > property, const PropertyCallbackInfo< Value > &info)
Definition: v8.h:5301
void(* AccessorSetterCallback)(Local< String > property, Local< Value > value, const PropertyCallbackInfo< void > &info)
Definition: v8.h:2993
void(* AccessorNameGetterCallback)(Local< Name > property, const PropertyCallbackInfo< Value > &info)
Definition: v8.h:2988
void(* NamedPropertySetterCallback)(Local< String > property, Local< Value > value, const PropertyCallbackInfo< Value > &info)
Definition: v8.h:5103
void(* IndexedPropertyDefinerCallback)(uint32_t index, const PropertyDescriptor &desc, const PropertyCallbackInfo< Value > &info)
Definition: v8.h:5342
void(* IndexedPropertyQueryCallback)(uint32_t index, const PropertyCallbackInfo< Integer > &info)
Definition: v8.h:5322
void(* OOMErrorCallback)(const char *location, bool is_heap_oom)
Definition: v8.h:6135
void(* FunctionCallback)(const FunctionCallbackInfo< Value > &info)
Definition: v8.h:3821
Local< Boolean > False(Isolate *isolate)
Definition: v8.h:10183
bool(* ExtensionCallback)(const FunctionCallbackInfo< Value > &)
Definition: v8.h:6354
void(* GCCallback)(GCType type, GCCallbackFlags flags)
Definition: v8.h:6402
void(* NamedPropertyDeleterCallback)(Local< String > property, const PropertyCallbackInfo< Boolean > &info)
Definition: v8.h:5124
void(* FunctionEntryHook)(uintptr_t function, uintptr_t return_addr_location)
Definition: v8.h:6511
bool(* AllowCodeGenerationFromStringsCallback)(Local< Context > context, Local< String > source)
Definition: v8.h:6350
bool(* EntropySource)(unsigned char *buffer, size_t length)
Definition: v8.h:7760
void(* ApiImplementationCallback)(const FunctionCallbackInfo< Value > &)
Definition: v8.h:6358
void(* FatalErrorCallback)(const char *location, const char *message)
Definition: v8.h:6133
void(* BeforeCallEnteredCallback)(Isolate *)
Definition: v8.h:6202
GCType
Definition: v8.h:6369
@ kGCTypeScavenge
Definition: v8.h:6370
@ kGCTypeProcessWeakCallbacks
Definition: v8.h:6373
@ kGCTypeMarkSweepCompact
Definition: v8.h:6371
@ kGCTypeAll
Definition: v8.h:6374
@ kGCTypeIncrementalMarking
Definition: v8.h:6372
void(* NamedPropertyQueryCallback)(Local< String > property, const PropertyCallbackInfo< Integer > &info)
Definition: v8.h:5114
Local< Boolean > True(Isolate *isolate)
Definition: v8.h:10174
NewStringType
Definition: v8.h:2436
void(* GenericNamedPropertyDeleterCallback)(Local< Name > property, const PropertyCallbackInfo< Boolean > &info)
Definition: v8.h:5248
StateTag
Definition: v8.h:1729
@ COMPILER
Definition: v8.h:1734
@ BYTECODE_COMPILER
Definition: v8.h:1733
@ EXTERNAL
Definition: v8.h:1736
@ GC
Definition: v8.h:1731
@ PARSER
Definition: v8.h:1732
@ IDLE
Definition: v8.h:1737
@ JS
Definition: v8.h:1730
@ OTHER
Definition: v8.h:1735
void(* IndexedPropertyEnumeratorCallback)(const PropertyCallbackInfo< Array > &info)
Definition: v8.h:5336
AccessType
Definition: v8.h:5355
@ ACCESS_SET
Definition: v8.h:5357
@ ACCESS_HAS
Definition: v8.h:5358
@ ACCESS_KEYS
Definition: v8.h:5360
@ ACCESS_GET
Definition: v8.h:5356
@ ACCESS_DELETE
Definition: v8.h:5359
void(* GenericNamedPropertyQueryCallback)(Local< Name > property, const PropertyCallbackInfo< Integer > &info)
Definition: v8.h:5224
MemoryPressureLevel
Definition: v8.h:6646
AllocationAction
Definition: v8.h:6195
@ kAllocationActionAllocate
Definition: v8.h:6196
@ kAllocationActionAll
Definition: v8.h:6198
@ kAllocationActionFree
Definition: v8.h:6197
void RegisterExtension(Extension *extension)
ObjectSpace
Definition: v8.h:6184
@ kObjectSpaceOldSpace
Definition: v8.h:6186
@ kObjectSpaceAll
Definition: v8.h:6190
@ kObjectSpaceMapSpace
Definition: v8.h:6188
@ kObjectSpaceNewSpace
Definition: v8.h:6185
@ kObjectSpaceLoSpace
Definition: v8.h:6189
@ kObjectSpaceCodeSpace
Definition: v8.h:6187
ArrayBufferCreationMode
Definition: v8.h:4252
void(* PromiseHook)(PromiseHookType type, Local< Promise > promise, Local< Value > parent)
Definition: v8.h:6247
Maybe< T > Just(const T &t)
Definition: v8.h:8318
void(* InterruptCallback)(Isolate *isolate, void *data)
Definition: v8.h:6404
void(* MicrotasksCompletedCallback)(Isolate *)
Definition: v8.h:6284
PropertyHandlerFlags
Definition: v8.h:5597
void(* GenericNamedPropertySetterCallback)(Local< Name > property, Local< Value > value, const PropertyCallbackInfo< Value > &info)
Definition: v8.h:5199
PropertyFilter
Definition: v8.h:3022
@ ONLY_CONFIGURABLE
Definition: v8.h:3026
@ SKIP_SYMBOLS
Definition: v8.h:3028
@ ONLY_WRITABLE
Definition: v8.h:3024
@ ALL_PROPERTIES
Definition: v8.h:3023
@ SKIP_STRINGS
Definition: v8.h:3027
@ ONLY_ENUMERABLE
Definition: v8.h:3025
PromiseHookType
Definition: v8.h:6245
static const bool kResetInDestructor
Definition: v8.h:660
Persistent< T, CopyablePersistentTraits< T > > CopyablePersistent
Definition: v8.h:659
static void Copy(const Persistent< S, M > &source, CopyablePersistent *dest)
Definition: v8.h:662
void(* CallbackFunction)(Local< Object > holder, int index, StartupData payload, void *data)
Definition: v8.h:6749
void * data
Definition: v8.h:6756
void(* callback)(Local< Object > holder, int index, StartupData payload, void *data)
Definition: v8.h:6754
IndexedPropertyGetterCallback getter
Definition: v8.h:5711
IndexedPropertyDefinerCallback definer
Definition: v8.h:5716
PropertyHandlerFlags flags
Definition: v8.h:5719
IndexedPropertyDescriptorCallback descriptor
Definition: v8.h:5717
IndexedPropertySetterCallback setter
Definition: v8.h:5712
IndexedPropertyEnumeratorCallback enumerator
Definition: v8.h:5715
IndexedPropertyQueryCallback query
Definition: v8.h:5713
Local< Value > data
Definition: v8.h:5718
IndexedPropertyDeleterCallback deleter
Definition: v8.h:5714
size_t offset
Definition: v8.h:6559
size_t pos
Definition: v8.h:6561
PositionType position_type
Definition: v8.h:6563
const char * str
Definition: v8.h:6552
size_t len
Definition: v8.h:6554
PositionType
Definition: v8.h:6533
@ POSITION
Definition: v8.h:6533
@ STATEMENT_POSITION
Definition: v8.h:6533
struct name_t name
Definition: v8.h:6568
Local< UnboundScript > script
Definition: v8.h:6542
struct line_info_t line_info
Definition: v8.h:6571
void * user_data
Definition: v8.h:6547
void * new_code_start
Definition: v8.h:6574
EventType
Definition: v8.h:6520
@ CODE_END_LINE_INFO_RECORDING
Definition: v8.h:6526
@ CODE_ADDED
Definition: v8.h:6521
@ CODE_MOVED
Definition: v8.h:6522
@ CODE_ADD_LINE_POS_INFO
Definition: v8.h:6524
@ CODE_REMOVED
Definition: v8.h:6523
@ CODE_START_LINE_INFO_RECORDING
Definition: v8.h:6525
EventType type
Definition: v8.h:6536
size_t code_len
Definition: v8.h:6540
void * code_start
Definition: v8.h:6538
GenericNamedPropertySetterCallback setter
Definition: v8.h:5661
Local< Value > data
Definition: v8.h:5667
GenericNamedPropertyGetterCallback getter
Definition: v8.h:5660
GenericNamedPropertyDefinerCallback definer
Definition: v8.h:5665
GenericNamedPropertyEnumeratorCallback enumerator
Definition: v8.h:5664
GenericNamedPropertyDeleterCallback deleter
Definition: v8.h:5663
PropertyHandlerFlags flags
Definition: v8.h:5668
GenericNamedPropertyDescriptorCallback descriptor
Definition: v8.h:5666
GenericNamedPropertyQueryCallback query
Definition: v8.h:5662
void * sp
Definition: v8.h:1745
void * pc
Definition: v8.h:1744
void * fp
Definition: v8.h:1746
RegisterState()
Definition: v8.h:1743
size_t frames_count
Definition: v8.h:1751
void * external_callback_entry
Definition: v8.h:1753
StateTag vm_state
Definition: v8.h:1752
BufferPolicy buffer_policy
Definition: v8.h:1251
const uint8_t * data
Definition: v8.h:1248
CachedData(const CachedData &)=delete
bool rejected
Definition: v8.h:1250
CachedData(const uint8_t *data, int length, BufferPolicy buffer_policy=BufferNotOwned)
BufferPolicy
Definition: v8.h:1228
@ BufferNotOwned
Definition: v8.h:1229
CachedData()
Definition: v8.h:1233
int length
Definition: v8.h:1249
CachedData & operator=(const CachedData &)=delete
StartupData(* CallbackFunction)(Local< Object > holder, int index, void *data)
Definition: v8.h:6732
void * data
Definition: v8.h:6738
CallbackFunction callback
Definition: v8.h:6737
#define V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT
Definition: v8.h:4248
#define V8_EXPORT
Definition: v8.h:56
#define V8_INTRINSICS_LIST(F)
Definition: v8.h:4985
#define V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT
Definition: v8.h:4454
#define V8_PROMISE_INTERNAL_FIELD_COUNT
Definition: v8.h:3922
#define V8_DECL_INTRINSIC(name, iname)
Definition: v8.h:4994
#define TYPE_CHECK(T, S)
Definition: v8.h:160
#define V8_DEPRECATED(message, declarator)
Definition: v8config.h:325
#define V8_INLINE
Definition: v8config.h:298
#define V8_LIKELY(condition)
Definition: v8config.h:350
#define V8_WARN_UNUSED_RESULT
Definition: v8config.h:412
#define V8_UNLIKELY(condition)
Definition: v8config.h:349
#define V8_DEPRECATE_SOON(message, declarator)
Definition: v8config.h:340