Lines Matching defs:chain
1557 /* Head of collider's chain. */
1558 upb_tabent *chain = getentry_mutable(t, hashfunc(mainpos_e->key));
1559 if (chain == mainpos_e) {
1561 * is the head of our chain). Insert to new ent and append to this chain. */
1567 * chain). This implies that no existing ent in the table has our hash.
1568 * Evict it (updating its chain) and use its ent for head of our chain. */
1570 while (chain->next != mainpos_e) {
1571 chain = (upb_tabent*)chain->next;
1572 UPB_ASSERT(chain);
1574 chain->next = new_e;
1586 upb_tabent *chain = getentry_mutable(t, hash);
1587 if (upb_tabent_isempty(chain)) return false;
1588 if (eql(chain->key, key)) {
1589 /* Element to remove is at the head of its chain. */
1591 if (val) _upb_value_setval(val, chain->val.val);
1592 if (removed) *removed = chain->key;
1593 if (chain->next) {
1594 upb_tabent *move = (upb_tabent*)chain->next;
1595 *chain = *move;
1598 chain->key = 0; /* Make the slot empty. */
1604 while (chain->next && !eql(chain->next->key, key)) {
1605 chain = (upb_tabent*)chain->next;
1607 if (chain->next) {
1609 upb_tabent *rm = (upb_tabent*)chain->next;
1611 if (val) _upb_value_setval(val, chain->next->val.val);
1614 chain->next = rm->next;