pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.c:2118: Inside #if defined(PIKE_DEBUG)
  #ifdef PIKE_DEBUG    scope->flags&=~PIKE_FRAME_MALLOCED_LOCALS;   #endif    }    really_free_pike_frame(scope);   }      void *lower_mega_apply( INT32 args, struct object *o, ptrdiff_t fun )   {    struct pike_callsite C; -  callsite_init(&C); -  callsite_set_args(&C, args); +  callsite_init(&C, args);    callsite_resolve_fun(&C, o, fun);    if (C.type == CALLTYPE_PIKEFUN) {    FAST_CHECK_THREADS_ON_CALL();    return C.ptr;    }    /* This is only needed for pike functions right now:    * callsite_prepare(&C); */    callsite_execute(&C);    callsite_return(&C);    callsite_free(&C);
pike.git/src/interpret.c:2160:    *    * 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().    */   void* low_mega_apply(enum apply_type type, INT32 args, void *arg1, void *arg2)   {    struct pike_callsite C;    -  callsite_init(&C); -  callsite_set_args(&C, args); +  callsite_init(&C, args);       switch (type) {    case APPLY_STACK:    C.args--;    callsite_resolve_svalue(&C, Pike_sp - args);    break;    case APPLY_SVALUE_STRICT:    C.flags |= CALL_NEED_NO_RETVAL;    case APPLY_SVALUE:    callsite_resolve_svalue(&C, arg1);
pike.git/src/interpret.c:2195:    callsite_free(&C);       return NULL;   }      /* TAILCALL optimization variants. They try to reuse the current frame */   void* low_mega_apply_tailcall(enum apply_type type, INT32 args, void *arg1, void *arg2) {    struct pike_frame *frame = Pike_fp;    struct pike_callsite C;    -  callsite_init(&C); -  callsite_set_args(&C, args); +  callsite_init(&C, args);       /* We can reuse the current frame, so we set it into C here    * to allow callsite_resolve_* to pick it up    */    if (!(frame->flags & PIKE_FRAME_NO_REUSE) && frame->refs == 1) {    C.frame = Pike_fp;    }       switch (type) {    case APPLY_STACK:
pike.git/src/interpret.c:2246:    callsite_free(&C);       return NULL;   }      /* NOTE: see comments in low_mega_apply_tailcall() */   void* lower_mega_apply_tailcall(INT32 args, struct object *o, ptrdiff_t fun) {    struct pike_frame *frame = Pike_fp;    struct pike_callsite C;    -  callsite_init(&C); -  callsite_set_args(&C, args); +  callsite_init(&C, args);       if (!(frame->flags & PIKE_FRAME_NO_REUSE) && frame->refs == 1) {    C.frame = Pike_fp;    }       callsite_resolve_fun(&C, o, fun);       if (C.frame == frame) {    if (C.type == CALLTYPE_PIKEFUN) {    FAST_CHECK_THREADS_ON_CALL();
pike.git/src/interpret.c:2820:   PMOD_EXPORT void apply_svalue(struct svalue *s, INT32 args)   {    if(TYPEOF(*s) == T_INT)    {    pop_n_elems(args);    push_int(0);    }else{    ptrdiff_t expected_stack=Pike_sp-args+1 - Pike_interpreter.evaluator_stack;    struct pike_callsite C;    -  callsite_init(&C); -  callsite_set_args(&C, args); +  callsite_init(&C, args);    callsite_resolve_svalue(&C, s);    callsite_prepare(&C);    callsite_execute(&C);    callsite_return(&C);    callsite_free(&C);       /* Note: do we still need those? I guess callsite_return takes care    * of this stuff */    if(Pike_sp > (expected_stack + Pike_interpreter.evaluator_stack))    {