pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: interpret.c,v 1.99 1998/11/16 22:14:50 hubbe Exp $"); + RCSID("$Id: interpret.c,v 1.100 1998/11/20 01:57:21 hubbe Exp $");   #include "interpret.h"   #include "object.h"   #include "program.h"   #include "svalue.h"   #include "array.h"   #include "mapping.h"   #include "error.h"   #include "language.h"   #include "stralloc.h"   #include "constants.h"
pike.git/src/interpret.c:61:   struct svalue *evaluator_stack; /* Start of stack */   int stack_size = EVALUATOR_STACK_SIZE;   int evaluator_stack_malloced = 0;   char *stack_top;      /* mark stack, used to store markers into the normal stack */   struct svalue **mark_sp; /* Current position */   struct svalue **mark_stack; /* Start of stack */   int mark_stack_malloced = 0;    + #ifdef PROFILING + #ifdef HAVE_GETHRTIME + long long accounted_time =0; + long long time_base =0; + #endif + #endif +    void push_sp_mark(void)   {    if(mark_sp == mark_stack + stack_size)    error("No more mark stack!\n");    *mark_sp++=sp;   }   int pop_sp_mark(void)   {   #ifdef DEBUG    if(mark_sp < mark_stack)
pike.git/src/interpret.c:1785:   }         void mega_apply(enum apply_type type, INT32 args, void *arg1, void *arg2)   {    struct object *o;    int fun, tailrecurse=-1;    struct svalue *save_sp=sp-args;   #ifdef PROFILING   #ifdef HAVE_GETHRTIME -  static long long accounted_time =0; +     long long children_base = accounted_time;    long long start_time = gethrtime();    unsigned INT32 self_time_base;   #endif   #endif       switch(type)    {    case APPLY_STACK:    apply_stack: