pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:1:   /*\   ||| This file is part of Pike. For copyright information see COPYRIGHT.   ||| 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.282 2002/03/02 18:47:38 mast Exp $"); + RCSID("$Id: las.c,v 1.283 2002/03/04 16:02:37 mast 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:120: Inside #if defined(PIKE_DEBUG)
   {    int parent_id = n->u.integer.a;    int id_no = n->u.integer.b;    struct program_state *state = Pike_compiler;    while (state && (state->new_program->id != parent_id)) {    state = state->previous;    }    if (state) {    struct identifier *id = ID_FROM_INT(state->new_program, id_no);    if (id) { + #if 0   #ifdef PIKE_DEBUG    /* FIXME: This test crashes on valid code because the type of the    * identifier can change in pass 2 - Hubbe    */    if(id->type != n->type)    {    fprintf(stderr, "Type of external node "    "is not matching its identifier.\nid->type: ");    simple_describe_type(id->type);    fprintf(stderr, "\nn->type : ");    simple_describe_type(n->type);    fprintf(stderr, "\n");       fatal("Type of external node is not matching its identifier.\n");    }   #endif -  + #endif    }    }    }    }       if(d_flag<2) break;       if(!(depth & 1023))    {    node *q;
pike.git/src/las.c:446: Inside #if defined(SHARED_NODES)
   }    n->next = NULL;   }      static node *freeze_node(node *orig)   {    size_t hash;    node *n;    int found = 0;    +  /* Defeat shared nodes since it messes up the line number info in +  * e.g. backtraces, which can be extremely annoying. Done the ugly +  * way for the time being since I've grown tired of waiting for the +  * issue to be resolved one way or the other. /mast */ +  orig->tree_info |= OPT_NOT_SHARED; +     if (orig->tree_info & OPT_NOT_SHARED) {    /* No need to have this node in the hash-table. */    /* add_node(orig); */    return orig;    }       /* free_node() wants a correct hash */    orig->hash = hash = hash_node(orig);       /* Mark this node as a possible duplicate */
pike.git/src/las.c:1383:    /* Bzot-i-zot */    state = Pike_compiler;    while(parent_prog != state->new_program)    {    state->new_program->flags |= PROGRAM_USES_PARENT | PROGRAM_NEEDS_PARENT;    state=state->previous;    }       res=freeze_node(res);    + #if 0   #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: ");    simple_describe_type(id->type);    printf("\nres->type : ");    simple_describe_type(res->type);    printf("\n");       fatal("Type of external node is not matching it's identifier.\n");    }   #endif -  + #endif       return res;   }      node *debug_mkcastnode(struct pike_type *type, node *n)   {    node *res;       if(!n) return 0;   
pike.git/src/las.c:3542:    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) {    name = id->name->str; + #if 0   #ifdef PIKE_DEBUG    /* FIXME: This test crashes on valid code because the type of the    * identifier can change in pass 2 -Hubbe    */    if(id->type != f)    {    printf("Type of external node is not matching it's identifier.\nid->type: ");    simple_describe_type(id->type);    printf("\nf : ");    simple_describe_type(f);    printf("\n");       fatal("Type of external node is not matching it's identifier.\n");    }   #endif -  + #endif    }    }    }    break;       default:    name="unknown function";    }       if(max_args < args)