Branch: Tag:

2003-02-04

2003-02-04 18:17:33 by Martin Stjernholm <mast@lysator.liu.se>

Always store file info in nodes to ensure that it works correctly with
include directives etc. (Previously it was only enabled when compiling with
rtldebug.)

Rev: src/language.yacc:1.314
Rev: src/las.c:1.323
Rev: src/pike_types.h:1.85

2:   || 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: language.yacc,v 1.313 2003/01/26 11:09:00 mirar Exp $ + || $Id: language.yacc,v 1.314 2003/02/04 18:17:33 mast Exp $   */      %pure_parser
113:   /* This is the grammar definition of Pike. */      #include "global.h" - RCSID("$Id: language.yacc,v 1.313 2003/01/26 11:09:00 mirar Exp $"); + RCSID("$Id: language.yacc,v 1.314 2003/02/04 18:17:33 mast Exp $");   #ifdef HAVE_MEMORY_H   #include <memory.h>   #endif
788:    {    int f;    node *check_args = NULL; +  struct pike_string *save_file = lex.current_file;    int save_line = lex.current_line;    int num_required_args = 0;    struct identifier *i; - #ifdef PIKE_DEBUG -  struct pike_string *save_file = lex.current_file; +     lex.current_file = $4->current_file; - #endif +     lex.current_line = $4->line_number;       if (($1 & ID_EXTERN) && (Pike_compiler->compiler_pass == 1)) {
870:       {    int l = $10->line_number; - #ifdef PIKE_DEBUG +     struct pike_string *f = $10->current_file; - #endif +     if (check_args) {    /* Prepend the arg checking code. */    $10 = mknode(F_COMMA_EXPR, mknode(F_POP_VALUE, check_args, NULL), $10);    }    lex.current_line = l; - #ifdef PIKE_DEBUG +     lex.current_file = f; - #endif +     }       f=dooptcode(check_node_hash($4)->u.sval.u.string,
912:   #endif       lex.current_line = save_line; - #ifdef PIKE_DEBUG +     lex.current_file = save_file; - #endif +     }    pop_compiler_frame();    free_node($4);
2038:    {    int localid;    struct identifier *i=ID_FROM_INT(Pike_compiler->new_program, $<number>4); -  int save_line = lex.current_line; - #ifdef PIKE_DEBUG +     struct pike_string *save_file = lex.current_file; -  +  int save_line = lex.current_line;    lex.current_file = $1->current_file; - #endif +     lex.current_line = $1->line_number;       $5=mknode(F_COMMA_EXPR,$5,mknode(F_RETURN,mkintnode(0),0));
2056:    i->opt_flags = Pike_compiler->compiler_frame->opt_flags;       lex.current_line = save_line; - #ifdef PIKE_DEBUG +     lex.current_file = save_file; - #endif +     pop_compiler_frame();    free_node($1);   
2177:    {    int localid;    struct identifier *i=ID_FROM_INT(Pike_compiler->new_program, $<number>5); -  int save_line = lex.current_line; - #ifdef PIKE_DEBUG +     struct pike_string *save_file = lex.current_file; -  +  int save_line = lex.current_line;    lex.current_file = $2->current_file; - #endif +     lex.current_line = $2->line_number;       debug_malloc_touch($6);
2197:    i->opt_flags = Pike_compiler->compiler_frame->opt_flags;       lex.current_line = save_line; - #ifdef PIKE_DEBUG +     lex.current_file = save_file; - #endif +     pop_compiler_frame();    free_node($2);