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.39 1997/10/05 03:39:25 grubba Exp $"); + RCSID("$Id: las.c,v 1.40 1998/03/03 11:24:32 hubbe 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:136:   static node *free_nodes=0;      void free_all_nodes(void)   {    if(!local_variables)    {    node *tmp;    struct node_chunk *tmp2;    int e=0;    -  + #ifndef DEBUG    if(cumulative_parse_error)    { -  + #endif       for(tmp2=node_chunks;tmp2;tmp2=tmp2->next) e+=NODES;    for(tmp=free_nodes;tmp;tmp=CAR(tmp)) e--;    if(e)    {    int e2=e;    for(tmp2=node_chunks;tmp2;tmp2=tmp2->next)    {    for(e=0;e<NODES;e++)    {    for(tmp=free_nodes;tmp;tmp=CAR(tmp))    if(tmp==tmp2->nodes+e)    break;       if(!tmp)    {    tmp=tmp2->nodes+e;   #ifdef DEBUG    if(!cumulative_parse_error)    { -  fprintf(stderr,"Free node at %p.\n",tmp); +  fprintf(stderr,"Free node at %p, (%d) (token=%d).\n",tmp, tmp->line_number, tmp->token); +  if(tmp->token==F_CONSTANT) +  print_tree(tmp);    }    else   #endif    {    /* 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; -  +  debug_malloc_touch(tmp->type);    free_node(tmp);    }    }    }    }   #ifdef DEBUG    if(!cumulative_parse_error)    fatal("Failed to free %d nodes when compiling!\n",e2);   #endif    } -  + #ifndef DEBUG    } -  + #endif    while(node_chunks)    {    tmp2=node_chunks;    node_chunks=tmp2->next;    free((char *)tmp2);    }    free_nodes=0;    cumulative_parse_error=0;    }   }
pike.git/src/las.c:481:    break;       case F_GLOBAL:    yyerror("Expected constant, got global variable");    push_int(0);    break;    }    }   }    - node *index_node(node *n, struct pike_string * id) + node *debug_index_node(node *n, struct pike_string * id)   {    node *ret;    JMP_BUF tmp;    if(SETJMP(tmp))    {    ONERROR tmp;    SET_ONERROR(tmp,exit_on_error,"Error in handle_error in master object!");    assign_svalue_no_free(sp++, & throw_value);    APPLY_MASTER("handle_error", 1);    pop_stack();