22 #include "v8-version.h"
35 #if defined(BUILDING_V8_SHARED) && defined(USING_V8_SHARED)
36 #error both BUILDING_V8_SHARED and USING_V8_SHARED are set - please check the\
37 build configuration to ensure that at most one of these is set
40 #ifdef BUILDING_V8_SHARED
41 # define V8_EXPORT __declspec(dllexport)
43 # define V8_EXPORT __declspec(dllimport)
46 #endif // BUILDING_V8_SHARED
51 #if V8_HAS_ATTRIBUTE_VISIBILITY && defined(V8_SHARED)
52 # ifdef BUILDING_V8_SHARED
53 # define V8_EXPORT __attribute__ ((visibility("default")))
80 class ImplementationUtilities;
90 class ObjectOperationDescriptor;
95 class RawOperationDescriptor;
120 template <
class K,
class V,
class T>
122 template <
class K,
class V,
class T>
134 class CallHandlerHelper;
144 struct StreamedSource;
146 class PropertyCallbackArguments;
147 class FunctionCallbackArguments;
161 return data_ == other.data_;
165 return data_ != other.data_;
169 return data_ < other.data_;
178 #define TYPE_CHECK(T, S) \
180 *(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
215 : val_(reinterpret_cast<T*>(*that)) {
227 V8_INLINE
bool IsEmpty()
const {
return val_ == 0; }
232 V8_INLINE
void Clear() { val_ = 0; }
246 internal::Object** a =
reinterpret_cast<internal::Object**
>(this->val_);
247 internal::Object** b =
reinterpret_cast<internal::Object**
>(that.val_);
248 if (a == 0)
return b == 0;
249 if (b == 0)
return false;
255 internal::Object** a =
reinterpret_cast<internal::Object**
>(this->val_);
256 internal::Object** b =
reinterpret_cast<internal::Object**
>(that.val_);
257 if (a == 0)
return b == 0;
258 if (b == 0)
return false;
279 #ifdef V8_ENABLE_CHECKS
282 if (that.IsEmpty())
return Local<T>();
306 template<
class F>
friend class Local;
321 template <
class F1,
class F2,
class F3>
326 V8_INLINE
Local(S* that)
354 : val_(reinterpret_cast<T*>(*that)) {
358 V8_INLINE
bool IsEmpty()
const {
return val_ ==
nullptr; }
362 out->val_ =
IsEmpty() ?
nullptr : this->val_;
380 template <
class T>
class Eternal {
382 V8_INLINE
Eternal() : index_(kInitialValue) { }
385 Set(isolate, handle);
389 V8_INLINE
bool IsEmpty() {
return index_ == kInitialValue; }
393 static const int kInitialValue = -1;
398 static const int kInternalFieldsInWeakCallback = 2;
401 template <
typename T>
407 void* internal_fields[kInternalFieldsInWeakCallback],
409 : isolate_(isolate), parameter_(parameter), callback_(callback) {
410 for (
int i = 0; i < kInternalFieldsInWeakCallback; ++i) {
411 internal_fields_[i] = internal_fields[i];
420 void* GetInternalField1()
const) {
421 return internal_fields_[0];
424 void* GetInternalField2()
const) {
425 return internal_fields_[1];
442 void* internal_fields_[kInternalFieldsInWeakCallback];
446 template <
class T,
class P>
452 : isolate_(isolate), parameter_(parameter), handle_(handle) {}
486 template <
class T>
class PersistentBase {
492 V8_INLINE
void Reset();
498 V8_INLINE
void Reset(
Isolate* isolate,
const Handle<S>& other);
505 V8_INLINE
void Reset(
Isolate* isolate,
const PersistentBase<S>& other);
507 V8_INLINE
bool IsEmpty()
const {
return val_ == NULL; }
508 V8_INLINE
void Empty() { val_ = 0; }
512 internal::Object** a =
reinterpret_cast<internal::Object**
>(this->val_);
513 internal::Object** b =
reinterpret_cast<internal::Object**
>(that.val_);
514 if (a == NULL)
return b == NULL;
515 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;
543 template <
typename P>
545 "use WeakCallbackInfo version",
549 template <
typename S,
typename P>
551 "use WeakCallbackInfo version",
561 template <
typename P>
564 void SetPhantom(P* parameter,
566 int internal_field_index1 = -1,
567 int internal_field_index2 = -1));
569 template <
typename P>
570 V8_INLINE
void SetWeak(P* parameter,
604 V8_INLINE
bool IsWeak()
const;
621 template<
class F>
friend class Local;
627 template <
class F1,
class F2,
class F3>
635 V8_INLINE
static T* New(
Isolate* isolate, T* that);
648 class NonCopyablePersistentTraits {
652 template<
class S,
class M>
654 NonCopyablePersistent* dest) {
655 Uncompilable<Object>();
672 template<
class S,
class M>
674 CopyablePersistent* dest) {
688 template <
class T,
class M>
class Persistent :
public PersistentBase<T> {
708 template <
class S,
class M2>
722 template <
class S,
class M2>
730 template <
class S,
class M2>
741 if (M::kResetInDestructor) this->
Reset();
747 #ifdef V8_ENABLE_CHECKS
750 if (!that.IsEmpty()) T::Cast(*that);
763 template<
class F>
friend class Local;
768 V8_INLINE T* operator*()
const {
return this->val_; }
769 template<
class S,
class M2>
770 V8_INLINE
void Copy(
const Persistent<S, M2>& that);
780 class Global :
public PersistentBase<T> {
810 other.val_ =
nullptr;
821 this->val_ = rhs.val_;
841 V8_INLINE T* operator*()
const {
return this->val_; }
873 static int NumberOfHandles(
Isolate* isolate);
876 return reinterpret_cast<Isolate*
>(isolate_);
882 void Initialize(
Isolate* isolate);
884 static internal::Object** CreateHandle(internal::Isolate* isolate,
885 internal::Object* value);
889 static internal::Object** CreateHandle(internal::HeapObject* heap_object,
890 internal::Object* value);
896 void*
operator new(
size_t size);
897 void operator delete(
void*, size_t);
899 internal::Isolate* isolate_;
900 internal::Object** prev_next_;
901 internal::Object** prev_limit_;
904 template<
class F>
friend class Local;
928 internal::Object** slot =
929 Escape(reinterpret_cast<internal::Object**>(*value));
930 return Local<T>(
reinterpret_cast<T*
>(slot));
934 internal::Object** Escape(internal::Object** escape_value);
940 void*
operator new(
size_t size);
941 void operator delete(
void*, size_t);
943 internal::Object** escape_slot_;
956 void*
operator new(
size_t size);
957 void operator delete(
void*, size_t);
959 internal::Isolate* isolate_;
961 internal::Object** prev_limit_;
983 bool is_shared_cross_origin =
false,
984 bool is_opaque =
false)
985 : flags_((is_embedder_debug_script ? kIsEmbedderDebugScript : 0) |
986 (is_shared_cross_origin ? kIsSharedCrossOrigin : 0) |
987 (is_opaque ? kIsOpaque : 0)) {}
990 (kIsEmbedderDebugScript | kIsSharedCrossOrigin | kIsOpaque)) {}
992 return (flags_ & kIsEmbedderDebugScript) != 0;
995 return (flags_ & kIsSharedCrossOrigin) != 0;
997 bool IsOpaque()
const {
return (flags_ & kIsOpaque) != 0; }
998 int Flags()
const {
return flags_; }
1002 kIsEmbedderDebugScript = 1,
1003 kIsSharedCrossOrigin = 1 << 1,
1069 int GetLineNumber(
int code_pos);
1071 static const int kNoScriptId = 0;
1084 static V8_DEPRECATE_SOON(
1085 "Use maybe version",
1101 V8_DEPRECATE_SOON(
"Use maybe version",
Local<Value> Run());
1111 return GetUnboundScript()->GetId();
1138 buffer_policy(BufferNotOwned) {}
1145 BufferPolicy buffer_policy = BufferNotOwned);
1170 V8_INLINE ~Source();
1175 V8_INLINE
const CachedData* GetCachedData()
const;
1180 Source(
const Source&);
1181 Source& operator=(
const Source&);
1223 virtual size_t GetMoreData(
const uint8_t** src) = 0;
1235 virtual bool SetBookmark();
1240 virtual void ResetToBookmark();
1262 internal::StreamedSource*
impl()
const {
return impl_; }
1269 internal::StreamedSource* impl_;
1279 virtual void Run() = 0;
1283 kNoCompileOptions = 0,
1306 static V8_DEPRECATE_SOON(
"Use maybe version",
1308 Isolate* isolate, Source* source,
1309 CompileOptions options = kNoCompileOptions));
1311 Isolate* isolate, Source* source,
1312 CompileOptions options = kNoCompileOptions);
1325 static V8_DEPRECATE_SOON(
1326 "Use maybe version",
1328 CompileOptions options = kNoCompileOptions));
1331 CompileOptions options = kNoCompileOptions);
1344 static ScriptStreamingTask* StartStreamingScript(
1345 Isolate* isolate, StreamedSource* source,
1346 CompileOptions options = kNoCompileOptions);
1355 static V8_DEPRECATE_SOON(
1356 "Use maybe version",
1382 static uint32_t CachedDataVersionTag();
1392 static V8_DEPRECATE_SOON(
1393 "Use maybe version",
1395 CompileOptions options = kNoCompileOptions));
1398 CompileOptions options = kNoCompileOptions);
1410 static V8_DEPRECATE_SOON(
"Use maybe version",
1412 Isolate* isolate, Source* source,
1415 size_t context_extension_count,
1424 Isolate* isolate, Source* source, CompileOptions options,
bool is_module);
1435 V8_DEPRECATE_SOON(
"Use maybe version",
Local<String> GetSourceLine()
const);
1461 V8_DEPRECATE_SOON(
"Use maybe version",
int GetLineNumber()
const);
1468 int GetStartPosition()
const;
1474 int GetEndPosition()
const;
1480 V8_DEPRECATE_SOON(
"Use maybe version",
int GetStartColumn()
const);
1487 V8_DEPRECATE_SOON(
"Use maybe version",
int GetEndColumn()
const);
1494 bool IsSharedCrossOrigin()
const;
1495 bool IsOpaque()
const;
1498 static void PrintCurrentStackTrace(
Isolate* isolate, FILE* out);
1500 static const int kNoLineNumberInfo = 0;
1501 static const int kNoColumnInfo = 0;
1502 static const int kNoScriptIdInfo = 0;
1519 kColumnOffset = 1 << 1 | kLineNumber,
1520 kScriptName = 1 << 2,
1521 kFunctionName = 1 << 3,
1523 kIsConstructor = 1 << 5,
1524 kScriptNameOrSourceURL = 1 << 6,
1526 kExposeFramesAcrossSecurityOrigins = 1 << 8,
1527 kOverview = kLineNumber | kColumnOffset | kScriptName | kFunctionName,
1528 kDetailed = kOverview | kIsEval | kIsConstructor | kScriptNameOrSourceURL
1539 int GetFrameCount()
const;
1556 StackTraceOptions options = kOverview);
1571 int GetLineNumber()
const;
1580 int GetColumn()
const;
1588 int GetScriptId()
const;
1613 bool IsEval()
const;
1619 bool IsConstructor()
const;
1656 static V8_DEPRECATE_SOON(
"Use maybe version",
1690 V8_INLINE
bool IsUndefined()
const;
1696 V8_INLINE
bool IsNull()
const;
1701 bool IsTrue()
const;
1706 bool IsFalse()
const;
1712 bool IsName()
const;
1718 V8_INLINE
bool IsString()
const;
1724 bool IsSymbol()
const;
1729 bool IsFunction()
const;
1734 bool IsArray()
const;
1739 bool IsObject()
const;
1744 bool IsBoolean()
const;
1749 bool IsNumber()
const;
1754 bool IsExternal()
const;
1759 bool IsInt32()
const;
1764 bool IsUint32()
const;
1769 bool IsDate()
const;
1774 bool IsArgumentsObject()
const;
1779 bool IsBooleanObject()
const;
1784 bool IsNumberObject()
const;
1789 bool IsStringObject()
const;
1795 bool IsSymbolObject()
const;
1800 bool IsNativeError()
const;
1805 bool IsRegExp()
const;
1811 bool IsGeneratorFunction()
const;
1817 bool IsGeneratorObject()
const;
1823 bool IsPromise()
const;
1838 bool IsMapIterator()
const;
1843 bool IsSetIterator()
const;
1848 bool IsWeakMap()
const;
1853 bool IsWeakSet()
const;
1859 bool IsArrayBuffer()
const;
1865 bool IsArrayBufferView()
const;
1871 bool IsTypedArray()
const;
1877 bool IsUint8Array()
const;
1883 bool IsUint8ClampedArray()
const;
1889 bool IsInt8Array()
const;
1895 bool IsUint16Array()
const;
1901 bool IsInt16Array()
const;
1907 bool IsUint32Array()
const;
1913 bool IsInt32Array()
const;
1919 bool IsFloat32Array()
const;
1925 bool IsFloat64Array()
const;
1931 bool IsFloat32x4()
const;
1937 bool IsDataView()
const;
1943 bool IsSharedArrayBuffer()
const;
1962 V8_DEPRECATE_SOON(
"Use maybe version",
1964 V8_DEPRECATE_SOON(
"Use maybe version",
1966 V8_DEPRECATE_SOON(
"Use maybe version",
1968 V8_DEPRECATE_SOON(
"Use maybe version",
1970 V8_DEPRECATE_SOON(
"Use maybe version",
1972 V8_DEPRECATE_SOON(
"Use maybe version",
1974 V8_DEPRECATE_SOON(
"Use maybe version",
1976 V8_DEPRECATE_SOON(
"Use maybe version",
1979 inline V8_DEPRECATE_SOON(
"Use maybe version",
1981 inline V8_DEPRECATE_SOON(
"Use maybe version",
Local<Number> ToNumber()
const);
1982 inline V8_DEPRECATE_SOON(
"Use maybe version",
Local<String> ToString()
const);
1983 inline V8_DEPRECATE_SOON(
"Use maybe version",
1985 inline V8_DEPRECATE_SOON(
"Use maybe version",
Local<Object> ToObject()
const);
1986 inline V8_DEPRECATE_SOON(
"Use maybe version",
1988 inline V8_DEPRECATE_SOON(
"Use maybe version",
Local<Uint32> ToUint32()
const);
1989 inline V8_DEPRECATE_SOON(
"Use maybe version",
Local<Int32> ToInt32()
const);
1995 V8_DEPRECATE_SOON(
"Use maybe version",
Local<Uint32> ToArrayIndex()
const);
2007 V8_DEPRECATE_SOON(
"Use maybe version",
bool BooleanValue()
const);
2008 V8_DEPRECATE_SOON(
"Use maybe version",
double NumberValue()
const);
2009 V8_DEPRECATE_SOON(
"Use maybe version", int64_t IntegerValue()
const);
2010 V8_DEPRECATE_SOON(
"Use maybe version", uint32_t Uint32Value()
const);
2011 V8_DEPRECATE_SOON(
"Use maybe version", int32_t Int32Value()
const);
2014 V8_DEPRECATE_SOON(
"Use maybe version",
bool Equals(
Handle<Value> that)
const);
2020 template <
class T> V8_INLINE
static Value* Cast(T* value);
2023 V8_INLINE
bool QuickIsUndefined()
const;
2024 V8_INLINE
bool QuickIsNull()
const;
2025 V8_INLINE
bool QuickIsString()
const;
2026 bool FullIsUndefined()
const;
2027 bool FullIsNull()
const;
2028 bool FullIsString()
const;
2064 int GetIdentityHash();
2080 static const int kMaxLength = (1 << 28) - 16;
2083 UNKNOWN_ENCODING = 0x1,
2084 TWO_BYTE_ENCODING = 0x0,
2085 ONE_BYTE_ENCODING = 0x4
2096 int Utf8Length()
const;
2103 bool IsOneByte()
const;
2109 bool ContainsOnlyOneByte()
const;
2138 HINT_MANY_WRITES_EXPECTED = 1,
2139 NO_NULL_TERMINATION = 2,
2140 PRESERVE_ONE_BYTE_NULL = 4,
2144 REPLACE_INVALID_UTF8 = 8
2148 int Write(uint16_t* buffer,
2151 int options = NO_OPTIONS)
const;
2153 int WriteOneByte(uint8_t* buffer,
2156 int options = NO_OPTIONS)
const;
2158 int WriteUtf8(
char* buffer,
2160 int* nchars_ref = NULL,
2161 int options = NO_OPTIONS)
const;
2171 bool IsExternal()
const;
2176 bool IsExternalOneByte()
const;
2198 friend class v8::internal::Heap;
2219 virtual const uint16_t* data()
const = 0;
2224 virtual size_t length()
const = 0;
2249 virtual const char* data()
const = 0;
2251 virtual size_t length()
const = 0;
2261 V8_INLINE ExternalStringResourceBase* GetExternalStringResourceBase(
2262 Encoding* encoding_out)
const;
2268 V8_INLINE ExternalStringResource* GetExternalStringResource()
const;
2274 const ExternalOneByteStringResource* GetExternalOneByteStringResource()
const;
2285 static V8_DEPRECATE_SOON(
2286 "Use maybe version",
2298 static V8_DEPRECATE_SOON(
2299 "Use maybe version",
2311 static V8_DEPRECATE_SOON(
2312 "Use maybe version",
2337 static V8_DEPRECATE_SOON(
2338 "Use maybe version",
2340 ExternalStringResource* resource));
2342 Isolate* isolate, ExternalStringResource* resource);
2353 bool MakeExternal(ExternalStringResource* resource);
2363 static V8_DEPRECATE_SOON(
2364 "Use maybe version",
2366 ExternalOneByteStringResource* resource));
2368 Isolate* isolate, ExternalOneByteStringResource* resource);
2379 bool MakeExternal(ExternalOneByteStringResource* resource);
2384 bool CanMakeExternal();
2428 void operator=(
const Value&);
2432 void VerifyExternalStringResourceBase(ExternalStringResourceBase* v,
2433 Encoding encoding)
const;
2434 void VerifyExternalStringResource(ExternalStringResource* val)
const;
2482 double Value()
const;
2498 int64_t
Value()
const;
2511 int32_t
Value()
const;
2525 uint32_t
Value()
const;
2586 V8_DEPRECATE_SOON(
"Use maybe version",
2591 V8_DEPRECATE_SOON(
"Use maybe version",
2616 V8_WARN_UNUSED_RESULT
Maybe<bool> DefineOwnProperty(
2628 V8_DEPRECATE_SOON(
"Use CreateDataProperty",
2631 V8_DEPRECATE_SOON(
"Use CreateDataProperty",
2640 V8_DEPRECATE_SOON(
"Use maybe version",
Local<Value> Get(uint32_t index));
2649 V8_DEPRECATE_SOON(
"Use maybe version",
2657 V8_DEPRECATE_SOON(
"Use maybe version",
2662 V8_DEPRECATE_SOON(
"Use maybe version",
bool Has(
Handle<Value> key));
2666 V8_DEPRECATE_SOON(
"Use maybe version",
bool Delete(
Handle<Value> key));
2670 V8_DEPRECATE_SOON(
"Use maybe version",
bool Has(uint32_t index));
2673 V8_DEPRECATE_SOON(
"Use maybe version",
bool Delete(uint32_t index));
2677 V8_DEPRECATE_SOON(
"Use maybe version",
2684 V8_DEPRECATE_SOON(
"Use maybe version",
2711 V8_DEPRECATE_SOON(
"Use maybe version",
Local<Array> GetPropertyNames());
2720 V8_DEPRECATE_SOON(
"Use maybe version",
Local<Array> GetOwnPropertyNames());
2736 V8_DEPRECATE_SOON(
"Use maybe version",
2752 V8_DEPRECATE_SOON(
"Use maybe version",
Local<String> ObjectProtoToString());
2762 int InternalFieldCount();
2767 return object.val_->InternalFieldCount();
2781 V8_INLINE
void* GetAlignedPointerFromInternalField(
int index);
2786 return object.val_->GetAlignedPointerFromInternalField(index);
2794 void SetAlignedPointerInInternalField(
int index,
void* value);
2797 V8_DEPRECATE_SOON(
"Use maybe version",
2801 V8_DEPRECATE_SOON(
"Use maybe version",
2805 V8_DEPRECATE_SOON(
"Use maybe version",
2806 bool HasRealIndexedProperty(uint32_t index));
2807 V8_WARN_UNUSED_RESULT
Maybe<bool> HasRealIndexedProperty(
2809 V8_DEPRECATE_SOON(
"Use maybe version",
2811 V8_WARN_UNUSED_RESULT
Maybe<bool> HasRealNamedCallbackProperty(
2819 "Use maybe version",
2830 "Use maybe version",
2834 GetRealNamedPropertyAttributesInPrototypeChain(
Local<Context> context,
2842 V8_DEPRECATE_SOON(
"Use maybe version",
2852 V8_DEPRECATE_SOON(
"Use maybe version",
2859 bool HasNamedLookupInterceptor();
2862 bool HasIndexedLookupInterceptor();
2869 V8_DEPRECATE_SOON(
"No alternative",
void TurnOnAccessCheck());
2878 int GetIdentityHash();
2914 V8_DEPRECATE_SOON(
"Use maybe version",
2927 V8_DEPRECATE_SOON(
"Use maybe version",
2936 V8_DEPRECATE_SOON(
"Keep track of isolate correctly",
Isolate* GetIsolate());
2944 static void CheckCast(
Value* obj);
2946 void* SlowGetAlignedPointerFromInternalField(
int index);
2955 uint32_t Length()
const;
2961 V8_DEPRECATE_SOON(
"Use maybe version",
2975 static void CheckCast(
Value* obj);
2984 size_t Size()
const;
3005 V8_INLINE
static Map* Cast(
Value* obj);
3009 static void CheckCast(
Value* obj);
3018 size_t Size()
const;
3037 V8_INLINE
static Set* Cast(
Value* obj);
3041 static void CheckCast(
Value* obj);
3045 template<
typename T>
3049 : value_(that.value_) {
3053 template <
typename S>
3056 template <
typename S>
3058 template <
typename S>
3061 V8_INLINE
void Set(
bool value);
3062 V8_INLINE
void Set(
double i);
3063 V8_INLINE
void Set(int32_t i);
3064 V8_INLINE
void Set(uint32_t i);
3073 template <
typename S>
3074 V8_INLINE
void Set(S* whatever);
3080 template <
class F,
class G,
class H>
3082 V8_INLINE
void SetInternal(internal::Object* value) { *value_ = value; }
3083 V8_INLINE internal::Object* GetDefaultValue();
3084 V8_INLINE
explicit ReturnValue(internal::Object** slot);
3085 internal::Object** value_;
3095 template<
typename T>
3096 class FunctionCallbackInfo {
3098 V8_INLINE
int Length()
const;
3099 V8_INLINE Local<Value>
operator[](
int i)
const;
3100 V8_INLINE Local<Function>
Callee()
const;
3101 V8_INLINE Local<Object>
This()
const;
3102 V8_INLINE Local<Object>
Holder()
const;
3104 V8_INLINE Local<Value>
Data()
const;
3122 internal::Object** values,
3124 bool is_construct_call);
3136 template<
typename T>
3149 friend class internal::PropertyCallbackArguments;
3179 static V8_DEPRECATE_SOON(
3180 "Use maybe version",
3184 V8_DEPRECATE_SOON(
"Use maybe version",
3190 V8_DEPRECATE_SOON(
"Use maybe version",
Local<Object> NewInstance()
const);
3193 return NewInstance(context, 0,
nullptr);
3196 V8_DEPRECATE_SOON(
"Use maybe version",
3224 int GetScriptLineNumber()
const;
3229 int GetScriptColumnNumber()
const;
3234 bool IsBuiltin()
const;
3239 int ScriptId()
const;
3253 static void CheckCast(
Value* obj);
3268 static V8_DEPRECATE_SOON(
"Use maybe version",
3282 V8_DEPRECATE_SOON(
"Use maybe version",
void Resolve(
Handle<Value> value));
3286 V8_DEPRECATE_SOON(
"Use maybe version",
void Reject(
Handle<Value> value));
3294 static void CheckCast(
Value* obj);
3303 V8_DEPRECATE_SOON(
"Use maybe version",
3308 V8_DEPRECATE_SOON(
"Use maybe version",
3313 V8_DEPRECATE_SOON(
"Use maybe version",
3328 static void CheckCast(
Value* obj);
3332 #ifndef V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT
3334 #define V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT 2
3362 virtual void* Allocate(
size_t length) = 0;
3368 virtual void* AllocateUninitialized(
size_t length) = 0;
3373 virtual void Free(
void* data,
size_t length) = 0;
3390 void*
Data()
const {
return data_; }
3395 size_t byte_length_;
3404 size_t ByteLength()
const;
3421 Isolate* isolate,
void* data,
size_t byte_length,
3428 bool IsExternal()
const;
3433 bool IsNeuterable()
const;
3472 static void CheckCast(
Value* obj);
3476 #ifndef V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT
3478 #define V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT 2
3497 size_t ByteOffset();
3501 size_t ByteLength();
3512 size_t CopyContents(
void* dest,
size_t byte_length);
3518 bool HasBuffer()
const;
3522 static const int kInternalFieldCount =
3527 static void CheckCast(
Value* obj);
3548 static void CheckCast(
Value* obj);
3559 size_t byte_offset,
size_t length);
3561 size_t byte_offset,
size_t length);
3566 static void CheckCast(
Value* obj);
3577 size_t byte_offset,
size_t length);
3585 static void CheckCast(
Value* obj);
3595 size_t byte_offset,
size_t length);
3597 size_t byte_offset,
size_t length);
3602 static void CheckCast(
Value* obj);
3613 size_t byte_offset,
size_t length);
3615 size_t byte_offset,
size_t length);
3620 static void CheckCast(
Value* obj);
3631 size_t byte_offset,
size_t length);
3633 size_t byte_offset,
size_t length);
3638 static void CheckCast(
Value* obj);
3649 size_t byte_offset,
size_t length);
3651 size_t byte_offset,
size_t length);
3656 static void CheckCast(
Value* obj);
3667 size_t byte_offset,
size_t length);
3669 size_t byte_offset,
size_t length);
3674 static void CheckCast(
Value* obj);
3685 size_t byte_offset,
size_t length);
3687 size_t byte_offset,
size_t length);
3692 static void CheckCast(
Value* obj);
3703 size_t byte_offset,
size_t length);
3705 size_t byte_offset,
size_t length);
3710 static void CheckCast(
Value* obj);
3721 size_t byte_offset,
size_t length);
3723 size_t byte_offset,
size_t length);
3728 static void CheckCast(
Value* obj);
3753 void*
Data()
const {
return data_; }
3758 size_t byte_length_;
3767 size_t ByteLength()
const;
3784 Isolate* isolate,
void* data,
size_t byte_length,
3791 bool IsExternal()
const;
3827 static void CheckCast(
Value* obj);
3836 static V8_DEPRECATE_SOON(
"Use maybe version.",
3845 double ValueOf()
const;
3861 static void DateTimeConfigurationChangeNotification(
Isolate* isolate);
3875 double ValueOf()
const;
3891 bool ValueOf()
const;
3960 static V8_DEPRECATE_SOON(
"Use maybe version",
3976 Flags GetFlags()
const;
3993 void*
Value()
const;
4012 void SetAccessorProperty(
4349 V8_DEPRECATE_SOON(
"Use maybe version",
Local<Function> GetFunction());
4362 void SetLength(
int length);
4388 void SetAcceptAnyReceiver(
bool value);
4402 void SetHiddenPrototype(
bool value);
4408 void ReadOnlyPrototype();
4414 void RemovePrototype();
4513 V8_DEPRECATE_SOON(
"Use maybe version",
Local<Object> NewInstance());
4583 void SetNamedPropertyHandler(
4618 deleter, enumerator, data));
4637 void MarkAsUndetectable();
4653 bool turned_on_by_default =
true);
4659 int InternalFieldCount();
4665 void SetInternalFieldCount(
int value);
4725 : data_(data), length_(length) {}
4726 const char*
data()
const {
return data_; }
4742 const char* source = 0,
4744 const char** deps = 0,
4745 int source_length = -1);
4752 const char*
name()
const {
return name_; }
4763 size_t source_length_;
4780 V8_INLINE Handle<Primitive>
Undefined(Isolate* isolate);
4781 V8_INLINE Handle<Primitive>
Null(Isolate* isolate);
4782 V8_INLINE Handle<Boolean>
True(Isolate* isolate);
4783 V8_INLINE Handle<Boolean>
False(Isolate* isolate);
4808 void ConfigureDefaults(uint64_t physical_memory,
4809 uint64_t virtual_memory_limit);
4812 V8_DEPRECATED(
"Use two-args version instead",
4813 void ConfigureDefaults(uint64_t physical_memory,
4814 uint64_t virtual_memory_limit,
4815 uint32_t number_of_processors));
4827 return max_available_threads_;
4831 void set_max_available_threads(
int value)) {
4832 max_available_threads_ = value;
4836 code_range_size_ = value;
4840 int max_semi_space_size_;
4841 int max_old_space_size_;
4842 int max_executable_size_;
4843 uint32_t* stack_limit_;
4844 int max_available_threads_;
4845 size_t code_range_size_;
4890 typedef int* (*CounterLookupCallback)(
const char* name);
4892 typedef void* (*CreateHistogramCallback)(
const char* name,
4934 : promise_(promise),
4937 stack_trace_(stack_trace) {}
5016 size_t total_heap_size_;
5017 size_t total_heap_size_executable_;
5018 size_t total_physical_size_;
5019 size_t total_available_size_;
5020 size_t used_heap_size_;
5021 size_t heap_size_limit_;
5038 const char* space_name_;
5040 size_t space_used_size_;
5041 size_t space_available_size_;
5042 size_t physical_space_size_;
5057 const char* object_type_;
5058 const char* object_sub_type_;
5059 size_t object_count_;
5060 size_t object_size_;
5066 class RetainedObjectInfo;
5081 uintptr_t return_addr_location);
5182 uint16_t class_id) {}
5202 code_event_handler(NULL),
5203 snapshot_blob(NULL),
5204 counter_lookup_callback(NULL),
5205 create_histogram_callback(NULL),
5206 add_histogram_sample_callback(NULL),
5207 array_buffer_allocator(NULL) {}
5309 void* internal_throws_;
5310 void* internal_assert_;
5328 internal::Isolate* isolate_;
5342 kMinorGarbageCollection
5354 kMarkDequeOverflow = 3,
5355 kStoreBufferOverflow = 4,
5356 kSlotsBufferOverflow = 5,
5359 kUseCounterFeatureCount
5362 typedef void (*UseCounterCallback)(
Isolate* isolate,
5377 static V8_DEPRECATED(
"Always pass CreateParams",
Isolate* New());
5418 V8_INLINE
void SetData(uint32_t slot,
void* data);
5424 V8_INLINE
void* GetData(uint32_t slot);
5430 V8_INLINE
static uint32_t GetNumberOfDataSlots();
5440 size_t NumberOfHeapSpaces();
5457 size_t NumberOfTrackedHeapObjectTypes();
5483 void GetStackSample(
const RegisterState& state,
void** frames,
5484 size_t frames_limit,
SampleInfo* sample_info);
5500 AdjustAmountOfExternalAllocatedMemory(int64_t change_in_bytes);
5506 HeapProfiler* GetHeapProfiler();
5513 CpuProfiler* GetCpuProfiler();
5550 template<
typename T>
void SetObjectGroupId(
const Persistent<T>&
object,
5560 template<
typename T>
void SetReferenceFromGroup(
UniqueId id,
5569 template<
typename T,
typename S>
5588 void AddGCPrologueCallback(
5606 void AddGCEpilogueCallback(
5623 void TerminateExecution();
5633 bool IsExecutionTerminating();
5649 void CancelTerminateExecution();
5703 void RunMicrotasks();
5719 void SetAutorunMicrotasks(
bool autorun);
5725 bool WillAutorunMicrotasks()
const;
5730 void SetUseCounterCallback(UseCounterCallback callback);
5761 bool IdleNotificationDeadline(
double deadline_in_seconds);
5763 V8_DEPRECATE_SOON(
"use IdleNotificationDeadline()",
5764 bool IdleNotification(
int idle_time_in_ms));
5770 void LowMemoryNotification();
5781 int ContextDisposedNotification(
bool dependant_context =
true);
5817 void SetStackLimit(uintptr_t stack_limit);
5832 void GetCodeRange(
void** start,
size_t* length_in_bytes);
5841 void SetAllowCodeGenerationFromStringsCallback(
5874 void SetCaptureStackTraceForUncaughtExceptions(
5875 bool capture,
int frame_limit = 10,
5913 template <
class K,
class V,
class Traits>
5920 void*
operator new(
size_t size);
5921 void operator delete(
void*, size_t);
5923 void SetObjectGroupId(internal::Object**
object,
UniqueId id);
5924 void SetReferenceFromGroup(
UniqueId id, internal::Object**
object);
5925 void SetReference(internal::Object** parent, internal::Object** child);
5926 void CollectAllGarbage(
const char* gc_reason);
5957 uintptr_t return_addr_location);
5966 V8_INLINE
static V8_DEPRECATE_SOON(
5967 "Use isolate version",
5974 V8_INLINE
static V8_DEPRECATE_SOON(
5975 "Use isolate version",
void SetAllowCodeGenerationFromStringsCallback(
5984 static V8_DEPRECATE_SOON(
5985 "Use isolate version",
5992 V8_INLINE
static V8_DEPRECATE_SOON(
"no alternative",
bool IsDead());
6009 static void SetNativesDataBlob(
StartupData* startup_blob);
6010 static void SetSnapshotDataBlob(
StartupData* startup_blob);
6017 static StartupData CreateSnapshotDataBlob(
const char* custom_source = NULL);
6028 V8_INLINE
static V8_DEPRECATE_SOON(
6029 "Use isolate version",
6036 V8_INLINE
static V8_DEPRECATE_SOON(
6037 "Use isolate version",
void RemoveMessageListeners(
MessageCallback that));
6043 V8_INLINE
static V8_DEPRECATE_SOON(
6044 "Use isolate version",
6045 void SetCaptureStackTraceForUncaughtExceptions(
6046 bool capture,
int frame_limit = 10,
6052 static void SetFlagsFromString(
const char* str,
int length);
6057 static void SetFlagsFromCommandLine(
int* argc,
6062 static const char* GetVersion();
6065 V8_INLINE
static V8_DEPRECATE_SOON(
6066 "Use isolate version",
6079 static V8_DEPRECATE_SOON(
6080 "Use isolate version",
6088 V8_INLINE
static V8_DEPRECATE_SOON(
6089 "Use isolate version",
6102 static V8_DEPRECATE_SOON(
6103 "Use isolate version",
6111 V8_INLINE
static V8_DEPRECATE_SOON(
6112 "Use isolate version",
6119 V8_INLINE
static V8_DEPRECATE_SOON(
6120 "Use isolate version",
6128 V8_INLINE
static V8_DEPRECATE_SOON(
6129 "Use isolate version",
6136 static bool Initialize();
6148 static void SetReturnAddressLocationResolver(
6160 V8_INLINE
static V8_DEPRECATE_SOON(
"Use isolate version",
6161 void TerminateExecution(
Isolate* isolate));
6173 V8_INLINE
static V8_DEPRECATE_SOON(
6174 "Use isolate version",
6175 bool IsExecutionTerminating(
Isolate* isolate = NULL));
6193 V8_INLINE
static V8_DEPRECATE_SOON(
6194 "Use isolate version",
void CancelTerminateExecution(
Isolate* isolate));
6205 static bool Dispose();
6212 V8_INLINE
static V8_DEPRECATE_SOON(
6213 "Use isoalte version",
6220 V8_INLINE
static V8_DEPRECATE_SOON(
6221 "Use isolate version",
6228 V8_INLINE
static V8_DEPRECATE_SOON(
6229 "Use isolate version",
6230 void VisitHandlesWithClassIds(
Isolate* isolate,
6240 V8_INLINE
static V8_DEPRECATE_SOON(
6241 "Use isolate version",
6242 void VisitHandlesForPartialDependence(
Isolate* isolate,
6252 static bool InitializeICU(
const char* icu_data_file = NULL);
6258 static void InitializePlatform(Platform* platform);
6264 static void ShutdownPlatform();
6269 static internal::Object** GlobalizeReference(internal::Isolate* isolate,
6270 internal::Object** handle);
6271 static internal::Object** CopyPersistent(internal::Object** handle);
6272 static void DisposeGlobal(internal::Object** global_handle);
6274 static void MakeWeak(internal::Object** global_handle,
void* data,
6275 WeakCallback weak_callback);
6276 static void MakeWeak(internal::Object** global_handle,
void* data,
6279 static void MakeWeak(internal::Object** global_handle,
void* data,
6281 int internal_field_index1,
6283 int internal_field_index2,
6285 static void* ClearWeak(internal::Object** global_handle);
6286 static void Eternalize(
Isolate* isolate,
6291 static void FromJustIsNothing();
6292 static void ToLocalEmpty();
6293 static void InternalFieldOutOfBounds(
int index);
6322 V8_INLINE
bool IsJust()
const {
return has_value; }
6326 if (V8_UNLIKELY(!
IsJust())) V8::FromJustIsNothing();
6331 return has_value ? value : default_value;
6344 Maybe() : has_value(false) {}
6345 explicit Maybe(
const T& t) : has_value(true), value(t) {}
6353 friend Maybe<U>
Just(
const U& u);
6379 V8_DEPRECATE_SOON(
"Use isolate version",
TryCatch());
6396 bool HasCaught()
const;
6406 bool CanContinue()
const;
6420 bool HasTerminated()
const;
6476 void SetVerbose(
bool value);
6483 void SetCaptureMessage(
bool value);
6497 if (handler == NULL)
return NULL;
6498 return handler->js_stack_comparable_address_;
6502 void ResetInternal();
6507 void*
operator new(
size_t size);
6508 void operator delete(
void*, size_t);
6510 v8::internal::Isolate* isolate_;
6514 void* js_stack_comparable_address_;
6515 bool is_verbose_ : 1;
6516 bool can_continue_ : 1;
6517 bool capture_message_ : 1;
6519 bool has_terminated_ : 1;
6521 friend class v8::internal::Isolate;
6535 : name_count_(name_count), names_(names) { }
6537 const char**
begin()
const {
return &names_[0]; }
6538 const char**
end()
const {
return &names_[name_count_]; }
6541 const int name_count_;
6542 const char** names_;
6570 void DetachGlobal();
6603 void UseDefaultSecurityToken();
6658 V8_INLINE
void* GetAlignedPointerFromEmbedderData(
int index);
6665 void SetAlignedPointerInEmbedderData(
int index,
void* value);
6680 void AllowCodeGenerationFromStrings(
bool allow);
6686 bool IsCodeGenerationFromStringsAllowed();
6693 void SetErrorMessageForCodeGenerationFromStrings(
Handle<String> message);
6717 void* SlowGetAlignedPointerFromEmbedderData(
int index);
6806 void Initialize(
Isolate* isolate);
6808 internal::Isolate* isolate_;
6825 static bool IsLocked(
Isolate* isolate);
6830 static bool IsActive();
6833 void Initialize(
Isolate* isolate);
6837 internal::Isolate* isolate_;
6841 void operator=(
const Locker&);
6848 namespace internal {
6866 template<
int kSmiShiftSize>
6869 uintptr_t tagged_value =
6870 (
static_cast<uintptr_t
>(value) << smi_shift_bits) |
kSmiTag;
6871 return reinterpret_cast<internal::Object*
>(tagged_value);
6879 V8_INLINE
static int SmiToInt(
const internal::Object* value) {
6882 return static_cast<int>(
reinterpret_cast<intptr_t
>(value)) >> shift_bits;
6884 V8_INLINE
static internal::Object*
IntToSmi(
int value) {
6885 return internal::IntToSmi<kSmiShiftSize>(value);
6899 return static_cast<uintptr_t
>(value + 0x40000000U) < 0x80000000U;
6908 V8_INLINE
static int SmiToInt(
const internal::Object* value) {
6911 return static_cast<int>(
reinterpret_cast<intptr_t
>(value) >> shift_bits);
6913 V8_INLINE
static internal::Object*
IntToSmi(
int value) {
6914 return internal::IntToSmi<kSmiShiftSize>(value);
6918 return (value == static_cast<int32_t>(value));
6925 V8_INLINE
static bool SmiValuesAre31Bits() {
return kSmiValueSize == 31; }
6926 V8_INLINE
static bool SmiValuesAre32Bits() {
return kSmiValueSize == 32; }
6959 kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset + kApiInt64Size +
6992 #ifdef V8_ENABLE_CHECKS
6998 return ((reinterpret_cast<intptr_t>(value) & kHeapObjectTagMask) ==
7002 V8_INLINE
static int SmiValue(
const internal::Object* value) {
7003 return PlatformSmiTagging::SmiToInt(value);
7006 V8_INLINE
static internal::Object*
IntToSmi(
int value) {
7011 return PlatformSmiTagging::IsValidSmi(value);
7015 typedef internal::Object O;
7023 typedef internal::Object O;
7024 return SmiValue(ReadField<O*>(obj, kOddballKindOffset));
7032 V8_INLINE
static uint8_t
GetNodeFlag(internal::Object** obj,
int shift) {
7033 uint8_t* addr =
reinterpret_cast<uint8_t*
>(obj) + kNodeFlagsOffset;
7034 return *addr &
static_cast<uint8_t
>(1U << shift);
7038 bool value,
int shift) {
7039 uint8_t* addr =
reinterpret_cast<uint8_t*
>(obj) + kNodeFlagsOffset;
7040 uint8_t mask =
static_cast<uint8_t
>(1U << shift);
7041 *addr =
static_cast<uint8_t
>((*addr & ~mask) | (value << shift));
7045 uint8_t* addr =
reinterpret_cast<uint8_t*
>(obj) + kNodeFlagsOffset;
7051 uint8_t* addr =
reinterpret_cast<uint8_t*
>(obj) + kNodeFlagsOffset;
7052 *addr =
static_cast<uint8_t
>((*addr & ~kNodeStateMask) | value);
7058 uint8_t *addr =
reinterpret_cast<uint8_t *
>(isolate) +
7059 kIsolateEmbedderDataOffset + slot * kApiPointerSize;
7060 *
reinterpret_cast<void**
>(addr) = data;
7065 const uint8_t* addr =
reinterpret_cast<const uint8_t*
>(isolate) +
7066 kIsolateEmbedderDataOffset + slot * kApiPointerSize;
7067 return *
reinterpret_cast<void* const*
>(addr);
7072 uint8_t* addr =
reinterpret_cast<uint8_t*
>(isolate) + kIsolateRootsOffset;
7073 return reinterpret_cast<internal::Object**
>(addr + index *
kApiPointerSize);
7076 template <
typename T>
7077 V8_INLINE
static T
ReadField(
const internal::Object* ptr,
int offset) {
7078 const uint8_t* addr =
7079 reinterpret_cast<const uint8_t*
>(ptr) + offset - kHeapObjectTag;
7080 return *
reinterpret_cast<const T*
>(addr);
7083 template <
typename T>
7085 typedef internal::Object O;
7087 O* ctx = *
reinterpret_cast<O* const*
>(context);
7088 int embedder_data_offset = I::kContextHeaderSize +
7090 O* embedder_data = I::ReadField<O*>(ctx, embedder_data_offset);
7093 return I::ReadField<T>(embedder_data, value_offset);
7102 return New(isolate, that.val_);
7107 return New(isolate, that.val_);
7113 if (that == NULL)
return Local<T>();
7115 internal::Object** p =
reinterpret_cast<internal::Object**
>(that_ptr);
7117 reinterpret_cast<internal::Isolate*>(isolate), *p)));
7125 V8::Eternalize(isolate, reinterpret_cast<Value*>(*handle), &this->index_);
7131 return Local<T>(
reinterpret_cast<T*
>(*V8::GetEternal(isolate, index_)));
7137 if (V8_UNLIKELY(val_ ==
nullptr)) V8::ToLocalEmpty();
7144 #ifdef V8_ENABLE_CHECKS
7145 if (index < 0 || index >= kInternalFieldsInWeakCallback) {
7146 V8::InternalFieldOutOfBounds(index);
7149 return internal_fields_[index];
7155 if (that == NULL)
return NULL;
7156 internal::Object** p =
reinterpret_cast<internal::Object**
>(that);
7157 return reinterpret_cast<T*
>(
7158 V8::GlobalizeReference(reinterpret_cast<internal::Isolate*>(isolate),
7163 template <
class T,
class M>
7164 template <
class S,
class M2>
7168 if (that.IsEmpty())
return;
7169 internal::Object** p =
reinterpret_cast<internal::Object**
>(that.val_);
7170 this->val_ =
reinterpret_cast<T*
>(V8::CopyPersistent(p));
7171 M::Copy(that,
this);
7178 if (this->IsEmpty())
return false;
7179 return I::GetNodeFlag(reinterpret_cast<internal::Object**>(this->val_),
7180 I::kNodeIsIndependentShift);
7187 if (this->IsEmpty())
return false;
7188 uint8_t node_state =
7189 I::GetNodeState(reinterpret_cast<internal::Object**>(this->val_));
7190 return node_state == I::kNodeStateIsNearDeathValue ||
7191 node_state == I::kNodeStateIsPendingValue;
7198 if (this->IsEmpty())
return false;
7199 return I::GetNodeState(reinterpret_cast<internal::Object**>(this->val_)) ==
7200 I::kNodeStateIsWeakValue;
7206 if (this->IsEmpty())
return;
7207 V8::DisposeGlobal(reinterpret_cast<internal::Object**>(this->val_));
7218 this->val_ = New(isolate, other.val_);
7228 if (other.IsEmpty())
return;
7229 this->val_ = New(isolate, other.val_);
7234 template <
typename S,
typename P>
7240 V8::MakeWeak(reinterpret_cast<internal::Object**>(this->val_), parameter,
7241 reinterpret_cast<Callback>(callback));
7246 template <
typename P>
7250 SetWeak<T, P>(parameter, callback);
7255 template <
typename P>
7258 int internal_field_index1,
int internal_field_index2) {
7260 V8::MakeWeak(reinterpret_cast<internal::Object**>(this->val_), parameter,
7261 internal_field_index1, internal_field_index2,
7262 reinterpret_cast<Callback>(callback));
7267 template <
typename P>
7269 P* parameter,
typename WeakCallbackInfo<P>::Callback callback,
7271 typedef typename WeakCallbackInfo<void>::Callback Callback;
7272 V8::MakeWeak(reinterpret_cast<internal::Object**>(this->val_), parameter,
7273 reinterpret_cast<Callback>(callback), type);
7278 template <
typename P>
7280 return reinterpret_cast<P*
>(
7281 V8::ClearWeak(reinterpret_cast<internal::Object**>(this->val_)));
7288 if (this->IsEmpty())
return;
7289 I::UpdateNodeFlag(reinterpret_cast<internal::Object**>(this->val_),
7291 I::kNodeIsIndependentShift);
7298 if (this->IsEmpty())
return;
7299 I::UpdateNodeFlag(reinterpret_cast<internal::Object**>(this->val_),
7301 I::kNodeIsPartiallyDependentShift);
7308 if (this->IsEmpty())
return;
7309 internal::Object** obj =
reinterpret_cast<internal::Object**
>(this->val_);
7310 uint8_t* addr =
reinterpret_cast<uint8_t*
>(obj) + I::kNodeClassIdOffset;
7311 *
reinterpret_cast<uint16_t*
>(addr) = class_id;
7318 if (this->IsEmpty())
return 0;
7319 internal::Object** obj =
reinterpret_cast<internal::Object**
>(this->val_);
7320 uint8_t* addr =
reinterpret_cast<uint8_t*
>(obj) + I::kNodeClassIdOffset;
7321 return *
reinterpret_cast<uint16_t*
>(addr);
7325 template<
typename T>
7328 template<
typename T>
7329 template<
typename S>
7332 if (V8_UNLIKELY(handle.IsEmpty())) {
7333 *value_ = GetDefaultValue();
7335 *value_ = *
reinterpret_cast<internal::Object**
>(*handle);
7339 template <
typename T>
7340 template <
typename S>
7343 if (V8_UNLIKELY(handle.IsEmpty())) {
7344 *value_ = GetDefaultValue();
7346 *value_ = *
reinterpret_cast<internal::Object**
>(*handle);
7350 template <
typename T>
7351 template <
typename S>
7354 if (V8_UNLIKELY(handle.IsEmpty())) {
7355 *value_ = GetDefaultValue();
7357 *value_ = *
reinterpret_cast<internal::Object**
>(*handle);
7361 template<
typename T>
7367 template<
typename T>
7371 if (V8_LIKELY(I::IsValidSmi(i))) {
7378 template<
typename T>
7382 bool fits_into_int32_t = (i & (1U << 31)) == 0;
7383 if (V8_LIKELY(fits_into_int32_t)) {
7384 Set(static_cast<int32_t>(i));
7390 template<
typename T>
7396 root_index = I::kTrueValueRootIndex;
7398 root_index = I::kFalseValueRootIndex;
7400 *value_ = *I::GetRoot(GetIsolate(), root_index);
7403 template<
typename T>
7407 *value_ = *I::GetRoot(GetIsolate(), I::kNullValueRootIndex);
7410 template<
typename T>
7414 *value_ = *I::GetRoot(GetIsolate(), I::kUndefinedValueRootIndex);
7417 template<
typename T>
7421 *value_ = *I::GetRoot(GetIsolate(), I::kEmptyStringRootIndex);
7424 template<
typename T>
7427 return *
reinterpret_cast<Isolate**
>(&value_[-2]);
7430 template<
typename T>
7431 template<
typename S>
7437 template<
typename T>
7444 template<
typename T>
7446 internal::Object** values,
7448 bool is_construct_call)
7449 : implicit_args_(implicit_args),
7452 is_construct_call_(is_construct_call) { }
7455 template<
typename T>
7462 template<
typename T>
7465 &implicit_args_[kCalleeIndex]));
7469 template<
typename T>
7475 template<
typename T>
7478 &implicit_args_[kHolderIndex]));
7482 template<
typename T>
7488 template<
typename T>
7490 return *
reinterpret_cast<Isolate**
>(&implicit_args_[kIsolateIndex]);
7494 template<
typename T>
7500 template<
typename T>
7502 return is_construct_call_ & 0x1;
7506 template<
typename T>
7519 : resource_name_(resource_name),
7520 resource_line_offset_(resource_line_offset),
7521 resource_column_offset_(resource_column_offset),
7522 options_(!resource_is_embedder_debug_script.IsEmpty() &&
7523 resource_is_embedder_debug_script->IsTrue(),
7524 !resource_is_shared_cross_origin.IsEmpty() &&
7525 resource_is_shared_cross_origin->IsTrue(),
7526 !resource_is_opaque.IsEmpty() && resource_is_opaque->IsTrue()),
7527 script_id_(script_id),
7528 source_map_url_(source_map_url) {}
7531 return resource_name_;
7536 return resource_line_offset_;
7541 return resource_column_offset_;
7555 : source_string(string),
7556 resource_name(origin.ResourceName()),
7557 resource_line_offset(origin.ResourceLineOffset()),
7558 resource_column_offset(origin.ResourceColumnOffset()),
7559 resource_options(origin.Options()),
7560 source_map_url(origin.SourceMapUrl()),
7561 cached_data(data) {}
7566 : source_string(string), cached_data(data) {}
7581 return value ?
True(isolate) :
False(isolate);
7593 #ifndef V8_ENABLE_CHECKS
7594 typedef internal::Object O;
7595 typedef internal::HeapObject HO;
7597 O* obj = *
reinterpret_cast<O**
>(
this);
7600 if (I::GetInstanceType(obj) == I::kJSObjectType) {
7602 O* value = I::ReadField<O*>(obj, offset);
7607 return SlowGetInternalField(index);
7612 #ifndef V8_ENABLE_CHECKS
7613 typedef internal::Object O;
7615 O* obj = *
reinterpret_cast<O**
>(
this);
7618 if (V8_LIKELY(I::GetInstanceType(obj) == I::kJSObjectType)) {
7620 return I::ReadField<void*>(obj, offset);
7623 return SlowGetAlignedPointerFromInternalField(index);
7628 #ifdef V8_ENABLE_CHECKS
7631 return static_cast<String*
>(value);
7636 typedef internal::Object* S;
7638 I::CheckInitialized(isolate);
7639 S* slot = I::GetRoot(isolate, I::kEmptyStringRootIndex);
7645 typedef internal::Object O;
7647 O* obj = *
reinterpret_cast<O* const*
>(
this);
7649 if (I::IsExternalTwoByteString(I::GetInstanceType(obj))) {
7650 void* value = I::ReadField<void*>(obj, I::kStringResourceOffset);
7655 #ifdef V8_ENABLE_CHECKS
7656 VerifyExternalStringResource(result);
7664 typedef internal::Object O;
7666 O* obj = *
reinterpret_cast<O* const*
>(
this);
7667 int type = I::GetInstanceType(obj) & I::kFullStringRepresentationMask;
7668 *encoding_out =
static_cast<Encoding>(type & I::kStringEncodingMask);
7670 if (type == I::kExternalOneByteRepresentationTag ||
7671 type == I::kExternalTwoByteRepresentationTag) {
7672 void* value = I::ReadField<void*>(obj, I::kStringResourceOffset);
7675 #ifdef V8_ENABLE_CHECKS
7676 VerifyExternalStringResourceBase(resource, *encoding_out);
7683 #ifdef V8_ENABLE_CHECKS
7684 return FullIsUndefined();
7686 return QuickIsUndefined();
7690 bool Value::QuickIsUndefined()
const {
7691 typedef internal::Object O;
7693 O* obj = *
reinterpret_cast<O* const*
>(
this);
7694 if (!I::HasHeapObjectTag(obj))
return false;
7695 if (I::GetInstanceType(obj) != I::kOddballType)
return false;
7696 return (I::GetOddballKind(obj) == I::kUndefinedOddballKind);
7701 #ifdef V8_ENABLE_CHECKS
7702 return FullIsNull();
7704 return QuickIsNull();
7708 bool Value::QuickIsNull()
const {
7709 typedef internal::Object O;
7711 O* obj = *
reinterpret_cast<O* const*
>(
this);
7712 if (!I::HasHeapObjectTag(obj))
return false;
7713 if (I::GetInstanceType(obj) != I::kOddballType)
return false;
7714 return (I::GetOddballKind(obj) == I::kNullOddballKind);
7719 #ifdef V8_ENABLE_CHECKS
7720 return FullIsString();
7722 return QuickIsString();
7726 bool Value::QuickIsString()
const {
7727 typedef internal::Object O;
7729 O* obj = *
reinterpret_cast<O* const*
>(
this);
7730 if (!I::HasHeapObjectTag(obj))
return false;
7731 return (I::GetInstanceType(obj) < I::kFirstNonstringType);
7736 return static_cast<Value*
>(value);
7789 #ifdef V8_ENABLE_CHECKS
7792 return static_cast<Boolean*
>(value);
7797 #ifdef V8_ENABLE_CHECKS
7800 return static_cast<Name*
>(value);
7805 #ifdef V8_ENABLE_CHECKS
7808 return static_cast<Symbol*
>(value);
7813 #ifdef V8_ENABLE_CHECKS
7816 return static_cast<Number*
>(value);
7821 #ifdef V8_ENABLE_CHECKS
7824 return static_cast<Integer*
>(value);
7829 #ifdef V8_ENABLE_CHECKS
7832 return static_cast<Int32*
>(value);
7837 #ifdef V8_ENABLE_CHECKS
7840 return static_cast<Uint32*
>(value);
7845 #ifdef V8_ENABLE_CHECKS
7848 return static_cast<Date*
>(value);
7853 #ifdef V8_ENABLE_CHECKS
7861 #ifdef V8_ENABLE_CHECKS
7869 #ifdef V8_ENABLE_CHECKS
7877 #ifdef V8_ENABLE_CHECKS
7885 #ifdef V8_ENABLE_CHECKS
7888 return static_cast<RegExp*
>(value);
7893 #ifdef V8_ENABLE_CHECKS
7896 return static_cast<Object*
>(value);
7901 #ifdef V8_ENABLE_CHECKS
7904 return static_cast<Array*
>(value);
7909 #ifdef V8_ENABLE_CHECKS
7912 return static_cast<Map*
>(value);
7917 #ifdef V8_ENABLE_CHECKS
7920 return static_cast<Set*
>(value);
7925 #ifdef V8_ENABLE_CHECKS
7928 return static_cast<Promise*
>(value);
7933 #ifdef V8_ENABLE_CHECKS
7941 #ifdef V8_ENABLE_CHECKS
7949 #ifdef V8_ENABLE_CHECKS
7957 #ifdef V8_ENABLE_CHECKS
7965 #ifdef V8_ENABLE_CHECKS
7973 #ifdef V8_ENABLE_CHECKS
7981 #ifdef V8_ENABLE_CHECKS
7989 #ifdef V8_ENABLE_CHECKS
7997 #ifdef V8_ENABLE_CHECKS
8005 #ifdef V8_ENABLE_CHECKS
8013 #ifdef V8_ENABLE_CHECKS
8021 #ifdef V8_ENABLE_CHECKS
8029 #ifdef V8_ENABLE_CHECKS
8037 #ifdef V8_ENABLE_CHECKS
8040 return static_cast<DataView*
>(value);
8045 #ifdef V8_ENABLE_CHECKS
8053 #ifdef V8_ENABLE_CHECKS
8056 return static_cast<Function*
>(value);
8061 #ifdef V8_ENABLE_CHECKS
8064 return static_cast<External*
>(value);
8068 template<
typename T>
8070 return *
reinterpret_cast<Isolate**
>(&args_[kIsolateIndex]);
8074 template<
typename T>
8080 template<
typename T>
8086 template<
typename T>
8092 template<
typename T>
8099 typedef internal::Object* S;
8101 I::CheckInitialized(isolate);
8102 S* slot = I::GetRoot(isolate, I::kUndefinedValueRootIndex);
8108 typedef internal::Object* S;
8110 I::CheckInitialized(isolate);
8111 S* slot = I::GetRoot(isolate, I::kNullValueRootIndex);
8117 typedef internal::Object* S;
8119 I::CheckInitialized(isolate);
8120 S* slot = I::GetRoot(isolate, I::kTrueValueRootIndex);
8126 typedef internal::Object* S;
8128 I::CheckInitialized(isolate);
8129 S* slot = I::GetRoot(isolate, I::kFalseValueRootIndex);
8136 I::SetEmbedderData(
this, slot, data);
8142 return I::GetEmbedderData(
this, slot);
8148 return I::kNumIsolateDataSlots;
8153 int64_t change_in_bytes) {
8155 int64_t* amount_of_external_allocated_memory =
8156 reinterpret_cast<int64_t*
>(
reinterpret_cast<uint8_t*
>(
this) +
8157 I::kAmountOfExternalAllocatedMemoryOffset);
8158 int64_t* amount_of_external_allocated_memory_at_last_global_gc =
8159 reinterpret_cast<int64_t*
>(
8160 reinterpret_cast<uint8_t*
>(
this) +
8161 I::kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset);
8162 int64_t amount = *amount_of_external_allocated_memory + change_in_bytes;
8163 if (change_in_bytes > 0 &&
8164 amount - *amount_of_external_allocated_memory_at_last_global_gc >
8165 I::kExternalAllocationLimit) {
8166 CollectAllGarbage(
"external memory allocation limit reached.");
8168 *amount_of_external_allocated_memory = amount;
8169 return *amount_of_external_allocated_memory;
8173 template<
typename T>
8177 SetObjectGroupId(reinterpret_cast<v8::internal::Object**>(
object.val_),
id);
8181 template<
typename T>
8185 SetReferenceFromGroup(
id,
8186 reinterpret_cast<v8::internal::Object**>(
object.val_));
8190 template<
typename T,
typename S>
8195 SetReference(reinterpret_cast<v8::internal::Object**>(parent.val_),
8196 reinterpret_cast<v8::internal::Object**>(child.val_));
8201 #ifndef V8_ENABLE_CHECKS
8202 typedef internal::Object O;
8203 typedef internal::HeapObject HO;
8205 HO* context = *
reinterpret_cast<HO**
>(
this);
8210 return SlowGetEmbedderData(index);
8216 #ifndef V8_ENABLE_CHECKS
8218 return I::ReadEmbedderData<void*>(
this, index);
8220 return SlowGetAlignedPointerFromEmbedderData(index);
8225 void V8::SetAllowCodeGenerationFromStringsCallback(
8234 return isolate->IsDead();
8238 bool V8::AddMessageListener(
MessageCallback that, Handle<Value> data) {
8240 return isolate->AddMessageListener(that, data);
8246 isolate->RemoveMessageListeners(that);
8250 void V8::SetFailedAccessCheckCallbackFunction(
8253 isolate->SetFailedAccessCheckCallbackFunction(callback);
8257 void V8::SetCaptureStackTraceForUncaughtExceptions(
8260 isolate->SetCaptureStackTraceForUncaughtExceptions(capture, frame_limit,
8267 isolate->SetFatalErrorHandler(callback);
8273 isolate->RemoveGCPrologueCallback(
8274 reinterpret_cast<v8::Isolate::GCPrologueCallback>(callback));
8280 isolate->RemoveGCEpilogueCallback(
8281 reinterpret_cast<v8::Isolate::GCEpilogueCallback>(callback));
8289 isolate->AddMemoryAllocationCallback(callback, space, action);
8295 isolate->RemoveMemoryAllocationCallback(callback);
8299 void V8::TerminateExecution(Isolate* isolate) { isolate->TerminateExecution(); }
8302 bool V8::IsExecutionTerminating(Isolate* isolate) {
8303 if (isolate == NULL) {
8306 return isolate->IsExecutionTerminating();
8310 void V8::CancelTerminateExecution(Isolate* isolate) {
8311 isolate->CancelTerminateExecution();
8315 void V8::VisitExternalResources(ExternalResourceVisitor* visitor) {
8317 isolate->VisitExternalResources(visitor);
8321 void V8::VisitHandlesWithClassIds(PersistentHandleVisitor* visitor) {
8323 isolate->VisitHandlesWithClassIds(visitor);
8327 void V8::VisitHandlesWithClassIds(Isolate* isolate,
8328 PersistentHandleVisitor* visitor) {
8329 isolate->VisitHandlesWithClassIds(visitor);
8333 void V8::VisitHandlesForPartialDependence(Isolate* isolate,
8334 PersistentHandleVisitor* visitor) {
8335 isolate->VisitHandlesForPartialDependence(visitor);
static const int kNodeStateIsWeakValue
Definition: v8.h:6974
size_t total_heap_size()
Definition: v8.h:5008
friend Maybe< U > Nothing()
Definition: v8.h:6358
size_t object_count()
Definition: v8.h:5053
V8_INLINE Handle< Value > ResourceName() const
Definition: v8.h:7530
void(* NamedPropertySetterCallback)(Local< String > property, Local< Value > value, const PropertyCallbackInfo< Value > &info)
Definition: v8.h:4086
static V8_EXPORT void CheckInitializedImpl(v8::Isolate *isolate)
V8_INLINE Eternal()
Definition: v8.h:382
CreateParams()
Definition: v8.h:5200
static V8_INLINE int SmiValue(const internal::Object *value)
Definition: v8.h:7002
static V8_INLINE void UpdateNodeFlag(internal::Object **obj, bool value, int shift)
Definition: v8.h:7037
AddHistogramSampleCallback add_histogram_sample_callback
Definition: v8.h:5248
ExtensionConfiguration(int name_count, const char *names[])
Definition: v8.h:6534
static V8_INLINE Value * Cast(T *value)
friend Local< Boolean > False(Isolate *isolate)
Definition: v8.h:8125
void(* GCEpilogueCallback)(GCType type, GCCallbackFlags flags)
Definition: v8.h:4994
V8_INLINE bool operator==(const Handle< S > &that) const
Definition: v8.h:519
void(* GenericNamedPropertyDeleterCallback)(Local< Name > property, const PropertyCallbackInfo< Boolean > &info)
Definition: v8.h:4153
size_t length() const
Definition: v8.h:4727
V8_INLINE T * operator->() const
Definition: v8.h:234
V8_INLINE bool IsString() const
Definition: v8.h:7718
const char * operator*() const
Definition: v8.h:2398
V8_DEPRECATED("Unused, will be removed", int max_available_threads() const)
Definition: v8.h:4826
JitCodeEventHandler code_event_handler
Definition: v8.h:5222
WeakCallbackData(Isolate *isolate, P *parameter, Local< T > handle)
Definition: v8.h:451
static V8_INLINE DataView * Cast(Value *obj)
Definition: v8.h:8036
V8_INLINE Unlocker(Isolate *isolate)
Definition: v8.h:6802
void *(* CreateHistogramCallback)(const char *name, int min, int max, size_t buckets)
Definition: v8.h:4892
GCCallbackFlags
Definition: v8.h:4986
ArrayBufferCreationMode
Definition: v8.h:3338
static V8_INLINE Symbol * Cast(v8::Value *obj)
Definition: v8.h:7804
static const int kUndefinedValueRootIndex
Definition: v8.h:6961
V8_INLINE void * GetAlignedPointerFromEmbedderData(int index)
Definition: v8.h:8215
static V8_INLINE NumberObject * Cast(v8::Value *obj)
Definition: v8.h:7868
void(* NamedPropertyDeleterCallback)(Local< String > property, const PropertyCallbackInfo< Boolean > &info)
Definition: v8.h:4107
static V8_INLINE Function * Cast(Value *obj)
Definition: v8.h:8052
static V8_INLINE int SmiToInt(const internal::Object *value)
Definition: v8.h:6908
static const int kHolderIndex
Definition: v8.h:3151
static const int kOddballType
Definition: v8.h:6982
static const int kIsolateEmbedderDataOffset
Definition: v8.h:6953
V8_INLINE ScriptOriginOptions(bool is_embedder_debug_script=false, bool is_shared_cross_origin=false, bool is_opaque=false)
Definition: v8.h:982
void MoveOnlyTypeForCPP03
Definition: v8.h:834
AllocationAction
Definition: v8.h:4911
V8_INLINE Local< S > FromMaybe(Local< S > default_value) const
Definition: v8.h:370
static int SmiValueSize()
Definition: v8.h:6907
Encoding
Definition: v8.h:2082
V8_INLINE void MarkIndependent()
Definition: v8.h:7286
size_t pos
Definition: v8.h:5130
V8_INLINE void * GetData(uint32_t slot)
Definition: v8.h:8140
void(* AccessorGetterCallback)(Local< String > property, const PropertyCallbackInfo< Value > &info)
Definition: v8.h:2546
V8_INLINE ReturnValue(const ReturnValue< S > &that)
Definition: v8.h:3048
PromiseRejectMessage(Handle< Promise > promise, PromiseRejectEvent event, Handle< Value > value, Handle< StackTrace > stack_trace)
Definition: v8.h:4932
V8_INLINE bool operator!=(const Handle< S > &that) const
Definition: v8.h:532
bool IsSharedCrossOrigin() const
Definition: v8.h:994
V8_INLINE Local< Value > GetInternalField(int index)
Definition: v8.h:7592
GenericNamedPropertySetterCallback setter
Definition: v8.h:4461
Contents()
Definition: v8.h:3388
Maybe< T > Just(const T &t)
Definition: v8.h:6364
V8_DEPRECATED("Unused, will be removed", void set_max_available_threads(int value))
Definition: v8.h:4830
static const int kStringEncodingMask
Definition: v8.h:6949
void * new_code_start
Definition: v8.h:5143
WeakCallbackType
Definition: v8.h:470
#define V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT
Definition: v8.h:3334
void * sp
Definition: v8.h:1632
V8_WARN_UNUSED_RESULT MaybeLocal< Object > NewInstance(Local< Context > context) const
Definition: v8.h:3191
NewStringType
Definition: v8.h:2072
static int SmiShiftSize()
Definition: v8.h:6906
bool operator==(const UniqueId &other) const
Definition: v8.h:160
GenericNamedPropertyDeleterCallback deleter
Definition: v8.h:4463
int length_
Definition: v8.h:3127
void Set(Handle< Name > name, Handle< Data > value, PropertyAttribute attributes=None)
NewStringType
Definition: v8.h:2279
V8_INLINE void * GetInternalField(int index) const
Definition: v8.h:7143
V8_INLINE bool IsEmpty()
Definition: v8.h:389
void(* IndexedPropertySetterCallback)(uint32_t index, Local< Value > value, const PropertyCallbackInfo< Value > &info)
Definition: v8.h:4178
size_t space_available_size()
Definition: v8.h:5034
static V8_INLINE internal::Object ** GetRoot(v8::Isolate *isolate, int index)
Definition: v8.h:7070
V8_INLINE bool IsConstructCall() const
Definition: v8.h:7501
void(* IndexedPropertyQueryCallback)(uint32_t index, const PropertyCallbackInfo< Integer > &info)
Definition: v8.h:4188
V8_INLINE bool operator==(const Local< S > &that) const
Definition: v8.h:245
V8_INLINE ~Global()
Definition: v8.h:812
static const int kThisIndex
Definition: v8.h:3156
V8_INLINE MaybeLocal()
Definition: v8.h:351
const int kApiIntSize
Definition: v8.h:6851
V8_INLINE Eternal(Isolate *isolate, Local< S > handle)
Definition: v8.h:384
V8_WARN_UNUSED_RESULT MaybeLocal< String > ToDetailString(Local< Context > context) const
Definition: v8.h:7758
PropertyAttribute
Definition: v8.h:2534
static const int kForeignAddressOffset
Definition: v8.h:6943
ExternalStringResource()
Definition: v8.h:2227
static V8_INLINE Resolver * Cast(Value *obj)
Definition: v8.h:7932
static const int kCalleeIndex
Definition: v8.h:3118
V8_INLINE uint16_t WrapperClassId() const
Definition: v8.h:7316
V8_WARN_UNUSED_RESULT MaybeLocal< Boolean > ToBoolean(Local< Context > context) const
Definition: v8.h:7740
void(* MessageCallback)(Handle< Message > message, Handle< Value > error)
Definition: v8.h:4855
IndexedPropertyQueryCallback query
Definition: v8.h:4490
bool auto_enable()
Definition: v8.h:4759
virtual void VisitPersistentHandle(Persistent< Value > *value, uint16_t class_id)
Definition: v8.h:5181
const char * data() const
Definition: v8.h:4726
PositionType position_type
Definition: v8.h:5132
const uint16_t * operator*() const
Definition: v8.h:2420
bool(* AllowCodeGenerationFromStringsCallback)(Local< Context > context)
Definition: v8.h:4969
V8_INLINE bool IsJust() const
Definition: v8.h:6322
IndexedPropertyEnumeratorCallback enumerator
Definition: v8.h:4492
const int kApiPointerSize
Definition: v8.h:6850
static const int kDataIndex
Definition: v8.h:3117
V8_INLINE Persistent(const Persistent< S, M2 > &that)
Definition: v8.h:723
static V8_INLINE Map * Cast(Value *obj)
Definition: v8.h:7908
V8_INLINE void SetWrapperClassId(uint16_t class_id)
Definition: v8.h:7306
void(* NamedPropertyGetterCallback)(Local< String > property, const PropertyCallbackInfo< Value > &info)
Definition: v8.h:4077
V8_INLINE Local< T > Get(Isolate *isolate)
Definition: v8.h:7130
V8_INLINE V8_DEPRECATE_SOON("Use Global<> instead", void Set(const Persistent< S > &handle))
ObjectSpace
Definition: v8.h:4900
static V8_INLINE TypedArray * Cast(Value *obj)
Definition: v8.h:7956
CounterLookupCallback counter_lookup_callback
Definition: v8.h:5239
static const int kHeapObjectMapOffset
Definition: v8.h:6937
void(* NamedPropertyEnumeratorCallback)(const PropertyCallbackInfo< Array > &info)
Definition: v8.h:4116
WriteOptions
Definition: v8.h:2136
static V8_WARN_UNUSED_RESULT MaybeLocal< String > NewFromUtf8(Isolate *isolate, const char *data, v8::NewStringType type, int length=-1)
static Local< Number > New(Isolate *isolate, double value)
void(* IndexedPropertyDeleterCallback)(uint32_t index, const PropertyCallbackInfo< Boolean > &info)
Definition: v8.h:4198
V8_INLINE Local< Function > Callee() const
Definition: v8.h:7463
virtual ~Allocator()
Definition: v8.h:3356
PositionType
Definition: v8.h:5102
size_t heap_size_limit()
Definition: v8.h:5013
internal::Object ** values_
Definition: v8.h:3126
Flags
Definition: v8.h:3943
IndexedPropertyGetterCallback getter
Definition: v8.h:4488
void SetSecondPassCallback(Callback callback) const
Definition: v8.h:436
V8_INLINE Local< S > As()
Definition: v8.h:288
static const int kFullStringRepresentationMask
Definition: v8.h:6948
void(* FatalErrorCallback)(const char *location, const char *message)
Definition: v8.h:4852
V8_INLINE void Reset()
Definition: v8.h:7205
static V8_INLINE int InternalFieldCount(const PersistentBase< Object > &object)
Definition: v8.h:2765
static V8_INLINE uint8_t GetNodeState(internal::Object **obj)
Definition: v8.h:7044
V8_INLINE bool operator!=(const Local< S > &that) const
Definition: v8.h:269
static int SmiValueSize()
Definition: v8.h:6878
static V8_INLINE T ReadEmbedderData(const v8::Context *context, int index)
Definition: v8.h:7084
V8_INLINE Persistent & operator=(const Persistent &that)
Definition: v8.h:726
V8_INLINE Persistent< S > & As()
Definition: v8.h:756
char * operator*()
Definition: v8.h:2397
bool(* IndexedSecurityCallback)(Local< Object > host, uint32_t index, AccessType type, Local< Value > data)
Definition: v8.h:4237
V8_INLINE Isolate * GetIsolate()
Definition: v8.h:7425
V8_INLINE Handle< Boolean > True(Isolate *isolate)
Definition: v8.h:8116
internal::Object ** args_
Definition: v8.h:3159
static const int kNullOddballKind
Definition: v8.h:6986
void * Data() const
Definition: v8.h:3390
Maybe< T > Nothing()
Definition: v8.h:6358
V8_INLINE Local< Object > Holder() const
Definition: v8.h:7476
static const int kLineOffsetNotFound
Definition: v8.h:3249
static V8_INLINE void UpdateNodeState(internal::Object **obj, uint8_t value)
Definition: v8.h:7049
int length
Definition: v8.h:1150
size_t space_used_size()
Definition: v8.h:5033
V8_INLINE MaybeLocal(Local< S > that)
Definition: v8.h:353
V8_INLINE void SetData(uint32_t slot, void *data)
Definition: v8.h:8134
static Isolate * GetCurrent()
static V8_INLINE internal::Object * IntToSmi(int value)
Definition: v8.h:6913
virtual v8::Handle< v8::FunctionTemplate > GetNativeFunctionTemplate(v8::Isolate *isolate, v8::Handle< v8::String > name)
Definition: v8.h:4747
void(* GenericNamedPropertyGetterCallback)(Local< Name > property, const PropertyCallbackInfo< Value > &info)
Definition: v8.h:4126
CompileOptions
Definition: v8.h:1282
static V8_INLINE Handle< Boolean > New(Isolate *isolate, bool value)
Definition: v8.h:7580
OnFailure
Definition: v8.h:5284
const int kSmiTag
Definition: v8.h:6860
friend class ReturnValue
Definition: v8.h:3077
V8_INLINE V8_DEPRECATE_SOON("use WeakCallbackInfo version", void SetWeak(P *parameter, typename WeakCallbackData< T, P >::Callback callback))
V8_INLINE PromiseRejectEvent GetEvent() const
Definition: v8.h:4940
bool operator<(const UniqueId &other) const
Definition: v8.h:168
V8_WARN_UNUSED_RESULT MaybeLocal< Int32 > ToInt32(Local< Context > context) const
Definition: v8.h:7782
bool IsFirstPass() const
Definition: v8.h:428
StateTag vm_state
Definition: v8.h:1640
void * fp
Definition: v8.h:1633
V8_INLINE ReturnValue< T > GetReturnValue() const
Definition: v8.h:7495
V8_INLINE Handle< Value > SourceMapUrl() const
Definition: v8.h:7550
V8_INLINE ExternalStringResource * GetExternalStringResource() const
Definition: v8.h:7644
V8_INLINE Local< T > GetValue() const
Definition: v8.h:456
V8_INLINE int64_t AdjustAmountOfExternalAllocatedMemory(int64_t change_in_bytes)
Definition: v8.h:8152
const int kSmiTagSize
Definition: v8.h:6861
Encoding
Definition: v8.h:1252
static V8_INLINE void SetEmbedderData(v8::Isolate *isolate, uint32_t slot, void *data)
Definition: v8.h:7055
static V8_INLINE int GetInstanceType(const internal::Object *obj)
Definition: v8.h:7014
const String::ExternalOneByteStringResource * source() const
Definition: v8.h:4754
V8_WARN_UNUSED_RESULT MaybeLocal< String > ToString(Local< Context > context) const
Definition: v8.h:7752
uintptr_t(* ReturnAddressLocationResolver)(uintptr_t return_addr_location)
Definition: v8.h:5956
~Scope()
Definition: v8.h:5268
PropertyHandlerFlags
Definition: v8.h:4429
static const int kReturnValueIndex
Definition: v8.h:3116
V8_INLINE bool IsNearDeath() const
Definition: v8.h:7185
V8_INLINE T FromJust() const
Definition: v8.h:6325
const char * data
Definition: v8.h:5931
JitCodeEventOptions
Definition: v8.h:5150
static const int kFixedArrayHeaderSize
Definition: v8.h:6945
void(* GCPrologueCallback)(GCType type, GCCallbackFlags flags)
Definition: v8.h:4993
static const int kDataIndex
Definition: v8.h:3155
size_t used_heap_size()
Definition: v8.h:5012
V8_INLINE ScriptOrigin(Handle< Value > resource_name, Handle< Integer > resource_line_offset=Handle< Integer >(), Handle< Integer > resource_column_offset=Handle< Integer >(), Handle< Boolean > resource_is_shared_cross_origin=Handle< Boolean >(), Handle< Integer > script_id=Handle< Integer >(), Handle< Boolean > resource_is_embedder_debug_script=Handle< Boolean >(), Handle< Value > source_map_url=Handle< Value >(), Handle< Boolean > resource_is_opaque=Handle< Boolean >())
Definition: v8.h:7511
static V8_INLINE ArrayBufferView * Cast(Value *obj)
Definition: v8.h:7948
V8_INLINE HandleScope()
Definition: v8.h:880
const intptr_t kSmiTagMask
Definition: v8.h:6862
CachedData()
Definition: v8.h:1134
V8_INLINE Isolate * GetIsolate() const
Definition: v8.h:454
void(* InterruptCallback)(Isolate *isolate, void *data)
Definition: v8.h:4996
StartupData * snapshot_blob
Definition: v8.h:5232
V8_INLINE void Empty()
Definition: v8.h:508
static V8_INLINE uint8_t GetNodeFlag(internal::Object **obj, int shift)
Definition: v8.h:7032
static V8_INLINE Promise * Cast(Value *obj)
Definition: v8.h:7924
BufferPolicy buffer_policy
Definition: v8.h:1152
const int kSmiValueSize
Definition: v8.h:6924
void(* GenericNamedPropertyQueryCallback)(Local< Name > property, const PropertyCallbackInfo< Integer > &info)
Definition: v8.h:4144
IndexedPropertySetterCallback setter
Definition: v8.h:4489
size_t code_len
Definition: v8.h:5109
size_t len
Definition: v8.h:5123
bool operator!=(const UniqueId &other) const
Definition: v8.h:164
V8_INLINE internal::Object * IntToSmi(int value)
Definition: v8.h:6867
struct line_info_t line_info
Definition: v8.h:5140
UniqueId(intptr_t data)
Definition: v8.h:157
V8_INLINE ~EscapableHandleScope()
Definition: v8.h:920
V8_INLINE void ClearWeak()
Definition: v8.h:578
V8_INLINE Local()
Definition: v8.h:212
V8_INLINE ExternalStringResourceBase * GetExternalStringResourceBase(Encoding *encoding_out) const
Definition: v8.h:7662
virtual void VisitExternalString(Handle< String > string)
Definition: v8.h:5171
V8_INLINE Handle< Boolean > False(Isolate *isolate)
Definition: v8.h:8125
static V8_INLINE Local< T > New(Isolate *isolate, Local< T > that)
Definition: v8.h:7101
V8_INLINE Handle< Integer > ScriptID() const
Definition: v8.h:7545
virtual ~ExternalStringResource()
Definition: v8.h:2214
V8_INLINE void SetWeak(P *parameter, typename WeakCallbackInfo< P >::Callback callback, WeakCallbackType type)
Definition: v8.h:7235
static const int kArgsLength
Definition: v8.h:3108
PropertyHandlerFlags flags
Definition: v8.h:4466
static const int kArgsLength
Definition: v8.h:3145
EventType type
Definition: v8.h:5105
static const int kContextHeaderSize
Definition: v8.h:6946
static const bool kResetInDestructor
Definition: v8.h:651
V8_WARN_UNUSED_RESULT MaybeLocal< Number > ToNumber(Local< Context > context) const
Definition: v8.h:7746
int is_construct_call_
Definition: v8.h:3128
virtual void Dispose()
Definition: v8.h:2191
WeakCallbackInfo(Isolate *isolate, T *parameter, void *internal_fields[kInternalFieldsInWeakCallback], Callback *callback)
Definition: v8.h:406
static V8_INLINE Float64Array * Cast(Value *obj)
Definition: v8.h:8020
V8_INLINE Isolate * GetIsolate() const
Definition: v8.h:415
V8_INLINE T * operator*() const
Definition: v8.h:236
size_t total_physical_size()
Definition: v8.h:5010
V8_INLINE Persistent(Isolate *isolate, const Persistent< S, M2 > &that)
Definition: v8.h:709
static Local< Integer > NewFromUnsigned(Isolate *isolate, uint32_t value)
int raw_size
Definition: v8.h:5932
bool IsOpaque() const
Definition: v8.h:997
static V8_INLINE String * Cast(v8::Value *obj)
Definition: v8.h:7627
Global Pass()
Definition: v8.h:829
void * pc
Definition: v8.h:1631
int length() const
Definition: v8.h:2399
size_t ByteLength() const
Definition: v8.h:3754
V8_INLINE ~Scope()
Definition: v8.h:6704
friend class PersistentBase
Definition: v8.h:625
static internal::Object ** CreateHandle(internal::Isolate *isolate, internal::Object *value)
static void * JSStackComparableAddress(v8::TryCatch *handler)
Definition: v8.h:6496
V8_INLINE Local< Object > Holder() const
Definition: v8.h:8087
V8_INLINE Handle< Primitive > Null(Isolate *isolate)
Definition: v8.h:8107
const int kHeapObjectTag
Definition: v8.h:6855
void(* AccessorNameGetterCallback)(Local< Name > property, const PropertyCallbackInfo< Value > &info)
Definition: v8.h:2549
V8_INLINE Isolate * GetIsolate() const
Definition: v8.h:875
static const int kNodeStateMask
Definition: v8.h:6973
static const int kReturnValueDefaultValueIndex
Definition: v8.h:3115
void(* MemoryAllocationCallback)(ObjectSpace space, AllocationAction action, int size)
Definition: v8.h:4917
StateTag
Definition: v8.h:1624
static V8_INLINE StringObject * Cast(v8::Value *obj)
Definition: v8.h:7852
V8_INLINE void Clear()
Definition: v8.h:232
static V8_INLINE Set * Cast(Value *obj)
Definition: v8.h:7916
void SetReference(const Persistent< T > &parent, const Persistent< S > &child)
Definition: v8.h:8191
const char * object_sub_type()
Definition: v8.h:5052
AccessType
Definition: v8.h:4214
int max_semi_space_size() const
Definition: v8.h:4817
static const int kNullValueRootIndex
Definition: v8.h:6962
GenericNamedPropertyEnumeratorCallback enumerator
Definition: v8.h:4464
void(* LogEventCallback)(const char *name, int event)
Definition: v8.h:4859
static V8_INLINE internal::Object * IntToSmi(int value)
Definition: v8.h:7006
const intptr_t kHeapObjectTagMask
Definition: v8.h:6857
GenericNamedPropertyQueryCallback query
Definition: v8.h:4462
static V8_INLINE Persistent< T > & Cast(Persistent< S > &that)
Definition: v8.h:746
int max_old_space_size() const
Definition: v8.h:4819
static V8_INLINE Uint8Array * Cast(Value *obj)
Definition: v8.h:7964
static const int kNodeStateIsPendingValue
Definition: v8.h:6975
const char * name() const
Definition: v8.h:4752
size_t total_heap_size_executable()
Definition: v8.h:5009
static const int kContextSaveIndex
Definition: v8.h:3119
static V8_INLINE Float32Array * Cast(Value *obj)
Definition: v8.h:8012
static const uint32_t kNumIsolateDataSlots
Definition: v8.h:6988
size_t physical_space_size()
Definition: v8.h:5035
V8_INLINE Locker(Isolate *isolate)
Definition: v8.h:6817
virtual ~ExternalResourceVisitor()
Definition: v8.h:5170
void set_code_range_size(size_t value)
Definition: v8.h:4835
void(* FunctionCallback)(const FunctionCallbackInfo< Value > &info)
Definition: v8.h:3163
static V8_INLINE internal::Object * IntToSmi(int value)
Definition: v8.h:6884
static const int kJSObjectType
Definition: v8.h:6980
V8_INLINE Global & operator=(Global< S > &&rhs)
Definition: v8.h:817
void SetAllowCodeGenerationFromStringsCallback(AllowCodeGenerationFromStringsCallback callback)
void(* Callback)(const WeakCallbackInfo< T > &data)
Definition: v8.h:404
void(* AddHistogramSampleCallback)(void *histogram, int sample)
Definition: v8.h:4897
V8_INLINE Handle< Integer > ResourceLineOffset() const
Definition: v8.h:7535
static V8_INLINE Name * Cast(v8::Value *obj)
Definition: v8.h:7796
static V8_INLINE void Copy(const Persistent< S, M > &source, CopyablePersistent *dest)
Definition: v8.h:673
void SetObjectGroupId(const Persistent< T > &object, UniqueId id)
Definition: v8.h:8174
V8_INLINE bool operator!=(const Maybe &other) const
Definition: v8.h:6339
StackTraceOptions
Definition: v8.h:1517
static const int kNodeIsIndependentShift
Definition: v8.h:6977
EmbedderDataFields
Definition: v8.h:6630
static const int kUndefinedOddballKind
Definition: v8.h:6985
NamedPropertyHandlerConfiguration(GenericNamedPropertyGetterCallback getter=0, GenericNamedPropertySetterCallback setter=0, GenericNamedPropertyQueryCallback query=0, GenericNamedPropertyDeleterCallback deleter=0, GenericNamedPropertyEnumeratorCallback enumerator=0, Handle< Value > data=Handle< Value >(), PropertyHandlerFlags flags=PropertyHandlerFlags::kNone)
Definition: v8.h:4443
void set_max_executable_size(int value)
Definition: v8.h:4822
void * code_start
Definition: v8.h:5107
const int kHeapObjectTagSize
Definition: v8.h:6856
SmiTagging< kApiPointerSize > PlatformSmiTagging
Definition: v8.h:6922
friend Maybe< U > Just(const U &u)
const char * str
Definition: v8.h:5121
V8_INLINE Local< Value > Data() const
Definition: v8.h:8075
ArrayBuffer::Allocator * array_buffer_allocator
Definition: v8.h:5254
size_t source_length() const
Definition: v8.h:4753
size_t frames_count
Definition: v8.h:1639
RegisterState()
Definition: v8.h:1630
V8_INLINE void Set(const Global< S > &handle)
ExternalStringResourceBase()
Definition: v8.h:2183
size_t offset
Definition: v8.h:5128
void set_max_old_space_size(int value)
Definition: v8.h:4820
V8_INLINE bool operator!=(const PersistentBase< S > &that) const
Definition: v8.h:528
void(* CallCompletedCallback)()
Definition: v8.h:4922
static V8_INLINE void Uncompilable()
Definition: v8.h:658
Persistent< T, CopyablePersistentTraits< T > > CopyablePersistent
Definition: v8.h:670
void(* PromiseRejectCallback)(PromiseRejectMessage message)
Definition: v8.h:4953
friend class Utils
Definition: v8.h:620
bool IsEmbedderDebugScript() const
Definition: v8.h:991
int dependency_count()
Definition: v8.h:4756
V8_INLINE void Set(Isolate *isolate, Local< S > handle)
V8_INLINE bool IsIndependent() const
Definition: v8.h:7176
V8_INLINE Persistent & operator=(const Persistent< S, M2 > &that)
Definition: v8.h:731
V8_INLINE Global(Global &&other)
Definition: v8.h:809
static V8_INLINE v8::Local< v8::String > Empty(Isolate *isolate)
Definition: v8.h:7635
static V8_INLINE uint32_t GetNumberOfDataSlots()
Definition: v8.h:8146
void(* Callback)(const WeakCallbackData< T, P > &data)
Definition: v8.h:449
static V8_INLINE Number * Cast(v8::Value *obj)
Definition: v8.h:7812
V8_INLINE void * GetAlignedPointerFromInternalField(int index)
Definition: v8.h:7611
static const int kReturnValueIndex
Definition: v8.h:3154
V8_INLINE bool operator==(const PersistentBase< S > &that) const
Definition: v8.h:511
V8_INLINE Local< Value > Data() const
Definition: v8.h:7483
FunctionEntryHook entry_hook
Definition: v8.h:5216
V8_INLINE void MarkPartiallyDependent()
Definition: v8.h:7296
static V8_INLINE void Copy(const Persistent< S, M > &source, NonCopyablePersistent *dest)
Definition: v8.h:653
PropertyHandlerFlags flags
Definition: v8.h:4494
ExternalOneByteStringResource()
Definition: v8.h:2253
V8_INLINE bool operator!=(const Persistent< S > &that) const
Definition: v8.h:273
virtual ~Extension()
Definition: v8.h:4746
EventType
Definition: v8.h:5089
void(* AccessorSetterCallback)(Local< String > property, Local< Value > value, const PropertyCallbackInfo< void > &info)
Definition: v8.h:2554
V8_INLINE Local< Object > This() const
Definition: v8.h:7470
V8_INLINE Isolate * GetIsolate() const
Definition: v8.h:7489
V8_INLINE Handle< Primitive > Undefined(Isolate *isolate)
Definition: v8.h:8098
friend Local< Primitive > Null(Isolate *isolate)
Definition: v8.h:8107
const char ** begin() const
Definition: v8.h:6537
void(* IndexedPropertyGetterCallback)(uint32_t index, const PropertyCallbackInfo< Value > &info)
Definition: v8.h:4169
V8_INLINE P * ClearWeak()
static V8_INLINE RegExp * Cast(v8::Value *obj)
Definition: v8.h:7884
V8_INLINE bool IsEmpty() const
Definition: v8.h:507
static const int kIsolateRootsOffset
Definition: v8.h:6958
V8_INLINE Local< T > ToLocalChecked()
Definition: v8.h:7136
ExternalOneByteStringResourceImpl(const char *data, size_t length)
Definition: v8.h:4724
static const int kNodeIsPartiallyDependentShift
Definition: v8.h:6978
static int SmiShiftSize()
Definition: v8.h:6877
void(* AccessorNameSetterCallback)(Local< Name > property, Local< Value > value, const PropertyCallbackInfo< void > &info)
Definition: v8.h:2558
V8_INLINE Persistent()
Definition: v8.h:693
V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local< S > *out) const
Definition: v8.h:361
void set_max_semi_space_size(int value)
Definition: v8.h:4818
V8_INLINE bool IsWeak() const
Definition: v8.h:7196
static const int kExternalTwoByteRepresentationTag
Definition: v8.h:6950
V8_INLINE ScriptOriginOptions Options() const
Definition: v8.h:1031
static V8_INLINE void * GetEmbedderData(const v8::Isolate *isolate, uint32_t slot)
Definition: v8.h:7063
static V8_INLINE Local< T > Cast(Local< S > that)
Definition: v8.h:278
void set_auto_enable(bool value)
Definition: v8.h:4758
PromiseRejectEvent
Definition: v8.h:4925
static const int kFirstNonstringType
Definition: v8.h:6981
static Local< Integer > New(Isolate *isolate, int32_t value)
virtual ~ExternalSourceStream()
Definition: v8.h:1204
static const int kIsolateIndex
Definition: v8.h:3114
bool(* NamedSecurityCallback)(Local< Object > host, Local< Value > key, AccessType type, Local< Value > data)
Definition: v8.h:4227
int length() const
Definition: v8.h:2421
internal::StreamedSource * impl() const
Definition: v8.h:1262
void * user_data
Definition: v8.h:5116
V8_INLINE ScriptOriginOptions(int flags)
Definition: v8.h:988
static const int kHolderIndex
Definition: v8.h:3113
static V8_INLINE void CheckInitialized(v8::Isolate *isolate)
Definition: v8.h:6991
V8_INLINE bool IsNothing() const
Definition: v8.h:6321
static const int kExternalAllocationLimit
Definition: v8.h:6969
static V8_INLINE bool IsValidSmi(intptr_t value)
Definition: v8.h:7010
static const int kForeignType
Definition: v8.h:6983
GarbageCollectionType
Definition: v8.h:5340
#define V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT
Definition: v8.h:3478
IndexedPropertyDeleterCallback deleter
Definition: v8.h:4491
V8_INLINE int Length() const
Definition: v8.h:7507
V8_INLINE Global()
Definition: v8.h:785
void(* GenericNamedPropertyEnumeratorCallback)(const PropertyCallbackInfo< Array > &info)
Definition: v8.h:4161
V8_INLINE Persistent(Isolate *isolate, Handle< S > that)
Definition: v8.h:699
V8_INLINE Global(Isolate *isolate, Handle< S > that)
Definition: v8.h:792
Handle< Value > data
Definition: v8.h:4465
void(* MicrotaskCallback)(void *data)
Definition: v8.h:4956
V8_WARN_UNUSED_RESULT MaybeLocal< Uint32 > ToUint32(Local< Context > context) const
Definition: v8.h:7776
V8_INLINE T * GetParameter() const
Definition: v8.h:416
static V8_INLINE bool IsExternalTwoByteString(int instance_type)
Definition: v8.h:7027
V8_INLINE void SetUndefined()
Definition: v8.h:7411
void SetReferenceFromGroup(UniqueId id, const Persistent< T > &child)
Definition: v8.h:8182
static V8_INLINE BooleanObject * Cast(v8::Value *obj)
Definition: v8.h:7876
const char ** end() const
Definition: v8.h:6538
static const int kAmountOfExternalAllocatedMemoryOffset
Definition: v8.h:6954
friend class Isolate
Definition: v8.h:619
virtual ~ExternalOneByteStringResource()
Definition: v8.h:2247
static V8_INLINE SharedArrayBuffer * Cast(Value *obj)
Definition: v8.h:8044
static const int kReturnValueDefaultValueIndex
Definition: v8.h:3153
static const int kStringResourceOffset
Definition: v8.h:6940
V8_INLINE Handle< Value > GetValue() const
Definition: v8.h:4941
V8_INLINE Handle< Integer > ResourceColumnOffset() const
Definition: v8.h:7540
V8_INLINE P * GetParameter() const
Definition: v8.h:455
static const int kMapInstanceTypeAndBitFieldOffset
Definition: v8.h:6938
V8_INLINE Persistent(const Persistent &that)
Definition: v8.h:719
static const int kNodeClassIdOffset
Definition: v8.h:6971
V8_INLINE V8_DEPRECATE_SOON("use indexed version", void *GetInternalField2() const)
Definition: v8.h:423
uint32_t * stack_limit() const
Definition: v8.h:4823
static V8_INLINE bool HasHeapObjectTag(const internal::Object *value)
Definition: v8.h:6997
friend class internal::FunctionCallbackArguments
Definition: v8.h:3111
static const int kJSObjectHeaderSize
Definition: v8.h:6944
friend class MacroAssembler
Definition: v8.h:3148
Scope(Isolate *isolate)
Definition: v8.h:5264
V8_INLINE void SetEmptyString()
Definition: v8.h:7418
static V8_INLINE void * GetAlignedPointerFromInternalField(const PersistentBase< Object > &object, int index)
Definition: v8.h:2784
internal::Object ** implicit_args_
Definition: v8.h:3125
BufferPolicy
Definition: v8.h:1129
int max_executable_size() const
Definition: v8.h:4821
GCType
Definition: v8.h:4980
static V8_INLINE External * Cast(Value *obj)
Definition: v8.h:8060
#define TYPE_CHECK(T, S)
Definition: v8.h:178
bool rejected
Definition: v8.h:1151
friend Local< Boolean > True(Isolate *isolate)
Definition: v8.h:8116
V8_INLINE void SetNull()
Definition: v8.h:7404
static V8_INLINE Int32Array * Cast(Value *obj)
Definition: v8.h:8004
static V8_INLINE SymbolObject * Cast(v8::Value *obj)
Definition: v8.h:7860
static V8_INLINE Integer * Cast(v8::Value *obj)
Definition: v8.h:7820
V8_INLINE FunctionCallbackInfo(internal::Object **implicit_args, internal::Object **values, int length, bool is_construct_call)
Definition: v8.h:7445
uint16_t * operator*()
Definition: v8.h:2419
virtual ~ExternalStringResourceBase()
Definition: v8.h:2180
static V8_INLINE Date * Cast(v8::Value *obj)
Definition: v8.h:7844
friend class Utils
Definition: v8.h:762
void * Data() const
Definition: v8.h:3753
V8_INLINE Global(Isolate *isolate, const PersistentBase< S > &that)
Definition: v8.h:802
V8_INLINE Local< Value > operator[](int i) const
Definition: v8.h:7456
V8_INLINE Local(Local< S > that)
Definition: v8.h:214
static V8_INLINE int GetOddballKind(const internal::Object *obj)
Definition: v8.h:7022
CreateHistogramCallback create_histogram_callback
Definition: v8.h:5247
static V8_INLINE int SmiToInt(const internal::Object *value)
Definition: v8.h:6879
static V8_INLINE Array * Cast(Value *obj)
Definition: v8.h:7900
V8_INLINE Local< T > Escape(Local< T > value)
Definition: v8.h:927
const int kApiInt64Size
Definition: v8.h:6852
static const int kTrueValueRootIndex
Definition: v8.h:6963
static const int kEmptyStringRootIndex
Definition: v8.h:6965
Handle< Value > data
Definition: v8.h:4493
V8_INLINE Handle< Promise > GetPromise() const
Definition: v8.h:4939
V8_INLINE Local< Object > This() const
Definition: v8.h:8081
V8_INLINE bool IsNull() const
Definition: v8.h:7700
V8_INLINE ~Persistent()
Definition: v8.h:740
void(* GenericNamedPropertySetterCallback)(Local< Name > property, Local< Value > value, const PropertyCallbackInfo< Value > &info)
Definition: v8.h:4134
V8_WARN_UNUSED_RESULT MaybeLocal< Integer > ToInteger(Local< Context > context) const
Definition: v8.h:7770
V8_INLINE T FromMaybe(const T &default_value) const
Definition: v8.h:6330
V8_INLINE Source(Local< String > source_string, const ScriptOrigin &origin, CachedData *cached_data=NULL)
Definition: v8.h:7553
V8_INLINE PropertyCallbackInfo(internal::Object **args)
Definition: v8.h:3158
size_t code_range_size() const
Definition: v8.h:4834
static V8_INLINE bool IsValidSmi(intptr_t value)
Definition: v8.h:6916
void(* FunctionEntryHook)(uintptr_t function, uintptr_t return_addr_location)
Definition: v8.h:5080
static V8_INLINE Boolean * Cast(v8::Value *obj)
Definition: v8.h:7788
GenericNamedPropertyGetterCallback getter
Definition: v8.h:4460
static V8_INLINE Object * Cast(Value *obj)
Definition: v8.h:7892
static V8_INLINE Uint8ClampedArray * Cast(Value *obj)
Definition: v8.h:8028
static V8_INLINE T ReadField(const internal::Object *ptr, int offset)
Definition: v8.h:7077
static const int kContextEmbedderDataIndex
Definition: v8.h:6947
static const int kNodeStateIsNearDeathValue
Definition: v8.h:6976
static V8_INLINE bool IsValidSmi(intptr_t value)
Definition: v8.h:6887
static const int kExternalOneByteRepresentationTag
Definition: v8.h:6951
const uint8_t * data
Definition: v8.h:1149
static V8_INLINE ArrayBuffer * Cast(Value *obj)
Definition: v8.h:7940
Contents()
Definition: v8.h:3751
int Flags() const
Definition: v8.h:998
#define V8_EXPORT
Definition: v8.h:58
static const int kNodeFlagsOffset
Definition: v8.h:6972
static V8_INLINE Uint32Array * Cast(Value *obj)
Definition: v8.h:7996
void V8_EXPORT RegisterExtension(Extension *extension)
friend class Utils
Definition: v8.h:302
UseCounterFeature
Definition: v8.h:5350
virtual ~ScriptStreamingTask()
Definition: v8.h:1278
AccessControl
Definition: v8.h:2573
static const bool kResetInDestructor
Definition: v8.h:671
static V8_INLINE Int8Array * Cast(Value *obj)
Definition: v8.h:7972
virtual ~PersistentHandleVisitor()
Definition: v8.h:5180
int *(* CounterLookupCallback)(const char *name)
Definition: v8.h:4890
V8_INLINE bool IsUndefined() const
Definition: v8.h:7682
ResourceConstraints constraints
Definition: v8.h:5227
void SetIndexedPropertyHandler(IndexedPropertyGetterCallback getter, IndexedPropertySetterCallback setter=0, IndexedPropertyQueryCallback query=0, IndexedPropertyDeleterCallback deleter=0, IndexedPropertyEnumeratorCallback enumerator=0, Handle< Value > data=Handle< Value >())
Definition: v8.h:4610
void(* IndexedPropertyEnumeratorCallback)(const PropertyCallbackInfo< Array > &info)
Definition: v8.h:4207
static V8_INLINE Int32 * Cast(v8::Value *obj)
Definition: v8.h:7828
size_t total_available_size()
Definition: v8.h:5011
static const int kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset
Definition: v8.h:6956
size_t ByteLength() const
Definition: v8.h:3391
static const int kFalseValueRootIndex
Definition: v8.h:6964
void set_stack_limit(uint32_t *value)
Definition: v8.h:4825
V8_DEPRECATED("Use GetUnboundScript()->GetId()", int GetId())
Definition: v8.h:1109
V8_WARN_UNUSED_RESULT MaybeLocal< Object > ToObject(Local< Context > context) const
Definition: v8.h:7764
V8_INLINE Isolate * GetIsolate() const
Definition: v8.h:8069
V8_INLINE V8_DEPRECATE_SOON("use indexed version", void *GetInternalField1() const)
Definition: v8.h:419
void(* JitCodeEventHandler)(const JitCodeEvent *event)
Definition: v8.h:5162
const int kSmiShiftSize
Definition: v8.h:6923
V8_INLINE Local< Value > GetEmbedderData(int index)
Definition: v8.h:8200
V8_INLINE bool operator==(const Maybe &other) const
Definition: v8.h:6334
static const int kIsolateIndex
Definition: v8.h:3152
V8_INLINE bool IsEmpty() const
Definition: v8.h:227
V8_INLINE ReturnValue< T > GetReturnValue() const
Definition: v8.h:8093
static const int kOddballKindOffset
Definition: v8.h:6942
const char ** dependencies()
Definition: v8.h:4757
const char * space_name()
Definition: v8.h:5031
size_t object_size()
Definition: v8.h:5054
static V8_INLINE Int16Array * Cast(Value *obj)
Definition: v8.h:7988
V8_INLINE ~Source()
Definition: v8.h:7569
static V8_INLINE Uint32 * Cast(v8::Value *obj)
Definition: v8.h:7836
Persistent< T, NonCopyablePersistentTraits< T > > NonCopyablePersistent
Definition: v8.h:650
V8_INLINE Handle< StackTrace > GetStackTrace() const
Definition: v8.h:4944
bool(* EntropySource)(unsigned char *buffer, size_t length)
Definition: v8.h:5940
ExternalOneByteStringResourceImpl()
Definition: v8.h:4723
void(* FailedAccessCheckCallback)(Local< Object > target, AccessType type, Local< Value > data)
Definition: v8.h:4959
void(* NamedPropertyQueryCallback)(Local< String > property, const PropertyCallbackInfo< Integer > &info)
Definition: v8.h:4097
V8_INLINE const CachedData * GetCachedData() const
Definition: v8.h:7574
const char * object_type()
Definition: v8.h:5051
friend Local< Primitive > Undefined(Isolate *isolate)
Definition: v8.h:8098
ExtensionConfiguration()
Definition: v8.h:6533
Handle< UnboundScript > script
Definition: v8.h:5111
V8_INLINE bool operator==(const PersistentBase< S > &that) const
Definition: v8.h:253
V8_INLINE bool IsEmpty() const
Definition: v8.h:358
V8_INLINE Scope(Handle< Context > context)
Definition: v8.h:6701
static V8_INLINE Uint16Array * Cast(Value *obj)
Definition: v8.h:7980
IndexedPropertyHandlerConfiguration(IndexedPropertyGetterCallback getter=0, IndexedPropertySetterCallback setter=0, IndexedPropertyQueryCallback query=0, IndexedPropertyDeleterCallback deleter=0, IndexedPropertyEnumeratorCallback enumerator=0, Handle< Value > data=Handle< Value >(), PropertyHandlerFlags flags=PropertyHandlerFlags::kNone)
Definition: v8.h:4471
size_t space_size()
Definition: v8.h:5032