Branch: Tag:

2001-04-08

2001-04-08 10:11:40 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

pike now avoides saving o->parent when it doesn't have to

Rev: src/bignum.c:1.21
Rev: src/builtin.cmod:1.25
Rev: src/builtin_functions.c:1.358
Rev: src/las.c:1.250
Rev: src/object.c:1.168
Rev: src/program.c:1.310
Rev: src/program.h:1.124
Rev: src/testsuite.in:1.401

5:   \*/   /**/   #include "global.h" - RCSID("$Id: las.c,v 1.249 2001/04/01 15:40:23 grubba Exp $"); + RCSID("$Id: las.c,v 1.250 2001/04/08 10:11:39 hubbe Exp $");      #include "language.h"   #include "interpret.h"
938:    res->node_info |= OPT_ASSIGNMENT;    /* FALL_THROUGH */    case F_MAGIC_INDEX: +  { +  int e; +  struct program_state *state = Pike_compiler;    res->node_info |= OPT_EXTERNAL_DEPEND; -  +  for(e=0;e<b->u.sval.u.integer;e++) +  { +  state->new_program->flags |= PROGRAM_USES_PARENT; +  state=state->previous; +  } +     break; -  +  }       case F_UNDEFINED:    res->node_info |= OPT_EXTERNAL_DEPEND | OPT_SIDE_EFFECT;
1256:      node *debug_mkexternalnode(struct program *parent_prog, int i)   { +  struct program_state *state;    node *res = mkemptynode();    struct identifier *id;    res->token = F_EXTERNAL;
1287:    res->u.integer.b = i;       /* Bzot-i-zot */ -  if(parent_prog != Pike_compiler->new_program) -  Pike_compiler->new_program->flags |= PROGRAM_USES_PARENT; +  state = Pike_compiler; +  while(parent_prog != state->new_program) +  { +  state->new_program->flags |= PROGRAM_USES_PARENT; +  state=state->previous; +  }       res=freeze_node(res);