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.297 2007/06/19 18:23:52 mast Exp $ + || $Id: gc.c,v 1.298 2007/09/29 15:10:50 grubba 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:1285: Inside #if defined(PIKE_DEBUG)
   inh_id_end = inh->identifier_level + inh->prog->num_identifier_references;    }       if (id_ref->id_flags & ID_HIDDEN ||    (id_ref->id_flags & (ID_INHERITED|ID_PRIVATE)) ==    (ID_INHERITED|ID_PRIVATE)) continue;       id_inh = INHERIT_FROM_PTR (p, id_ref);    id = id_inh->prog->identifiers + id_ref->identifier_offset;    -  if (IDENTIFIER_IS_PIKE_FUNCTION (id->identifier_flags)) type = "fun"; +  if (IDENTIFIER_IS_ALIAS (id->identifier_flags)) type = "alias"; +  else if (IDENTIFIER_IS_PIKE_FUNCTION (id->identifier_flags)) type = "fun";    else if (IDENTIFIER_IS_FUNCTION (id->identifier_flags)) type = "cfun";    else if (IDENTIFIER_IS_CONSTANT (id->identifier_flags)) type = "const"; -  else if (IDENTIFIER_IS_ALIAS (id->identifier_flags)) type = "alias"; +     else if (IDENTIFIER_IS_VARIABLE (id->identifier_flags)) type = "var";    else type = "???";       prot[0] = prot[1] = 0;    if (id_ref->id_flags & ID_PRIVATE) {    strcat (prot, ",pri");    if (!(id_ref->id_flags & ID_STATIC)) strcat (prot, ",!sta");    }    else    if (id_ref->id_flags & ID_STATIC) strcat (prot, ",sta");    if (id_ref->id_flags & ID_NOMASK) strcat (prot, ",nom");    if (id_ref->id_flags & ID_PUBLIC) strcat (prot, ",pub");    if (id_ref->id_flags & ID_PROTECTED) strcat (prot, ",pro");    if (id_ref->id_flags & ID_INLINE) strcat (prot, ",inl");    if (id_ref->id_flags & ID_OPTIONAL) strcat (prot, ",opt");    if (id_ref->id_flags & ID_EXTERN) strcat (prot, ",ext");    if (id_ref->id_flags & ID_VARIANT) strcat (prot, ",var"); -  if (id_ref->id_flags & ID_ALIAS) strcat (prot, ",ali"); +        sprintf (descr, "%s: %s", type, prot + 1);    fprintf (stderr, "%*s**%*s%-18s name: ",    indent, "", id_inh->inherit_level + 1, "", descr);       if (id->name->size_shift)    print_short_svalue (stderr, (union anything *) &id->name, T_STRING);    else    fprintf (stderr, "%-20s", id->name->str);    -  if (id->identifier_flags & IDENTIFIER_C_FUNCTION) +  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))    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);    print_svalue_compact (stderr, &id_inh->prog->constants[id->func.offset].sval);    }