Lines Matching defs:table

14 #include "src/objects/hash-table-inl.h"
16 #include "src/objects/ordered-hash-table.h"
59 TNode<HeapObject> table = AllocateTable(variant, at_least_space_for);
60 StoreObjectField(collection, GetTableOffset(variant), table);
511 // This is a NOP if the [table] is not obsolete.
513 using UpdateInTransition = std::function<void(const TNode<TableType> table,
517 const TNode<TableType> table, const TNode<IntPtrT> index,
524 TNode<TableType> table, TNode<IntPtrT> index, Label* if_end);
530 void FindOrderedHashTableEntryForSmiKey(TNode<CollectionType> table,
545 TNode<CollectionType> table, TNode<HeapNumber> key_heap_number,
554 void FindOrderedHashTableEntryForBigIntKey(TNode<CollectionType> table,
564 void FindOrderedHashTableEntryForStringKey(TNode<CollectionType> table,
580 void FindOrderedHashTableEntryForOtherKey(TNode<CollectionType> table,
587 void TryLookupOrderedHashTableIndex(const TNode<CollectionType> table,
594 void StoreOrderedHashMapNewEntry(const TNode<OrderedHashMap> table,
601 void StoreOrderedHashSetNewEntry(const TNode<OrderedHashSet> table,
610 // iterator and iterate directly on the underlying hash table. In the end it
618 // iterator and iterate directly on the underlying hash table. In the end, if
638 const TNode<CollectionType> table, const TNode<IntPtrT> hash,
648 const TNode<CollectionType> table, const TNode<IntPtrT> hash,
655 table, CollectionType::NumberOfBucketsIndex())));
659 table, bucket, CollectionType::HashTableStartIndex() * kTaggedSize)));
683 table, CollectionType::NumberOfElementsIndex())),
685 table, CollectionType::NumberOfDeletedElementsIndex()))))));
695 table, entry_start,
703 table, entry_start,
719 const TNode<Object> table =
731 StoreObjectFieldNoWriteBarrier(iterator, IteratorType::kTableOffset, table);
974 // Transition the {iterator} table if necessary.
975 TNode<OrderedHashMap> table;
977 std::tie(table, index) =
982 LoadAndUntagObjectField(table, OrderedHashMap::NumberOfElementsOffset());
1007 // Read the next entry from the {table}, skipping holes.
1012 NextSkipHoles<OrderedHashMap>(table, var_index.value(), &done);
1030 UnsafeLoadFixedArrayElement(table, entry_start_position,
1081 // Transition the {iterable} table if necessary.
1092 TNode<OrderedHashSet> table = var_table.value();
1094 LoadAndUntagObjectField(table, OrderedHashMap::NumberOfElementsOffset());
1118 // Read the next entry from the {table}, skipping holes.
1123 NextSkipHoles<OrderedHashSet>(table, var_index.value(), &finalize);
1167 TNode<CollectionType> table, TNode<Smi> smi_key, TVariable<IntPtrT>* result,
1175 table, hash,
1184 TNode<CollectionType> table, TNode<String> key_tagged,
1190 table, hash,
1199 TNode<CollectionType> table, TNode<HeapNumber> key_heap_number,
1206 table, hash,
1215 TNode<CollectionType> table, TNode<BigInt> key_big_int,
1221 table, hash,
1230 TNode<CollectionType> table, TNode<HeapObject> key_heap_object,
1236 table, hash,
1320 auto table = Parameter<HeapObject>(Descriptor::kTable);
1327 // Check if the {table} was cleared.
1331 table, OrderedHashMap::NumberOfDeletedElementsOffset());
1349 CAST(table), i, OrderedHashMap::RemovedHolesIndex() * kTaggedSize));
1366 const TNode<TableType> table, const TNode<IntPtrT> index,
1369 TVARIABLE(TableType, var_table, table);
1396 // Update with the new {table} and {index}.
1412 [this, iterator](const TNode<TableType> table,
1415 StoreObjectField(iterator, IteratorType::kTableOffset, table);
1423 CollectionsBuiltinsAssembler::NextSkipHoles(TNode<TableType> table,
1426 // Compute the used capacity for the {table}.
1428 LoadAndUntagObjectField(table, TableType::NumberOfBucketsOffset());
1430 LoadAndUntagObjectField(table, TableType::NumberOfElementsOffset());
1432 table, TableType::NumberOfDeletedElementsOffset());
1448 table, entry_start_position,
1466 const TNode<Object> table =
1469 CAST(CallBuiltin(Builtin::kFindOrderedHashMapEntry, context, table, key));
1477 CAST(table), SmiUntag(index),
1492 const TNode<Object> table =
1495 CAST(CallBuiltin(Builtin::kFindOrderedHashMapEntry, context, table, key));
1536 const TNode<OrderedHashMap> table =
1543 table, key, &entry_start_position_or_hash, &entry_found, &not_found);
1547 StoreFixedArrayElement(table, entry_start_position_or_hash.value(), value,
1569 TVARIABLE(OrderedHashMap, table_var, table);
1573 table, OrderedHashMap::NumberOfBucketsIndex())));
1578 CAST(LoadObjectField(table, OrderedHashMap::NumberOfElementsOffset())));
1580 table, OrderedHashMap::NumberOfDeletedElementsOffset())));
1584 // We do not have enough space, grow the table and reload the relevant
1607 const TNode<OrderedHashMap> table, const TNode<Object> key,
1613 table, bucket, OrderedHashMap::HashTableStartIndex() * kTaggedSize));
1620 table, entry_start, key, UPDATE_WRITE_BARRIER,
1623 table, entry_start, value, UPDATE_WRITE_BARRIER,
1627 table, entry_start, bucket_entry,
1633 table, bucket, SmiTag(occupancy),
1638 CAST(LoadObjectField(table, OrderedHashMap::NumberOfElementsOffset()));
1639 StoreObjectFieldNoWriteBarrier(table,
1652 const TNode<OrderedHashMap> table =
1659 table, key, &entry_start_position_or_hash, &entry_found, &not_found);
1666 StoreFixedArrayElement(table, entry_start_position_or_hash.value(),
1669 StoreFixedArrayElement(table, entry_start_position_or_hash.value(),
1676 CAST(LoadObjectField(table, OrderedHashMap::NumberOfElementsOffset())),
1679 table, OrderedHashMap::NumberOfElementsOffset(), number_of_elements);
1682 table, OrderedHashMap::NumberOfDeletedElementsOffset())),
1685 table, OrderedHashMap::NumberOfDeletedElementsOffset(),
1689 LoadFixedArrayElement(table, OrderedHashMap::NumberOfBucketsIndex()));
1691 // If there fewer elements than #buckets / 2, shrink the table.
1712 const TNode<OrderedHashSet> table =
1719 table, key, &entry_start_position_or_hash, &entry_found, &not_found);
1741 TVARIABLE(OrderedHashSet, table_var, table);
1745 table, OrderedHashSet::NumberOfBucketsIndex())));
1750 CAST(LoadObjectField(table, OrderedHashSet::NumberOfElementsOffset())));
1752 table, OrderedHashSet::NumberOfDeletedElementsOffset())));
1756 // We do not have enough space, grow the table and reload the relevant
1779 const TNode<OrderedHashSet> table, const TNode<Object> key,
1785 table, bucket, OrderedHashSet::HashTableStartIndex() * kTaggedSize));
1792 table, entry_start, key, UPDATE_WRITE_BARRIER,
1795 table, entry_start, bucket_entry,
1801 table, bucket, SmiTag(occupancy),
1806 CAST(LoadObjectField(table, OrderedHashSet::NumberOfElementsOffset()));
1807 StoreObjectFieldNoWriteBarrier(table,
1820 const TNode<OrderedHashSet> table =
1827 table, key, &entry_start_position_or_hash, &entry_found, &not_found);
1834 StoreFixedArrayElement(table, entry_start_position_or_hash.value(),
1840 CAST(LoadObjectField(table, OrderedHashSet::NumberOfElementsOffset())),
1843 table, OrderedHashSet::NumberOfElementsOffset(), number_of_elements);
1846 table, OrderedHashSet::NumberOfDeletedElementsOffset())),
1849 table, OrderedHashSet::NumberOfDeletedElementsOffset(),
1853 LoadFixedArrayElement(table, OrderedHashSet::NumberOfBucketsIndex()));
1855 // If there fewer elements than #buckets / 2, shrink the table.
1881 const TNode<OrderedHashMap> table =
1883 Return(LoadObjectField(table, OrderedHashMap::NumberOfElementsOffset()));
1909 // Transition {table} and {index} if there was any modification to
1912 TNode<OrderedHashMap> table = var_table.value();
1913 std::tie(table, index) = Transition<OrderedHashMap>(
1914 table, index, [](const TNode<OrderedHashMap>, const TNode<IntPtrT>) {});
1916 // Read the next entry from the {table}, skipping holes.
1920 NextSkipHoles<OrderedHashMap>(table, index, &done_loop);
1924 table, entry_start_position,
1934 var_table = table;
1994 // Transition the {receiver} table if necessary.
1995 TNode<OrderedHashMap> table;
1997 std::tie(table, index) =
2000 // Read the next entry from the {table}, skipping holes.
2004 NextSkipHoles<OrderedHashMap>(table, index, &return_end);
2014 table, entry_start_position,
2049 const TNode<Object> table =
2066 CAST(table), CAST(key), &entry_start_position, &entry_found, &not_found);
2071 CAST(table), CAST(key), &entry_start_position, &entry_found,
2078 CAST(table), CAST(key), &entry_start_position, &entry_found,
2085 CAST(table), CAST(key), &entry_start_position, &entry_found,
2092 CAST(table), CAST(key), &entry_start_position, &entry_found,
2117 const TNode<OrderedHashSet> table =
2119 Return(LoadObjectField(table, OrderedHashSet::NumberOfElementsOffset()));
2145 // Transition {table} and {index} if there was any modification to
2148 TNode<OrderedHashSet> table = var_table.value();
2149 std::tie(table, index) = Transition<OrderedHashSet>(
2150 table, index, [](const TNode<OrderedHashSet>, const TNode<IntPtrT>) {});
2152 // Read the next entry from the {table}, skipping holes.
2156 NextSkipHoles<OrderedHashSet>(table, index, &done_loop);
2163 var_table = table;
2214 // Transition the {receiver} table if necessary.
2215 TNode<OrderedHashSet> table;
2217 std::tie(table, index) =
2220 // Read the next entry from the {table}, skipping holes.
2224 NextSkipHoles<OrderedHashSet>(table, index, &return_end);
2258 const TNode<CollectionType> table, const TNode<Object> key,
2273 table, CAST(key), result, if_entry_found, if_not_found);
2278 table, CAST(key), result, if_entry_found, if_not_found);
2284 table, CAST(key), result, if_entry_found, if_not_found);
2290 table, CAST(key), result, if_entry_found, if_not_found);
2296 table, CAST(key), result, if_entry_found, if_not_found);
2301 const auto table = Parameter<OrderedHashMap>(Descriptor::kTable);
2308 table, key, &entry_start_position, &entry_found, &not_found);
2318 TNode<EphemeronHashTable> table, TNode<IntPtrT> key_index,
2322 UnsafeStoreFixedArrayElement(table, key_index, key,
2324 UnsafeStoreFixedArrayElement(table, value_index, value);
2327 UnsafeStoreFixedArrayElement(table,
2360 TNode<FixedArray> table = CAST(AllocateFixedArray(
2365 StoreMapNoWriteBarrier(table, map);
2366 StoreFixedArrayElement(table, EphemeronHashTable::kNumberOfElementsIndex,
2368 StoreFixedArrayElement(table,
2371 StoreFixedArrayElement(table, EphemeronHashTable::kCapacityIndex,
2375 FillFixedArrayWithValue(HOLEY_ELEMENTS, table, start, length,
2377 return table;
2401 TNode<HeapObject> table, TNode<IntPtrT> key_hash, TNode<IntPtrT> entry_mask,
2414 UnsafeLoadFixedArrayElement(CAST(table), key_index);
2430 TNode<HeapObject> table, TNode<IntPtrT> key_hash,
2437 return FindKeyIndex(table, key_hash, entry_mask, is_not_live);
2441 TNode<HeapObject> table, TNode<Object> key, TNode<IntPtrT> hash,
2449 return FindKeyIndex(table, hash, entry_mask, match_key_or_exit_on_empty);
2463 TNode<EphemeronHashTable> table, int offset) {
2465 table, EphemeronHashTable::kNumberOfElementsIndex)));
2470 TNode<EphemeronHashTable> table, int offset) {
2472 table, EphemeronHashTable::kNumberOfDeletedElementsIndex)));
2482 TNode<EphemeronHashTable> table) {
2484 UnsafeLoadFixedArrayElement(table, EphemeronHashTable::kCapacityIndex)));
2506 TNode<EphemeronHashTable> table, TNode<IntPtrT> key_index,
2510 StoreFixedArrayElement(table, key_index, TheHoleConstant());
2511 StoreFixedArrayElement(table, value_index, TheHoleConstant());
2514 TNode<IntPtrT> number_of_deleted = LoadNumberOfDeleted(table, 1);
2515 StoreFixedArrayElement(table, EphemeronHashTable::kNumberOfElementsIndex,
2517 StoreFixedArrayElement(table,
2573 auto table = Parameter<EphemeronHashTable>(Descriptor::kTable);
2581 TNode<IntPtrT> capacity = LoadTableCapacity(table);
2583 table, key, hash, EntryMask(capacity), &if_cannot_be_held_weakly);
2600 const TNode<EphemeronHashTable> table = LoadTable(CAST(receiver));
2602 CAST(CallBuiltin(Builtin::kWeakMapLookupHashIndex, context, table, key));
2606 Return(LoadFixedArrayElement(table, SmiUntag(index)));
2622 const TNode<EphemeronHashTable> table = LoadTable(CAST(receiver));
2624 CallBuiltin(Builtin::kWeakMapLookupHashIndex, context, table, key);
2646 TNode<EphemeronHashTable> table = LoadTable(collection);
2647 TNode<IntPtrT> capacity = LoadTableCapacity(table);
2649 table, key, hash, EntryMask(capacity), &if_cannot_be_held_weakly);
2650 TNode<IntPtrT> number_of_elements = LoadNumberOfElements(table, -1);
2653 RemoveEntry(table, key_index, number_of_elements);
2676 TNode<EphemeronHashTable> table = LoadTable(collection);
2677 TNode<IntPtrT> capacity = LoadTableCapacity(table);
2681 TNode<IntPtrT> key_index = FindKeyIndexForKey(table, key, var_hash.value(),
2684 StoreFixedArrayElement(table, ValueIndexFromKeyIndex(key_index), value);
2695 TNode<IntPtrT> number_of_deleted = LoadNumberOfDeleted(table);
2696 TNode<IntPtrT> number_of_elements = LoadNumberOfElements(table, 1);
2705 FindKeyIndexForInsertion(table, var_hash.value(), entry_mask);
2706 AddEntry(table, insertion_key_index, key, value, number_of_elements);
2786 const TNode<EphemeronHashTable> table = LoadTable(CAST(receiver));
2788 CallBuiltin(Builtin::kWeakMapLookupHashIndex, context, table, key);