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.331 2003/09/24 00:57:58 mast Exp $ + || $Id: interpret.c,v 1.332 2003/09/26 17:38:12 grubba Exp $   */      #include "global.h" - RCSID("$Id: interpret.c,v 1.331 2003/09/24 00:57:58 mast Exp $"); + RCSID("$Id: interpret.c,v 1.332 2003/09/26 17:38:12 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:130: Inside #if defined(PIKE_DEBUG)
  void gc_mark_stack_external (struct pike_frame *f,    struct svalue *stack_p, struct svalue *stack)   {    for (; f; f = f->next)    GC_ENTER (f, T_PIKE_FRAME) {    if(f->context.parent)    gc_mark_external (f->context.parent, " in context.parent in frame on stack");    gc_mark_external (f->current_object, " in current_object in frame on stack");    gc_mark_external (f->context.prog, " in context.prog in frame on stack");    if (f->locals) { /* Check really needed? */ +  if (f->flags & PIKE_FRAME_MALLOCED_LOCALS) { +  /* FIXME: In this case the frame is an object; +  * Are we counting double? +  */ +  gc_mark_external_svalues(f->locals, f->num_locals, +  " in malloced locals"); +  } else { +  /* NOTE: stack_fp may be less than f->locals. */ +  if ((stack_p - f->locals) >= 0x10000) { +  fatal("Unreasonable locals: stack:%p locals:%p\n", +  stack_p, f->locals); +  }    gc_mark_external_svalues (f->locals, stack_p - f->locals, " on svalue stack"); -  +  /* FIXME: Is this safe if stack_p is less than f->locals? */    stack_p = f->locals;    } -  +  }    } GC_LEAVE;    if (stack != stack_p)    gc_mark_external_svalues (stack, stack_p - stack, " on svalue stack");   }      static void gc_check_stack_callback(struct callback *foo, void *bar, void *gazonk)   {    gc_mark_stack_external (Pike_fp, Pike_sp, Pike_interpreter.evaluator_stack);   }   #endif