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.191 2000/08/16 10:20:23 grubba Exp $"); + RCSID("$Id: las.c,v 1.192 2000/08/24 04:04:41 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:869: Inside #if defined(SHARED_NODES)
   res->hash = hash_node(res);       /* return freeze_node(res); */   #endif /* SHARED_NODES */       return res;   }      node *debug_mkidentifiernode(int i)   { + #if 1 +  return mkexternalnode(Pike_compiler->new_program, i); + #else    node *res = mkemptynode();    res->token = F_IDENTIFIER;    copy_shared_string(res->type, ID_FROM_INT(Pike_compiler->new_program, i)->type);       /* FIXME */    if(IDENTIFIER_IS_CONSTANT(ID_FROM_INT(Pike_compiler->new_program, i)->identifier_flags))    {    res->node_info = OPT_EXTERNAL_DEPEND;    }else{    res->node_info = OPT_NOT_CONST;
pike.git/src/las.c:894:   #endif    res->u.id.number = i;   #ifdef SHARED_NODES    res->u.id.prog = Pike_compiler->new_program;   #endif /* SHARED_NODES */       res = freeze_node(res);       check_tree(res,0);    return res; + #endif   }      node *debug_mktrampolinenode(int i)   {    node *res = mkemptynode();    res->token = F_TRAMPOLINE;    copy_shared_string(res->type, ID_FROM_INT(Pike_compiler->new_program, i)->type);       /* FIXME */    if(IDENTIFIER_IS_CONSTANT(ID_FROM_INT(Pike_compiler->new_program, i)->identifier_flags))
pike.git/src/las.c:958:    }    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;       return freeze_node(res);   }      node *debug_mkcastnode(struct pike_string *type,node *n)   {    node *res;       if(!n) return 0;
pike.git/src/las.c:1072:    push_int(0);    }else{    switch(n->token)    {    case F_CONSTANT:    push_svalue(& n->u.sval);    return;       case F_EXTERNAL:    { -  struct program_state *state = Pike_compiler->previous; +  struct program_state *state = Pike_compiler;       while (state && (state->new_program->id != n->u.integer.a)) {    state = state->previous;    }    if(!state)    {    yyerror("Failed to resolv external constant");    push_int(0);    return;    }
pike.git/src/las.c:2417:    default:    name="`() (function call)";    break;    }    break;       case F_EXTERNAL:    {    int program_id = CAR(n)->u.integer.a;    int id_no = CAR(n)->u.integer.b; -  struct program_state *state = Pike_compiler->previous; +  struct program_state *state = Pike_compiler;       name="external symbol";       while (state && (state->new_program->id != program_id)) {    state = state->previous;    }       if (state) {    struct identifier *id = ID_FROM_INT(state->new_program, id_no);    if (id && id->name) {