Branch: Tag:

2008-05-13

2008-05-13 17:11:19 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Changed representation of GETTER/SETTER identifiers.
The getter/setter information is now stored directly in struct identifier, rather than embedded in the program code.
This means that getter/setters implemented in C won't need to allocate any space for the program code.
It also does away with one level of indirection, which should improve performance marginally.

Rev: src/docode.c:1.199
Rev: src/object.c:1.292
Rev: src/program.c:1.693
Rev: src/program.h:1.244

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: docode.c,v 1.198 2008/05/11 22:44:00 mast Exp $ + || $Id: docode.c,v 1.199 2008/05/13 17:11:18 grubba Exp $   */      #include "global.h"
737: Inside #if defined(PIKE_DEBUG)
   id->run_time_type);    }   #endif /* PIKE_DEBUG */ -  f = ((INT32 *)(inh->prog->program + id->func.offset))[1]; +  f = id->func.gs_info.setter;    if (f == -1) {    yywarning("Variable %S lacks a setter.", id->name);    } else if (!level) {
891: Inside #if defined(PIKE_DEBUG)
   id->run_time_type);    }   #endif /* PIKE_DEBUG */ -  f = ((INT32 *)(inh->prog->program + id->func.offset))[0]; +  f = id->func.gs_info.getter;    if (f == -1) {    yywarning("Variable %S lacks a getter.", id->name);    } else if (!level) {
1260:    }    }    } -  +  /* FALL_THROUGH */    default:    switch(CDR(n)->token)    {
1324: Inside #if defined(PIKE_DEBUG)
   id->run_time_type);    }   #endif /* PIKE_DEBUG */ -  f = ((INT32 *)(inh->prog->program + id->func.offset))[1]; +  f = id->func.gs_info.setter;    if (f == -1) {    yywarning("Variable %S lacks a setter.", id->name);    } else if (!level) {