Lines Matching defs:table
55 #include "src/objects/compilation-cache-table-inl.h"
65 #include "src/objects/hash-table-inl.h"
101 #include "src/codegen/source-position-table.h"
5712 isolate->FatalProcessOutOfHeapMemory("invalid table size");
5725 Handle<Derived> table = Handle<Derived>::cast(array);
5727 table->SetNumberOfElements(0);
5728 table->SetNumberOfDeletedElements(0);
5729 table->SetCapacity(capacity);
5730 return table;
5852 IsolateT* isolate, Handle<Derived> table, int n,
5854 if (table->HasSufficientCapacityToAdd(n)) return table;
5856 int capacity = table->Capacity();
5857 int new_nof = table->NumberOfElements() + n;
5861 !Heap::InYoungGeneration(*table));
5866 table->Rehash(isolate, *new_table);
5913 Handle<Derived> table,
5916 table->Capacity(), table->NumberOfElements() + additional_capacity);
5917 if (new_capacity == table->Capacity()) return table;
5921 !Heap::InYoungGeneration(*table);
5927 table->Rehash(isolate, *new_table);
5936 // EnsureCapacity will guarantee the hash table is never full.
5960 // EnsureCapacity will guarantee the hash table is never full.
5994 Isolate* isolate, Handle<RegisteredSymbolTable> table, Handle<String> key,
5997 SLOW_DCHECK(table->FindEntry(isolate, key).is_not_found());
5999 table = EnsureCapacity(isolate, table);
6001 InternalIndex entry = table->FindInsertionEntry(isolate, hash);
6002 table->set(EntryToIndex(entry), *key);
6003 table->set(EntryToValueIndex(entry), *symbol);
6004 table->ElementAdded();
6005 return table;
6278 Handle<Derived> table) {
6279 int length = table->length();
6281 table->set_the_hole(i);
6356 Handle<Derived> ObjectHashTableBase<Derived, Shape>::Put(Handle<Derived> table,
6359 Isolate* isolate = Heap::FromWritableHeapObject(*table)->isolate();
6360 DCHECK(table->IsKey(ReadOnlyRoots(isolate), *key));
6366 return ObjectHashTableBase<Derived, Shape>::Put(isolate, table, key, value,
6372 Handle<Derived> table,
6377 DCHECK(table->IsKey(roots, *key));
6380 InternalIndex entry = table->FindEntry(isolate, roots, key, hash);
6382 // Key is already in table, just overwrite value.
6384 table->set(Derived::EntryToValueIndex(entry), *value);
6385 return table;
6390 if ((table->NumberOfDeletedElements() << 1) > table->NumberOfElements()) {
6391 table->Rehash(isolate);
6395 if (!table->HasSufficientCapacityToAdd(1)) {
6396 int nof = table->NumberOfElements() + 1;
6403 table->Rehash(isolate);
6407 // Check whether the hash table should be extended.
6408 table = Derived::EnsureCapacity(isolate, table);
6409 table->AddEntry(table->FindInsertionEntry(isolate, hash), *key, *value);
6410 return table;
6415 Isolate* isolate, Handle<Derived> table, Handle<Object> key,
6417 DCHECK(table->IsKey(table->GetReadOnlyRoots(), *key));
6422 return table;
6425 return Remove(isolate, table, key, was_present, Smi::ToInt(hash));
6430 Isolate* isolate, Handle<Derived> table, Handle<Object> key,
6432 ReadOnlyRoots roots = table->GetReadOnlyRoots();
6433 DCHECK(table->IsKey(roots, *key));
6435 InternalIndex entry = table->FindEntry(isolate, roots, key, hash);
6438 return table;
6442 table->RemoveEntry(entry);
6443 return Derived::Shrink(isolate, table);
6463 Handle<OrderedHashSet> table = isolate->factory()->NewOrderedHashSet();
6464 set->set_table(*table);
6468 Handle<OrderedHashSet> table(OrderedHashSet::cast(set->table()), isolate);
6469 table = OrderedHashSet::Clear(isolate, table);
6470 set->set_table(*table);
6474 Handle<OrderedHashSet> table_handle(OrderedHashSet::cast(table()), isolate);
6481 Handle<OrderedHashMap> table = isolate->factory()->NewOrderedHashMap();
6482 map->set_table(*table);
6486 Handle<OrderedHashMap> table(OrderedHashMap::cast(map->table()), isolate);
6487 table = OrderedHashMap::Clear(isolate, table);
6488 map->set_table(*table);
6492 Handle<OrderedHashMap> table_handle(OrderedHashMap::cast(table()), isolate);
6500 Handle<EphemeronHashTable> table = EphemeronHashTable::New(isolate, 0);
6501 weak_collection->set_table(*table);
6508 Handle<EphemeronHashTable> table(
6509 EphemeronHashTable::cast(weak_collection->table()),
6511 DCHECK(table->IsKey(weak_collection->GetReadOnlyRoots(), *key));
6513 weak_collection->GetIsolate(), table, key, value, hash);
6515 if (*table != *new_table) {
6516 // Zap the old table since we didn't record slots for its elements.
6517 EphemeronHashTable::FillEntriesWithHoles(table);
6524 Handle<EphemeronHashTable> table(
6525 EphemeronHashTable::cast(weak_collection->table()),
6527 DCHECK(table->IsKey(weak_collection->GetReadOnlyRoots(), *key));
6530 weak_collection->GetIsolate(), table, key, &was_present, hash);
6532 if (*table != *new_table) {
6533 // Zap the old table since we didn't record slots for its elements.
6534 EphemeronHashTable::FillEntriesWithHoles(table);
6542 Handle<EphemeronHashTable> table(EphemeronHashTable::cast(holder->table()),
6544 if (max_entries == 0 || max_entries > table->NumberOfElements()) {
6545 max_entries = table->NumberOfElements();
6550 // Recompute max_values because GC could have removed elements from the table.
6551 if (max_entries > table->NumberOfElements()) {
6552 max_entries = table->NumberOfElements();
6560 count / values_per_entry < max_entries && i < table->Capacity(); i++) {
6562 if (table->ToKey(roots, InternalIndex(i), &key)) {
6565 Object value = table->Lookup(handle(key, isolate));
6753 // is used in the source position table, hence the subtraction.
6970 // from the hash table.
6975 // of the key in the hash table.