https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119151

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
BTW, even if we had the size information on btree_remove, we could just
increase the separator during walk to base + size - 1 from base - 1.  But until
it reaches the leaf node, it doesn't know what the first existing entry after
it is, because the separator should be adjusted to that next's entry's base -
1.

Anyway, I worried a little about this increase of separators to base + size - 1
in case the next inner entry has separator lower than that, but I'd hope that
should never happen, as btree_remove shouldn't retain empty leafs nor empty
inner nodes at any level and btree_merge_node should aggressively merge with
adjacent node, or merge into parent, or move some entries to the left or right.

Reply via email to