Branch: Tag:

2002-06-10

2002-06-10 20:49:50 by Martin Stjernholm <mast@lysator.liu.se>

Cleaned up find_module_identifier a little and fixed a lookup bug: It should
be possible to access identifiers in a private inherit of a surrounding
class.

Rev: src/language.yacc:1.287
Rev: src/program.c:1.433

5:   \*/   /**/   #include "global.h" - RCSID("$Id: program.c,v 1.432 2002/05/31 22:41:26 nilsson Exp $"); + RCSID("$Id: program.c,v 1.433 2002/06/10 20:49:50 mast Exp $");   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"
984:    struct svalue *modules=(struct svalue *)    (used_modules.s.str + used_modules.s.len);    -  if((ret=index_modules(ident, -  &Pike_compiler->module_index_cache, -  Pike_compiler->num_used_modules, -  modules))) return ret; -  modules-=Pike_compiler->num_used_modules; -  +     { -  struct program_state *p=Pike_compiler->previous; +  struct program_state *p=Pike_compiler;    int n; -  for(n=0;n<compilation_depth;n++,p=p->previous) +  for(n=0;n<=compilation_depth;n++,p=p->previous)    {    int i;    if(see_inherit)    {    i=really_low_find_shared_string_identifier(ident,    p->new_program, -  SEE_STATIC); +  SEE_STATIC|SEE_PRIVATE);    if(i!=-1)    { -  return mkexternalnode(p->new_program, i); +  return p == Pike_compiler ? +  mkidentifiernode(i) : +  mkexternalnode(p->new_program, i);    }    }   
3091:    break;       case -18: +  /* Ponder: Can we be sure that PROGRAM_USES_PARENT +  * doesn't get set later? /mast */    if(par->prog->flags & PROGRAM_USES_PARENT)    {    pid = PARENT_INFO(par)->parent_identifier;