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.202 2000/09/04 14:49:05 per Exp $"); + RCSID("$Id: las.c,v 1.203 2000/09/08 17:06:29 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:103: Inside #if defined(PIKE_DEBUG)
      check_node_hash(n);       switch(n->token)    {    case F_EXTERNAL:    if(n->type)    {    int parent_id = n->u.integer.a;    int id_no = n->u.integer.b; -  struct program_state *state = Pike_compiler->previous; +  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) {   #ifdef PIKE_DEBUG    if(id->type != n->type)    {    printf("Type of external node is not matching it's identifier.\nid->type: ");
pike.git/src/las.c:368: Inside #if defined(SHARED_NODES)
   !MEMCMP(&(n->token), &(orig->token),    sizeof(node) - OFFSETOF(node_s, token))) {    free_node(dmalloc_touch(node *, orig));    n->refs++;    return check_node_hash(dmalloc_touch(node *, n));    }    n = n->next;    }    orig->node_info &= ~OPT_DEFROSTED;    add_node(dmalloc_touch(node *, orig)); +  check_tree(orig,0);    return check_node_hash(orig);   }      #else /* !SHARED_NODES */      #ifdef PIKE_DEBUG   static node *freeze_node(node *orig)   {    check_tree(orig, 0);    return orig;
pike.git/src/las.c:906: Inside #if defined(SHARED_NODES)
      /* return freeze_node(res); */   #endif /* SHARED_NODES */       return res;   }      node *debug_mkidentifiernode(int i)   {   #if 1 -  return mkexternalnode(Pike_compiler->new_program, i); +  node *res = mkexternalnode(Pike_compiler->new_program, i); +  check_tree(res,0); +  return res;   #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{
pike.git/src/las.c:1001: Inside #if defined(__CHECKER__)
  #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); +  res=freeze_node(res); +  + #ifdef PIKE_DEBUG +  if(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    -  +  return res; + } +    node *debug_mkcastnode(struct pike_string *type,node *n)   {    node *res;       if(!n) return 0;      #ifdef PIKE_DEBUG    if (!type) {    fatal("Casting to no type!\n");    }