Branch: Tag:

2009-11-19

2009-11-19 17:10:04 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Don't generate parent pointers when the only external symbols referenced are by inherits.
Fixes bug related to [bug 2672 (#2672)].

Rev: src/las.c:1.440

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: las.c,v 1.439 2009/11/09 17:17:45 grubba Exp $ + || $Id: las.c,v 1.440 2009/11/19 17:10:04 grubba Exp $   */      #include "global.h"
1207:    res->u.integer.a = parent_prog->id;    res->u.integer.b = i;    +  /* Don't do this if res about to get inherited, since the inherit won't +  * be affected by later overloading of the inherited class in our parents. +  */ +  if (!(Pike_compiler->flags & COMPILATION_FORCE_RESOLVE)) {    /* Bzot-i-zot */    state = Pike_compiler;    while(parent_prog != state->new_program)
1214:    state->new_program->flags |= PROGRAM_USES_PARENT | PROGRAM_NEEDS_PARENT;    state=state->previous;    } +  }       return res;   #endif /* 0 */