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.301 2003/03/24 12:23:32 jonasw Exp $ + || $Id: interpret.c,v 1.302 2003/04/03 14:56:26 grubba Exp $   */      #include "global.h" - RCSID("$Id: interpret.c,v 1.301 2003/03/24 12:23:32 jonasw Exp $"); + RCSID("$Id: interpret.c,v 1.302 2003/04/03 14:56:26 grubba 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:1357:    *    * Return values:    *    * Returns zero if the function was invalid or has been executed.    *    * Returns one if a frame has been set up to start the function    * with eval_instruction(Pike_fp->pc - ENTRY_PROLOGUE_SIZE). After    * eval_instruction() is done the frame needs to be removed by a call    * to low_return() or low_return_pop().    */ - PIKE_OPCODE_T *low_mega_apply(enum apply_type type, int frame_flags, -  INT32 args, void *arg1, void *arg2) + int low_mega_apply(enum apply_type type, INT32 args, void *arg1, void *arg2)   {    struct object *o;    struct pike_frame *scope=0;    ptrdiff_t fun;    struct svalue *save_sp=Pike_sp-args;      #if defined(PIKE_DEBUG) && defined(_REENTRANT)    if(d_flag)    {    THREAD_T self = th_self();
pike.git/src/interpret.c:1554:    }else{    if(save_sp+1 < Pike_sp)    {    assign_svalue(save_sp,Pike_sp-1);    pop_n_elems(Pike_sp-save_sp-1);    low_destruct_objects_to_destruct(); /* consider using a flag for immediate destruct instead... */       }    if(Pike_interpreter.trace_level>1) trace_return_value();    } - #if 0 -  if (frame_flags & PIKE_FRAME_RETURN_POP) { -  pop_stack(); +  return 0;   } -  if (frame_flags & PIKE_FRAME_RETURN_INTERNAL) { -  /* Inlined DO_DUMB_RETURN */ -  if (Pike_fp->flags & PIKE_FRAME_RETURN_INTERNAL) { -  if (Pike_fp->flags & PIKE_FRAME_RETURN_POP) { -  low_return_pop(); -  } else { -  low_return(); -  } - #ifdef PIKE_DEBUG -  if (t_flag) { -  fprintf(stderr, "Returning to 0x%p\n", Pike_fp->pc); -  } - #endif /* PIKE_DEBUG */ -  return Pike_fp->pc; -  } else { -  /* Inter return */ - #ifdef PIKE_DEBUG -  if (t_flag) { -  fprintf(stderr, "Inter return\n"); -  } - #endif /* PIKE_DEBUG */ -  return 1; -  } -  } - #endif /* 0 */ -  return NULL; - } +             #define low_return_profiling()      #ifdef PROFILING   #ifdef HAVE_GETHRTIME   #undef low_return_profiling   #define low_return_profiling() do { \    struct identifier *function; \
pike.git/src/interpret.c:1718:    sizeof(struct svalue **)*(Pike_mark_sp - Pike_fp->mark_sp_base));    Pike_fp->mark_sp_base-=freespace;    Pike_mark_sp-=freespace;    }   }         void mega_apply(enum apply_type type, INT32 args, void *arg1, void *arg2)   {    check_c_stack(8192); -  if(low_mega_apply(type, 0, args, arg1, arg2)) +  if(low_mega_apply(type, args, arg1, arg2))    {    eval_instruction(Pike_fp->pc   #ifdef ENTRY_PROLOGUE_SIZE    - ENTRY_PROLOGUE_SIZE   #endif /* ENTRY_PROLOGUE_SIZE */    );    low_return();    }   }