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 under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: las.c,v 1.372 2006/01/20 17:56:46 grubba Exp $ + || $Id: las.c,v 1.373 2006/01/21 14:32:36 grubba Exp $   */      #include "global.h"   #include "interpret.h"   #include "las.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "dynamic_buffer.h"   #include "lex.h"
pike.git/src/las.c:50:   int car_is_node(node *n)   {    switch(n->token)    {    case F_EXTERNAL:    case F_IDENTIFIER:    case F_TRAMPOLINE:    case F_CONSTANT:    case F_LOCAL:    case F_THIS: +  case F_VERSION:    return 0;       default:    return !!_CAR(n);    }   }      int cdr_is_node(node *n)   {    switch(n->token)    {    case F_EXTERNAL:    case F_IDENTIFIER:    case F_TRAMPOLINE:    case F_CONSTANT:    case F_LOCAL:    case F_THIS: -  +  case F_VERSION:    return 0;       default:    return !!_CDR(n);    }   }      int node_is_leaf(node *n)   {    switch(n->token)    {    case F_EXTERNAL:    case F_IDENTIFIER:    case F_TRAMPOLINE:    case F_CONSTANT:    case F_LOCAL: -  +  case F_VERSION:    return 1;    }    return 0;   }      #ifdef PIKE_DEBUG   void check_tree(node *n, int depth)   {    node *orig_n = n;    node *parent;
pike.git/src/las.c:1290:   }      node *debug_mkopernode(char *oper_id, node *arg1, node *arg2)   {    if(arg1 && arg2)    arg1=mknode(F_ARG_LIST,arg1,arg2);       return mkefuncallnode(oper_id, arg1);   }    + node *debug_mkversionnode(int major, int minor) + { +  node *res = mkemptynode(); +  res->token = F_VERSION; + #ifdef __CHECKER__ +  _CDR(res) = 0; + #endif +  res->u.integer.a = major; +  res->u.integer.b = minor; + #ifdef SHARED_NODES +  res->hash = hash_node(res); + #endif /* SHARED_NODES */ +  return freeze_node(res); + } +    node *debug_mklocalnode(int var, int depth)   {    struct compiler_frame *f;    int e;    node *res = mkemptynode();    res->token = F_LOCAL;       f=Pike_compiler->compiler_frame;    for(e=0;e<depth;e++) f=f->previous;    copy_pike_type(res->type, f->variable[var].type);