Lines Matching defs:table
16 Isolate* isolate, Handle<SwissNameDictionary> table, InternalIndex entry) {
18 DCHECK(IsFull(table->GetCtrl(entry.as_int())));
22 table->SetCtrl(i, Ctrl::kDeleted);
23 table->ClearDataTableEntry(isolate, i);
27 int nof = table->NumberOfElements();
28 table->SetNumberOfElements(nof - 1);
29 int nod = table->NumberOfDeletedElements();
30 table->SetNumberOfDeletedElements(nod + 1);
37 return Shrink(isolate, table);
43 IsolateT* isolate, Handle<SwissNameDictionary> table, int new_capacity) {
45 DCHECK_LE(table->NumberOfElements(), MaxUsableCapacity(new_capacity));
50 new_capacity, Heap::InYoungGeneration(*table) ? AllocationType::kYoung
56 new_table->SetNumberOfElements(table->NumberOfElements());
57 for (int enum_index = 0; enum_index < table->UsedCapacity(); ++enum_index) {
58 int entry = table->EntryForEnumerationIndex(enum_index);
62 if (table->ToKey(roots, entry, &key)) {
63 Object value = table->ValueAtRaw(entry);
64 PropertyDetails details = table->DetailsAt(entry);
69 // select the correct meta table entry size (based on the capacity of the
70 // table) out of the loop.
76 new_table->SetHash(table->Hash());
111 Isolate* isolate, Handle<SwissNameDictionary> table) {
114 // require tidying up the enumeration table in a similar fashion as would be
117 if (table->Capacity() == 0) {
118 return table;
121 int capacity = table->Capacity();
122 int used_capacity = table->UsedCapacity();
126 capacity, Heap::InYoungGeneration(*table) ? AllocationType::kYoung
129 new_table->SetHash(table->Hash());
135 // Copy data table and ctrl table, which are stored next to each other.
137 reinterpret_cast<void*>(table->field_address(DataTableStartOffset()));
146 // We may have to trigger write barriers when copying the data table.
148 Object key = table->KeyAt(i);
149 Object value = table->ValueAtRaw(i);
157 void* original_ctrl_table = table->CtrlTable();
162 // PropertyDetails table may contain uninitialized data for unused slots.
164 if (IsFull(table->GetCtrl(i))) {
165 new_table->DetailsAtPut(i, table->DetailsAt(i));
169 // Meta table is only initialized for the first 2 + UsedCapacity() entries,
170 // where size of each entry depends on table capacity.
173 new_table->meta_table().copy_in(0, table->meta_table().GetDataStartAddress(),
181 Isolate* isolate, Handle<SwissNameDictionary> table) {
186 // table. Abseil's heuristic doesn't take the numbere of deleted elements into
189 int nof = table->NumberOfElements();
190 int capacity = table->Capacity();
191 if (nof >= (capacity >> 2)) return table;
193 return Rehash(isolate, table, new_capacity);
197 // the table doesn't seem like a good algorithm. Abseil's Swiss Tables come with
199 // table, effectively changing the roles of full, empty and deleted buckets. It
203 // too. However, it would require a mapping from hash table buckets back to
206 // enumeration table) or by creating this backwards mapping ahead of time and
207 // storing it somewhere in the main table or the meta table, for those
244 // select the correct meta table entry size (based on the capacity of the
245 // table) out of the loop.
253 // elsewhere (e.g., hash-table-utils)?
270 // hash-table-utils)?
282 // The largest value we ever have to store in the enumeration table is
285 // meta table is unsigned. Using this, we verify the values of the constants
305 Handle<SwissNameDictionary> table,
308 SwissNameDictionary::Rehash(Isolate* isolate, Handle<SwissNameDictionary> table,