pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.c:955:    Pike_fatal("Mark Stack error (underflow).\n");       if(Pike_sp > Pike_interpreter.evaluator_stack+Pike_stack_size)    Pike_fatal("stack error (overflow).\n");          /* The locals will not be correct when running FILL_STACK    (actually, they will always be incorrect before running FILL_STACK,    but at least currently that is the first opcode run).    */ -  if( instr+F_OFFSET != F_FILL_STACK ) -  { -  if(/* Pike_fp->fun>=0 && */ Pike_fp->current_object->prog && -  Pike_fp->locals+Pike_fp->num_locals > Pike_sp) -  Pike_fatal("Stack error (stupid! %p %p+%x).\n",Pike_sp, -  Pike_fp->locals, Pike_fp->num_locals*sizeof(struct svalue)); -  } +     -  +  /* as it turns out, this is no longer true.. */ +  /* if( instr+F_OFFSET != F_FILL_STACK ) */ +  /* { */ +  /* if(/\* Pike_fp->fun>=0 && *\/ Pike_fp->current_object->prog && */ +  /* Pike_fp->locals+Pike_fp->num_locals > Pike_sp) */ +  /* Pike_fatal("Stack error (stupid! %p %p+%x).\n",Pike_sp, */ +  /* Pike_fp->locals, Pike_fp->num_locals*sizeof(struct svalue)); */ +  /* } */ +     if(Pike_interpreter.recoveries &&    (Pike_sp-Pike_interpreter.evaluator_stack <    Pike_interpreter.recoveries->stack_pointer))    Pike_fatal("Stack error (underflow).\n");       if(Pike_mark_sp > Pike_interpreter.mark_stack &&    Pike_mark_sp[-1] > Pike_sp)    Pike_fatal("Stack error (underflow?)\n");       if(d_flag > 9) do_debug();
pike.git/src/interpret.c:2048:    {    free_mixed_svalues(scope->locals,scope->num_locals);    free((char *)(scope->locals));   #ifdef PIKE_DEBUG    scope->flags&=~PIKE_FRAME_MALLOCED_LOCALS;   #endif    }    really_free_pike_frame(scope);   }    - int lower_mega_apply( INT32 args, struct object *o, ptrdiff_t fun ) + void *lower_mega_apply( INT32 args, struct object *o, ptrdiff_t fun )   {    struct program *p;    check_stack(256);    check_mark_stack(256);       if( (p = o->prog) )    {    struct svalue *save_sp = Pike_sp - args;    struct reference *ref = p->identifier_references + fun;    struct inherit *context = p->inherits + ref->inherit_offset;
pike.git/src/interpret.c:2182:    if(UNLIKELY(Pike_interpreter.trace_level>1))    do_trace_func_return (1, o, fun);    goto pop;    }    new_frame->save_mark_sp=new_frame->mark_sp_base=Pike_mark_sp;    new_frame->pc = new_frame->context->prog->program + function->func.offset   #ifdef ENTRY_PROLOGUE_SIZE    + ENTRY_PROLOGUE_SIZE   #endif /* ENTRY_PROLOGUE_SIZE */    ; -  return 1; +  return new_frame->pc;    }    else    {    struct object *tmp;    new_frame->pc = 0;    new_frame->num_args = 0;    tmp=parent_clone_object(constant->u.program,    o,    fun,    args);
pike.git/src/interpret.c:2227:    *    * Return values:    *    * Returns zero if the function was invalid or has been executed.    *    * Returns one if a frame has been set up to start the function    * with eval_instruction(Pike_fp->pc - ENTRY_PROLOGUE_SIZE). After    * eval_instruction() is done the frame needs to be removed by a call    * to low_return() or low_return_pop().    */ - int low_mega_apply(enum apply_type type, INT32 args, void *arg1, void *arg2) + void* low_mega_apply(enum apply_type type, INT32 args, void *arg1, void *arg2)   {    struct object *o = NULL;    struct pike_frame *scope=0;    ptrdiff_t fun=0;    struct svalue *save_sp=Pike_sp-args;      #if defined(PIKE_DEBUG) && defined(_REENTRANT)    if(d_flag)    {    THREAD_T self = th_self();