Branch: Tag:

2000-04-25

2000-04-25 09:32:46 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

some optimizations... (inline now speeds up recursive functions a lot)

Rev: src/docode.c:1.69
Rev: src/interpret.c:1.148
Rev: src/interpret_functions.h:1.16
Rev: src/language.yacc:1.181
Rev: src/las.h:1.35
Rev: src/lex.c:1.78
Rev: src/peep.in:1.29
Rev: src/program.c:1.233

33:   %token F_BRANCH_IF_NOT_LOCAL_ARROW   %token F_INC_LOOP F_DEC_LOOP   %token F_INC_NEQ_LOOP F_DEC_NEQ_LOOP + %token F_RECUR F_TAIL_RECUR      %token F_LEXICAL_LOCAL F_LEXICAL_LOCAL_LVALUE   
192:   /* This is the grammar definition of Pike. */      #include "global.h" - RCSID("$Id: language.yacc,v 1.180 2000/04/20 02:41:45 hubbe Exp $"); + RCSID("$Id: language.yacc,v 1.181 2000/04/25 09:32:46 hubbe Exp $");   #ifdef HAVE_MEMORY_H   #include <memory.h>   #endif
710:    free_string(s);    }    -  if(compiler_pass==1) + /* if(compiler_pass==1) */    { -  $<number>5=define_function(check_node_hash($4)->u.sval.u.string, +  /* FIXME: +  * set current_function_number for local functions as well +  */ +  compiler_frame->current_function_number= +  define_function(check_node_hash($4)->u.sval.u.string,    check_node_hash($<n>$)->u.sval.u.string,    $1 & (~ID_EXTERN),    IDENTIFIER_PIKE_FUNCTION,
778:    lex.current_file = save_file;   #endif /* PIKE_DEBUG */    -  f=dooptcode(check_node_hash($4)->u.sval.u.string, check_node_hash($10), -  check_node_hash($<n>9)->u.sval.u.string, $1); +  f=dooptcode(check_node_hash($4)->u.sval.u.string, +  check_node_hash($10), +  check_node_hash($<n>9)->u.sval.u.string, +  $1);   #ifdef PIKE_DEBUG    if(recoveries && sp-evaluator_stack < recoveries->sp)    fatal("Stack error (underflow)\n");    -  if(compiler_pass == 1 && f!=$<number>5) -  fatal("define_function screwed up! %d != %d\n",f,$<number>5); +  if(compiler_pass == 1 && f!=compiler_frame->current_function_number) +  fatal("define_function screwed up! %d != %d\n",f,compiler_frame->current_function_number);   #endif    }    pop_compiler_frame();