pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.c:3924:    frame->pc = c->ptr;    else    frame->pc = NULL;    frame->current_storage = o->storage + context->storage_offset;    frame->expendible_offset = 0;    frame->args = args;    frame->num_locals = 0;    frame->num_args = 0;    frame->scope = scope;    frame->save_mark_sp=Pike_mark_sp; +  frame->return_addr = NULL;    frame_set_save_sp(frame, c->retval);       Pike_fp = frame;    c->frame = frame;   }      PMOD_EXPORT void callsite_resolve_lfun(struct pike_callsite *c, struct object *o, int lfun) {    struct program *p = o->prog;      #ifdef PIKE_DEBUG
pike.git/src/interpret.c:3990:   }      PMOD_EXPORT void callsite_execute(const struct pike_callsite *c) {    FAST_CHECK_THREADS_ON_CALL();    switch (c->type) {    default:    case CALLTYPE_NONE:   #ifdef PIKE_DEBUG    Pike_fatal("Unknown callsite type: %d\n", c->type);   #endif +  break;    case CALLTYPE_EFUN:    case CALLTYPE_CFUN:    {    void (*fun)(INT32) = c->ptr; -  fun(c->args); +  (* fun)(c->args);    }    break;    case CALLTYPE_PIKEFUN:    {    PIKE_OPCODE_T *pc = c->ptr;   #ifdef ENTRY_PROLOGUE_SIZE    pc -= ENTRY_PROLOGUE_SIZE;   #endif    eval_instruction(pc);    }
pike.git/src/interpret.c:4069:       /* restore catching_eval_jmpbuf */       Pike_interpreter.catching_eval_jmpbuf = c->saved_jmpbuf;    UNSET_ONERROR(c->onerror);   }      PMOD_EXPORT void callsite_return(struct pike_callsite *c) {    const struct svalue *sp = Pike_sp;    struct svalue *retval = c->retval; -  struct pike_frame *frame; +  struct pike_frame *frame = c->frame;    int got_retval = 1; -  int pop; +  int pop = 0;       /* NOTE: this is necessary because of recursion */ -  +  if (c->type == CALLTYPE_PIKEFUN) {    c->frame = frame = Pike_fp; -  +     pop = frame->flags & PIKE_FRAME_RETURN_POP; -  +  }       if(Pike_mark_sp < Pike_fp->save_mark_sp)    Pike_fatal("Popped below save_mark_sp!\n");    if(Pike_sp<Pike_interpreter.evaluator_stack)    Pike_fatal("Stack error (also simple).\n");       if (retval >= sp) {   #ifdef PIKE_DEBUG    if (retval - sp > 1)    Pike_fatal("Stack too small after function call.\n");