Lines Matching refs:idx
42 phpdbg_btree_result *phpdbg_btree_find(phpdbg_btree *tree, zend_ulong idx) { in phpdbg_btree_find() argument
51 if ((idx >> i) % 2 == 1) { in phpdbg_btree_find()
69 phpdbg_btree_result *phpdbg_btree_find_closest(phpdbg_btree *tree, zend_ulong idx) { in phpdbg_btree_find_closest() argument
79 if ((idx >> i) % 2 == 0) { in phpdbg_btree_find_closest()
94 CHOOSE_BRANCH((idx >> i) % 2 == 1 && branch->branches[1]); in phpdbg_btree_find_closest()
137 if (result == NULL || result->idx < pos->end) { in phpdbg_btree_next()
141 pos->cur = result->idx - 1; in phpdbg_btree_next()
146 int phpdbg_btree_insert_or_update(phpdbg_btree *tree, zend_ulong idx, void *ptr, int flags) { in phpdbg_btree_insert_or_update() argument
154 branch = &(*branch)->branches[(idx >> i) % 2]; in phpdbg_btree_insert_or_update()
165 (*branch)->branches[!((idx >> i) % 2)] = NULL; in phpdbg_btree_insert_or_update()
166 branch = &(*branch)->branches[(idx >> i) % 2]; in phpdbg_btree_insert_or_update()
175 (*branch)->result.idx = idx; in phpdbg_btree_insert_or_update()
181 int phpdbg_btree_delete(phpdbg_btree *tree, zend_ulong idx) { in phpdbg_btree_delete() argument
192 last_dual_branch_branch = (idx >> i) % 2; in phpdbg_btree_delete()
194 branch = branch->branches[(idx >> i) % 2]; in phpdbg_btree_delete()
255 fprintf(stderr, "%p: %p\n", (void *) branch->result.idx, branch->result.ptr); in phpdbg_btree_branch_dump()