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
76 if ((idx >> i) % 2 == 0) { in phpdbg_btree_find_closest()
91 CHOOSE_BRANCH((idx >> i) % 2 == 1 && branch->branches[1]); in phpdbg_btree_find_closest()
134 if (result == NULL || result->idx < pos->end) { in phpdbg_btree_next()
138 pos->cur = result->idx - 1; in phpdbg_btree_next()
143 int phpdbg_btree_insert_or_update(phpdbg_btree *tree, zend_ulong idx, void *ptr, int flags) { in phpdbg_btree_insert_or_update() argument
151 branch = &(*branch)->branches[(idx >> i) % 2]; in phpdbg_btree_insert_or_update()
162 (*branch)->branches[!((idx >> i) % 2)] = NULL; in phpdbg_btree_insert_or_update()
163 branch = &(*branch)->branches[(idx >> i) % 2]; in phpdbg_btree_insert_or_update()
172 (*branch)->result.idx = idx; in phpdbg_btree_insert_or_update()
178 int phpdbg_btree_delete(phpdbg_btree *tree, zend_ulong idx) { in phpdbg_btree_delete() argument
189 last_dual_branch_branch = (idx >> i) % 2; in phpdbg_btree_delete()
191 branch = branch->branches[(idx >> i) % 2]; in phpdbg_btree_delete()
232 fprintf(stderr, "%p: %p\n", (void *) branch->result.idx, branch->result.ptr); in phpdbg_btree_branch_dump()