Branch: Tag:

2015-06-04

2015-06-04 20:59:17 by Martin Karlgren <marty@roxen.com>

count_memory: avoid visiting refs at all in negative lookahead mode.

2527:    void *extra)   {    visit_enter(md, T_MAPPING_DATA, extra); -  switch (action) { +  switch (action & VISIT_MODE_MASK) {   #ifdef PIKE_DEBUG    default:    Pike_fatal ("Unknown visit action %d.\n", action);
2540:    break;    }    -  if ((md->ind_types | md->val_types) & +  if (!(action & VISIT_NO_REFS) && +  (md->ind_types | md->val_types) &    (action & VISIT_COMPLEX_ONLY ? BIT_COMPLEX : BIT_REF_TYPES)) {    int ind_ref_type =    md->flags & MAPPING_WEAK_INDICES ? REF_TYPE_WEAK : REF_TYPE_NORMAL;
2559:   PMOD_EXPORT void visit_mapping (struct mapping *m, int action, void *extra)   {    visit_enter(m, T_MAPPING, extra); -  switch (action) { +  switch (action & VISIT_MODE_MASK) {   #ifdef PIKE_DEBUG    default:    Pike_fatal ("Unknown visit action %d.\n", action);