pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:9145: Inside #if defined(PIKE_DEBUG)
   tmp++;    }    if(tmp >= p->refs)    gc_fatal(p, 1 ,"garbage collector failed to free program!!!\n");    }   #endif       return unreferenced;   }    -  - void push_compiler_frame(int lexical_scope) - { -  struct compiler_frame *f; -  f=ALLOC_STRUCT(compiler_frame); -  f->previous=Pike_compiler->compiler_frame; -  f->lexical_scope=lexical_scope; -  f->current_type=0; -  f->current_return_type=0; -  -  f->current_number_of_locals=0; -  f->max_number_of_locals=0; -  f->min_number_of_locals=0; -  f->last_block_level=-1; -  -  f->current_function_number=-2; /* no function */ -  f->recur_label=-1; -  f->is_inline=0; -  f->num_args=-1; -  f->opt_flags = OPT_SIDE_EFFECT|OPT_EXTERNAL_DEPEND; /* FIXME: Should be 0. */ -  Pike_compiler->compiler_frame=f; - } -  - node *low_pop_local_variables(int level, node *block) - { -  struct compilation *c = THIS_COMPILATION; -  while(Pike_compiler->compiler_frame->current_number_of_locals > level) -  { -  int e; -  e=--(Pike_compiler->compiler_frame->current_number_of_locals); -  if (block) { -  block = mknode(F_COMMA_EXPR, block, -  mknode(F_POP_VALUE, -  mknode(F_ASSIGN, -  mkintnode(0), -  mklocalnode(e, 0)), -  NULL)); -  } -  if ((Pike_compiler->compiler_pass == 2) && -  !(Pike_compiler->compiler_frame->variable[e].flags & -  LOCAL_VAR_IS_USED)) { -  ref_push_string(Pike_compiler->compiler_frame->variable[e].name); -  low_yyreport(REPORT_WARNING, -  Pike_compiler->compiler_frame->variable[e].file, -  Pike_compiler->compiler_frame->variable[e].line, -  parser_system_string, -  1, "Unused local variable %s."); -  } -  free_string(Pike_compiler->compiler_frame->variable[e].name); -  free_type(Pike_compiler->compiler_frame->variable[e].type); -  if(Pike_compiler->compiler_frame->variable[e].def) -  free_node(Pike_compiler->compiler_frame->variable[e].def); -  -  free_string(Pike_compiler->compiler_frame->variable[e].file); -  } -  return block; - } -  - node *pop_local_variables(int level, node *block) - { - #if 1 -  struct compilation *c = THIS_COMPILATION; -  /* We need to save the variables Kuppo (but not their names) */ -  if(level < Pike_compiler->compiler_frame->min_number_of_locals) -  { -  /* FIXME: Consider using flags to indicate whether a local variable -  * actually is used from a nested scope. */ -  for(;level<Pike_compiler->compiler_frame->min_number_of_locals;level++) -  { -  if ((Pike_compiler->compiler_pass == 2) && -  !(Pike_compiler->compiler_frame->variable[level].flags & -  LOCAL_VAR_IS_USED)) { -  ref_push_string(Pike_compiler->compiler_frame->variable[level].name); -  low_yyreport(REPORT_WARNING, -  Pike_compiler->compiler_frame->variable[level].file, -  Pike_compiler->compiler_frame->variable[level].line, -  parser_system_string, -  1, "Unused local variable %s."); -  /* Make sure we only warn once... */ -  Pike_compiler->compiler_frame->variable[level].flags |= -  LOCAL_VAR_IS_USED; -  } -  free_string(Pike_compiler->compiler_frame->variable[level].name); -  copy_shared_string(Pike_compiler->compiler_frame->variable[level].name, -  empty_pike_string); -  /* FIXME: Do we need to keep the filenames? */ -  } -  } - #endif -  return low_pop_local_variables(level, block); - } -  -  - void pop_compiler_frame(void) - { -  struct compiler_frame *f; -  -  f=Pike_compiler->compiler_frame; - #ifdef PIKE_DEBUG -  if(!f) -  Pike_fatal("Popping out of compiler frames\n"); - #endif -  -  low_pop_local_variables(0, NULL); -  if(f->current_type) -  free_type(f->current_type); -  -  if(f->current_return_type) -  free_type(f->current_return_type); -  -  Pike_compiler->compiler_frame=f->previous; -  dmfree((char *)f); - } -  -  +    PMOD_EXPORT void *get_inherit_storage(struct object *o, int inherit)   {    if (!o || !o->prog) return NULL;   #ifdef PIKE_DEBUG    if ((inherit < 0) || (inherit >= o->prog->num_inherits))    Pike_fatal("Inherit #%d out of range [0..%d]\n",    inherit, o->prog->num_inherits-1);   #endif    return o->storage + o->prog->inherits[inherit].storage_offset;   }
pike.git/src/program.c:10010: Inside #if defined(PIKE_DEBUG)
   Pike_fatal("Inherit out of range!\n");    }    if (i->prog != expected) {    Pike_fatal("Unexpected program at inherit #%d!\n", inh);    }   #endif       return Pike_fp->current_object->storage + i->storage_offset;   }    - PMOD_EXPORT void change_compiler_compatibility(int major, int minor) - { -  CHECK_COMPILER(); -  -  push_int(major); -  push_int(minor); -  -  safe_apply_current2(PC_CHANGE_COMPILER_COMPATIBILITY_FUN_NUM, 2, -  "change_compiler_compatibility"); -  pop_stack(); - } -  +    #ifdef PIKE_USE_MACHINE_CODE      #ifdef HAVE_SYS_MMAN_H   #include <sys/mman.h>   #endif      #if defined(HAVE_SYNC_INSTRUCTION_MEMORY) || defined(FLUSH_INSTRUCTION_CACHE) || !defined(USE_MY_MEXEC_ALLOC)   void make_area_executable (char *start, size_t len)   {   #ifndef USE_MY_MEXEC_ALLOC