32#define RETURN_NOTHING_IF_NOT_SUCCESSFUL(call) \
34 if (!(call)) return Nothing<bool>(); \
37#define RETURN_FAILURE_IF_NOT_SUCCESSFUL(call) \
39 ExceptionStatus status_enum_result = (call); \
40 if (!status_enum_result) return status_enum_result; \
45static bool ContainsOnlyValidKeys(DirectHandle<FixedArray> array) {
47 for (
int i = 0;
i < len;
i++) {
49 if (!(IsName(e) ||
IsNumber(e)))
return false;
55 DirectHandle<DescriptorArray> descs,
int nof_descriptors,
57 for (InternalIndex
i : InternalIndex::Range(nof_descriptors)) {
58 if (descs->GetKey(
i) ==
key)
return 0;
60 combined_keys->set(target,
key);
68 bool may_have_elements) {
69 int prototype_chain_keys_length = prototype_chain_keys->length();
70 if (prototype_chain_keys_length == 0)
return own_keys;
73 int nof_descriptors = map->NumberOfOwnDescriptors();
74 if (nof_descriptors == 0 && !may_have_elements)
return prototype_chain_keys;
76 DirectHandle<DescriptorArray> descs(map->instance_descriptors(isolate),
78 int own_keys_length = own_keys.is_null() ? 0 : own_keys->length();
80 own_keys_length + prototype_chain_keys_length);
81 if (own_keys_length != 0) {
85 int target_keys_length = own_keys_length;
86 for (
int i = 0;
i < prototype_chain_keys_length;
i++) {
87 target_keys_length += AddKey(prototype_chain_keys->get(
i), combined_keys,
88 descs, nof_descriptors, target_keys_length);
103 return accumulator.
GetKeys(keys_conversion);
107 if (
keys_.is_null()) {
110 USE(ContainsOnlyValidKeys);
117 ->set_prototype_chain_enum_cache(*
result);
140 }
else if (IsSymbol(*
key)) {
148 if (
keys_.is_null()) {
159 if (!new_set_candidate.
ToHandle(&new_set)) {
164 isolate_, NewRangeError(MessageTemplate::kTooManyProperties),
167 if (*new_set != *
keys_) {
179 int add_length = array->length();
180 for (
int i = 0;
i < add_length;
i++) {
189 DCHECK(IsJSArray(*array_like) || array_like->HasSloppyArgumentsElements());
204 int store_position = 0;
205 for (
int i = 0;
i < keys->
length(); ++
i) {
210 if (
key->AsArrayIndex(&index))
continue;
218 if (!desc.enumerable()) {
224 if (store_position !=
i) {
225 keys->set(store_position, *
key);
272 if (IsJSProxy(*current)) {
277 NewTypeError(MessageTemplate::kWasmObjectsAreOpaque));
283 DCHECK(IsJSObject(*current));
287 if (!
result.FromJust())
break;
290 if (!iter.AdvanceFollowingProxiesIgnoringAccessChecks()) {
327 if (!map->OnlyHasSimpleProperties())
return;
328 DCHECK(IsJSObjectMap(map));
329 if (map->NumberOfEnumerableProperties() > 0)
return;
330 map->SetEnumLength(0);
335 TrySettingEmptyEnumCache(
object);
337 if (object->map()->EnumLength() != 0)
return false;
338 DCHECK(IsJSObject(
object));
363 bool has_no_properties = CheckAndInitializeEmptyEnumCache(current);
364 if (has_no_properties)
continue;
375 }
else if (!last_prototype.
is_null()) {
385 if (array->length() == length)
return array;
386 return isolate->factory()->CopyFixedArrayUpTo(array, length);
392 DirectHandle<JSObject>
object) {
393 DirectHandle<Map>
map(object->map(), isolate);
395 map->instance_descriptors(isolate)->enum_cache()->keys(), isolate);
399 int enum_length = map->EnumLength();
401 DCHECK(map->OnlyHasSimpleProperties());
403 DCHECK_EQ(enum_length, map->NumberOfEnumerableProperties());
404 isolate->counters()->enum_cache_hits()->Increment();
405 return ReduceFixedArrayTo(isolate, keys, enum_length);
409 enum_length = map->NumberOfEnumerableProperties();
413 if (enum_length <= keys->
length()) {
414 if (map->OnlyHasSimpleProperties()) map->SetEnumLength(enum_length);
415 isolate->counters()->enum_cache_hits()->Increment();
416 return ReduceFixedArrayTo(isolate, keys, enum_length);
423template <
bool fast_properties>
424MaybeHandle<FixedArray> GetOwnKeysWithElements(Isolate* isolate,
425 DirectHandle<JSObject>
object,
429 if (fast_properties) {
430 keys = GetFastEnumPropertyKeys(isolate,
object);
436 MaybeHandle<FixedArray>
result;
440 ElementsAccessor* accessor =
object->GetElementsAccessor(isolate);
441 result = accessor->PrependElementIndices(isolate,
object, keys, convert,
445 if (
v8_flags.trace_for_in_enumerate) {
446 PrintF(
"| strings=%d symbols=0 elements=%u || prototypes>=1 ||\n",
447 keys->length(),
result.ToHandleChecked()->length() - keys->length());
463 if (
GetKeysFast(keys_conversion).ToHandle(&keys)) {
488 if (map->is_dictionary_map()) {
489 return GetOwnKeysWithElements<false>(
isolate_,
object, keys_conversion,
492 int enum_length =
receiver_->map()->EnumLength();
497 if (
v8_flags.trace_for_in_enumerate) {
498 PrintF(
"| strings=%d symbols=0 elements=0 || prototypes>=1 ||\n",
508 return GetOwnKeysWithElements<true>(
isolate_,
object, keys_conversion,
518 DCHECK_EQ(enum_length, map->NumberOfEnumerableProperties());
519 DCHECK(!map->is_dictionary_map());
526 DCHECK_LT(descriptors->enum_cache()->keys()->length(), enum_length);
527 isolate->counters()->enum_cache_misses()->Increment();
531 bool fields_only =
true;
533 isolate->factory()->NewFixedArray(enum_length, allocation);
539 if (IsSymbol(
key))
continue;
540 keys->set(index,
key);
549 indices = isolate->factory()->NewFixedArray(enum_length, allocation);
559 if (IsSymbol(
key))
continue;
570 indices, allocation);
571 if (map->OnlyHasSimpleProperties()) map->SetEnumLength(enum_length);
581 object->elements() !=
586 int number_of_own_descriptors = map->NumberOfOwnDescriptors();
587 if (number_of_own_descriptors == 0) {
588 map->SetEnumLength(0);
611 return accumulator.
GetKeys(keys_conversion);
619 if (
receiver_->map()->is_dictionary_map()) {
620 maybe_own_keys = GetOwnKeysWithElements<false>(
623 maybe_own_keys = GetOwnKeysWithElements<true>(
633 prototype_chain_keys =
636 ->prototype_chain_enum_cache()),
649 prototype_chain_keys = accumulator.
GetKeys(keys_conversion);
662 if (!IsJSObject(
receiver))
return true;
664 if (object->HasEnumerableElements())
return true;
665 if (object->HasIndexedInterceptor())
return true;
673 if (!object->HasFastProperties())
return false;
674 if (object->HasNamedInterceptor())
return false;
675 if (IsAccessCheckNeeded(*
object) &&
681 if (prototype.is_null())
return false;
683 if (!maybe_proto_map->is_prototype_map())
return false;
685 if (!maybe_proto_map->TryGetPrototypeInfo(&prototype_info))
return false;
690 maybe_proto_map->IsPrototypeValidityCellValid() &&
691 IsFixedArray(prototype_info->prototype_chain_enum_cache());
716 attributes =
args.CallIndexedQuery(interceptor, number);
718 CHECK(IsName(*element));
719 attributes =
args.CallNamedQuery(interceptor,
Cast<Name>(element));
743 if (!interceptor->has_enumerator()) {
755 if (IsUndefined(*maybe_result))
return Just(
true);
756 DCHECK(IsJSObject(*maybe_result));
777 if (!object->HasIndexedInterceptor())
return Just(
true);
779 if (!object->HasNamedInterceptor())
return Just(
true);
782 type ==
kIndexed ? object->GetIndexedInterceptor()
783 : object->GetNamedInterceptor(),
800template <
bool skip_symbols>
801std::optional<int> CollectOwnPropertyNamesInternal(
805 int first_skipped = -1;
809 bool is_shadowing_key =
false;
812 if ((
int{details.
attributes()} & filter) != 0) {
814 is_shadowing_key =
true;
821 if (skip_symbols == IsSymbol(
key)) {
822 if (first_skipped == -1) first_skipped =
i.as_int();
827 if (is_shadowing_key) {
829 keys->AddShadowingKey(
key, &allow_gc);
833 return std::optional<int>();
837 return first_skipped;
841template <
typename Dictionary>
842void CommonCopyEnumKeysTo(Isolate* isolate, DirectHandle<Dictionary> dictionary,
843 DirectHandle<FixedArray> storage,
846 int length = storage->length();
848 ReadOnlyRoots roots(isolate);
851 for (InternalIndex
i : dictionary->IterateEntries()) {
853 if (!dictionary->ToKey(roots,
i, &
key))
continue;
854 bool is_shadowing_key =
false;
855 if (IsSymbol(
key))
continue;
856 PropertyDetails details = dictionary->DetailsAt(
i);
857 if (details.IsDontEnum()) {
859 is_shadowing_key =
true;
864 if (is_shadowing_key) {
866 accumulator->AddShadowingKey(
key, &allow_gc);
869 if (Dictionary::kIsOrderedDictionaryType) {
889template <
typename Dictionary>
890void CopyEnumKeysTo(Isolate* isolate, DirectHandle<Dictionary> dictionary,
892 KeyAccumulator* accumulator) {
893 static_assert(!Dictionary::kIsOrderedDictionaryType);
895 CommonCopyEnumKeysTo<Dictionary>(isolate, dictionary, storage, mode,
898 int length = storage->length();
901 Tagged<Dictionary> raw_dictionary = *dictionary;
903 EnumIndexComparator<Dictionary> cmp(raw_dictionary);
906 AtomicSlot
start(storage->RawFieldOfFirstElement());
910 raw_storage->set(
i, raw_dictionary->NameAt(index));
915void CopyEnumKeysTo(Isolate* isolate,
916 DirectHandle<SwissNameDictionary> dictionary,
918 KeyAccumulator* accumulator) {
919 CommonCopyEnumKeysTo<SwissNameDictionary>(isolate, dictionary, storage, mode,
931 DirectHandle<JSObject>
object, Tagged<T> raw_dictionary) {
932 DirectHandle<T> dictionary(raw_dictionary, isolate);
933 if (dictionary->NumberOfElements() == 0) {
934 return isolate->factory()->empty_fixed_array();
936 int length = dictionary->NumberOfEnumerableProperties();
938 CopyEnumKeysTo(isolate, dictionary, storage, mode, accumulator);
944template <
typename Dictionary>
945ExceptionStatus CollectKeysFromDictionary(DirectHandle<Dictionary> dictionary,
946 KeyAccumulator* keys) {
947 Isolate* isolate = keys->isolate();
948 ReadOnlyRoots roots(isolate);
950 DirectHandle<FixedArray> array =
951 isolate->factory()->NewFixedArray(dictionary->NumberOfElements());
958 for (InternalIndex
i : dictionary->IterateEntries()) {
960 Tagged<Dictionary> raw_dictionary = *dictionary;
961 if (!raw_dictionary->ToKey(roots,
i, &
key))
continue;
963 PropertyDetails details = raw_dictionary->DetailsAt(
i);
964 if ((
int{details.attributes()} & filter) != 0) {
967 keys->AddShadowingKey(
key, &gc);
974 if (!Dictionary::kIsOrderedDictionaryType) {
978 EnumIndexComparator<Dictionary> cmp(*dictionary);
981 AtomicSlot
start(array->RawFieldOfFirstElement());
986 bool has_seen_symbol =
false;
987 for (
int i = 0;
i < array_size;
i++) {
991 has_seen_symbol =
true;
995 if (!status)
return status;
997 if (has_seen_symbol) {
998 for (
int i = 0;
i < array_size;
i++) {
1001 if (!IsSymbol(
key))
continue;
1003 if (!status)
return status;
1015 if (object->HasFastProperties()) {
1020 int nof_descriptors = map->NumberOfOwnDescriptors();
1021 if (enum_keys->length() != nof_descriptors) {
1033 }
else if (IsJSGlobalObject(*
object)) {
1034 enum_keys = GetOwnEnumPropertyDictionaryKeys(
1038 enum_keys = GetOwnEnumPropertyDictionaryKeys(
1039 isolate_,
mode_,
this,
object, object->property_dictionary_swiss());
1041 enum_keys = GetOwnEnumPropertyDictionaryKeys(
1042 isolate_,
mode_,
this,
object, object->property_dictionary());
1044 if (IsJSModuleNamespace(*
object)) {
1047 for (
int i = 0, n = enum_keys->length();
i < n; ++
i) {
1058 if (object->HasFastProperties()) {
1059 int limit =
object->map()->NumberOfOwnDescriptors();
1063 std::optional<int> first_symbol =
1064 CollectOwnPropertyNamesInternal<true>(
object,
this, descs, 0, limit);
1067 if (first_symbol.value() != -1) {
1069 object,
this, descs, first_symbol.value(), limit));
1071 }
else if (IsJSGlobalObject(*
object)) {
1092 if (object->HasFastProperties()) {
1093 int limit =
object->map()->NumberOfOwnDescriptors();
1096 CollectOwnPropertyNamesInternal<false>(
object,
this, descs, 0, limit);
1097 }
else if (IsJSGlobalObject(*
object)) {
1129 access_check_info->named_interceptor()),
1141 if (IsAccessCheckNeeded(*
object) &&
1160 if (!access_check_info.
is_null() &&
1183 if (object->HasFastProperties()) {
1184 return GetFastEnumPropertyKeys(isolate,
object);
1185 }
else if (IsJSGlobalObject(*
object)) {
1186 return GetOwnEnumPropertyDictionaryKeys(
1190 return GetOwnEnumPropertyDictionaryKeys(
1192 object->property_dictionary_swiss());
1194 return GetOwnEnumPropertyDictionaryKeys(
1196 object->property_dictionary());
1202class NameComparator {
1206 bool operator()(uint32_t hash1, uint32_t hash2,
1207 const DirectHandle<Name>& key1,
1208 const DirectHandle<Name>& key2)
const {
1238 if (proxy->IsRevoked()) {
1240 MessageTemplate::kProxyRevoked,
isolate_->
factory()->ownKeys_string()));
1277 const int kPresent = 1;
1278 const int kGone = 0;
1279 using ZoneHashMapImpl =
1282 ZoneHashMapImpl unchecked_result_keys(
1283 ZoneHashMapImpl::kDefaultHashMapCapacity, NameComparator(
isolate_),
1285 int unchecked_result_keys_size = 0;
1286 for (
int i = 0;
i < trap_result->length(); ++
i) {
1288 auto entry = unchecked_result_keys.LookupOrInsert(
key,
key->EnsureHash());
1289 if (entry->value != kPresent) {
1290 entry->value = kPresent;
1291 unchecked_result_keys_size++;
1295 MessageTemplate::kProxyOwnKeysDuplicateEntries));
1302 bool extensible_target = maybe_extensible.
FromJust();
1315 int nonconfigurable_keys_length = 0;
1317 for (
int i = 0;
i < target_keys->length(); ++
i) {
1324 if (found.
FromJust() && !desc.configurable()) {
1326 target_nonconfigurable_keys->set(nonconfigurable_keys_length,
1327 target_keys->get(
i));
1328 nonconfigurable_keys_length++;
1339 if (extensible_target && nonconfigurable_keys_length == 0) {
1345 for (
int i = 0;
i < nonconfigurable_keys_length; ++
i) {
1350 auto found = unchecked_result_keys.Lookup(
key,
key->hash());
1351 if (found ==
nullptr || found->value == kGone) {
1353 MessageTemplate::kProxyOwnKeysMissing,
key));
1357 found->value = kGone;
1358 unchecked_result_keys_size--;
1361 if (extensible_target) {
1365 for (
int i = 0;
i < target_configurable_keys->length(); ++
i) {
1367 if (
IsSmi(raw_key))
continue;
1371 auto found = unchecked_result_keys.Lookup(
key,
key->hash());
1372 if (found ==
nullptr || found->value == kGone) {
1374 MessageTemplate::kProxyOwnKeysMissing,
key));
1378 found->value = kGone;
1379 unchecked_result_keys_size--;
1382 if (unchecked_result_keys_size != 0) {
1383 DCHECK_GT(unchecked_result_keys_size, 0);
1385 MessageTemplate::kProxyOwnKeysNonExtensible));
1406#undef RETURN_NOTHING_IF_NOT_SUCCESSFUL
1407#undef RETURN_FAILURE_IF_NOT_SUCCESSFUL
V8_INLINE T FromJust() const &
static Tagged< AccessCheckInfo > Get(Isolate *isolate, DirectHandle< JSObject > receiver)
static void InitializeOrChangeEnumCache(DirectHandle< DescriptorArray > descriptors, Isolate *isolate, DirectHandle< FixedArray > keys, DirectHandle< FixedArray > indices, AllocationType allocation_if_initialize)
V8_INLINE bool is_null() const
virtual Handle< Object > Get(Isolate *isolate, DirectHandle< JSObject > holder, InternalIndex entry)=0
virtual size_t GetCapacity(Tagged< JSObject > holder, Tagged< FixedArrayBase > backing_store)=0
virtual V8_WARN_UNUSED_RESULT ExceptionStatus AddElementsToKeyAccumulator(DirectHandle< JSObject > receiver, KeyAccumulator *accumulator, AddKeyConversion convert)=0
virtual V8_WARN_UNUSED_RESULT ExceptionStatus CollectElementIndices(DirectHandle< JSObject > object, DirectHandle< FixedArrayBase > backing_store, KeyAccumulator *keys)=0
virtual bool HasEntry(Tagged< JSObject > holder, InternalIndex entry)=0
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT MaybeHandle< Object > Call(Isolate *isolate, DirectHandle< Object > callable, DirectHandle< Object > receiver, base::Vector< const DirectHandle< Object > > args)
Handle< Number > NewNumberFromUint(uint32_t value)
Handle< FixedArray > NewFixedArray(int length, AllocationType allocation=AllocationType::kYoung)
Handle< FixedArray > CopyFixedArray(Handle< FixedArray > array)
Handle< FixedArray > CopyFixedArrayUpTo(DirectHandle< FixedArray > array, int new_len, AllocationType allocation=AllocationType::kYoung)
bool try_prototype_info_cache_
static Handle< FixedArray > InitializeFastPropertyEnumCache(Isolate *isolate, DirectHandle< Map > map, int enum_length, AllocationType allocation=AllocationType::kOld)
MaybeHandle< FixedArray > GetKeys(GetKeysConversion convert=GetKeysConversion::kKeepNumbers)
bool only_own_has_simple_elements_
MaybeHandle< FixedArray > GetKeysFast(GetKeysConversion convert)
MaybeHandle< FixedArray > GetOwnKeysWithUninitializedEnumLength()
MaybeHandle< FixedArray > GetKeysSlow(GetKeysConversion convert)
bool TryPrototypeInfoCache(DirectHandle< JSReceiver > receiver)
DirectHandle< Map > first_prototype_map_
DirectHandle< JSReceiver > receiver_
DirectHandle< JSReceiver > last_non_empty_prototype_
DirectHandle< JSReceiver > first_prototype_
bool has_empty_prototype_
bool MayHaveElements(Tagged< JSReceiver > receiver)
MaybeHandle< FixedArray > GetKeysWithPrototypeInfoCache(GetKeysConversion convert)
bool is_receiver_simple_enum_
bool has_prototype_info_cache_
int GetLoadByFieldIndex() const
static FieldIndex ForDetails(Tagged< Map > map, PropertyDetails details)
static HandleType< FixedArray > RightTrimOrEmpty(Isolate *isolate, HandleType< FixedArray > array, int new_length)
void CopyElements(Isolate *isolate, int dst_index, Tagged< FixedArray > src, int src_index, int len, WriteBarrierMode mode)
V8_INLINE bool is_identical_to(const HandleBase &that) const
AccountingAllocator * allocator()
Tagged< Object > Throw(Tagged< Object > exception, MessageLocation *location=nullptr)
Handle< NativeContext > native_context()
v8::internal::Factory * factory()
bool MayAccess(DirectHandle< NativeContext > accessing_context, DirectHandle< JSObject > receiver)
static V8_WARN_UNUSED_RESULT Maybe< bool > GetOwnPropertyDescriptor(Isolate *isolate, DirectHandle< JSProxy > proxy, DirectHandle< Name > name, PropertyDescriptor *desc)
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT Maybe< bool > GetOwnPropertyDescriptor(Isolate *isolate, DirectHandle< JSReceiver > object, DirectHandle< Object > key, PropertyDescriptor *desc)
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< FixedArray > OwnPropertyKeys(Isolate *isolate, DirectHandle< JSReceiver > object)
static V8_WARN_UNUSED_RESULT Maybe< bool > IsExtensible(Isolate *isolate, DirectHandle< JSReceiver > object)
Maybe< bool > CollectOwnPropertyNames(DirectHandle< JSReceiver > receiver, DirectHandle< JSObject > object)
V8_WARN_UNUSED_RESULT ExceptionStatus CollectPrivateNames(DirectHandle< JSReceiver > receiver, DirectHandle< JSObject > object)
V8_WARN_UNUSED_RESULT ExceptionStatus FilterForEnumerableProperties(DirectHandle< JSReceiver > receiver, DirectHandle< JSObject > object, DirectHandle< InterceptorInfo > interceptor, DirectHandle< JSObject > result, IndexedOrNamed type)
Maybe< bool > CollectKeys(DirectHandle< JSReceiver > receiver, DirectHandle< JSReceiver > object)
Maybe< bool > CollectOwnJSProxyTargetKeys(DirectHandle< JSProxy > proxy, DirectHandle< JSReceiver > target)
void AddShadowingKey(Tagged< Object > key, AllowGarbageCollection *allow_gc)
void set_may_have_elements(bool value)
Handle< OrderedHashSet > keys()
V8_WARN_UNUSED_RESULT ExceptionStatus AddKey(Tagged< Object > key, AddKeyConversion convert=DO_NOT_CONVERT)
DirectHandle< JSReceiver > receiver_
void set_try_prototype_info_cache(bool value)
Maybe< bool > CollectInterceptorKeys(DirectHandle< JSReceiver > receiver, DirectHandle< JSObject > object, IndexedOrNamed type)
Handle< ObjectHashSet > shadowing_keys_
void set_receiver(DirectHandle< JSReceiver > object)
void set_last_non_empty_prototype(DirectHandle< JSReceiver > object)
Maybe< bool > CollectOwnJSProxyKeys(DirectHandle< JSReceiver > receiver, DirectHandle< JSProxy > proxy)
void set_is_for_in(bool value)
static MaybeHandle< FixedArray > GetKeys(Isolate *isolate, DirectHandle< JSReceiver > object, KeyCollectionMode mode, PropertyFilter filter, GetKeysConversion keys_conversion=GetKeysConversion::kKeepNumbers, bool is_for_in=false, bool skip_indices=false)
Maybe< bool > CollectOwnKeys(DirectHandle< JSReceiver > receiver, DirectHandle< JSObject > object)
Maybe< bool > CollectAccessCheckInterceptorKeys(DirectHandle< AccessCheckInfo > access_check_info, DirectHandle< JSReceiver > receiver, DirectHandle< JSObject > object)
void set_first_prototype_map(DirectHandle< Map > value)
void set_skip_indices(bool value)
Maybe< bool > AddKeysFromJSProxy(DirectHandle< JSProxy > proxy, DirectHandle< FixedArray > keys)
bool IsShadowed(DirectHandle< Object > key)
Maybe< bool > CollectOwnElementIndices(DirectHandle< JSReceiver > receiver, DirectHandle< JSObject > object)
static Handle< FixedArray > GetOwnEnumPropertyKeys(Isolate *isolate, DirectHandle< JSObject > object)
DirectHandle< JSReceiver > last_non_empty_prototype_
bool try_prototype_info_cache_
V8_WARN_UNUSED_RESULT ExceptionStatus AddKeys(DirectHandle< FixedArray > array, AddKeyConversion convert)
Handle< OrderedHashSet > keys_
DirectHandle< Map > first_prototype_map_
Maybe< bool > CollectInterceptorKeysInternal(DirectHandle< JSReceiver > receiver, DirectHandle< JSObject > object, DirectHandle< InterceptorInfo > interceptor, IndexedOrNamed type)
static Handle< UnionOf< Smi, Cell > > GetOrCreatePrototypeChainValidityCell(DirectHandle< Map > map, Isolate *isolate)
V8_WARN_UNUSED_RESULT V8_INLINE bool ToHandle(Handle< S > *out) const
bool Equals(Tagged< Name > other)
static Handle< ObjectHashSet > Add(Isolate *isolate, Handle< ObjectHashSet > set, DirectHandle< Object > key)
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< FixedArray > CreateListFromArrayLike(Isolate *isolate, DirectHandle< Object > object, ElementTypes element_types)
static bool FilterKey(Tagged< Object > obj, PropertyFilter filter)
static V8_EXPORT_PRIVATE bool ToInt32(Tagged< Object > obj, int32_t *value)
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< Object > GetMethod(Isolate *isolate, DirectHandle< JSReceiver > receiver, DirectHandle< Name > name)
static bool ToUint32(Tagged< Object > obj, uint32_t *value)
static MaybeHandle< OrderedHashSet > Allocate(IsolateT *isolate, int capacity, AllocationType allocation=AllocationType::kYoung)
static Handle< FixedArray > ConvertToKeysArray(Isolate *isolate, Handle< OrderedHashSet > table, GetKeysConversion convert)
static HandleType< OrderedHashSet >::MaybeType Add(Isolate *isolate, HandleType< OrderedHashSet > table, DirectHandle< Object > value)
static constexpr int NextTableIndex()
DirectHandle< JSObjectOrUndefined > CallIndexedEnumerator(DirectHandle< InterceptorInfo > interceptor)
DirectHandle< JSObjectOrUndefined > CallNamedEnumerator(DirectHandle< InterceptorInfo > interceptor)
PropertyAttributes attributes() const
PropertyLocation location() const
PropertyKind kind() const
Tagged< T > GetCurrent() const
static constexpr int ToInt(const Tagged< Object > object)
static constexpr Tagged< Smi > FromInt(int value)
static constexpr Tagged< Smi > zero()
V8_INLINE constexpr bool is_null() const
#define V8_ENABLE_SWISS_NAME_DICTIONARY_BOOL
#define RETURN_FAILURE_IF_NOT_SUCCESSFUL(call)
#define RETURN_NOTHING_IF_NOT_SUCCESSFUL(call)
#define THROW_NEW_ERROR_RETURN_VALUE(isolate, call, value)
#define ASSIGN_RETURN_ON_EXCEPTION(isolate, dst, call)
#define RETURN_FAILURE(isolate, should_throw, call)
#define ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, dst, call, value)
#define RETURN_VALUE_IF_EXCEPTION(isolate, value)
#define STACK_CHECK(isolate, result_value)
#define MAYBE_RETURN(call, value)
#define RETURN_VALUE_IF_EXCEPTION_DETECTOR(isolate, detector, value)
base::Vector< const DirectHandle< Object > > args
ZoneVector< RpoNumber > & result
std::optional< OolTrapLabel > trap
constexpr Vector< T > VectorOf(T *start, size_t size)
V8_INLINE IndirectHandle< T > handle(Tagged< T > object, Isolate *isolate)
PerThreadAssertScopeDebugOnly< false, SAFEPOINTS_ASSERT, HEAP_ALLOCATION_ASSERT > DisallowGarbageCollection
bool IsNumber(Tagged< Object > obj)
void PrintF(const char *format,...)
bool IsCustomElementsReceiverMap(Tagged< Map > map)
Tagged(T object) -> Tagged< T >
V8_INLINE constexpr bool IsSmi(TaggedImpl< kRefType, StorageType > obj)
kStaticElementsTemplateOffset kInstancePropertiesTemplateOffset Tagged< FixedArray >
V8_INLINE DirectHandle< T > direct_handle(Tagged< T > object, Isolate *isolate)
PerThreadAssertScopeDebugOnly< true, SAFEPOINTS_ASSERT, HEAP_ALLOCATION_ASSERT > AllowGarbageCollection
static const int kInvalidEnumCacheSentinel
V8_EXPORT_PRIVATE FlagValues v8_flags
MaybeDirectHandle< FixedArray > FilterProxyKeys(KeyAccumulator *accumulator, DirectHandle< JSProxy > owner, DirectHandle< FixedArray > keys, PropertyFilter filter, bool skip_indices)
V8_INLINE bool IsWasmObject(T obj, Isolate *=nullptr)
Tagged< To > Cast(Tagged< From > value, const v8::SourceLocation &loc=INIT_SOURCE_LOCATION_IN_DEBUG)
static constexpr AcquireLoadTag kAcquireLoad
Maybe< T > Just(const T &t)
#define DCHECK_LE(v1, v2)
#define DCHECK_IMPLIES(v1, v2)
#define DCHECK_NE(v1, v2)
#define CHECK_EQ(lhs, rhs)
#define DCHECK(condition)
#define DCHECK_LT(v1, v2)
#define DCHECK_EQ(v1, v2)
#define DCHECK_GT(v1, v2)
#define V8_WARN_UNUSED_RESULT