v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::JSDataPropertyDescriptor Class Referenceabstract

#include <js-objects.h>

Inheritance diagram for v8::internal::JSDataPropertyDescriptor:
Collaboration diagram for v8::internal::JSDataPropertyDescriptor:

Public Member Functions

 DEFINE_FIELD_OFFSET_CONSTANTS (JSObject::kHeaderSize, JS_DATA_PROPERTY_DESCRIPTOR_FIELDS) static const int kValueIndex=0
 
- Public Member Functions inherited from v8::internal::JSObject
Tagged< FixedArrayBaseelements (PtrComprCageBase cage_base, AcquireLoadTag tag) const =delete
 
void set_elements (Tagged< FixedArrayBase > value, ReleaseStoreTag tag, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)=delete
 
void initialize_elements ()
 
bool HasEnumerableElements ()
 
bool WouldConvertToSlowElements (uint32_t index)
 
bool MayHaveEmbedderFields () const
 
int GetEmbedderFieldsStartOffset ()
 
int GetEmbedderFieldCount () const
 
int GetEmbedderFieldOffset (int index)
 
Tagged< ObjectGetEmbedderField (int index)
 
void SetEmbedderField (int index, Tagged< Object > value)
 
void SetEmbedderField (int index, Tagged< Smi > value)
 
bool IsDroppableApiObject () const
 
void RequireSlowElements (Tagged< NumberDictionary > dictionary)
 
Tagged< JSAnyRawFastPropertyAt (FieldIndex index) const
 
Tagged< JSAnyRawFastPropertyAt (PtrComprCageBase cage_base, FieldIndex index) const
 
Tagged< JSAnyRawFastPropertyAt (FieldIndex index, SeqCstAccessTag tag) const
 
Tagged< JSAnyRawFastPropertyAt (PtrComprCageBase cage_base, FieldIndex index, SeqCstAccessTag tag) const
 
std::optional< Tagged< Object > > RawInobjectPropertyAt (PtrComprCageBase cage_base, Tagged< Map > original_map, FieldIndex index) const
 
void FastPropertyAtPut (FieldIndex index, Tagged< Object > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
 
void FastPropertyAtPut (FieldIndex index, Tagged< Object > value, SeqCstAccessTag tag)
 
void RawFastInobjectPropertyAtPut (FieldIndex index, Tagged< Object > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
 
void RawFastInobjectPropertyAtPut (FieldIndex index, Tagged< Object > value, SeqCstAccessTag tag)
 
void WriteToField (InternalIndex descriptor, PropertyDetails details, Tagged< Object > value)
 
Tagged< ObjectRawFastInobjectPropertyAtSwap (FieldIndex index, Tagged< Object > value, SeqCstAccessTag tag)
 
Tagged< ObjectRawFastPropertyAtSwap (FieldIndex index, Tagged< Object > value, SeqCstAccessTag tag)
 
Tagged< ObjectRawFastPropertyAtCompareAndSwap (FieldIndex index, Tagged< Object > expected, Tagged< Object > value, SeqCstAccessTag tag)
 
Tagged< ObjectRawFastInobjectPropertyAtCompareAndSwap (FieldIndex index, Tagged< Object > expected, Tagged< Object > value, SeqCstAccessTag tag)
 
int GetInObjectPropertyOffset (int index)
 
Tagged< ObjectInObjectPropertyAt (int index)
 
Tagged< ObjectInObjectPropertyAtPut (int index, Tagged< Object > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
 
void InitializeBody (Tagged< Map > map, int start_offset, bool is_slack_tracking_in_progress, MapWord filler_map, Tagged< Object > undefined_value)
 
bool ReferencesObject (Tagged< Object > obj)
 
void JSObjectShortPrint (StringStream *accumulator)
 
void PrintInstanceMigration (FILE *file, Tagged< Map > original_map, Tagged< Map > new_map)
 
Tagged< ObjectSlowReverseLookup (Tagged< Object > value)
 
int GetFastElementsUsage ()
 
template<typename T , template< typename > typename HandleType>
requires (std::is_convertible_v<HandleType<T>, DirectHandle<T>>)
HandleType< Object >::MaybeType DefineOwnPropertyIgnoreAttributes (LookupIterator *it, HandleType< T > value, PropertyAttributes attributes, AccessorInfoHandling handling, EnforceDefineSemantics semantics)
 
template<PropertyAttributes attrs>
Maybe< boolPreventExtensionsWithTransition (Isolate *isolate, DirectHandle< JSObject > object, ShouldThrow should_throw)
 

Static Public Attributes

static const int kWritableIndex = 1
 
static const int kEnumerableIndex = 2
 
static const int kConfigurableIndex = 3
 
- Static Public Attributes inherited from v8::internal::JSObject
static const uint32_t kMinAddedElementsCapacity = 16
 
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 const int kMapCacheSize = 128
 
static const int kFieldsAdded = 3
 
static const int kMaxInObjectProperties
 
static const int kMaxFirstInobjectPropertyOffset
 
static const int kMaxEmbedderFields
 
static constexpr int kMaxJSApiObjectInObjectProperties
 
static constexpr int kMaxJSApiObjectEmbedderFields
 

Private Member Functions

 DISALLOW_IMPLICIT_CONSTRUCTORS (JSDataPropertyDescriptor)
 

Additional Inherited Members

- Public Types inherited from v8::internal::JSObject
enum  AccessorInfoHandling { FORCE_FIELD , DONT_FORCE_FIELD }
 
- Static Public Member Functions inherited from v8::internal::JSObject
static bool IsUnmodifiedApiObject (FullObjectSlot o)
 
static V8_EXPORT_PRIVATE V8_WARN_UNUSED_RESULT MaybeHandle< JSObjectNew (DirectHandle< JSFunction > constructor, DirectHandle< JSReceiver > new_target, DirectHandle< AllocationSite > site, NewJSObjectType=NewJSObjectType::kNoAPIWrapper)
 
static MaybeDirectHandle< JSObjectNewWithMap (Isolate *isolate, DirectHandle< Map > initial_map, DirectHandle< AllocationSite > site, NewJSObjectType=NewJSObjectType::kNoAPIWrapper)
 
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< JSObjectObjectCreate (Isolate *isolate, DirectHandle< JSPrototype > prototype)
 
static void SetMapAndElements (DirectHandle< JSObject > object, DirectHandle< Map > map, DirectHandle< FixedArrayBase > elements)
 
static void EnsureWritableFastElements (DirectHandle< JSObject > object)
 
static V8_WARN_UNUSED_RESULT Maybe< InterceptorResultSetPropertyWithInterceptor (LookupIterator *it, Maybe< ShouldThrow > should_throw, DirectHandle< Object > value)
 
template<typename T , template< typename > typename HandleType>
requires (std::is_convertible_v<HandleType<T>, DirectHandle<T>>)
static V8_WARN_UNUSED_RESULT HandleType< Object >::MaybeType DefineOwnPropertyIgnoreAttributes (LookupIterator *it, HandleType< T > value, PropertyAttributes attributes, AccessorInfoHandling handling=DONT_FORCE_FIELD, EnforceDefineSemantics semantics=EnforceDefineSemantics::kSet)
 
static V8_WARN_UNUSED_RESULT Maybe< boolDefineOwnPropertyIgnoreAttributes (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)
 
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< Object > V8_EXPORT_PRIVATE SetOwnPropertyIgnoreAttributes (DirectHandle< JSObject > object, DirectHandle< Name > name, DirectHandle< Object > value, PropertyAttributes attributes)
 
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< ObjectSetOwnElementIgnoreAttributes (DirectHandle< JSObject > object, size_t index, DirectHandle< Object > value, PropertyAttributes attributes)
 
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT MaybeDirectHandle< ObjectDefinePropertyOrElementIgnoreAttributes (DirectHandle< JSObject > object, DirectHandle< Name > name, DirectHandle< Object > value, PropertyAttributes attributes=NONE)
 
static V8_WARN_UNUSED_RESULT Maybe< boolCreateDataProperty (Isolate *isolate, DirectHandle< JSObject > object, PropertyKey key, DirectHandle< Object > value, Maybe< ShouldThrow > should_throw=Just(kDontThrow))
 
static V8_EXPORT_PRIVATE 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)
 
static V8_EXPORT_PRIVATE Maybe< boolAddDataElement (DirectHandle< JSObject > receiver, uint32_t index, DirectHandle< Object > value, PropertyAttributes attributes)
 
static void AllocateStorageForMap (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< MapInvalidatePrototypeChains (Tagged< Map > map)
 
static void InvalidatePrototypeValidityCell (Tagged< JSGlobalObject > global)
 
static void NotifyMapChange (DirectHandle< Map > old_map, DirectHandle< Map > new_map, Isolate *isolate)
 
static bool PrototypeHasNoElements (Isolate *isolate, Tagged< JSObject > object)
 
static void PrototypeRegistryCompactionCallback (Tagged< HeapObject > value, int old_index, int new_index)
 
static V8_WARN_UNUSED_RESULT Maybe< PropertyAttributesGetPropertyAttributesWithInterceptor (LookupIterator *it)
 
static V8_WARN_UNUSED_RESULT Maybe< PropertyAttributesGetPropertyAttributesWithFailedAccessCheck (LookupIterator *it)
 
static V8_EXPORT_PRIVATE MaybeDirectHandle< ObjectDefineOwnAccessorIgnoreAttributes (DirectHandle< JSObject > object, DirectHandle< Name > name, DirectHandle< Object > getter, DirectHandle< Object > setter, PropertyAttributes attributes)
 
static MaybeDirectHandle< ObjectDefineOwnAccessorIgnoreAttributes (LookupIterator *it, DirectHandle< Object > getter, DirectHandle< Object > setter, PropertyAttributes attributes)
 
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< ObjectSetAccessor (DirectHandle< JSObject > object, DirectHandle< Name > name, DirectHandle< AccessorInfo > info, PropertyAttributes attributes)
 
static V8_WARN_UNUSED_RESULT Maybe< boolCheckIfCanDefineAsConfigurable (Isolate *isolate, LookupIterator *it, DirectHandle< Object > value, Maybe< ShouldThrow > should_throw)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< JSAnyGetPropertyWithInterceptor (LookupIterator *it, bool *done)
 
static void ValidateElements (Tagged< JSObject > object)
 
static void EnsureCanContainHeapObjectElements (DirectHandle< JSObject > obj)
 
template<typename TSlot >
static void EnsureCanContainElements (DirectHandle< JSObject > object, TSlot elements, uint32_t count, EnsureElementsMode mode)
 
static void EnsureCanContainElements (DirectHandle< JSObject > object, DirectHandle< FixedArrayBase > elements, uint32_t length, EnsureElementsMode mode)
 
static void EnsureCanContainElements (DirectHandle< JSObject > object, JavaScriptArguments *arguments, uint32_t arg_count, EnsureElementsMode mode)
 
static constexpr uint32_t NewElementsCapacity (uint32_t old_capacity)
 
template<AllocationSiteUpdateMode update_or_check = AllocationSiteUpdateMode::kUpdate>
static bool UpdateAllocationSite (DirectHandle< JSObject > object, ElementsKind to_kind)
 
static V8_WARN_UNUSED_RESULT Maybe< boolHasRealNamedProperty (Isolate *isolate, DirectHandle< JSObject > object, DirectHandle< Name > name)
 
static V8_WARN_UNUSED_RESULT Maybe< boolHasRealElementProperty (Isolate *isolate, DirectHandle< JSObject > object, uint32_t index)
 
static V8_WARN_UNUSED_RESULT Maybe< boolHasRealNamedCallbackProperty (Isolate *isolate, DirectHandle< JSObject > object, DirectHandle< Name > name)
 
static V8_EXPORT_PRIVATE int GetHeaderSize (InstanceType instance_type, bool function_has_prototype_slot=false)
 
static int GetHeaderSize (Tagged< Map > map)
 
static bool MayHaveEmbedderFields (Tagged< Map > map)
 
static int GetEmbedderFieldsStartOffset (Tagged< Map > map)
 
static int GetEmbedderFieldCount (Tagged< Map > map)
 
static bool IsDroppableApiObject (Tagged< Map >)
 
static DirectHandle< MapGetElementsTransitionMap (DirectHandle< JSObject > object, ElementsKind to_kind)
 
static V8_EXPORT_PRIVATE void TransitionElementsKind (DirectHandle< JSObject > object, ElementsKind to_kind)
 
static V8_EXPORT_PRIVATE 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)
 
static V8_EXPORT_PRIVATE void NormalizeProperties (Isolate *isolate, DirectHandle< JSObject > object, PropertyNormalizationMode mode, int expected_additional_properties, bool use_cache, const char *reason)
 
static V8_EXPORT_PRIVATE void NormalizeProperties (Isolate *isolate, DirectHandle< JSObject > object, PropertyNormalizationMode mode, int expected_additional_properties, const char *reason)
 
static V8_EXPORT_PRIVATE DirectHandle< NumberDictionaryNormalizeElements (DirectHandle< JSObject > object)
 
static V8_EXPORT_PRIVATE void MigrateSlowToFast (DirectHandle< JSObject > object, int unused_property_fields, const char *reason)
 
static Handle< ObjectDictionaryPropertyAt (Isolate *isolate, DirectHandle< JSObject > object, InternalIndex dict_index)
 
static std::optional< Tagged< Object > > DictionaryPropertyAt (DirectHandle< JSObject > object, InternalIndex dict_index, Heap *heap)
 
static Handle< JSAnyFastPropertyAt (Isolate *isolate, DirectHandle< JSObject > object, Representation representation, FieldIndex index)
 
static DirectHandle< JSAnyFastPropertyAt (Isolate *isolate, DirectHandle< JSObject > object, Representation representation, FieldIndex index, SeqCstAccessTag tag)
 
static V8_WARN_UNUSED_RESULT Maybe< boolSetPrototype (Isolate *isolate, DirectHandle< JSObject > object, DirectHandle< Object > value, bool from_javascript, ShouldThrow should_throw)
 
static void SetImmutableProto (Isolate *isolate, DirectHandle< JSObject > object)
 
static V8_WARN_UNUSED_RESULT Maybe< boolTestIntegrityLevel (Isolate *isolate, DirectHandle< JSObject > object, IntegrityLevel lvl)
 
static V8_WARN_UNUSED_RESULT Maybe< boolPreventExtensions (Isolate *isolate, DirectHandle< JSObject > object, ShouldThrow should_throw)
 
static bool IsExtensible (Isolate *isolate, DirectHandle< JSObject > object)
 
static MaybeDirectHandle< ObjectReadFromOptionsBag (DirectHandle< Object > options, DirectHandle< String > option_name, Isolate *isolate)
 
static void PrintElementsTransition (FILE *file, DirectHandle< JSObject > object, ElementsKind from_kind, DirectHandle< FixedArrayBase > from_elements, ElementsKind to_kind, DirectHandle< FixedArrayBase > to_elements)
 
template<typename Dictionary >
static void ApplyAttributesToDictionary (Isolate *isolate, ReadOnlyRoots roots, DirectHandle< Dictionary > dictionary, const PropertyAttributes attributes)
 

Detailed Description

Definition at line 1143 of file js-objects.h.

Member Function Documentation

◆ DEFINE_FIELD_OFFSET_CONSTANTS()

v8::internal::JSDataPropertyDescriptor::DEFINE_FIELD_OFFSET_CONSTANTS ( JSObject::kHeaderSize ,
JS_DATA_PROPERTY_DESCRIPTOR_FIELDS  ) const
pure virtual

◆ DISALLOW_IMPLICIT_CONSTRUCTORS()

v8::internal::JSDataPropertyDescriptor::DISALLOW_IMPLICIT_CONSTRUCTORS ( JSDataPropertyDescriptor )
private

Member Data Documentation

◆ kConfigurableIndex

const int v8::internal::JSDataPropertyDescriptor::kConfigurableIndex = 3
static

Definition at line 1162 of file js-objects.h.

◆ kEnumerableIndex

const int v8::internal::JSDataPropertyDescriptor::kEnumerableIndex = 2
static

Definition at line 1161 of file js-objects.h.

◆ kWritableIndex

const int v8::internal::JSDataPropertyDescriptor::kWritableIndex = 1
static

Definition at line 1160 of file js-objects.h.


The documentation for this class was generated from the following file: