pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:6065:    }   }      void identify_loop_visit_ref(void *dst, int ref_type,    visit_thing_fn *visit_dst,    void *extra)   {    int type = type_from_visit_fn(visit_dst);    struct mc_marker *ref_to = find_mc_marker(dst);    if (ref_to) { -  /* Already visited. */ +  /* Already visited or queued for visiting. */    return;    }    -  +  ref_to = my_make_mc_marker(dst, visit_dst, extra); +     if (type != PIKE_T_UNKNOWN) {    struct svalue s;    SET_SVAL(s, type, 0, refs, dst);    low_mapping_insert(identify_loop_reverse, &s, Pike_sp-1, 0); -  } +     -  ref_to = my_make_mc_marker(dst, visit_dst, extra); +     mc_wq_enqueue(ref_to); -  +  } else { +  /* Not a valid svalue type. +  * +  * Probably T_MAPPING_DATA or T_MULTISET_DATA or similar. +  * +  * Recurse directly while we have the containing thing on the stack. +  */ +  ref_to->flags |= MC_FLAG_INT_VISITED; +  visit_dst(dst, VISIT_COMPLEX_ONLY, extra);    } -  + }      void identify_loop_visit_leave(void *thing, int type, void *extra)   {    if (type < T_VOID) {    /* Valid svalue type. */    pop_stack();    }   }      /*! @decl array(mixed) identify_cycle(mixed x)