Branch: Tag:

2014-06-18

2014-06-18 13:31:26 by Henrik Grubbström (Grubba) <grubba@grubba.org>

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