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.226 2000/12/01 08:09:49 hubbe Exp $"); + RCSID("$Id: las.c,v 1.227 2000/12/01 20:19:25 grubba 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:341:    return res;    }    free_string(b);    }    return a;    }    return b;   }       - #define NODES 256 + #define NODES 128 /* 256 */      #undef BLOCK_ALLOC_NEXT   #define BLOCK_ALLOC_NEXT u.node.a      BLOCK_ALLOC(node_s, NODES)      #undef BLOCK_ALLOC_NEXT   #define BLOCK_ALLOC_NEXT next      #ifdef SHARED_NODES      struct node_hash_table node_hash;      static size_t hash_node(node *n)   { -  return hashmem((unsigned char *)&(n->token), +  DO_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);      #ifdef PIKE_DEBUG    node *probe = node_hash.table[hval];    while(probe) {
pike.git/src/las.c:549: Inside #if defined(PIKE_DEBUG)
   tmp->token);       debug_malloc_dump_references(tmp,0,2,0);       if(tmp->token==F_CONSTANT)    print_tree(tmp);    }    /* else */   #endif    { -  /* Free the node and be happy */ +    #ifdef SHARED_NODES -  /* Force the hashtable to be cleared. */ +  /* Force the hashtable entry to be cleared. */    tmp->next = NULL;    sub_node(tmp);   #endif /* SHARED_NODES */ -  +  /* Free the node and be happy */    /* Make sure we don't free any nodes twice */    if(car_is_node(tmp)) _CAR(tmp)=0;    if(cdr_is_node(tmp)) _CDR(tmp)=0;   #ifdef SHARED_NODES    if (!(tmp->tree_info & OPT_NOT_SHARED)) {    tmp->hash = hash_node(tmp);    }   #ifdef PIKE_DEBUG    if (l_flag > 3) {    fprintf(stderr, "Freeing node that had %d refs.\n",