Branch: Tag:

2001-10-05

2001-10-05 01:30:14 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

much improved handling of cross-dependencies

Rev: lib/master.pike.in:1.170
Rev: src/builtin_functions.c:1.408
Rev: src/compilation.h:1.25
Rev: src/encode.c:1.130
Rev: src/global.h:1.65
Rev: src/interpret.c:1.250
Rev: src/interpret_functions.h:1.97
Rev: src/las.c:1.271
Rev: src/object.c:1.186
Rev: src/pike_types.c:1.182
Rev: src/program.c:1.381
Rev: src/program.h:1.145
Rev: src/threads.c:1.169

5:   \*/   /**/   #include "global.h" - RCSID("$Id: las.c,v 1.270 2001/09/29 11:31:40 hubbe Exp $"); + RCSID("$Id: las.c,v 1.271 2001/10/05 01:30:13 hubbe Exp $");      #include "language.h"   #include "interpret.h"
1734:    return n;   }    -  +    node *index_node(node *n, char *node_name, struct pike_string *id)   {    node *ret;
1789:    push_int(0);    break;    +  case T_OBJECT: +  case T_PROGRAM: + #if 1 +  if(!(Pike_compiler->new_program->flags & PROGRAM_PASS_1_DONE)) +  { +  struct program *p; +  if(Pike_sp[-1].type == T_OBJECT) +  p=Pike_sp[-1].u.object->prog; +  else +  p=Pike_sp[-1].u.program; +  +  if(p && !(p->flags & PROGRAM_PASS_1_DONE)) +  { +  if(report_compiler_dependency(p)) +  { +  pop_stack(); +  ref_push_object(placeholder_object); +  break; +  } +  } +  } + #endif +     default:    {    ptrdiff_t c;
1831:    !Pike_sp[-1].u.integer &&    Pike_sp[-1].subtype==NUMBER_UNDEFINED)    { +  if(Pike_compiler->new_program->flags & PROGRAM_PASS_1_DONE) +  {    if (node_name) {    my_yyerror("Index '%s' not present in module '%s'.",    id->str, node_name);
1845:    pop_stack();    free_svalue(&thrown);    } +  }else{ +  /* Hope it's there in pass 2 */ +  pop_stack(); +  ref_push_object(placeholder_object);    }    } -  +  }    END_CYCLIC();    }    }