pike.git / src / rbtree_low.h

version» Context lines:

pike.git/src/rbtree_low.h:264:    rb_num_finds++; \    ); \    while (1) { \    DO_IF_DEBUG (if (!node) Pike_fatal ("Recursing into null node.\n")); \    DO_IF_RB_STATS ( \    if (++stat_depth_count_ > rb_max_depth) \    rb_max_depth = stat_depth_count_; \    rb_find_depth++; \    ); \    {cmp;} \ -  if (cmp_res < 0) \ -  if ((node)->flags & RB_THREAD_PREV) \ -  if (found_eq_) \ +  if (cmp_res < 0) { \ +  if ((node)->flags & RB_THREAD_PREV) { \ +  if (found_eq_) { \    (node) = (node)->prev; \ -  else { \ +  } else { \    {got_gt;} \    break; \    } \ -  else { \ +  } else { \    (node) = (node)->prev; \    continue; \    } \ -  else \ -  if ((node)->flags & RB_THREAD_NEXT) \ -  if (!cmp_res) \ -  {} \ -  else { \ +  } else { \ +  if ((node)->flags & RB_THREAD_NEXT) { \ +  if (cmp_res) { \    {got_lt;} \    break; \    } \ -  else { \ +  } else { \    if (!cmp_res) found_eq_ = 1; \    (node) = (node)->next; \    continue; \    } \ -  +  } \    {got_eq;} \    break; \    } \    } while (0)      /* Variant of LOW_RB_FIND that assumes that `cmp' never returns 0. */   #define LOW_RB_FIND_NEQ(node, cmp, got_lt, got_gt) \    do { \    int cmp_res; \    DO_IF_RB_STATS ( \
pike.git/src/rbtree_low.h:316:    rb_max_depth = stat_depth_count_; \    rb_find_depth++; \    ); \    {cmp;} \    if (cmp_res < 0) { \    if ((node)->flags & RB_THREAD_PREV) { \    {got_gt;} \    break; \    } \    (node) = (node)->prev; \ -  } \ -  else { \ +  } else { \    DO_IF_DEBUG (if (!cmp_res) Pike_fatal ("cmp_res 0 not expected.\n")); \    if ((node)->flags & RB_THREAD_NEXT) { \    {got_lt;} \    break; \    } \    (node) = (node)->next; \    } \    } \    } while (0)   
pike.git/src/rbtree_low.h:400:    if (node != RBSTACK_PEEK (rbstack)) \    Pike_fatal ("Given node is not on top of stack.\n"); \    ); \    DO_IF_RB_STATS (rb_num_sidetracks++); \    if (node->flags & RB_THREAD_NEXT) { \    struct rb_node_hdr *rb_next_ = node->next; \    while ((node = RBSTACK_PEEK (rbstack)) != rb_next_) { \    RBSTACK_POP_IGNORE (rbstack); \    DO_IF_RB_STATS (rb_num_sidetrack_ops++); \    } \ -  } \ -  else { \ +  } else { \    node = node->next; \    while (1) { \    RBSTACK_PUSH (rbstack, node); \    DO_IF_RB_STATS (rb_num_sidetrack_ops++); \    if (node->flags & RB_THREAD_PREV) break; \    node = node->prev; \    } \    } \    } while (0)   
pike.git/src/rbtree_low.h:426:    if (node != RBSTACK_PEEK (rbstack)) \    Pike_fatal ("Given node is not on top of stack.\n"); \    ); \    DO_IF_RB_STATS (rb_num_sidetracks++); \    if (node->flags & RB_THREAD_PREV) { \    struct rb_node_hdr *rb_prev_ = node->prev; \    while ((node = RBSTACK_PEEK (rbstack)) != rb_prev_) { \    RBSTACK_POP_IGNORE (rbstack); \    DO_IF_RB_STATS (rb_num_sidetrack_ops++); \    } \ -  } \ -  else { \ +  } else { \    node = node->prev; \    while (1) { \    RBSTACK_PUSH (rbstack, node); \    DO_IF_RB_STATS (rb_num_sidetrack_ops++); \    if (node->flags & RB_THREAD_NEXT) break; \    node = node->next; \    } \    } \    } while (0)   
pike.git/src/rbtree_low.h:521:    else if (cmp_res < 0) \    op_ = operation; \    else \    op_ = operation >> 4; \    } \    else if (operation & PIKE_ARRAY_OP_B) \    goto PIKE_CONCAT (label, _copy_b); \    else \    goto PIKE_CONCAT (label, _free_b); \    } \ -  else \ -  if (a) \ -  if (operation & (PIKE_ARRAY_OP_A << 8)) \ +  else if (a) { \ +  if (operation & (PIKE_ARRAY_OP_A << 8)) \    goto PIKE_CONCAT (label, _copy_a); \    else \    goto PIKE_CONCAT (label, _free_a); \ -  else \ -  break; \ +  } else \ +  break; \    \    if (op_ & PIKE_ARRAY_OP_B) { \    PIKE_CONCAT (label, _copy_b):; \    {copy_b;} \    new_node->next = res, res = new_node; \    length++; \    b = rb_prev (b); \    } \    else if (op_ & PIKE_ARRAY_OP_SKIP_B) { \    PIKE_CONCAT (label, _free_b):; \