299
this._elementsCount++;
300
if (this._growCount !== 0 && this._elementsCount >= this._growCount) {
302
>
const oldElements = this._elements;
303
>
304
>
this._currentLengthIndex++;
305
>
this._currentLength = HashTable._SIZES[this._currentLengthIndex];
306
>
this._growCount = Math.round(this._currentLengthIndex + 1 < HashTable._SIZES.length ? 2 / 3 * this._currentLength : 0);
307
>
this._elements = [];
308
>
HashTable._nullOutEntries(this._elements, this._currentLength);
309
>
310
>
for (const first of oldElements) {
311
>
let p = first;
312
>
while (p) {
313
>
const oldNext = p.next;
314
>
p.next = null;
315
>
this._add(p);
316
>
p = oldNext;
317
>
}
318
>
}
319
>
}
320
this._add(new HashTableEntry(tokenTypeIndex, tokenModifierSet, languageId, metadata));
321
}