pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #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"   #include "las.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "dynamic_buffer.h"   #include "lex.h"   #include "pike_types.h"
pike.git/src/las.c:931:    copy_pike_type(res->type, void_type_string);       if(a) res->tree_info |= a->tree_info;    if(b) res->tree_info |= b->tree_info;    break;       case F_MAGIC_SET_INDEX:    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;    break;       case F_RETURN:    res->node_info |= OPT_RETURN;    break;       case F_BREAK:
pike.git/src/las.c:1249:   #endif /* SHARED_NODES */       res = freeze_node(res);       check_tree(res,0);    return res;   }      node *debug_mkexternalnode(struct program *parent_prog, int i)   { +  struct program_state *state;    node *res = mkemptynode();    struct identifier *id;    res->token = F_EXTERNAL;       id = ID_FROM_INT(parent_prog, i);   #ifdef PIKE_DEBUG    if(d_flag)    {    check_type_string(id->type);    check_string(id->name);
pike.git/src/las.c:1280:    }    res->tree_info = res->node_info;      #ifdef __CHECKER__    _CDR(res) = 0;   #endif    res->u.integer.a = parent_prog->id;    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);      #ifdef PIKE_DEBUG    /* FIXME: This test crashes on valid code because the type of the    * identifier can change in pass 2 -Hubbe    */    if(d_flag && id->type != res->type)    {    printf("Type of external node is not matching it's identifier.\nid->type: ");