Branch: Tag:

2003-09-24

2003-09-24 00:57:58 by Martin Stjernholm <mast@lysator.liu.se>

Improved handling of frames in locate_references a little more.

Rev: src/gc.c:1.234
Rev: src/interpret.c:1.331

2:   || 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.330 2003/09/24 00:20:49 mast Exp $ + || $Id: interpret.c,v 1.331 2003/09/24 00:57:58 mast Exp $   */      #include "global.h" - RCSID("$Id: interpret.c,v 1.330 2003/09/24 00:20:49 mast Exp $"); + RCSID("$Id: interpret.c,v 1.331 2003/09/24 00:57:58 mast Exp $");   #include "interpret.h"   #include "object.h"   #include "program.h"
132: Inside #if defined(PIKE_DEBUG)
  {    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) { -  ptrdiff_t numargs = MAXIMUM (0, MINIMUM (f->num_args, stack_p - f->locals)); -  if (numargs > 0) -  gc_mark_external_svalues (f->locals, numargs, -  " in function arguments for frame on stack"); -  if (f->locals + numargs < stack_p) -  gc_mark_external_svalues (f->locals + numargs, -  stack_p - (f->locals + numargs), -  " in locals for frame on stack"); +  if (f->locals) { /* Check really needed? */ +  gc_mark_external_svalues (f->locals, stack_p - f->locals, " on svalue stack");    stack_p = f->locals;    }    } GC_LEAVE;    if (stack != stack_p) -  gc_mark_external_svalues (stack, stack_p - stack, " on bottom of svalue stack"); +  gc_mark_external_svalues (stack, stack_p - stack, " on svalue stack");   }      static void gc_check_stack_callback(struct callback *foo, void *bar, void *gazonk)