Branch: Tag:


2014-12-04 19:26:38 by Henrik Grubbström (Grubba) <>

GC: Added visit_{enter,leave}() API.

Make it easier to keep track of state in the visit_*() API
by tracking when we start and stop visiting things.

2472:   static void visit_mapping_data (struct mapping_data *md, int action,    void *extra)   { +  visit_enter(md, T_MAPPING_DATA, extra);    switch (action) {   #ifdef PIKE_DEBUG    default:
2498:    visit_svalue (&k->val, val_ref_type, extra);    }    } +  visit_leave(md, T_MAPPING_DATA, extra);   }      PMOD_EXPORT void visit_mapping (struct mapping *m, int action, void *extra)   { -  +  visit_enter(m, T_MAPPING, extra);    switch (action) {   #ifdef PIKE_DEBUG    default:
2517:       visit_ref (m->data, REF_TYPE_INTERNAL,    (visit_thing_fn *) &visit_mapping_data, extra); +  visit_leave(m, T_MAPPING, extra);   }      #ifdef MAPPING_SIZE_DEBUG