Lines Matching refs:idx
39 phpdbg_btree_result *phpdbg_btree_find(phpdbg_btree *tree, zend_ulong idx) { in phpdbg_btree_find() argument
48 if ((idx >> i) % 2 == 1) { in phpdbg_btree_find()
66 phpdbg_btree_result *phpdbg_btree_find_closest(phpdbg_btree *tree, zend_ulong idx) { in phpdbg_btree_find_closest() argument
78 if (!had_alternative_branch && (idx >> i) % 2 == 0 && !branch->branches[0]) { in phpdbg_btree_find_closest()
89 CHOOSE_BRANCH((idx >> i) % 2 == 1 && branch->branches[1]); in phpdbg_btree_find_closest()
100 if (had_alternative_branch || (idx >> i) % 2 == 1) { in phpdbg_btree_find_closest()
131 if (result == NULL || result->idx < pos->end) { in phpdbg_btree_next()
135 pos->cur = result->idx - 1; in phpdbg_btree_next()
140 int phpdbg_btree_insert_or_update(phpdbg_btree *tree, zend_ulong idx, void *ptr, int flags) { in phpdbg_btree_insert_or_update() argument
148 branch = &(*branch)->branches[(idx >> i) % 2]; in phpdbg_btree_insert_or_update()
159 (*branch)->branches[!((idx >> i) % 2)] = NULL; in phpdbg_btree_insert_or_update()
160 branch = &(*branch)->branches[(idx >> i) % 2]; in phpdbg_btree_insert_or_update()
169 (*branch)->result.idx = idx; in phpdbg_btree_insert_or_update()
175 int phpdbg_btree_delete(phpdbg_btree *tree, zend_ulong idx) { in phpdbg_btree_delete() argument
186 last_dual_branch_branch = (idx >> i) % 2; in phpdbg_btree_delete()
188 branch = branch->branches[(idx >> i) % 2]; in phpdbg_btree_delete()