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.276 2002/11/04 17:02:44 marcus Exp $ + || $Id: interpret.c,v 1.277 2002/11/09 17:03:53 grubba Exp $   */      #include "global.h" - RCSID("$Id: interpret.c,v 1.276 2002/11/04 17:02:44 marcus Exp $"); + RCSID("$Id: interpret.c,v 1.277 2002/11/09 17:03:53 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:141: Inside #if defined(PIKE_DEBUG)
   {    if(f->context.parent)    gc_external_mark2(f->context.parent,0," in Pike_fp->context.parent on current stack");    gc_external_mark2(f->current_object,0," in Pike_fp->current_object on current stack");    gc_external_mark2(f->context.prog,0," in Pike_fp->context.prog on current stack");    }      }   #endif    + /* Execute Pike code starting at pc. +  * +  * Called once with NULL to initialize tables. +  * +  * Returns 0 if pc is NULL. +  * +  * Returns -1 if the code terminated due to a RETURN. +  * +  * Returns -2 if the code terminated due to EXIT_CATCH or ESCAPE_CATCH. +  */   static int eval_instruction(PIKE_OPCODE_T *pc);      PMOD_EXPORT void init_interpreter(void)   {   #ifdef USE_MMAP_FOR_STACK    static int fd = -1;         #ifndef MAP_VARIABLE   #define MAP_VARIABLE 0
pike.git/src/interpret.c:1144:    {    free_mixed_svalues(scope->locals,scope->num_locals);    free((char *)(scope->locals));   #ifdef PIKE_DEBUG    scope->flags&=~PIKE_FRAME_MALLOCED_LOCALS;   #endif    }    really_free_pike_frame(scope);   }    + /* Apply a function. +  * +  * Application types: +  * +  * APPLY_STACK: Apply Pike_sp[-args] with args-1 arguments. +  * +  * APPLY_SVALUE: Apply the svalue at arg1, and adjust the stack +  * to leave a return value. +  * +  * APPLY_SVALUE_STRICT: Apply the svalue at arg1, and don't adjust the +  * stack for functions that return void. +  * +  * APPLY_LOW: Apply function #arg2 in object arg1. +  * +  * 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(). +  */   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)    {
pike.git/src/interpret.c:1489:   #endif /* ENTRY_PROLOGUE_SIZE */    );    low_return();    }   }         /* Put catch outside of eval_instruction, so    * the setjmp won't affect the optimization of    * eval_instruction +  * +  * Returns 0 on throw. +  * +  * Returns 1 if the code performed a RETURN. +  * +  * Returns 2 if the code performed EXIT_CATCH or ESCAPE_CATCH.    */   static int o_catch(PIKE_OPCODE_T *pc)   {    JMP_BUF tmp;    struct svalue *expendible=Pike_fp->expendible;    int flags=Pike_fp->flags;       debug_malloc_touch(Pike_fp);    if(SETJMP(tmp))    {