Lines Matching refs:idx
40 phpdbg_btree_result *phpdbg_btree_find(phpdbg_btree *tree, zend_ulong idx) { in phpdbg_btree_find() argument
49 if ((idx >> i) % 2 == 1) { in phpdbg_btree_find()
67 phpdbg_btree_result *phpdbg_btree_find_closest(phpdbg_btree *tree, zend_ulong idx) { in phpdbg_btree_find_closest() argument
77 if ((idx >> i) % 2 == 0) { in phpdbg_btree_find_closest()
92 CHOOSE_BRANCH((idx >> i) % 2 == 1 && branch->branches[1]); in phpdbg_btree_find_closest()
135 if (result == NULL || result->idx < pos->end) { in phpdbg_btree_next()
139 pos->cur = result->idx - 1; in phpdbg_btree_next()
144 int phpdbg_btree_insert_or_update(phpdbg_btree *tree, zend_ulong idx, void *ptr, int flags) { in phpdbg_btree_insert_or_update() argument
152 branch = &(*branch)->branches[(idx >> i) % 2]; in phpdbg_btree_insert_or_update()
163 (*branch)->branches[!((idx >> i) % 2)] = NULL; in phpdbg_btree_insert_or_update()
164 branch = &(*branch)->branches[(idx >> i) % 2]; in phpdbg_btree_insert_or_update()
173 (*branch)->result.idx = idx; in phpdbg_btree_insert_or_update()
179 int phpdbg_btree_delete(phpdbg_btree *tree, zend_ulong idx) { in phpdbg_btree_delete() argument
190 last_dual_branch_branch = (idx >> i) % 2; in phpdbg_btree_delete()
192 branch = branch->branches[(idx >> i) % 2]; in phpdbg_btree_delete()
253 fprintf(stderr, "%p: %p\n", (void *) branch->result.idx, branch->result.ptr); in phpdbg_btree_branch_dump()