Branch: Tag:

2001-06-23

2001-06-23 21:52:10 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

allow programs with pragma_save_parent to be cloned without parent since they unless they really NEED a parent pointer

Rev: src/docode.c:1.122
Rev: src/las.c:1.254
Rev: src/object.c:1.171
Rev: src/program.c:1.333
Rev: src/program.h:1.130

5:   \*/   /**/   #include "global.h" - RCSID("$Id: las.c,v 1.253 2001/06/07 21:47:11 hubbe Exp $"); + RCSID("$Id: las.c,v 1.254 2001/06/23 21:52:09 hubbe Exp $");      #include "language.h"   #include "interpret.h"
953:    res->node_info |= OPT_EXTERNAL_DEPEND;    for(e=0;e<b->u.sval.u.integer;e++)    { -  state->new_program->flags |= PROGRAM_USES_PARENT; +  state->new_program->flags |= PROGRAM_USES_PARENT | PROGRAM_NEEDS_PARENT;    state=state->previous;    }   
1310:    state = Pike_compiler;    while(parent_prog != state->new_program)    { -  state->new_program->flags |= PROGRAM_USES_PARENT; +  state->new_program->flags |= PROGRAM_USES_PARENT | PROGRAM_NEEDS_PARENT;    state=state->previous;    }   
1900:    struct program_state *state=Pike_compiler;;    for(;state->fake_object!=s->u.object;state=state->previous)    { -  state->new_program->flags |= PROGRAM_USES_PARENT; +  state->new_program->flags |= PROGRAM_USES_PARENT | PROGRAM_NEEDS_PARENT;    n=mkefuncallnode("function_object",    mkefuncallnode("object_program",n));    }