Branch: Tag:

2007-03-31

2007-03-31 21:41:34 by Henrik Grubbström (Grubba) <grubba@grubba.org>

low_describe_something() now knows about PIKE_T_TYPE.
Added disabled placeholders for hooks for types.

Rev: src/gc.c:1.279

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: gc.c,v 1.278 2007/03/07 18:41:31 mast Exp $ + || $Id: gc.c,v 1.279 2007/03/31 21:41:34 grubba Exp $   */      #include "global.h"
1180:    break;    }    +  case PIKE_T_TYPE: +  { +  fprintf(stderr, "%*s**type: ", indent, ""); +  simple_describe_type((struct pike_type *)a); +  fprintf(stderr, "\n"); +  break; +  } +     case T_PIKE_FRAME: {    struct pike_frame *f = (struct pike_frame *) a;    do {
2931:    n += gc_touch_all_programs();    n += gc_touch_all_objects();   #ifdef PIKE_DEBUG + #if 0 +  gc_touch_all_types(); + #endif    gc_touch_all_strings();   #endif    if (n != (unsigned) num_objects)
2989:    gc_mark_run_queue();    gc_mark_all_objects();    gc_mark_run_queue(); + #if 0 + #ifdef DEBUG_MALLOC +  gc_mark_all_types(); + #endif /* DEBUG_MALLOC */ + #endif   #ifdef PIKE_DEBUG    if(gc_debug) gc_mark_all_strings();   #endif /* PIKE_DEBUG */
3020:    gc_cycle_check_all_multisets();    gc_cycle_check_all_mappings();    gc_cycle_check_all_programs(); + #if 0 + #ifdef DEBUG_MALLOC +  gc_cycle_check_all_types(); + #endif + #endif      #ifdef PIKE_DEBUG    if (stack_top != POP2STACK (&sentinel_frame))
3078:    n += gc_touch_all_programs();    n += gc_touch_all_objects();   #ifdef PIKE_DEBUG + #if 0 +  gc_touch_all_types(); + #endif    gc_touch_all_strings();   #endif    if (n != (unsigned) num_objects)
3131:    if (gc_internal_program)    unreferenced += gc_free_all_unreferenced_programs();    + #if 0 + #ifdef DEBUG_MALLOC +  unreferenced += gc_free_all_unreferenced_types(); + #endif + #endif +     /* We might occasionally get things to gc_delayed_free that the free    * calls above won't find. They're tracked in this list. */    while (free_extra_list) {
3233: Inside #if 0
   n += gc_touch_all_mappings();    n += gc_touch_all_programs();    n += gc_touch_all_objects(); +  /* gc_touch_all_types(); */    /* gc_touch_all_strings(); */    if (n != (unsigned) num_objects)    Pike_fatal("Object count wrong after gc; expected %d, got %d.\n", num_objects, n);