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.420 2008/06/28 01:26:36 mast Exp $ + || $Id: las.c,v 1.421 2008/06/28 03:25:51 mast 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:5157:   }      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; +  struct program *malloc_prog = Pike_compiler->malloc_size_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);    }
pike.git/src/las.c:5192:    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;    -  make_program_executable(prog); +  if (prog->num_program > malloc_prog->total_size) { +  char *start = (char *) (prog->program + malloc_prog->total_size); +  size_t len = (malloc_prog->num_program - malloc_prog->total_size) * +  sizeof (prog->program[0]); +  make_area_executable (start, len); +  malloc_prog->total_size = malloc_prog->num_program; +  }       tmp_callback=add_to_callback(&evaluator_callbacks,    check_evaluation_time,    (void *)&foo,0);       if(apply_low_safe_and_stupid(Pike_compiler->fake_object, jump))    {    if(print_error)    /* Generate error message */    if(!Pike_compiler->catch_level)