Lines Matching defs:chain
1532 /* Head of collider's chain. */
1533 upb_tabent *chain = getentry_mutable(t, hashfunc(mainpos_e->key));
1534 if (chain == mainpos_e) {
1536 * is the head of our chain). Insert to new ent and append to this chain. */
1542 * chain). This implies that no existing ent in the table has our hash.
1543 * Evict it (updating its chain) and use its ent for head of our chain. */
1545 while (chain->next != mainpos_e) {
1546 chain = (upb_tabent*)chain->next;
1547 UPB_ASSERT(chain);
1549 chain->next = new_e;
1561 upb_tabent *chain = getentry_mutable(t, hash);
1562 if (upb_tabent_isempty(chain)) return false;
1563 if (eql(chain->key, key)) {
1564 /* Element to remove is at the head of its chain. */
1566 if (val) _upb_value_setval(val, chain->val.val);
1567 if (removed) *removed = chain->key;
1568 if (chain->next) {
1569 upb_tabent *move = (upb_tabent*)chain->next;
1570 *chain = *move;
1573 chain->key = 0; /* Make the slot empty. */
1579 while (chain->next && !eql(chain->next->key, key)) {
1580 chain = (upb_tabent*)chain->next;
1582 if (chain->next) {
1584 upb_tabent *rm = (upb_tabent*)chain->next;
1586 if (val) _upb_value_setval(val, chain->next->val.val);
1589 chain->next = rm->next;