| 208 | |
| 209 | |
| 210 | __hot void StringTable::grow() { |
| 211 | auto oldSize = _size; |
| 212 | auto oldHashes = _hashes; |
| 213 | auto oldEntries = _entries; |
| 214 | auto wasAllocated = _allocated; |
| 215 | |
| 216 | allocTable(2 * oldSize); |
| 217 | |
| 218 | for (size_t i = 0; i < oldSize; ++i) { |
| 219 | if (oldHashes[i] != hash_t::Empty) |
| 220 | _insertOnly(oldHashes[i], oldEntries[i]); |
| 221 | } |
| 222 | if (wasAllocated) |
| 223 | free(oldHashes); |
| 224 | } |
| 225 | |
| 226 | |
| 227 | void StringTable::dump() const noexcept { |
nothing calls this directly
no outgoing calls
no test coverage detected