Branch: Tag:

2001-08-15

2001-08-15 03:31:56 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

optimized function calls a few percent (especially recursive function calls)

Rev: src/docode.c:1.129
Rev: src/interpret.c:1.240
Rev: src/interpret.h:1.96
Rev: src/object.c:1.180
Rev: src/object.h:1.64
Rev: src/svalue.c:1.116
Rev: src/svalue.h:1.95

5:   \*/   /**/   #include "global.h" - RCSID("$Id: docode.c,v 1.128 2001/08/13 23:15:58 mast Exp $"); + RCSID("$Id: docode.c,v 1.129 2001/08/15 03:31:55 hubbe Exp $");   #include "las.h"   #include "program.h"   #include "pike_types.h"
426:      int do_lfun_call(int id,node *args)   { -  emit0(F_MARK); -  PUSH_CLEANUP_FRAME(do_pop_mark, 0); -  do_docode(args,0); +    #if 1    if(id == Pike_compiler->compiler_frame->current_function_number)    {    int n=count_args(args);    if(n == Pike_compiler->compiler_frame->num_args)    { -  +  do_docode(args,0);    if(Pike_compiler->compiler_frame->is_inline)    {    Pike_compiler->compiler_frame->recur_label=do_jump(F_RECUR,
444: Inside #if 1
   Pike_compiler->compiler_frame->recur_label=do_jump(F_POINTER,    Pike_compiler->compiler_frame->recur_label);    } +  return 1;    } -  else -  emit1(F_CALL_LFUN, id); +     } -  else +    #endif -  +  +  emit0(F_MARK); +  PUSH_CLEANUP_FRAME(do_pop_mark, 0); +  do_docode(args,0);    emit1(F_CALL_LFUN, id);    POP_AND_DONT_CLEANUP;    return 1;