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.342 2003/11/14 00:13:36 mast Exp $ + || $Id: las.c,v 1.343 2003/11/19 17:19:29 grubba Exp $   */      #include "global.h" - RCSID("$Id: las.c,v 1.342 2003/11/14 00:13:36 mast Exp $"); + RCSID("$Id: las.c,v 1.343 2003/11/19 17:19:29 grubba 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:1384:   #endif /* SHARED_NODES */       res = freeze_node(res);       check_tree(res,0);    return res;   }      node *debug_mkexternalnode(struct program *parent_prog, int i)   { + #if 0 +  return mkidentifiernode(add_ext_ref(Pike_compiler, parent_prog, i)); +  + #else /* !0 */    struct program_state *state;    node *res = mkemptynode();    res->token = F_EXTERNAL;       if (i == IDREF_MAGIC_THIS) {    type_stack_mark();    push_object_type (0, parent_prog->id);    res->type = pop_unfinished_type();    res->node_info = OPT_NOT_CONST;    }
pike.git/src/las.c:1452: Inside #if 0 and #if defined(PIKE_DEBUG)
   printf("\nres->type : ");    simple_describe_type(res->type);    printf("\n");       Pike_fatal("Type of external node is not matching it's identifier.\n");    }   #endif   #endif       return res; + #endif /* 0 */   }      node *debug_mkcastnode(struct pike_type *type, node *n)   {    node *res;       if(!n) return 0;      #ifdef PIKE_DEBUG    if (!type) {
pike.git/src/las.c:5372:    if(foo->counter-- < 0)    {    foo->yes=1;    pike_throw();    }   }      ptrdiff_t eval_low(node *n,int print_error)   {    unsigned INT16 num_strings, num_constants; +  unsigned INT32 num_program;    size_t jump;    struct svalue *save_sp = Pike_sp;    ptrdiff_t ret;    struct program *prog = Pike_compiler->new_program;   #ifdef PIKE_USE_MACHINE_CODE    size_t num_relocations;   #endif /* PIKE_USE_MACHINE_CODE */      #ifdef PIKE_DEBUG    if(l_flag > 3 && n)    {    fprintf(stderr,"Evaluating (tree info=%x):",n->tree_info);    print_tree(n);    }   #endif       if(Pike_compiler->num_parse_error) return -1;    -  num_strings=prog->num_strings; -  num_constants=prog->num_constants; +  num_strings = prog->num_strings; +  num_constants = prog->num_constants; +  num_program = prog->num_program;   #ifdef PIKE_USE_MACHINE_CODE    num_relocations = prog->num_relocations;   #endif /* PIKE_USE_MACHINE_CODE */    -  jump = PIKE_PC; +  jump = docode(dmalloc_touch(node *, n));    - #ifdef INS_ENTRY -  INS_ENTRY(); - #endif /* INS_ENTRY */ -  -  store_linenumbers=0; -  docode(dmalloc_touch(node *, n)); -  ins_f_byte(F_DUMB_RETURN); -  store_linenumbers=1; -  +     ret=-1;    if(!Pike_compiler->num_parse_error)    {    struct callback *tmp_callback;    struct timer_oflo foo;       /* This is how long we try to optimize before giving up... */    foo.counter=10000;    foo.yes=0;   
pike.git/src/las.c:5476:    free_string(p_const->name);    p_const->name = NULL;    }    }      #ifdef PIKE_USE_MACHINE_CODE    prog->num_relocations = num_relocations;      #ifdef VALGRIND_DISCARD_TRANSLATIONS    /* We won't use this machine code any more... */ -  VALGRIND_DISCARD_TRANSLATIONS(prog->program + jump, -  (prog->num_program - jump)*sizeof(PIKE_OPCODE_T)); +  VALGRIND_DISCARD_TRANSLATIONS(prog->program + num_program, +  (prog->num_program - num_program)*sizeof(PIKE_OPCODE_T));   #endif /* VALGRIND_DISCARD_TRANSLATIONS */   #endif /* PIKE_USE_MACHINE_CODE */    -  prog->num_program=jump; +  prog->num_program=num_program;       return ret;   }      static node *eval(node *n)   {    node *new;    ptrdiff_t args;    if(!is_const(n) || n->token==':')    return n;