pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h" - RCSID("$Id: las.c,v 1.218 2000/09/30 19:19:48 grubba Exp $"); + RCSID("$Id: las.c,v 1.219 2000/09/30 23:31:42 per Exp $");      #include "language.h"   #include "interpret.h"   #include "las.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "dynamic_buffer.h"   #include "lex.h"   #include "pike_types.h"
pike.git/src/las.c:363: Inside #if defined(SHARED_NODES)
  struct node_hash_table node_hash;      static size_t hash_node(node *n)   {    return hashmem((unsigned char *)&(n->token),    sizeof(node) - OFFSETOF(node_s, token), sizeof(node));   }      static void add_node(node *n)   { -  size_t hval = n->hash % node_hash.size; +  size_t hval = (n->hash % node_hash.size);      #ifdef PIKE_DEBUG    node *probe = node_hash.table[hval];    while(probe) { -  if (probe == n) { -  fatal("add_node(%p): Node already added!\n"); +  if (probe == n) +  { +  fprintf(stderr, "add_node(%p == %p): Node already added!\n", probe, n); +  fprintf( stderr, " %d <-> %d\n", hval, (n->hash % node_hash.size) ); +  probe = node_hash.table[hval]; +  while( probe ) +  { +  fprintf(stderr, " %p\n", probe); +  probe = probe->next;    } -  +  fatal( "Node already added!\n" ); +  }    probe = probe->next;    }   #endif /* PIKE_DEBUG */    n->next = node_hash.table[hval];    node_hash.table[hval] = n;   }      static void sub_node(node *n)   {    node *prior;