Lines Matching refs:Value
110 class Value;
198 * whenever an object moves. Handles should always be passed by value
211 * a Local<Object>); the value will still be governed by a handle
489 * the v8 engine which holds an object value and which is updated by
908 internal::Object* value);
913 internal::Object* value);
938 * which will be later filled with the escape value.
946 * Pushes the value into the previous scope and returns a handle to it.
950 V8_INLINE Local<T> Escape(Local<T> value) {
952 Escape(reinterpret_cast<internal::Object**>(*value));
1038 Local<Value> resource_name,
1044 Local<Value> source_map_url = Local<Value>(),
1046 V8_INLINE Local<Value> ResourceName() const;
1053 V8_INLINE Local<Value> SourceMapUrl() const;
1057 Local<Value
1062 Local<Value> source_map_url_;
1077 Local<Value> GetScriptName();
1082 Local<Value> GetSourceURL();
1086 Local<Value> GetSourceMappingURL();
1120 * Runs the script returning the resulting value. It will be run in the
1124 V8_DEPRECATE_SOON("Use maybe version", Local<Value> Run());
1125 V8_WARN_UNUSED_RESULT MaybeLocal<Value> Run(Local<Context> context);
1204 Local<Value> resource_name;
1208 Local<Value> source_map_url;
1382 * This value is meant only for determining whether a previously generated
1406 * TODO(adamk): Script is likely the wrong return value for this;
1462 Local<Value> GetScriptResourceName() const;
1504 * Passes on the value set by the embedder when it fed the script from which
1611 * function for this StackFrame or sourceURL value if the script name
1663 * Tries to parse the string |json_string| and returns it as value if
1667 * \return The corresponding value if successfully parsed.
1670 Local<Value> Parse(Local<String> json_string));
1671 static V8_WARN_UNUSED_RESULT MaybeLocal<Value> Parse(
1684 void Set(Local<Value> key, Local<Value> value);
1685 Local<Value> Get(Local<Value> key);
1686 bool Has(Local<Value> key);
1687 bool Delete(Local<Value> key);
1691 // --- Value ---
1697 class V8_EXPORT Value : public Data {
1700 * Returns true if this value is the undefined value. See ECMA-262
1706 * Returns true if this value is the null value. See ECMA-262
1712 * Returns true if this value is true.
1717 * Returns true if this value is false.
1722 * Returns true if this value is a symbol or a string.
1728 * Returns true if this value is an instance of the String type.
1734 * Returns true if this value is a symbol.
1740 * Returns true if this value is a function.
1745 * Returns true if this value is an array. Note that it will return false for
1751 * Returns true if this value is an object.
1756 * Returns true if this value is boolean.
1761 * Returns true if this value is a number.
1766 * Returns true if this value is external.
1771 * Returns true if this value is a 32-bit signed integer.
1776 * Returns true if this value is a 32-bit unsigned integer.
1781 * Returns true if this value is a Date.
1786 * Returns true if this value is an Arguments object.
1791 * Returns true if this value is a Boolean object.
1796 * Returns true if this value is a Number object.
1801 * Returns true if this value is a String object.
1806 * Returns true if this value is a Symbol object.
1812 * Returns true if this value is a NativeError.
1817 * Returns true if this value is a RegExp.
1822 * Returns true if this value is a Generator function.
1828 * Returns true if this value is a Generator object (iterator).
1834 * Returns true if this value is a Promise.
1840 * Returns true if this value is a Map.
1845 * Returns true if this value is a Set.
1850 * Returns true if this value is a Map Iterator.
1855 * Returns true if this value is a Set Iterator.
1860 * Returns true if this value is a WeakMap.
1865 * Returns true if this value is a WeakSet.
1870 * Returns true if this value is an ArrayBuffer.
1876 * Returns true if this value is an ArrayBufferView.
1882 * Returns true if this value is one of TypedArrays.
1888 * Returns true if this value is an Uint8Array.
1894 * Returns true if this value is an Uint8ClampedArray.
1900 * Returns true if this value is an Int8Array.
1906 * Returns true if this value is an Uint16Array.
1912 * Returns true if this value is an Int16Array.
1918 * Returns true if this value is an Uint32Array.
1924 * Returns true if this value is an Int32Array.
1930 * Returns true if this value is a Float32Array.
1936 * Returns true if this value is a Float64Array.
1942 * Returns true if this value is a SIMD Float32x4.
1948 * Returns true if this value is a DataView.
1954 * Returns true if this value is a SharedArrayBuffer.
1960 * Returns true if this value is a JavaScript Proxy.
2033 V8_DEPRECATE_SOON("Use maybe version", bool Equals(Local<Value> that) const);
2035 Local<Value> that) const;
2036 bool StrictEquals(Local<Value> that) const;
2037 bool SameValue(Local<Value> that) const;
2039 template <class T> V8_INLINE static Value* Cast(T* value);
2054 class V8_EXPORT Primitive : public Value { };
2058 * A primitive boolean value (ECMA-262, 4.3.14). Either the true
2059 * or false value.
2063 bool Value() const;
2064 V8_INLINE static Boolean* Cast(v8::Value* obj);
2065 V8_INLINE static Local<Boolean> New(Isolate* isolate, bool value);
2068 static void CheckCast(v8::Value* obj);
2081 * The return value will never be 0. Also, it is not guaranteed to be
2086 V8_INLINE static Name* Cast(v8::Value* obj);
2088 static void CheckCast(v8::Value* obj);
2096 * A JavaScript string value (ECMA-262, 4.3.17).
2298 V8_INLINE static String* Cast(v8::Value* obj);
2313 /** Allocates a new string from UTF-8 data. Only returns an empty value when
2326 /** Allocates a new string from Latin-1 data. Only returns an empty value
2339 /** Allocates a new string from UTF-16 data. Only returns an empty value when
2416 explicit Utf8Value(Local<v8::Value> obj);
2436 class V8_EXPORT Value {
2438 explicit Value(Local<v8::Value> obj);
2439 ~Value();
2448 Value(const Value&);
2449 void operator=(const Value&);
2456 static void CheckCast(v8::Value* obj);
2468 Local<Value> Name() const;
2491 V8_INLINE static Symbol* Cast(v8::Value* obj);
2495 static void CheckCast(v8::Value* obj);
2507 Local<Value> Name() const;
2528 * A JavaScript number value (ECMA-262, 4.3.20)
2532 double Value() const;
2533 static Local<Number> New(Isolate* isolate, double value);
2534 V8_INLINE static Number* Cast(v8::Value* obj);
2537 static void CheckCast(v8::Value* obj);
2542 * A JavaScript value representing a signed integer.
2546 static Local<Integer> New(Isolate* isolate, int32_t value);
2547 static Local<Integer> NewFromUnsigned(Isolate* isolate, uint32_t value);
2548 int64_t Value() const;
2549 V8_INLINE static Integer* Cast(v8::Value* obj);
2552 static void CheckCast(v8::Value* obj);
2557 * A JavaScript value representing a 32-bit signed integer.
2561 int32_t Value() const;
2562 V8_INLINE static Int32* Cast(v8::Value* obj);
2566 static void CheckCast(v8::Value* obj);
2571 * A JavaScript value representing a 32-bit unsigned integer.
2575 uint32_t Value() const;
2576 V8_INLINE static Uint32* Cast(v8::Value* obj);
2580 static void CheckCast(v8::Value* obj);
2598 const PropertyCallbackInfo<Value>& info);
2601 const PropertyCallbackInfo<Value>& info);
2606 Local<Value> value,
2610 Local<Value> value,
2634 class V8_EXPORT Object : public Value {
2637 bool Set(Local<Value> key, Local<Value> value));
2639 Local<Value> key, Local<Value> value);
2642 bool Set(uint32_t index, Local<Value> value));
2644 Local<Value> value);
2648 // Defines a configurable, writable, enumerable property with the given value
2655 Local<Value> value);
2658 Local<Value> value);
2667 Local<Context> context, Local<Name> key, Local<Value> value,
2675 // will only be returned if the interceptor doesn't return a value.
2679 bool ForceSet(Local<Value> key, Local<Value> value,
2682 Maybe<bool> ForceSet(Local<Context> context, Local<Value> key,
2683 Local<Value> value,
2686 V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));
2687 V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
2688 Local<Value> key);
2690 V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(uint32_t index));
2691 V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
2700 PropertyAttribute GetPropertyAttributes(Local<Value> key));
2702 Local<Context> context, Local<Value> key);
2708 Local<Value> GetOwnPropertyDescriptor(Local<String> key));
2709 V8_WARN_UNUSED_RESULT MaybeLocal<Value> GetOwnPropertyDescriptor(
2712 V8_DEPRECATE_SOON("Use maybe version", bool Has(Local<Value> key));
2714 Local<Value> key);
2716 V8_DEPRECATE_SOON("Use maybe version", bool Delete(Local<Value> key));
2718 Maybe<bool> Delete(Local<Context> context, Local<Value> key);
2731 Local<Value> data = Local<Value>(),
2738 Local<Value> data = Local<Value>(),
2745 MaybeLocal<Value> data = MaybeLocal<Value>(),
2762 Local<Value> value);
2764 MaybeLocal<Value> GetPrivate(Local<Context> context, Local<Private> key);
2790 Local<Value> GetPrototype();
2797 V8_DEPRECATED("Use maybe version", bool SetPrototype(Local<Value> prototype));
2799 Local<Value> prototype);
2809 * This is different from Value::ToString() that may call
2830 /** Gets the value from an internal field. */
2831 V8_INLINE Local<Value> GetInternalField(int index);
2833 /** Sets the value in an internal field. */
2834 void SetInternalField(int index, Local<Value> value);
2854 void SetAlignedPointerInInternalField(int index, void* value);
2879 Local<Value> GetRealNamedPropertyInPrototypeChain(Local<String> key));
2880 V8_WARN_UNUSED_RESULT MaybeLocal<Value> GetRealNamedPropertyInPrototypeChain(
2902 Local<Value> GetRealNamedProperty(Local<String> key));
2903 V8_WARN_UNUSED_RESULT MaybeLocal<Value> GetRealNamedProperty(
2927 * The return value will never be 0. Also, it is not guaranteed to be
2933 bool SetHiddenValue(Local<String> key, Local<Value> value));
2935 Local<Value> GetHiddenValue(Local<String> key));
2963 Local<Value> CallAsFunction(Local<Value> recv, int argc,
2964 Local<Value> argv[]));
2965 V8_WARN_UNUSED_RESULT MaybeLocal<Value> CallAsFunction(Local<Context> context,
2966 Local<Value> recv,
2968 Local<Value> argv[]);
2976 Local<Value> CallAsConstructor(int argc, Local<Value> argv[]));
2977 V8_WARN_UNUSED_RESULT MaybeLocal<Value> CallAsConstructor(
2978 Local<Context> context, int argc, Local<Value> argv[]);
2987 V8_INLINE static Object* Cast(Value* obj);
2991 static void CheckCast(Value* obj);
2992 Local<Value> SlowGetInternalField(int index);
3020 V8_INLINE static Array* Cast(Value* obj);
3023 static void CheckCast(Value* obj);
3034 V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
3035 Local<Value> key);
3037 Local<Value> key,
3038 Local<Value> value);
3040 Local<Value> key);
3042 Local<Value> key);
3046 * index N + 1 is the Nth value.
3055 V8_INLINE static Map* Cast(Value* obj);
3059 static void CheckCast(Value* obj);
3071 Local<Value> key);
3073 Local<Value> key);
3075 Local<Value> key);
3087 V8_INLINE static Set* Cast(Value* obj);
3091 static void CheckCast(Value* obj);
3111 V8_INLINE void Set(bool value);
3132 V8_INLINE void SetInternal(internal::Object* value) { *value_ = value; }
3149 V8_INLINE Local<Value> operator[](int i) const;
3154 V8_INLINE Local<Value> Data() const;
3190 V8_INLINE Local<Value> Data() const;
3213 typedef void (*FunctionCallback)(const FunctionCallbackInfo<Value>& info);
3227 Local<Value> data = Local<Value>(),
3232 Local<Value> data = Local<Value>(), int length = 0));
3235 Local<Object> NewInstance(int argc, Local<Value> argv[]) const);
3237 Local<Context> context, int argc, Local<Value> argv[]) const;
3246 Local<Value> Call(Local<Value> recv, int argc,
3247 Local<Value> argv[]));
3248 V8_WARN_UNUSED_RESULT MaybeLocal<Value> Call(Local<Context> context,
3249 Local<Value> recv, int argc,
3250 Local<Value> argv[]);
3253 Local<Value> GetName() const;
3261 Local<Value> GetInferredName() const;
3267 Local<Value> GetDebugName() const;
3273 Local<Value> GetDisplayName() const;
3300 Local<Value> GetBoundFunction() const;
3303 V8_INLINE static Function* Cast(Value* obj);
3308 static void CheckCast(Value* obj);
3334 * Resolve/reject the associated promise with a given value.
3337 V8_DEPRECATE_SOON("Use maybe version", void Resolve(Local<Value> value));
3339 Maybe<bool> Resolve(Local<Context> context, Local<Value> value);
3341 V8_DEPRECATE_SOON("Use maybe version", void Reject(Local<Value> value));
3343 Maybe<bool> Reject(Local<Context> context, Local<Value> value);
3345 V8_INLINE static Resolver* Cast(Value* obj);
3349 static void CheckCast(Value* obj);
3354 * The handler is given the respective resolution/rejection value as
3380 V8_INLINE static Promise* Cast(Value* obj);
3384 static void CheckCast(Value* obj);
3395 Local<Value> GetHandler();
3406 V8_INLINE static Proxy* Cast(Value* obj);
3410 static void CheckCast(Value* obj);
3548 V8_INLINE static ArrayBuffer* Cast(Value* obj);
3554 static void CheckCast(Value* obj);
3602 V8_INLINE static ArrayBufferView* Cast(Value* obj);
3609 static void CheckCast(Value* obj);
3626 V8_INLINE static TypedArray* Cast(Value* obj);
3630 static void CheckCast(Value* obj);
3644 V8_INLINE static Uint8Array* Cast(Value* obj);
3648 static void CheckCast(Value* obj);
3663 V8_INLINE static Uint8ClampedArray* Cast(Value* obj);
3667 static void CheckCast(Value* obj);
3680 V8_INLINE static Int8Array* Cast(Value* obj);
3684 static void CheckCast(Value* obj);
3698 V8_INLINE static Uint16Array* Cast(Value* obj);
3702 static void CheckCast(Value* obj);
3716 V8_INLINE static Int16Array* Cast(Value* obj);
3720 static void CheckCast(Value* obj);
3734 V8_INLINE static Uint32Array* Cast(Value* obj);
3738 static void CheckCast(Value* obj);
3752 V8_INLINE static Int32Array* Cast(Value* obj);
3756 static void CheckCast(Value* obj);
3770 V8_INLINE static Float32Array* Cast(Value* obj);
3774 static void CheckCast(Value* obj);
3788 V8_INLINE static Float64Array* Cast(Value* obj);
3792 static void CheckCast(Value* obj);
3806 V8_INLINE static DataView* Cast(Value* obj);
3810 static void CheckCast(Value* obj);
3903 V8_INLINE static SharedArrayBuffer* Cast(Value* obj);
3909 static void CheckCast(Value* obj);
3919 Local<Value> New(Isolate* isolate, double time));
3920 static V8_WARN_UNUSED_RESULT MaybeLocal<Value> New(Local<Context> context,
3924 * A specialization of Value::NumberValue that is more efficient
3929 V8_INLINE static Date* Cast(v8::Value* obj);
3946 static void CheckCast(v8::Value* obj);
3955 static Local<Value> New(Isolate* isolate, double value);
3959 V8_INLINE static NumberObject* Cast(v8::Value* obj);
3962 static void CheckCast(v8::Value* obj);
3971 static Local<Value> New(Isolate* isolate, bool value);
3972 V8_DEPRECATED("Pass an isolate", static Local<Value> New(bool value));
3976 V8_INLINE static BooleanObject* Cast(v8::Value* obj);
3979 static void CheckCast(v8::Value* obj);
3988 static Local<Value> New(Local<String> value);
3992 V8_INLINE static StringObject* Cast(v8::Value* obj);
3995 static void CheckCast(v8::Value* obj);
4006 static Local<Value> New(Isolate* isolate, Local<Symbol> value);
4010 V8_INLINE static SymbolObject* Cast(v8::Value* obj);
4013 static void CheckCast(v8::Value* obj);
4053 * Returns the value of the source property: a string representing
4063 V8_INLINE static RegExp* Cast(v8::Value* obj);
4066 static void CheckCast(v8::Value* obj);
4071 * A JavaScript value that wraps a C++ void*. This type of value is mainly used
4074 class V8_EXPORT External : public Value {
4076 static Local<External> New(Isolate* isolate, void* value);
4077 V8_INLINE static External* Cast(Value* obj);
4078 void* Value() const;
4080 static void CheckCast(v8::Value* obj);
4102 value,
4104 V8_INLINE void Set(Isolate* isolate, const char* name, Local<Data> value);
4144 Local<Value> data = Local<Value>(), PropertyAttribute attribute = None,
4151 Local<Value> data = Local<Value>(), PropertyAttribute attribute = None,
4156 * During template instantiation, sets the value with the intrinsic property
4176 const PropertyCallbackInfo<Value>& info);
4180 * Returns the value if the setter intercepts the request.
4185 Local<Value> value,
4186 const PropertyCallbackInfo<Value>& info);
4201 * The return value is true if the property could be deleted and false
4224 Local<Name> property, const PropertyCallbackInfo<Value>& info);
4228 * Returns the value if the setter intercepts the request.
4232 Local<Name> property, Local<Value> value,
4233 const PropertyCallbackInfo<Value>& info);
4247 * The return value is true if the property could be deleted and false
4263 * Returns the value of the property if the getter intercepts the
4268 const PropertyCallbackInfo<Value>& info);
4272 * Returns the value if the setter intercepts the request.
4277 Local<Value> value,
4278 const PropertyCallbackInfo<Value>& info);
4292 * The return value is true if the property could be deleted and false
4333 Local<Value> key,
4335 Local<Value> data);
4345 Local<Value> data);
4448 Local<Value> data = Local<Value>(),
4458 Local<Value> data = Local<Value>(),
4472 FunctionCallback callback, Local<Value> data = Local<Value>(),
4502 void SetAcceptAnyReceiver(bool value);
4510 * Call with a value of true to make the __proto__ accessor ignore
4511 * instances of the function template. Call with a value of false
4516 void SetHiddenPrototype(bool value);
4534 bool HasInstance(Local<Value> object);
4564 Local<Value> data = Local<Value>(),
4579 Local<Value> data;
4592 Local<Value> data = Local<Value>(),
4607 Local<Value> data;
4661 AccessorSetterCallback setter = 0, Local<Value> data = Local<Value>(),
4666 AccessorNameSetterCallback setter = 0, Local<Value> data = Local<Value>(),
4696 Local<Value> data = Local<Value>());
4723 Local<Value> data = Local<Value>()) {
4734 Local<Value> data = Local<Value>());
4755 Local<Value> data = Local<Value>());
4761 Local<Value> data = Local<Value>()));
4773 void SetInternalFieldCount(int value);
4852 void set_auto_enable(bool value) { auto_enable_ = value; }
4906 void set_max_semi_space_size(int value) { max_semi_space_size_ = value; }
4908 void set_max_old_space_size(int value) { max_old_space_size_ = value; }
4910 void set_max_executable_size(int value) { max_executable_size_ = value; }
4913 void set_stack_limit(uint32_t* value) { stack_limit_ = value; }
4915 void set_code_range_size(size_t value) {
4916 code_range_size_ = value;
4934 typedef void (*MessageCallback)(Local<Message> message, Local<Value> error);
4946 static Local<Value> RangeError(Local<String> message);
4947 static Local<Value> ReferenceError(Local<String> message);
4948 static Local<Value> SyntaxError(Local<String> message);
4949 static Local<Value> TypeError(Local<String> message);
4950 static Local<Value> Error(Local<String> message);
4954 * Will try to reconstruct the original stack trace from the exception value,
4957 static Local<Message> CreateMessage(Isolate* isolate, Local<Value> exception);
4959 static Local<Message> CreateMessage(Local<Value> exception));
4965 static Local<StackTrace> GetStackTrace(Local<Value> exception);
5014 Local<Value> value, Local<StackTrace> stack_trace)
5017 value_(value),
5022 V8_INLINE Local<Value
5032 Local<Value> value_;
5044 Local<Value> data);
5268 virtual void VisitPersistentHandle(Persistent<Value>* value,
5458 kUseCounterFeatureCount // This enum value must be last.
5616 * \returns the adjusted value.
5662 Local<Value> ThrowException(Local<Value> exception);
5992 Local<Value> data = Local<Value>());
6144 * The caller owns the data array in the return value.
6160 Local<Value> data = Local<Value>()));
6421 typedef WeakCallbackData<Value, void>::Callback WeakCallback;
6435 Value* handle,
6437 static Local<Value> GetEternal(Isolate* isolate, int index);
6458 * value, see https://hackage.haskell.org/package/base/docs/Data-Maybe.html.
6464 * "Nothing" value is returned.
6475 return value;
6479 return has_value ? value : default_value;
6493 explicit Maybe(const T& t) : has_value(true), value(t) {}
6496 T value;
6577 Local<Value> ReThrow();
6585 Local<Value> Exception() const;
6591 V8_DEPRECATE_SOON("Use maybe version.", Local<Value> StackTrace() const);
6592 V8_WARN_UNUSED_RESULT MaybeLocal<Value> StackTrace(
6624 void SetVerbose(bool value);
6631 void SetCaptureMessage(bool value);
6741 Local<Value> global_object = Local<Value>());
6747 void SetSecurityToken(Local<Value> token);
6749 /** Restores the security token to the default value. */
6753 Local<Value> GetSecurityToken();
6774 * The value is propagated to the scripts compiled in given Context and
6784 V8_INLINE Local<Value> GetEmbedderData(int index);
6799 void SetEmbedderData(int index, Local<Value> value);
6814 void SetAlignedPointerInEmbedderData(int index, void* value);
6865 friend class Value;
6870 Local<Value> SlowGetEmbedderData(int index);
7021 V8_INLINE internal::Object* IntToSmi(int value) {
7024 (static_cast<uintptr_t>(value) << smi_shift_bits) | kSmiTag;
7033 V8_INLINE static int SmiToInt(const internal::Object* value) {
7036 return static_cast<int>(reinterpret_cast<intptr_t>(value)) >> shift_bits;
7038 V8_INLINE static internal::Object* IntToSmi(int value) {
7039 return internal::IntToSmi<kSmiShiftSize>(value);
7041 V8_INLINE static bool IsValidSmi(intptr_t value) {
7043 // most-significant bits of 'value' must be either 00 or 11 due to
7048 // bool result = ((value + 0x40000000) & 0x80000000) == 0;
7053 return static_cast<uintptr_t>(value + 0x40000000U) < 0x80000000U;
7062 V8_INLINE static int SmiToInt(const internal::Object* value) {
7065 return static_cast<int>(reinterpret_cast<intptr_t>(value) >> shift_bits);
7067 V8_INLINE static internal::Object* IntToSmi(int value) {
7068 return internal::IntToSmi<kSmiShiftSize>(value);
7070 V8_INLINE static bool IsValidSmi(intptr_t value) {
7071 // To be representable as a long smi, the value must be a 32-bit integer.
7072 return (value == static_cast<int32_t>(value));
7152 V8_INLINE static bool HasHeapObjectTag(const internal::Object* value) {
7153 return ((reinterpret_cast<intptr_t>(value) & kHeapObjectTagMask) ==
7157 V8_INLINE static int SmiValue(const internal::Object* value) {
7158 return PlatformSmiTagging::SmiToInt(value);
7161 V8_INLINE static internal::Object* IntToSmi(int value) {
7162 return PlatformSmiTagging::IntToSmi(value);
7165 V8_INLINE static bool IsValidSmi(intptr_t value) {
7166 return PlatformSmiTagging::IsValidSmi(value);
7193 bool value, int shift) {
7196 *addr = static_cast<uint8_t>((*addr & ~mask) | (value << shift));
7205 uint8_t value) {
7207 *addr = static_cast<uint8_t>((*addr & ~kNodeStateMask) | value);
7280 V8::Eternalize(isolate, reinterpret_cast<Value*>(*handle), &this->index_);
7394 typedef typename WeakCallbackData<Value, void>::Callback Callback;
7555 void ReturnValue<T>::Set(bool value) {
7559 if (value) {
7590 // Isolate is always the pointer below the default value on the stack.
7603 // Default value is always the pointer below value_ on the stack.
7620 Local<Value> FunctionCallbackInfo<T>::operator[](int i) const {
7621 if (i < 0 || length_ <= i) return Local<Value>(*Undefined(GetIsolate()));
7622 return Local<Value>(reinterpret_cast<Value*>(values_ - i));
7647 Local<Value> FunctionCallbackInfo<T>::Data() const {
7648 return Local<Value>(reinterpret_cast<Value*>(&implicit_args_[kDataIndex]));
7675 ScriptOrigin::ScriptOrigin(Local<Value> resource_name,
7681 Local<Value> source_map_url,
7694 Local<Value> ScriptOrigin::ResourceName() const { return resource_name_; }
7710 Local<Value> ScriptOrigin::SourceMapUrl() const { return source_map_url_; }
7740 Local<Boolean> Boolean::New(Isolate* isolate, bool value) {
7741 return value ? True(isolate) : False(isolate);
7745 void Template::Set(Isolate* isolate, const char* name, v8::Local<Data> value) {
7748 value);
7752 Local<Value> Object::GetInternalField(int index) {
7759 // know where to find the internal fields and can return the value directly.
7762 O* value = I::ReadField<O*>(obj, offset);
7763 O** result = HandleScope::CreateHandle(reinterpret_cast<HO*>(obj), value);
7764 return Local<Value>(reinterpret_cast<Value*>(result));
7777 // know where to find the internal fields and can return the value directly.
7787 String* String::Cast(v8::Value* value) {
7789 CheckCast(value);
7791 return static_cast<String*>(value);
7810 void* value = I::ReadField<void*>(obj, I::kStringResourceOffset);
7811 result = reinterpret_cast<String::ExternalStringResource*>(value);
7832 void* value = I::ReadField<void*>(obj, I::kStringResourceOffset);
7833 resource = static_cast<ExternalStringResourceBase*>(value);
7842 bool Value::IsUndefined() const {
7850 bool Value::QuickIsUndefined() const {
7860 bool Value::IsNull() const {
7868 bool Value::QuickIsNull() const {
7878 bool Value::IsString() const {
7886 bool Value::QuickIsString() const {
7895 template <class T> Value* Value::Cast(T* value) {
7896 return static_cast<Value*>(value);
7900 Local<Boolean> Value::ToBoolean() const {
7906 Local<Number> Value::ToNumber() const {
7912 Local<String> Value::ToString() const {
7918 Local<String> Value::ToDetailString() const {
7924 Local<Object> Value::ToObject() const {
7930 Local<Integer> Value::ToInteger() const {
7936 Local<Uint32> Value::ToUint32() const {
7942 Local<Int32> Value::ToInt32() const {
7948 Boolean* Boolean::Cast(v8::Value* value) {
7950 CheckCast(value);
7952 return static_cast<Boolean*>(value);
7956 Name* Name::Cast(v8::Value* value) {
7958 CheckCast(value);
7960 return static_cast<Name*>(value);
7964 Symbol* Symbol::Cast(v8::Value* value) {
7966 CheckCast(value);
7968 value);
7972 Number* Number::Cast(v8::Value* value) {
7974 CheckCast(value);
7976 return static_cast<Number*>(value);
7980 Integer* Integer::Cast(v8::Value* value) {
7982 CheckCast(value);
7984 return static_cast<Integer*>(value);
7988 Int32* Int32::Cast(v8::Value* value) {
7990 CheckCast(value);
7992 return static_cast<Int32*>(value);
7996 Uint32* Uint32::Cast(v8::Value* value) {
7998 CheckCast(value);
8000 return static_cast<Uint32*>(value);
8004 Date* Date::Cast(v8::Value* value) {
8006 CheckCast(value);
8008 return static_cast<Date*>(value);
8012 StringObject* StringObject::Cast(v8::Value* value) {
8014 CheckCast(value);
8016 return static_cast<StringObject*>(value);
8020 SymbolObject* SymbolObject::Cast(v8::Value* value) {
8022 CheckCast(value);
8024 return static_cast<SymbolObject*>(value);
8028 NumberObject* NumberObject::Cast(v8::Value* value) {
8030 CheckCast(value);
8032 return static_cast<NumberObject*>(value);
8036 BooleanObject* BooleanObject::Cast(v8::Value* value) {
8038 CheckCast(value);
8040 return static_cast<BooleanObject*>(value);
8044 RegExp* RegExp::Cast(v8::Value* value) {
8046 CheckCast(value);
8048 return static_cast<RegExp*>(value);
8052 Object* Object::Cast(v8::Value* value) {
8054 CheckCast(value);
8056 return static_cast<Object*>(value);
8060 Array* Array::Cast(v8::Value* value) {
8062 CheckCast(value);
8064 return static_cast<Array*>(value);
8068 Map* Map::Cast(v8::Value* value) {
8070 CheckCast(value);
8072 return static_cast<Map*>(value);
8076 Set* Set::Cast(v8::Value* value) {
8078 CheckCast(value);
8080 return static_cast<Set*>(value);
8084 Promise* Promise::Cast(v8::Value* value) {
8086 CheckCast(value);
8088 return static_cast<Promise*>(value);
8092 Proxy* Proxy::Cast(v8::Value* value) {
8094 CheckCast(value);
8096 return static_cast<Proxy*>(value);
8100 Promise::Resolver* Promise::Resolver::Cast(v8::Value* value) {
8102 CheckCast(value);
8104 return static_cast<Promise::Resolver*>(value);
8108 ArrayBuffer* ArrayBuffer::Cast(v8::Value* value) {
8110 CheckCast(value);
8112 return static_cast<ArrayBuffer*>(value);
8116 ArrayBufferView* ArrayBufferView::Cast(v8::Value* value) {
8118 CheckCast(value);
8120 return static_cast<ArrayBufferView*>(value);
8124 TypedArray* TypedArray::Cast(v8::Value* value) {
8126 CheckCast(value);
8128 return static_cast<TypedArray*>(value);
8132 Uint8Array* Uint8Array::Cast(v8::Value* value) {
8134 CheckCast(value);
8136 return static_cast<Uint8Array*>(value);
8140 Int8Array* Int8Array::Cast(v8::Value* value) {
8142 CheckCast(value);
8144 return static_cast<Int8Array*>(value);
8148 Uint16Array* Uint16Array::Cast(v8::Value* value) {
8150 CheckCast(value);
8152 return static_cast<Uint16Array*>(value);
8156 Int16Array* Int16Array::Cast(v8::Value* value) {
8158 CheckCast(value);
8160 return static_cast<Int16Array*>(value);
8164 Uint32Array* Uint32Array::Cast(v8::Value* value) {
8166 CheckCast(value);
8168 return static_cast<Uint32Array*>(value);
8172 Int32Array* Int32Array::Cast(v8::Value* value) {
8174 CheckCast(value);
8176 return static_cast<Int32Array*>(value);
8180 Float32Array* Float32Array::Cast(v8::Value* value) {
8182 CheckCast(value);
8184 return static_cast<Float32Array*>(value);
8188 Float64Array* Float64Array::Cast(v8::Value* value) {
8190 CheckCast(value);
8192 return static_cast<Float64Array*>(value);
8196 Uint8ClampedArray* Uint8ClampedArray::Cast(v8::Value* value) {
8198 CheckCast(value);
8200 return static_cast<Uint8ClampedArray*>(value);
8204 DataView* DataView::Cast(v8::Value* value) {
8206 CheckCast(value);
8208 return static_cast<DataView*>(value);
8212 SharedArrayBuffer* SharedArrayBuffer::Cast(v8::Value* value) {
8214 CheckCast(value);
8216 return static_cast<SharedArrayBuffer*>(value);
8220 Function* Function::Cast(v8::Value* value) {
8222 CheckCast(value);
8224 return static_cast<Function*>(value);
8228 External* External::Cast(v8::Value* value) {
8230 CheckCast(value);
8232 return static_cast<External*>(value);
8243 Local<Value> PropertyCallbackInfo<T>::Data() const {
8244 return Local<Value>(reinterpret_cast<Value*>(&args_[kDataIndex]));
8344 TYPE_CHECK(Value, T);
8352 TYPE_CHECK(Value, T);
8362 TYPE_CHECK(Value, S);
8368 Local<Value> Context::GetEmbedderData(int index) {
8376 return Local<Value>(reinterpret_cast<Value*>(result));
8406 bool V8::AddMessageListener(MessageCallback that, Local<Value> data) {