Branch: Tag:

2002-04-15

2002-04-15 15:53:02 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added identifier_ref_offset to struct inherit.
Improved handling of inherits in new-style {en,de}code_value() of programs.
Removed some dead code.

Rev: src/encode.c:1.93
Rev: src/program.c:1.311
Rev: src/program.h:1.116

5:   \*/   /**/   #include "global.h" - RCSID("$Id: program.c,v 1.310 2002/04/12 09:30:13 grubba Exp $"); + RCSID("$Id: program.c,v 1.311 2002/04/15 15:53:02 grubba Exp $");   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"
917:    i.identifier_level=0;    i.storage_offset=0;    i.inherit_level=0; +  i.identifier_ref_offset=0;    i.parent=0;    i.parent_identifier=-1;    i.parent_offset=-18;
1335:          /* Collect references to inherited __INIT functions */ +  if (!(Pike_compiler->new_program->flags & PROGRAM_AVOID_CHECK)) {    for(e=Pike_compiler->new_program->num_inherits-1;e;e--)    {    int id;
1348:    Pike_compiler->init_node);    }    } +  }       /*    * Define the __INIT function, but only if there was any code
1969:    add_to_inherits(inherit);    }    +  /* This value is used by encode_value() to reverse the inherit operation. */ +  Pike_compiler->new_program->inherits[inherit_offset].identifier_ref_offset = +  Pike_compiler->new_program->num_identifier_references; +     for (e=0; e < (int)p->num_identifier_references; e++)    {    struct reference fun;