pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:1:   /*   || 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.339 2009/11/28 13:53:59 mast Exp $ + || $Id: gc.c,v 1.340 2009/12/13 23:22:34 mast Exp $   */      #include "global.h"      struct callback *gc_evaluator_callback=0;      #include "array.h"   #include "multiset.h"   #include "mapping.h"   #include "object.h"
pike.git/src/gc.c:1225: Inside #if defined(PIKE_DEBUG)
   }    else    fprintf (stderr,    "%*s**%*s=== In nameless inherit, program %d:\n",    indent, "", inh->inherit_level + 1, "", inh->prog->id);    }       for (var_idx = 0; var_idx < p2->num_variable_index; var_idx++) {    struct identifier *id =    p2->identifiers + p2->variable_index[var_idx]; +  if (id->run_time_type != PIKE_T_FREE && +  id->run_time_type != PIKE_T_GET_SET) {    void *ptr;       fprintf (stderr, "%*s**%*srtt: %-8s name: ",    indent, "", inh->inherit_level + 1, "",    get_name_of_type (id->run_time_type));       if (id->name->size_shift)    safe_print_short_svalue (stderr, (union anything *) &id->name,    T_STRING);    else    fprintf (stderr, "%-20s", id->name->str);       fprintf (stderr, " off: %4"PRINTPTRDIFFT"d value: ",    inh->storage_offset + id->func.offset);       ptr = PIKE_OBJ_STORAGE ((struct object *) a) +    inh->storage_offset + id->func.offset;    if (id->run_time_type == T_MIXED)    safe_print_svalue_compact (stderr, (struct svalue *) ptr);    else -  safe_print_short_svalue_compact (stderr, (union anything *) ptr, +  safe_print_short_svalue_compact (stderr, +  (union anything *) ptr,    id->run_time_type);       fputc ('\n', stderr);    var_count++;    }    } -  +  }       if (!var_count)    fprintf (stderr, "%*s** (none)\n", indent, "");    }       fprintf(stderr,"%*s**Describing program %p of object:\n",indent,"", p);   #ifdef DEBUG_MALLOC    if ((INT32)(ptrdiff_t) p == 0x55555555)    fprintf(stderr, "%*s**Zapped program pointer.\n", indent, "");    else
pike.git/src/gc.c:1401: Inside #if defined(PIKE_DEBUG)
   safe_print_short_svalue (stderr, (union anything *) &id->name,    T_STRING);    else    fprintf (stderr, "%-20s", id->name->str);       if (IDENTIFIER_IS_ALIAS(id->identifier_flags)) {    fprintf(stderr, " depth: %d id: %d",    id->func.ext_ref.depth, id->func.ext_ref.id);    } else if (id->identifier_flags & IDENTIFIER_C_FUNCTION)    fprintf (stderr, " addr: %p", id->func.c_fun); -  else if (IDENTIFIER_IS_VARIABLE (id->identifier_flags)) +  else if (IDENTIFIER_IS_VARIABLE (id->identifier_flags)) { +  if (id->run_time_type == PIKE_T_GET_SET) { +  fprintf (stderr, " "); +  if (id->func.gs_info.getter >= 0) { +  fprintf (stderr, "getter: %d(%d)", +  id->func.gs_info.getter, +  id->func.gs_info.getter + id_inh->identifier_level); +  if (id->func.gs_info.setter >= 0) +  fprintf (stderr, ", "); +  } +  if (id->func.gs_info.setter >= 0) +  fprintf (stderr, "setter: %d(%d)", +  id->func.gs_info.setter, +  id->func.gs_info.setter + id_inh->identifier_level); +  } +  else if (id->run_time_type == PIKE_T_FREE) +  fprintf (stderr, " extern"); +  else    fprintf (stderr, " rtt: %s off: %"PRINTPTRDIFFT"d",    get_name_of_type (id->run_time_type), id->func.offset); -  +  }    else if (IDENTIFIER_IS_PIKE_FUNCTION (id->identifier_flags))    fprintf (stderr, " pc: %"PRINTPTRDIFFT"d", id->func.offset);    else if (IDENTIFIER_IS_CONSTANT (id->identifier_flags)) {    fputs (" value: ", stderr);    safe_print_svalue_compact (    stderr, &id_inh->prog->constants[id->func.offset].sval);    }       fputc ('\n', stderr);    id_count++;