pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.c:1:   /*   || 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: interpret.c,v 1.323 2003/08/08 10:28:48 grubba Exp $ + || $Id: interpret.c,v 1.324 2003/08/08 11:02:15 mast Exp $   */      #include "global.h" - RCSID("$Id: interpret.c,v 1.323 2003/08/08 10:28:48 grubba Exp $"); + RCSID("$Id: interpret.c,v 1.324 2003/08/08 11:02:15 mast Exp $");   #include "interpret.h"   #include "object.h"   #include "program.h"   #include "svalue.h"   #include "array.h"   #include "mapping.h"   #include "pike_error.h"   #include "language.h"   #include "stralloc.h"   #include "constants.h"
pike.git/src/interpret.c:1666:    self_time=time_passed - time_in_children; \    Pike_interpreter.accounted_time+=self_time; \    function = Pike_fp->context.prog->identifiers + Pike_fp->ident; \    function->total_time=Pike_fp->self_time_base + (INT32)(time_passed /1000); \    function->self_time+=(INT32)( self_time /1000); \   }while(0)   #endif   #endif       - #define basic_low_return() do { \ -  struct svalue *save_sp=Pike_fp->save_sp; \ -  DO_IF_DEBUG( \ + #define basic_low_return(save_sp) \ +  DO_IF_DEBUG( \    if(Pike_mark_sp < Pike_fp->save_mark_sp) \    Pike_fatal("Popped below save_mark_sp!\n"); \    if(Pike_sp<Pike_interpreter.evaluator_stack) \    Pike_fatal("Stack error (also simple).\n"); \    ) \    \    Pike_mark_sp=Pike_fp->save_mark_sp; \    \ -  POP_PIKE_FRAME(); \ -  } while(0) +  POP_PIKE_FRAME()         void low_return(void)   { -  +  struct svalue *save_sp = Pike_fp->save_sp;   #if defined (PIKE_USE_MACHINE_CODE) && defined (OPCODE_RETURN_JUMPADDR)    /* If the function that returns is the only ref to the current    * object and its program then the program would be freed in    * destruct_objects_to_destruct below. However, we're still    * executing in an opcode in its code so we need prog->program to    * stick around for a little while more to handle the returned    * address. We therefore add a ref to the current object so that    * it'll live through this function. */    struct object *o = Pike_fp->current_object;    add_ref (o);   #endif    -  basic_low_return(); +  basic_low_return (save_sp);    if(save_sp+1 > Pike_sp)    {    push_int(0);    }else{    if(save_sp+1 < Pike_sp)    {    assign_svalue(save_sp,Pike_sp-1);    pop_n_elems(Pike_sp-save_sp-1);       /* consider using a flag for immediate destruct instead... */
pike.git/src/interpret.c:1718:    if(Pike_interpreter.trace_level>1) trace_return_value();    }      #if defined (PIKE_USE_MACHINE_CODE) && defined (OPCODE_RETURN_JUMPADDR)    free_object (o);   #endif   }      void low_return_pop(void)   { +  struct svalue *save_sp = Pike_fp->save_sp;   #if defined (PIKE_USE_MACHINE_CODE) && defined (OPCODE_RETURN_JUMPADDR)    /* See note above. */    struct object *o = Pike_fp->current_object;    add_ref (o);   #endif    -  basic_low_return(); +  basic_low_return (save_sp);       if(save_sp < Pike_sp)    {    pop_n_elems(Pike_sp-save_sp);    /* consider using a flag for immediate destruct instead... */    destruct_objects_to_destruct();    }      #if defined (PIKE_USE_MACHINE_CODE) && defined (OPCODE_RETURN_JUMPADDR)    sub_ref (o);