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.69 1998/11/17 22:57:50 hubbe Exp $"); + RCSID("$Id: las.c,v 1.70 1998/11/17 23:16: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:75:   }      #ifdef DEBUG   void check_tree(node *n, int depth)   {    if(!d_flag) return;    if(!n) return;    if(n->token==USHRT_MAX)    fatal("Free node in tree.\n");    +  if(d_flag<2) return; +     if(!(depth & 1023))    {    node *q;    for(q=n->parent;q;q=q->parent)    if(q->parent==n)    fatal("Cyclic node structure found.\n");    }    depth++;       if(car_is_node(n))
pike.git/src/las.c:326:    res->type=0;    res->node_info=0;    res->tree_info=0;    res->parent=0;    return res;   }      node *mknode(short token,node *a,node *b)   {    node *res; + #ifdef DEBUG +  if(a && a==b) +  fatal("mknode: a and be are the same!\n"); + #endif +  +     check_tree(a,0);    check_tree(b,0);    res = mkemptynode();    CAR(res) = a;    CDR(res) = b;    res->node_info = 0;    res->tree_info = 0;    if(a) a->parent = res;    if(b) b->parent = res;   
pike.git/src/las.c:1049:    CAR(n)->u.sval.u.efun->function == f)    return & CDR(n);    }    return 0;   }         static void low_print_tree(node *foo,int needlval)   {    if(!foo) return; -  if(l_flag>4) +  if(l_flag>9)    {    printf("/*%x*/",foo->tree_info);    }    switch(foo->token)    {    case F_LOCAL:    if(needlval) putchar('&');    printf("$%ld",(long)foo->u.number);    break;