Branch: Tag:

2002-03-04

2002-03-04 16:02:35 by Martin Stjernholm <mast@lysator.liu.se>

Defeated shared nodes the ugly way since I finally got fed up with the
bogus line numbers. Also disabled some debug checks that don't work well
enough.

Rev: src/las.c:1.240

5:   \*/   /**/   #include "global.h" - RCSID("$Id: las.c,v 1.239 2002/02/06 17:26:15 grubba Exp $"); + RCSID("$Id: las.c,v 1.240 2002/03/04 16:02:35 mast Exp $");      #include "language.h"   #include "interpret.h"
126: Inside #if defined(PIKE_DEBUG)
   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
141: Inside #if defined(PIKE_DEBUG) and #if defined(PIKE_DEBUG)
   fatal("Type of external node is not matching it's identifier.\n");    }   #endif + #endif    }    }    }
448: Inside #if defined(SHARED_NODES)
   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); */
1297:       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
1312: Inside #if defined(PIKE_DEBUG)
   fatal("Type of external node is not matching it's identifier.\n");    }   #endif + #endif       return res;   }
3152:    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
3167: Inside #if defined(PIKE_DEBUG)
   fatal("Type of external node is not matching it's identifier.\n");    }   #endif + #endif    }    }    }