#ifndef V8_OBJECTS_JS_OBJECTS_H_
#define V8_OBJECTS_JS_OBJECTS_H_
#include <optional>
#include "src/common/globals.h"
#include "src/handles/handles.h"
#include "src/objects/embedder-data-slot.h"
#include "src/objects/fixed-array.h"
#include "src/objects/internal-index.h"
#include "src/objects/objects.h"
#include "src/objects/property-array.h"
#include "src/objects/object-macros.h"
namespace v8::internal {
enum class AllocationPolicy { kAllocationAllowed, kAllocationDisallowed };
enum InstanceType : uint16_t;
class JSGlobalObject;
class JSGlobalProxy;
class LookupIterator;
class PropertyDescriptor;
class PropertyKey;
class NativeContext;
class IsCompiledScope;
class StackTraceInfo;
class SwissNameDictionary;
class ElementsAccessor;
class Undefined;
class Null;
#include "torque-generated/src/objects/js-objects-tq.inc"
class JSReceiver : public TorqueGeneratedJSReceiver<JSReceiver, HeapObject> {
public:
DECL_GETTER(HasFastProperties, bool)
DECL_GETTER(property_array, Tagged<PropertyArray>)
DECL_GETTER(property_dictionary, Tagged<NameDictionary>)
DECL_GETTER(property_dictionary_swiss, Tagged<SwissNameDictionary>)
void SetProperties(Tagged<HeapObject> properties);
DECL_ACCESSORS(raw_properties_or_hash, Tagged<Object>)
DECL_RELAXED_ACCESSORS(raw_properties_or_hash, Tagged<Object>)
inline void initialize_properties(Isolate* isolate);
static void DeleteNormalizedProperty(DirectHandle<JSReceiver> object,
InternalIndex entry);
template <template <typename> typename HandleType>
requires(
std::is_convertible_v<HandleType<JSReceiver>, DirectHandle<JSReceiver>>)
V8_WARN_UNUSED_RESULT static typename HandleType<Object>::MaybeType
ToPrimitive(Isolate* isolate, HandleType<JSReceiver> receiver,
ToPrimitiveHint hint = ToPrimitiveHint::kDefault);
template <template <typename> typename HandleType>
requires(std::is_convertible_v<HandleType<Object>, DirectHandle<Object>>)
V8_WARN_UNUSED_RESULT static typename HandleType<Object>::MaybeType
OrdinaryToPrimitive(Isolate* isolate, DirectHandle<JSReceiver> receiver,
OrdinaryToPrimitiveHint hint);
static MaybeDirectHandle<NativeContext> GetFunctionRealm(
DirectHandle<JSReceiver> receiver);
V8_EXPORT_PRIVATE static MaybeHandle<NativeContext> GetContextForMicrotask(
DirectHandle<JSReceiver> receiver);
static inline MaybeDirectHandle<JSPrototype> GetPrototype(
Isolate* isolate, DirectHandle<JSReceiver> receiver);
V8_WARN_UNUSED_RESULT static Maybe<bool> HasInPrototypeChain(
Isolate* isolate, DirectHandle<JSReceiver> object,
DirectHandle<Object> proto);
V8_WARN_UNUSED_RESULT static Maybe<bool> SetOrCopyDataProperties(
Isolate* isolate, DirectHandle<JSReceiver> target,
DirectHandle<Object> source, PropertiesEnumerationMode mode,
base::Vector<DirectHandle<Object>> excluded_properties = {},
bool use_set = true);
V8_EXPORT_PRIVATE V8_WARN_UNUSED_RESULT static Maybe<bool> HasProperty(
LookupIterator* it);
V8_WARN_UNUSED_RESULT static inline Maybe<bool> HasProperty(
Isolate* isolate, DirectHandle<JSReceiver> object,
DirectHandle<Name> name);
V8_WARN_UNUSED_RESULT static inline Maybe<bool> HasElement(
Isolate* isolate, DirectHandle<JSReceiver> object, uint32_t index);
V8_WARN_UNUSED_RESULT static inline Maybe<bool> HasPropertyOrElement(
Isolate* isolate, DirectHandle<JSReceiver> object, PropertyKey key);
V8_EXPORT_PRIVATE V8_WARN_UNUSED_RESULT static Maybe<bool> HasOwnProperty(
Isolate* isolate, DirectHandle<JSReceiver> object,
DirectHandle<Name> name);
V8_WARN_UNUSED_RESULT static inline Maybe<bool> HasOwnProperty(
Isolate* isolate, DirectHandle<JSReceiver> object, uint32_t index);
V8_WARN_UNUSED_RESULT static inline MaybeHandle<Object> GetProperty(
Isolate* isolate, DirectHandle<JSReceiver> receiver, const char* key);
V8_WARN_UNUSED_RESULT static inline MaybeHandle<Object> GetProperty(
Isolate* isolate, DirectHandle<JSReceiver> receiver,
DirectHandle<Name> name);
V8_WARN_UNUSED_RESULT static inline MaybeHandle<Object> GetElement(
Isolate* isolate, DirectHandle<JSReceiver> receiver, uint32_t index);
V8_EXPORT_PRIVATE V8_WARN_UNUSED_RESULT static Maybe<bool>
DeletePropertyOrElement(Isolate* isolate, DirectHandle<JSReceiver> object,
DirectHandle<Name> name,
LanguageMode language_mode = LanguageMode::kSloppy);
V8_EXPORT_PRIVATE V8_WARN_UNUSED_RESULT static Maybe<bool>
DeletePropertyOrElement(Isolate* isolate, DirectHandle<JSReceiver> object,
PropertyKey key,
LanguageMode language_mode = LanguageMode::kSloppy);
V8_EXPORT_PRIVATE V8_WARN_UNUSED_RESULT static Maybe<bool> DeleteProperty(
Isolate* isolate, DirectHandle<JSReceiver> object,
DirectHandle<Name> name,
LanguageMode language_mode = LanguageMode::kSloppy);
V8_WARN_UNUSED_RESULT static Maybe<bool> DeleteProperty(
LookupIterator* it, LanguageMode language_mode);
V8_WARN_UNUSED_RESULT static Maybe<bool> DeleteElement(
Isolate* isolate, DirectHandle<JSReceiver> object, uint32_t index,
LanguageMode language_mode = LanguageMode::kSloppy);
V8_WARN_UNUSED_RESULT static Tagged<Object> DefineProperty(
Isolate* isolate, DirectHandle<Object> object, DirectHandle<Object> name,
Handle<Object> attributes);
V8_WARN_UNUSED_RESULT static MaybeDirectHandle<Object> DefineProperties(
Isolate* isolate, DirectHandle<Object> object,
DirectHandle<Object> properties);
V8_WARN_UNUSED_RESULT static Maybe<bool> DefineOwnProperty(
Isolate* isolate, DirectHandle<JSReceiver> object,
DirectHandle<Object> key, PropertyDescriptor* desc,
Maybe<ShouldThrow> should_throw);
V8_WARN_UNUSED_RESULT static Maybe<bool> CheckPrivateNameStore(
LookupIterator* it, bool is_define);
V8_WARN_UNUSED_RESULT static Maybe<bool> CreateDataProperty(
Isolate* isolate, DirectHandle<JSReceiver> object, DirectHandle<Name> key,
DirectHandle<Object> value, Maybe<ShouldThrow> should_throw);
V8_WARN_UNUSED_RESULT static Maybe<bool> CreateDataProperty(
Isolate* isolate, DirectHandle<JSAny> object, PropertyKey key,
DirectHandle<Object> value, Maybe<ShouldThrow> should_throw);
V8_WARN_UNUSED_RESULT static Maybe<bool> CreateDataProperty(
Isolate* isolate, DirectHandle<JSReceiver> object, PropertyKey key,
DirectHandle<Object> value, Maybe<ShouldThrow> should_throw);
V8_WARN_UNUSED_RESULT static Maybe<bool> AddPrivateField(
LookupIterator* it, DirectHandle<Object> value,
Maybe<ShouldThrow> should_throw);
V8_WARN_UNUSED_RESULT static Maybe<bool> OrdinaryDefineOwnProperty(
Isolate* isolate, DirectHandle<JSObject> object, DirectHandle<Object> key,
PropertyDescriptor* desc, Maybe<ShouldThrow> should_throw);
V8_WARN_UNUSED_RESULT static Maybe<bool> OrdinaryDefineOwnProperty(
Isolate* isolate, DirectHandle<JSObject> object, const PropertyKey& key,
PropertyDescriptor* desc, Maybe<ShouldThrow> should_throw);
V8_WARN_UNUSED_RESULT static Maybe<bool> OrdinaryDefineOwnProperty(
LookupIterator* it, PropertyDescriptor* desc,
Maybe<ShouldThrow> should_throw);
V8_WARN_UNUSED_RESULT static Maybe<bool> IsCompatiblePropertyDescriptor(
Isolate* isolate, bool extensible, PropertyDescriptor* desc,
PropertyDescriptor* current, DirectHandle<Name> property_name,
Maybe<ShouldThrow> should_throw);
V8_WARN_UNUSED_RESULT static Maybe<bool> ValidateAndApplyPropertyDescriptor(
Isolate* isolate, LookupIterator* it, bool extensible,
PropertyDescriptor* desc, PropertyDescriptor* current,
Maybe<ShouldThrow> should_throw, DirectHandle<Name> property_name);
V8_EXPORT_PRIVATE V8_WARN_UNUSED_RESULT static Maybe<bool>
GetOwnPropertyDescriptor(Isolate* isolate, DirectHandle<JSReceiver> object,
DirectHandle<Object> key, PropertyDescriptor* desc);
V8_WARN_UNUSED_RESULT static Maybe<bool> GetOwnPropertyDescriptor(
LookupIterator* it, PropertyDescriptor* desc);
using IntegrityLevel = PropertyAttributes;
V8_WARN_UNUSED_RESULT static Maybe<bool> SetIntegrityLevel(
Isolate* isolate, DirectHandle<JSReceiver> object, IntegrityLevel lvl,
ShouldThrow should_throw);
V8_WARN_UNUSED_RESULT static Maybe<bool> TestIntegrityLevel(
Isolate* isolate, DirectHandle<JSReceiver> object, IntegrityLevel lvl);
V8_WARN_UNUSED_RESULT static Maybe<bool> PreventExtensions(
Isolate* isolate, DirectHandle<JSReceiver> object,
ShouldThrow should_throw);
V8_WARN_UNUSED_RESULT static Maybe<bool> IsExtensible(
Isolate* isolate, DirectHandle<JSReceiver> object);
V8_EXPORT_PRIVATE Tagged<String> class_name();
static MaybeDirectHandle<JSFunction> GetConstructor(
Isolate* isolate, DirectHandle<JSReceiver> receiver);
static DirectHandle<String> GetConstructorName(
Isolate* isolate, DirectHandle<JSReceiver> receiver);
V8_EXPORT_PRIVATE inline std::optional<Tagged<NativeContext>>
GetCreationContext();
V8_EXPORT_PRIVATE inline MaybeDirectHandle<NativeContext> GetCreationContext(
Isolate* isolate);
V8_WARN_UNUSED_RESULT static inline Maybe<PropertyAttributes>
GetPropertyAttributes(Isolate* isolate, DirectHandle<JSReceiver> object,
DirectHandle<Name> name);
V8_WARN_UNUSED_RESULT static inline Maybe<PropertyAttributes>
GetOwnPropertyAttributes(Isolate* isolate, DirectHandle<JSReceiver> object,
DirectHandle<Name> name);
V8_WARN_UNUSED_RESULT static inline Maybe<PropertyAttributes>
GetOwnPropertyAttributes(Isolate* isolate, DirectHandle<JSReceiver> object,
uint32_t index);
V8_WARN_UNUSED_RESULT static inline Maybe<PropertyAttributes>
GetElementAttributes(Isolate* isolate, DirectHandle<JSReceiver> object,
uint32_t index);
V8_WARN_UNUSED_RESULT static inline Maybe<PropertyAttributes>
GetOwnElementAttributes(Isolate* isolate, DirectHandle<JSReceiver> object,
uint32_t index);
V8_WARN_UNUSED_RESULT static Maybe<PropertyAttributes> GetPropertyAttributes(
LookupIterator* it);
V8_EXPORT_PRIVATE V8_WARN_UNUSED_RESULT static Maybe<bool> SetPrototype(
Isolate* isolate, DirectHandle<JSReceiver> object,
DirectHandle<Object> value, bool from_javascript,
ShouldThrow should_throw);
inline static Handle<Object> GetDataProperty(Isolate* isolate,
DirectHandle<JSReceiver> object,
DirectHandle<Name> name);
V8_EXPORT_PRIVATE static Handle<Object> GetDataProperty(
LookupIterator* it, AllocationPolicy allocation_policy =
AllocationPolicy::kAllocationAllowed);
V8_EXPORT_PRIVATE Tagged<Object> GetIdentityHash();
static Tagged<Smi> CreateIdentityHash(Isolate* isolate,
Tagged<JSReceiver> key);
V8_EXPORT_PRIVATE Tagged<Smi> GetOrCreateIdentityHash(Isolate* isolate);
V8_EXPORT_PRIVATE void SetIdentityHash(int masked_hash);
V8_WARN_UNUSED_RESULT static inline MaybeDirectHandle<FixedArray>
OwnPropertyKeys(Isolate* isolate, DirectHandle<JSReceiver> object);
V8_WARN_UNUSED_RESULT static MaybeDirectHandle<FixedArray> GetOwnValues(
Isolate* isolate, DirectHandle<JSReceiver> object, PropertyFilter filter,
bool try_fast_path = true);
V8_WARN_UNUSED_RESULT static MaybeDirectHandle<FixedArray> GetOwnEntries(
Isolate* isolate, DirectHandle<JSReceiver> object, PropertyFilter filter,
bool try_fast_path = true);
static const int kHashMask = PropertyArray::HashField::kMask;
bool HasProxyInPrototype(Isolate* isolate);
bool IsCodeLike(Isolate* isolate) const;
private:
DECL_ACCESSORS(properties_or_hash, Tagged<Object>)
TQ_OBJECT_CONSTRUCTORS(JSReceiver)
};
class JSObject : public TorqueGeneratedJSObject<JSObject, JSReceiver> {
public:
static bool IsUnmodifiedApiObject(FullObjectSlot o);
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT MaybeHandle<JSObject> New(
DirectHandle<JSFunction> constructor, DirectHandle<JSReceiver> new_target,
DirectHandle<AllocationSite> site,
NewJSObjectType = NewJSObjectType::kMaybeEmbedderFieldsAndNoApiWrapper);
static MaybeDirectHandle<JSObject> NewWithMap(
Isolate* isolate, DirectHandle<Map> initial_map,
DirectHandle<AllocationSite> site,
NewJSObjectType = NewJSObjectType::kMaybeEmbedderFieldsAndNoApiWrapper);
static V8_WARN_UNUSED_RESULT MaybeDirectHandle<JSObject> ObjectCreate(
Isolate* isolate, DirectHandle<JSPrototype> prototype);
DECL_ACCESSORS(elements, Tagged<FixedArrayBase>)
DECL_RELAXED_GETTER(elements, Tagged<FixedArrayBase>)
Tagged<FixedArrayBase> elements(PtrComprCageBase cage_base,
AcquireLoadTag tag) const = delete;
void set_elements(Tagged<FixedArrayBase> value, ReleaseStoreTag tag,
WriteBarrierMode mode = UPDATE_WRITE_BARRIER) = delete;
inline void initialize_elements();
static inline void SetMapAndElements(Isolate* isolate,
DirectHandle<JSObject> object,
DirectHandle<Map> map,
DirectHandle<FixedArrayBase> elements);
DECL_GETTER(GetElementsKind, ElementsKind)
DECL_GETTER(GetElementsAccessor, ElementsAccessor*)
DECL_GETTER(HasSmiElements, bool)
DECL_GETTER(HasObjectElements, bool)
DECL_GETTER(HasSmiOrObjectElements, bool)
DECL_GETTER(HasFastElements, bool)
DECL_GETTER(HasFastPackedElements, bool)
DECL_GETTER(HasDoubleElements, bool)
DECL_GETTER(HasHoleyElements, bool)
DECL_GETTER(HasSloppyArgumentsElements, bool)
DECL_GETTER(HasStringWrapperElements, bool)
DECL_GETTER(HasDictionaryElements, bool)
DECL_GETTER(HasPackedElements, bool)
DECL_GETTER(HasAnyNonextensibleElements, bool)
DECL_GETTER(HasSealedElements, bool)
DECL_GETTER(HasSharedArrayElements, bool)
DECL_GETTER(HasNonextensibleElements, bool)
DECL_GETTER(HasTypedArrayOrRabGsabTypedArrayElements, bool)
DECL_GETTER(HasFixedUint8ClampedElements, bool)
DECL_GETTER(HasFixedArrayElements, bool)
DECL_GETTER(HasFixedInt8Elements, bool)
DECL_GETTER(HasFixedUint8Elements, bool)
DECL_GETTER(HasFixedInt16Elements, bool)
DECL_GETTER(HasFixedUint16Elements, bool)
DECL_GETTER(HasFixedInt32Elements, bool)
DECL_GETTER(HasFixedUint32Elements, bool)
DECL_GETTER(HasFixedFloat16Elements, bool)
DECL_GETTER(HasFixedFloat32Elements, bool)
DECL_GETTER(HasFixedFloat64Elements, bool)
DECL_GETTER(HasFixedBigInt64Elements, bool)
DECL_GETTER(HasFixedBigUint64Elements, bool)
DECL_GETTER(HasFastArgumentsElements, bool)
DECL_GETTER(HasSlowArgumentsElements, bool)
DECL_GETTER(HasFastStringWrapperElements, bool)
DECL_GETTER(HasSlowStringWrapperElements, bool)
bool HasEnumerableElements();
DECL_GETTER(element_dictionary, Tagged<NumberDictionary>)
static inline void EnsureWritableFastElements(Isolate* isolate,
DirectHandle<JSObject> object);
V8_NOINLINE V8_PRESERVE_MOST static void MakeElementsWritable(
Isolate* isolate, DirectHandle<JSObject> object);
V8_WARN_UNUSED_RESULT static Maybe<InterceptorResult>
SetPropertyWithInterceptor(LookupIterator* it,
Maybe<ShouldThrow> should_throw,
DirectHandle<Object> value);
enum AccessorInfoHandling { FORCE_FIELD, DONT_FORCE_FIELD };
template <typename T, template <typename> typename HandleType>
requires(std::is_convertible_v<HandleType<T>, DirectHandle<T>>)
V8_WARN_UNUSED_RESULT static inline typename HandleType<Object>::MaybeType
DefineOwnPropertyIgnoreAttributes(
LookupIterator* it, HandleType<T> value, PropertyAttributes attributes,
AccessorInfoHandling handling = DONT_FORCE_FIELD,
EnforceDefineSemantics semantics = EnforceDefineSemantics::kSet);
V8_WARN_UNUSED_RESULT static Maybe<bool> DefineOwnPropertyIgnoreAttributes(
LookupIterator* it, DirectHandle<Object> value,
PropertyAttributes attributes, Maybe<ShouldThrow> should_throw,
AccessorInfoHandling handling = DONT_FORCE_FIELD,
EnforceDefineSemantics semantics = EnforceDefineSemantics::kSet,
StoreOrigin store_origin = StoreOrigin::kNamed,
MaybeDirectHandle<Object> old_value = {});
V8_WARN_UNUSED_RESULT static MaybeDirectHandle<Object> V8_EXPORT_PRIVATE
SetOwnPropertyIgnoreAttributes(DirectHandle<JSObject> object,
DirectHandle<Name> name,
DirectHandle<Object> value,
PropertyAttributes attributes);
V8_WARN_UNUSED_RESULT static MaybeDirectHandle<Object>
SetOwnElementIgnoreAttributes(DirectHandle<JSObject> object, size_t index,
DirectHandle<Object> value,
PropertyAttributes attributes);
V8_EXPORT_PRIVATE V8_WARN_UNUSED_RESULT static MaybeDirectHandle<Object>
DefinePropertyOrElementIgnoreAttributes(DirectHandle<JSObject> object,
DirectHandle<Name> name,
DirectHandle<Object> value,
PropertyAttributes attributes = NONE);
V8_WARN_UNUSED_RESULT static Maybe<bool> CreateDataProperty(
Isolate* isolate, DirectHandle<JSObject> object, PropertyKey key,
DirectHandle<Object> value,
Maybe<ShouldThrow> should_throw = Just(kDontThrow));
V8_EXPORT_PRIVATE static void AddProperty(Isolate* isolate,
DirectHandle<JSObject> object,
DirectHandle<Name> name,
DirectHandle<Object> value,
PropertyAttributes attributes);
static void AddProperty(Isolate* isolate, DirectHandle<JSObject> object,
const char* name, DirectHandle<Object> value,
PropertyAttributes attributes);
V8_EXPORT_PRIVATE static Maybe<bool> AddDataElement(
Isolate* isolate, DirectHandle<JSObject> receiver, uint32_t index,
DirectHandle<Object> value, PropertyAttributes attributes);
static void AllocateStorageForMap(Isolate* isolate,
DirectHandle<JSObject> object,
DirectHandle<Map> map);
static void MigrateInstance(Isolate* isolate,
DirectHandle<JSObject> instance);
static bool TryMigrateInstance(Isolate* isolate,
DirectHandle<JSObject> instance);
static void SetNormalizedProperty(DirectHandle<JSObject> object,
DirectHandle<Name> name,
DirectHandle<Object> value,
PropertyDetails details);
static void SetNormalizedElement(DirectHandle<JSObject> object,
uint32_t index, DirectHandle<Object> value,
PropertyDetails details);
static void OptimizeAsPrototype(DirectHandle<JSObject> object,
bool enable_setup_mode = true);
static void ReoptimizeIfPrototype(DirectHandle<JSObject> object);
static void MakePrototypesFast(DirectHandle<Object> receiver,
WhereToStart where_to_start, Isolate* isolate);
static void LazyRegisterPrototypeUser(DirectHandle<Map> user,
Isolate* isolate);
static void UpdatePrototypeUserRegistration(DirectHandle<Map> old_map,
DirectHandle<Map> new_map,
Isolate* isolate);
static bool UnregisterPrototypeUser(DirectHandle<Map> user, Isolate* isolate);
static Tagged<Map> InvalidatePrototypeChains(Tagged<Map> map);
static void InvalidatePrototypeValidityCell(Tagged<JSGlobalObject> global);
static void NotifyMapChange(DirectHandle<Map> old_map,
DirectHandle<Map> new_map, Isolate* isolate);
static inline bool PrototypeHasNoElements(Isolate* isolate,
Tagged<JSObject> object);
static void PrototypeRegistryCompactionCallback(Tagged<HeapObject> value,
int old_index, int new_index);
DECL_GETTER(GetNamedInterceptor, Tagged<InterceptorInfo>)
DECL_GETTER(GetIndexedInterceptor, Tagged<InterceptorInfo>)
V8_WARN_UNUSED_RESULT static Maybe<PropertyAttributes>
GetPropertyAttributesWithInterceptor(LookupIterator* it);
V8_WARN_UNUSED_RESULT static Maybe<PropertyAttributes>
GetPropertyAttributesWithFailedAccessCheck(LookupIterator* it);
V8_EXPORT_PRIVATE static MaybeDirectHandle<Object>
DefineOwnAccessorIgnoreAttributes(DirectHandle<JSObject> object,
DirectHandle<Name> name,
DirectHandle<Object> getter,
DirectHandle<Object> setter,
PropertyAttributes attributes);
static MaybeDirectHandle<Object> DefineOwnAccessorIgnoreAttributes(
LookupIterator* it, DirectHandle<Object> getter,
DirectHandle<Object> setter, PropertyAttributes attributes);
V8_WARN_UNUSED_RESULT static MaybeDirectHandle<Object> SetAccessor(
DirectHandle<JSObject> object, DirectHandle<Name> name,
DirectHandle<AccessorInfo> info, PropertyAttributes attributes);
V8_WARN_UNUSED_RESULT static Maybe<bool> CheckIfCanDefineAsConfigurable(
Isolate* isolate, LookupIterator* it, DirectHandle<Object> value,
Maybe<ShouldThrow> should_throw);
V8_WARN_UNUSED_RESULT static MaybeHandle<JSAny> GetPropertyWithInterceptor(
LookupIterator* it, bool* done);
static void ValidateElements(Isolate* isolate, Tagged<JSObject> object);
static inline void EnsureCanContainHeapObjectElements(
Isolate* isolate, DirectHandle<JSObject> obj);
template <typename TSlot>
static inline ElementsKind GetTransitionedElementsKind(
Isolate* isolate, ElementsKind current_kind, TSlot elements,
uint32_t count, EnsureElementsMode mode);
template <typename TSlot>
static inline void EnsureCanContainElements(Isolate* isolate,
DirectHandle<JSObject> object,
TSlot elements, uint32_t count,
EnsureElementsMode mode);
static inline void EnsureCanContainElements(
Isolate* isolate, DirectHandle<JSObject> object,
DirectHandle<FixedArrayBase> elements, uint32_t length,
EnsureElementsMode mode);
static void EnsureCanContainElements(Isolate* isolate,
DirectHandle<JSObject> object,
JavaScriptArguments* arguments,
uint32_t arg_count,
EnsureElementsMode mode);
bool WouldConvertToSlowElements(uint32_t index);
static const uint32_t kMinAddedElementsCapacity = 16;
static constexpr uint32_t NewElementsCapacity(uint32_t old_capacity) {
uint32_t new_capacity =
old_capacity + (old_capacity >> 1) + kMinAddedElementsCapacity;
if (new_capacity > kMaxFixedArrayCapacity &&
old_capacity + kMinAddedElementsCapacity <= kMaxFixedArrayCapacity) {
return kMaxFixedArrayCapacity;
}
return new_capacity;
}
template <AllocationSiteUpdateMode update_or_check =
AllocationSiteUpdateMode::kUpdate>
static bool UpdateAllocationSite(Isolate* isolate,
DirectHandle<JSObject> object,
ElementsKind to_kind);
DECL_GETTER(HasNamedInterceptor, bool)
DECL_GETTER(HasIndexedInterceptor, bool)
V8_WARN_UNUSED_RESULT static Maybe<bool> HasRealNamedProperty(
Isolate* isolate, DirectHandle<JSObject> object, DirectHandle<Name> name);
V8_WARN_UNUSED_RESULT static Maybe<bool> HasRealElementProperty(
Isolate* isolate, DirectHandle<JSObject> object, uint32_t index);
V8_WARN_UNUSED_RESULT static Maybe<bool> HasRealNamedCallbackProperty(
Isolate* isolate, DirectHandle<JSObject> object, DirectHandle<Name> name);
static V8_EXPORT_PRIVATE int GetHeaderSize(
InstanceType instance_type, bool function_has_prototype_slot = false);
static inline int GetHeaderSize(Tagged<Map> map);
static inline bool MayHaveEmbedderFields(Tagged<Map> map);
inline bool MayHaveEmbedderFields() const;
static inline int GetEmbedderFieldsStartOffset(Tagged<Map> map);
inline int GetEmbedderFieldsStartOffset();
static inline int GetEmbedderFieldCount(Tagged<Map> map);
inline int GetEmbedderFieldCount() const;
inline int GetEmbedderFieldOffset(int index);
inline Tagged<Object> GetEmbedderField(int index);
inline void SetEmbedderField(int index, Tagged<Object> value);
inline void SetEmbedderField(int index, Tagged<Smi> value);
static inline bool IsDroppableApiObject(Tagged<Map>);
inline bool IsDroppableApiObject() const;
static DirectHandle<Map> GetElementsTransitionMap(
Isolate* isolate, DirectHandle<JSObject> object, ElementsKind to_kind);
V8_EXPORT_PRIVATE static void TransitionElementsKind(
Isolate* isolate, DirectHandle<JSObject> object, ElementsKind to_kind);
V8_EXPORT_PRIVATE static void MigrateToMap(
Isolate* isolate, DirectHandle<JSObject> object,
DirectHandle<Map> new_map, int expected_additional_properties = 0);
static void ForceSetPrototype(Isolate* isolate, DirectHandle<JSObject> object,
DirectHandle<JSPrototype> proto);
V8_EXPORT_PRIVATE static void NormalizeProperties(
Isolate* isolate, DirectHandle<JSObject> object,
PropertyNormalizationMode mode, int expected_additional_properties,
bool use_cache, const char* reason);
V8_EXPORT_PRIVATE static void NormalizeProperties(
Isolate* isolate, DirectHandle<JSObject> object,
PropertyNormalizationMode mode, int expected_additional_properties,
const char* reason) {
const bool kUseCache = true;
NormalizeProperties(isolate, object, mode, expected_additional_properties,
kUseCache, reason);
}
V8_EXPORT_PRIVATE static DirectHandle<NumberDictionary> NormalizeElements(
Isolate* isolate, DirectHandle<JSObject> object);
void RequireSlowElements(Tagged<NumberDictionary> dictionary);
V8_EXPORT_PRIVATE static void MigrateSlowToFast(DirectHandle<JSObject> object,
int unused_property_fields,
const char* reason);
static Handle<Object> DictionaryPropertyAt(Isolate* isolate,
DirectHandle<JSObject> object,
InternalIndex dict_index);
static std::optional<Tagged<Object>> DictionaryPropertyAt(
DirectHandle<JSObject> object, InternalIndex dict_index, Heap* heap);
static Handle<JSAny> FastPropertyAt(Isolate* isolate,
DirectHandle<JSObject> object,
Representation representation,
FieldIndex index);
static DirectHandle<JSAny> FastPropertyAt(Isolate* isolate,
DirectHandle<JSObject> object,
Representation representation,
FieldIndex index,
SeqCstAccessTag tag);
inline Tagged<JSAny> RawFastPropertyAt(FieldIndex index) const;
inline Tagged<JSAny> RawFastPropertyAt(PtrComprCageBase cage_base,
FieldIndex index) const;
inline Tagged<JSAny> RawFastPropertyAt(FieldIndex index,
SeqCstAccessTag tag) const;
inline Tagged<JSAny> RawFastPropertyAt(PtrComprCageBase cage_base,
FieldIndex index,
SeqCstAccessTag tag) const;
inline std::optional<Tagged<Object>> RawInobjectPropertyAt(
PtrComprCageBase cage_base, Tagged<Map> original_map,
FieldIndex index) const;
inline void FastPropertyAtPut(FieldIndex index, Tagged<Object> value,
WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
inline void FastPropertyAtPut(FieldIndex index, Tagged<Object> value,
SeqCstAccessTag tag);
inline void RawFastInobjectPropertyAtPut(
FieldIndex index, Tagged<Object> value,
WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
inline void RawFastInobjectPropertyAtPut(FieldIndex index,
Tagged<Object> value,
SeqCstAccessTag tag);
inline void WriteToField(InternalIndex descriptor, PropertyDetails details,
Tagged<Object> value);
inline Tagged<Object> RawFastInobjectPropertyAtSwap(FieldIndex index,
Tagged<Object> value,
SeqCstAccessTag tag);
inline Tagged<Object> RawFastPropertyAtSwap(FieldIndex index,
Tagged<Object> value,
SeqCstAccessTag tag);
Tagged<Object> RawFastPropertyAtCompareAndSwap(FieldIndex index,
Tagged<Object> expected,
Tagged<Object> value,
SeqCstAccessTag tag);
inline Tagged<Object> RawFastInobjectPropertyAtCompareAndSwap(
FieldIndex index, Tagged<Object> expected, Tagged<Object> value,
SeqCstAccessTag tag);
inline int GetInObjectPropertyOffset(int index);
inline Tagged<Object> InObjectPropertyAt(int index);
inline Tagged<Object> InObjectPropertyAtPut(
int index, Tagged<Object> value,
WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
V8_WARN_UNUSED_RESULT static Maybe<bool> SetPrototype(
Isolate* isolate, DirectHandle<JSObject> object,
DirectHandle<Object> value, bool from_javascript,
ShouldThrow should_throw);
static void SetImmutableProto(Isolate* isolate,
DirectHandle<JSObject> object);
inline void InitializeBody(Tagged<Map> map, int start_offset,
bool is_slack_tracking_in_progress,
NewJSObjectType new_js_object_type);
bool ReferencesObject(Tagged<Object> obj);
V8_WARN_UNUSED_RESULT static Maybe<bool> TestIntegrityLevel(
Isolate* isolate, DirectHandle<JSObject> object, IntegrityLevel lvl);
V8_WARN_UNUSED_RESULT static Maybe<bool> PreventExtensions(
Isolate* isolate, DirectHandle<JSObject> object,
ShouldThrow should_throw);
static bool IsExtensible(Isolate* isolate, DirectHandle<JSObject> object);
static MaybeDirectHandle<Object> ReadFromOptionsBag(
DirectHandle<Object> options, DirectHandle<String> option_name,
Isolate* isolate);
void JSObjectShortPrint(StringStream* accumulator);
DECL_PRINTER(JSObject)
DECL_VERIFIER(JSObject)
#ifdef OBJECT_PRINT
bool PrintProperties(std::ostream& os);
void PrintElements(std::ostream& os);
#endif
#if defined(DEBUG) || defined(OBJECT_PRINT)
void PrintTransitions(std::ostream& os);
#endif
static void PrintElementsTransition(
FILE* file, DirectHandle<JSObject> object, ElementsKind from_kind,
DirectHandle<FixedArrayBase> from_elements, ElementsKind to_kind,
DirectHandle<FixedArrayBase> to_elements);
void PrintInstanceMigration(FILE* file, Tagged<Map> original_map,
Tagged<Map> new_map);
#ifdef DEBUG
class SpillInformation {
public:
void Clear();
void Print();
int number_of_objects_;
int number_of_objects_with_fast_properties_;
int number_of_objects_with_fast_elements_;
int number_of_fast_used_fields_;
int number_of_fast_unused_fields_;
int number_of_slow_used_properties_;
int number_of_slow_unused_properties_;
int number_of_fast_used_elements_;
int number_of_fast_unused_elements_;
int number_of_slow_used_elements_;
int number_of_slow_unused_elements_;
};
void IncrementSpillStatistics(Isolate* isolate, SpillInformation* info);
#endif
#ifdef VERIFY_HEAP
V8_EXPORT_PRIVATE bool ElementsAreSafeToExamine(
PtrComprCageBase cage_base) const;
#endif
Tagged<Object> SlowReverseLookup(Tagged<Object> value);
static constexpr uint32_t kMaxElementCount = kMaxUInt32;
static constexpr uint32_t kMaxElementIndex = kMaxElementCount - 1;
static const uint32_t kMaxGap = 1024;
static const int kMaxUncheckedFastElementsLength = 5000;
static const int kMaxUncheckedOldFastElementsLength = 500;
static const int kInitialGlobalObjectUnusedPropertiesCount = 4;
static const int kMaxInstanceSize = 255 * kTaggedSize;
static_assert((kMaxInstanceSize >> kTaggedSizeLog2) <= kMaxUInt8);
static const int kMapCacheSize = 128;
static const int kFieldsAdded = 3;
static_assert(kMaxNumberOfDescriptors + kFieldsAdded <=
PropertyArray::kMaxLength);
static_assert(kHeaderSize == Internals::kJSObjectHeaderSize);
static const int kMaxInObjectProperties =
(kMaxInstanceSize - kHeaderSize) >> kTaggedSizeLog2;
static_assert(kMaxInObjectProperties <= kMaxNumberOfDescriptors);
static const int kMaxFirstInobjectPropertyOffset =
(1 << kFirstInobjectPropertyOffsetBitCount) - 1;
static const int kMaxEmbedderFields =
(kMaxFirstInobjectPropertyOffset - kHeaderSize) / kEmbedderDataSlotSize;
static_assert(kHeaderSize +
kMaxEmbedderFields * kEmbedderDataSlotSizeInTaggedSlots <=
kMaxInstanceSize);
static constexpr int kMaxJSApiObjectInObjectProperties =
(kMaxInstanceSize - kHeaderSize - kCppHeapPointerSlotSize) >>
kTaggedSizeLog2;
static constexpr int kMaxJSApiObjectEmbedderFields =
(kMaxFirstInobjectPropertyOffset - kHeaderSize -
kCppHeapPointerSlotSize) /
kEmbedderDataSlotSize;
class BodyDescriptor;
class FastBodyDescriptor;
int GetFastElementsUsage();
template <typename Dictionary>
static void ApplyAttributesToDictionary(Isolate* isolate, ReadOnlyRoots roots,
DirectHandle<Dictionary> dictionary,
const PropertyAttributes attributes);
private:
friend class JSReceiver;
friend class Object;
V8_WARN_UNUSED_RESULT static MaybeHandle<JSAny>
GetPropertyWithFailedAccessCheck(LookupIterator* it);
V8_WARN_UNUSED_RESULT static Maybe<bool> SetPropertyWithFailedAccessCheck(
LookupIterator* it, DirectHandle<Object> value,
Maybe<ShouldThrow> should_throw);
V8_WARN_UNUSED_RESULT static Maybe<InterceptorResult>
DeletePropertyWithInterceptor(LookupIterator* it, ShouldThrow should_throw);
bool ReferencesObjectFromElements(Tagged<FixedArray> elements,
ElementsKind kind, Tagged<Object> object);
template <PropertyAttributes attrs>
V8_WARN_UNUSED_RESULT static Maybe<bool> PreventExtensionsWithTransition(
Isolate* isolate, DirectHandle<JSObject> object,
ShouldThrow should_throw);
inline Tagged<Object> RawFastPropertyAtCompareAndSwapInternal(
FieldIndex index, Tagged<Object> expected, Tagged<Object> value,
SeqCstAccessTag tag);
TQ_OBJECT_CONSTRUCTORS(JSObject)
};
class JSExternalObject
: public TorqueGeneratedJSExternalObject<JSExternalObject, JSObject> {
public:
inline void* value(ExternalPointerTagRange tag_range) const;
inline void* value(IsolateForSandbox isolate,
ExternalPointerTagRange tag_range) const;
inline void init_value(IsolateForSandbox isolate, ExternalPointerTag tag,
void* initial_value);
inline void set_value(IsolateForSandbox isolate, ExternalPointerTag tag,
void* value);
static constexpr int kEndOfTaggedFieldsOffset = JSObject::kHeaderSize;
DECL_PRINTER(JSExternalObject)
class BodyDescriptor;
private:
TQ_OBJECT_CONSTRUCTORS(JSExternalObject)
};
class JSObjectWithEmbedderSlots
: public TorqueGeneratedJSObjectWithEmbedderSlots<JSObjectWithEmbedderSlots,
JSObject> {
public:
static_assert(kHeaderSize == JSObject::kHeaderSize);
TQ_OBJECT_CONSTRUCTORS(JSObjectWithEmbedderSlots)
};
class JSAPIObjectWithEmbedderSlots
: public TorqueGeneratedJSAPIObjectWithEmbedderSlots<
JSAPIObjectWithEmbedderSlots, JSObject> {
public:
class BodyDescriptor;
TQ_OBJECT_CONSTRUCTORS(JSAPIObjectWithEmbedderSlots)
};
class JSCustomElementsObject
: public TorqueGeneratedJSCustomElementsObject<JSCustomElementsObject,
JSObject> {
public:
static_assert(kHeaderSize == JSObject::kHeaderSize);
TQ_OBJECT_CONSTRUCTORS(JSCustomElementsObject)
};
class JSSpecialObject
: public TorqueGeneratedJSSpecialObject<JSSpecialObject,
JSCustomElementsObject> {
public:
TQ_OBJECT_CONSTRUCTORS(JSSpecialObject)
};
class JSAccessorPropertyDescriptor : public JSObject {
public:
#define JS_ACCESSOR_PROPERTY_DESCRIPTOR_FIELDS(V) \
V(kGetOffset, kTaggedSize) \
V(kSetOffset, kTaggedSize) \
V(kEnumerableOffset, kTaggedSize) \
V(kConfigurableOffset, kTaggedSize) \
\
V(kSize, 0)
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize,
JS_ACCESSOR_PROPERTY_DESCRIPTOR_FIELDS)
#undef JS_ACCESSOR_PROPERTY_DESCRIPTOR_FIELDS
static const int kGetIndex = 0;
static const int kSetIndex = 1;
static const int kEnumerableIndex = 2;
static const int kConfigurableIndex = 3;
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(JSAccessorPropertyDescriptor);
};
class JSDataPropertyDescriptor : public JSObject {
public:
#define JS_DATA_PROPERTY_DESCRIPTOR_FIELDS(V) \
V(kValueOffset, kTaggedSize) \
V(kWritableOffset, kTaggedSize) \
V(kEnumerableOffset, kTaggedSize) \
V(kConfigurableOffset, kTaggedSize) \
\
V(kSize, 0)
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize,
JS_DATA_PROPERTY_DESCRIPTOR_FIELDS)
#undef JS_DATA_PROPERTY_DESCRIPTOR_FIELDS
static const int kValueIndex = 0;
static const int kWritableIndex = 1;
static const int kEnumerableIndex = 2;
static const int kConfigurableIndex = 3;
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(JSDataPropertyDescriptor);
};
class JSIteratorResult : public JSObject {
public:
DECL_ACCESSORS(value, Tagged<Object>)
DECL_ACCESSORS(done, Tagged<Object>)
#define JS_ITERATOR_RESULT_FIELDS(V) \
V(kValueOffset, kTaggedSize) \
V(kDoneOffset, kTaggedSize) \
\
V(kSize, 0)
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize,
JS_ITERATOR_RESULT_FIELDS)
#undef JS_ITERATOR_RESULT_FIELDS
static const int kValueIndex = 0;
static const int kDoneIndex = 1;
OBJECT_CONSTRUCTORS(JSIteratorResult, JSObject);
};
class JSGlobalProxy
: public TorqueGeneratedJSGlobalProxy<JSGlobalProxy, JSSpecialObject> {
public:
inline bool IsDetachedFrom(Tagged<JSGlobalObject> global) const;
V8_EXPORT_PRIVATE bool IsDetached();
static int SizeWithEmbedderFields(int embedder_field_count);
DECL_PRINTER(JSGlobalProxy)
DECL_VERIFIER(JSGlobalProxy)
TQ_OBJECT_CONSTRUCTORS(JSGlobalProxy)
};
class JSGlobalObject
: public TorqueGeneratedJSGlobalObject<JSGlobalObject, JSSpecialObject> {
public:
DECL_RELEASE_ACQUIRE_ACCESSORS(global_dictionary, Tagged<GlobalDictionary>)
static void InvalidatePropertyCell(DirectHandle<JSGlobalObject> object,
DirectHandle<Name> name);
inline bool IsDetached();
inline Tagged<NativeContext> native_context();
DECL_PRINTER(JSGlobalObject)
DECL_VERIFIER(JSGlobalObject)
TQ_OBJECT_CONSTRUCTORS(JSGlobalObject)
};
class JSPrimitiveWrapper
: public TorqueGeneratedJSPrimitiveWrapper<JSPrimitiveWrapper,
JSCustomElementsObject> {
public:
DECL_PRINTER(JSPrimitiveWrapper)
TQ_OBJECT_CONSTRUCTORS(JSPrimitiveWrapper)
};
class DateCache;
class JSDate : public TorqueGeneratedJSDate<JSDate, JSObject> {
public:
static V8_WARN_UNUSED_RESULT MaybeDirectHandle<JSDate> New(
Isolate* isolate, DirectHandle<JSFunction> constructor,
DirectHandle<JSReceiver> new_target, double tv);
static int64_t CurrentTimeValue(Isolate* isolate);
static Address GetField(Isolate* isolate, Address raw_date,
Address smi_index);
void SetValue(Isolate* isolate, double v);
void SetNanValue();
void UpdateFieldsAfterDeserialization(Isolate* isolate);
DECL_PRINTER(JSDate)
DECL_VERIFIER(JSDate)
enum FieldIndex {
kYear,
kMonth,
kDay,
kWeekday,
kHour,
kMinute,
kSecond,
kFirstUncachedField,
kMillisecond = kFirstUncachedField,
kDays,
kTimeInDay,
kFirstUTCField,
kYearUTC = kFirstUTCField,
kMonthUTC,
kDayUTC,
kWeekdayUTC,
kHourUTC,
kMinuteUTC,
kSecondUTC,
kMillisecondUTC,
kDaysUTC,
kTimeInDayUTC,
kTimezoneOffset
};
class BodyDescriptor;
private:
Tagged<Object> DoGetField(Isolate* isolate, FieldIndex index);
Tagged<Object> GetUTCField(FieldIndex index, double value,
DateCache* date_cache);
inline void SetCachedFields(Isolate* isolate, int64_t local_time_ms,
DateCache* date_cache);
TQ_OBJECT_CONSTRUCTORS(JSDate)
};
class JSMessageObject
: public TorqueGeneratedJSMessageObject<JSMessageObject, JSObject> {
public:
inline MessageTemplate type() const;
inline void set_type(MessageTemplate value);
static inline void EnsureSourcePositionsAvailable(
Isolate* isolate, DirectHandle<JSMessageObject> message);
inline int GetStartPosition() const;
inline int GetEndPosition() const;
V8_EXPORT_PRIVATE int GetLineNumber() const;
V8_EXPORT_PRIVATE int GetColumnNumber() const;
V8_EXPORT_PRIVATE Tagged<String> GetSource() const;
DirectHandle<String> GetSourceLine() const;
DECL_INT_ACCESSORS(error_level)
DECL_PRINTER(JSMessageObject)
static const int kPointerFieldsEndOffset = kStartPositionOffset;
using BodyDescriptor =
FixedBodyDescriptor<HeapObject::kMapOffset, kPointerFieldsEndOffset,
kHeaderSize>;
private:
friend class Factory;
inline bool DidEnsureSourcePositionsAvailable() const;
static void V8_PRESERVE_MOST V8_EXPORT_PRIVATE InitializeSourcePositions(
Isolate* isolate, DirectHandle<JSMessageObject> message);
DECL_ACCESSORS(shared_info, Tagged<Object>)
DECL_ACCESSORS(bytecode_offset, Tagged<Smi>)
DECL_INT_ACCESSORS(start_position)
DECL_INT_ACCESSORS(end_position)
DECL_INT_ACCESSORS(raw_type)
DECL_INT_ACCESSORS(message_type)
TQ_OBJECT_CONSTRUCTORS(JSMessageObject)
};
class JSAsyncFromSyncIterator
: public TorqueGeneratedJSAsyncFromSyncIterator<JSAsyncFromSyncIterator,
JSObject> {
public:
DECL_PRINTER(JSAsyncFromSyncIterator)
TQ_OBJECT_CONSTRUCTORS(JSAsyncFromSyncIterator)
};
class JSStringIterator
: public TorqueGeneratedJSStringIterator<JSStringIterator, JSObject> {
public:
DECL_PRINTER(JSStringIterator)
DECL_VERIFIER(JSStringIterator)
TQ_OBJECT_CONSTRUCTORS(JSStringIterator)
};
class JSValidIteratorWrapper
: public TorqueGeneratedJSValidIteratorWrapper<JSValidIteratorWrapper,
JSObject> {
public:
DECL_PRINTER(JSValidIteratorWrapper)
TQ_OBJECT_CONSTRUCTORS(JSValidIteratorWrapper)
};
class JSPromiseWithResolversResult : public JSObject {
public:
DECL_ACCESSORS(promise, Tagged<Object>)
DECL_ACCESSORS(resolve, Tagged<Object>)
DECL_ACCESSORS(reject, Tagged<Object>)
#define JS_PROMISE_WITHRESOLVERS_RESULT_FIELDS(V) \
V(kPromiseOffset, kTaggedSize) \
V(kResolveOffset, kTaggedSize) \
V(kRejectOffset, kTaggedSize) \
\
V(kSize, 0)
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize,
JS_PROMISE_WITHRESOLVERS_RESULT_FIELDS)
#undef JS_PROMISE_WITHRESOLVERS_RESULT_FIELDS
static const int kPromiseIndex = 0;
static const int kResolveIndex = 1;
static const int kRejectIndex = 2;
OBJECT_CONSTRUCTORS(JSPromiseWithResolversResult, JSObject);
};
class JSUint8ArraySetFromResult : public JSObject {
public:
DECL_ACCESSORS(read, Tagged<Object>)
DECL_ACCESSORS(written, Tagged<Object>)
#define JS_UINT8_ARRAY_SET_FROM_RESULT_FIELDS(V) \
V(kReadOffset, kTaggedSize) \
V(kWrittenOffset, kTaggedSize) \
\
V(kSize, 0)
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize,
JS_UINT8_ARRAY_SET_FROM_RESULT_FIELDS)
#undef JS_UINT8_ARRAY_SET_FROM_RESULT_FIELDS
static const int kReadIndex = 0;
static const int kWrittenIndex = 1;
OBJECT_CONSTRUCTORS(JSUint8ArraySetFromResult, JSObject);
};
}
#include "src/objects/object-macros-undef.h"
#endif