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.353 2004/11/06 07:35:17 nilsson Exp $ + || $Id: las.c,v 1.354 2004/12/18 18:06:45 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:49:      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:    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:    return 0;       default:    return !!_CDR(n);    }   }      int node_is_leaf(node *n)   {    switch(n->token)
pike.git/src/las.c:1467: Inside #if 0 and #if defined(PIKE_DEBUG)
      Pike_fatal("Type of external node is not matching it's identifier.\n");    }   #endif   #endif       return res;   #endif /* 0 */   }    + node *debug_mkthisnode(struct program *parent_prog, int inherit_num) + { +  node *res; +  + #ifdef PIKE_DEBUG +  if ((inherit_num < 0) || (inherit_num > 65535)) { +  Pike_fatal("This is bad: %p, %d\n", parent_prog, inherit_num); +  } + #endif /* PIKE_DEBUG */ +  +  res = mkemptynode(); +  res->token = F_THIS; +  type_stack_mark(); +  push_object_type(1, parent_prog->inherits[inherit_num].prog->id); +  res->type = pop_unfinished_type(); +  res->tree_info = res->node_info = OPT_NOT_CONST; +  + #ifdef __CHECKER__ +  _CDR(res) = 0; + #endif +  res->u.integer.a = parent_prog->id; +  res->u.integer.b = inherit_num; +  +  return freeze_node(res); + } +    node *debug_mkcastnode(struct pike_type *type, node *n)   {    node *res;       if(!n) return 0;      #ifdef PIKE_DEBUG    if (!type) {    Pike_fatal("Casting to no type!\n");    }
pike.git/src/las.c:5755:    }    }       tmp.offset=PIKE_PC;    Pike_compiler->compiler_frame->num_args=args;      #ifdef PIKE_DEBUG    if(a_flag > 2)    {    fputs("Coding: ", stderr); -  print_tree(check_node_hash(n)); +  /*print_tree(check_node_hash(n));*/    }   #endif    if(!Pike_compiler->num_parse_error)    {    extern int remove_clear_locals;    remove_clear_locals=args;    if(vargs) remove_clear_locals++;    tmp.offset=do_code_block(check_node_hash(n));    remove_clear_locals=0x7fffffff;    }