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.311 2003/07/31 14:28:50 tomas Exp $ + || $Id: interpret.c,v 1.312 2003/08/02 01:08:03 mast Exp $   */      #include "global.h" - RCSID("$Id: interpret.c,v 1.311 2003/07/31 14:28:50 tomas Exp $"); + RCSID("$Id: interpret.c,v 1.312 2003/08/02 01:08:03 mast 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:509: Inside #if defined(PIKE_DEBUG)
   i++;    }   }      #define TRACE(X) pike_trace X   #else   #define TRACE(X)   #endif      PMOD_EXPORT void find_external_context(struct external_variable_context *loc, -  int arg2) +  int depth)   {    struct program *p;    -  TRACE((4, "-find_external_context(%d, inherit=%ld)\n", arg2, +  TRACE((4, "-find_external_context(%d, inherit=%ld)\n", depth,    DO_NOT_WARN((long)(loc->o->prog ? loc->inherit - loc->o->prog->inherits : 0))));       if(!loc->o)    Pike_error("Current object is destructed\n");    -  while(--arg2>=0) +  while(--depth>=0)    {   #ifdef PIKE_DEBUG    if(Pike_interpreter.trace_level>8 && loc->o->prog)    my_describe_inherit_structure(loc->o->prog);   #endif       TRACE((4,"- i->parent_offset=%d i->parent_identifier=%d\n",    loc->inherit->parent_offset,    loc->inherit->parent_identifier));   
pike.git/src/interpret.c:560:       find_external_context(&tmp,    loc->inherit->parent_offset);    loc->o=tmp.o;    loc->parent_identifier =    loc->inherit->parent_identifier+    tmp.inherit->identifier_level;    }    break;    -  case -17: +  case INHERIT_PARENT:    TRACE((5,"- Following inherit->parent\n"));    loc->parent_identifier=loc->inherit->parent_identifier;    loc->o=loc->inherit->parent;    break;    -  case -18: +  case OBJECT_PARENT:    TRACE((5,"- Following o->parent\n"));    if(((p=loc->o->prog) ||    (p=get_program_for_object_being_destructed(loc->o))) &&    (p->flags & PROGRAM_USES_PARENT))    {    loc->parent_identifier=LOW_PARENT_INFO(loc->o,p)->parent_identifier;    loc->o=LOW_PARENT_INFO(loc->o,p)->parent;    }else{    loc->o=0;    loc->parent_identifier=-1;    }    break;    }       if(!loc->o)    Pike_error("Parent was lost during cloning.\n");       if(!(p=loc->o->prog)) -  Pike_error("Attempting to access variable in destructed object\n"); +  Pike_error("Attempting to access parent of destructed object.\n");      #ifdef DEBUG_MALLOC    if (loc->o->refs == 0x55555555) {    fprintf(stderr, "The object %p has been zapped!\n", loc->o);    describe(p);    Pike_fatal("Object zapping detected.\n");    }    if (p->refs == 0x55555555) {    fprintf(stderr, "The program %p has been zapped!\n", p);    describe(p);