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.247 2001/09/01 00:27:30 hubbe Exp $"); + RCSID("$Id: interpret.c,v 1.248 2001/09/13 15:58:18 hubbe 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:504: Inside #if defined(PIKE_DEBUG)
  #ifdef PIKE_DEBUG    if(t_flag>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));       TRACE((4,"- o->parent_identifier=%d inherit->identifier_level=%d\n", -  loc->o->prog->flags & PROGRAM_USES_PARENT ? +  loc->o->prog && +  (loc->o->prog->flags & PROGRAM_USES_PARENT) ?    PARENT_INFO(loc->o)->parent_identifier : -1,    loc->inherit->identifier_level));       switch(loc->inherit->parent_offset)    {    default:    {    struct external_variable_context tmp=*loc;   #ifdef PIKE_DEBUG    if(!loc->inherit->inherit_level)    fatal("Gahhh! inherit level zero in wrong place!\n");   #endif    while(tmp.inherit->inherit_level >= loc->inherit->inherit_level)    {    TRACE((5,"- inherit-- (%d >= %d)\n",tmp.inherit->inherit_level, loc->inherit->inherit_level));    tmp.inherit--;    }    -  +     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:    TRACE((5,"- Following inherit->parent\n"));    loc->parent_identifier=loc->inherit->parent_identifier;    loc->o=loc->inherit->parent;    break;       case -18:    TRACE((5,"- Following o->parent\n")); -  if(loc->o->prog && (loc->o->prog->flags & PROGRAM_USES_PARENT)) +  if(((p=loc->o->prog) || +  (p=get_program_for_object_being_destructed(loc->o))) && +  (p->flags & PROGRAM_USES_PARENT))    { -  loc->parent_identifier=PARENT_INFO(loc->o)->parent_identifier; -  loc->o=PARENT_INFO(loc->o)->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");