pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.c:3291:    get_name_of_type(TYPEOF(*s)));    break;    }   }      PMOD_EXPORT void callsite_resolve_fun(struct pike_callsite *c, struct object *o, INT16 fun) {    struct program *p = o->prog;    struct inherit *context;    struct reference *ref;    struct identifier *function; -  struct pike_frame *scope = NULL; +     INT32 args = c->args;       if(UNLIKELY(!p))    PIKE_ERROR("destructed object->function",    "Cannot call functions in destructed objects.\n", Pike_sp, args);       if(UNLIKELY(!(p->flags & PROGRAM_PASS_1_DONE) || (p->flags & PROGRAM_AVOID_CHECK)))    PIKE_ERROR("__empty_program() -> function",    "Cannot call functions in unfinished objects.\n", Pike_sp, args);       if(UNLIKELY(p == pike_trampoline_program &&    fun == QUICK_FIND_LFUN(pike_trampoline_program, LFUN_CALL)))    { -  scope = ((struct pike_trampoline *)(o->storage))->frame; +  struct pike_frame *scope = ((struct pike_trampoline *)(o->storage))->frame;    fun = ((struct pike_trampoline *)(o->storage))->func;    o = scope->current_object;    callsite_resolve_fun(c, o, fun);    c->frame->scope = scope;    add_ref(scope);    return;    }      #ifdef PIKE_DEBUG    if(fun>=(int)p->num_identifier_references)
pike.git/src/interpret.c:3362:    struct svalue *s=&(context->prog->    constants[function->func.const_info.offset].sval);    debug_malloc_touch(Pike_fp);    if(TYPEOF(*s) == T_PROGRAM)    {    c->type = CALLTYPE_PARENT_CLONE;    c->ptr = s->u.program;    /* this case needs a frame, too */    break;    } -  /* Fall through */ +  callsite_resolve_svalue(c, s); +  return;    }       case IDENTIFIER_VARIABLE:    {    struct svalue *save_sp = c->retval;       if(Pike_sp-save_sp-args<=0)    {    /* Create an extra svalue for tail recursion style call */    Pike_sp++;
pike.git/src/interpret.c:3396:    c->type = CALLTYPE_PIKEFUN;    c->ptr = context->prog->program + function->func.offset   #ifdef ENTRY_PROLOGUE_SIZE    + ENTRY_PROLOGUE_SIZE   #endif /* ENTRY_PROLOGUE_SIZE */    ;    break;    }       default: -  if (IDENTIFIER_IS_ALIAS(function->identifier_flags)) { +  if (UNLIKELY(IDENTIFIER_IS_ALIAS(function->identifier_flags))) {    do {    struct external_variable_context loc;    loc.o = o;    loc.inherit = INHERIT_FROM_INT(p, fun);    loc.parent_identifier = 0;    find_external_context(&loc, function->func.ext_ref.depth);    fun = function->func.ext_ref.id;    p = (o = loc.o)->prog;    function = ID_FROM_INT(p, fun);    } while (IDENTIFIER_IS_ALIAS(function->identifier_flags));
pike.git/src/interpret.c:3463:    frame->context = context;    frame->fun = fun;    frame->locals = Pike_sp - args;    if (c->type == CALLTYPE_PIKEFUN)    frame->pc = c->ptr;    else    frame->pc = NULL;    frame->current_storage = o->storage + context->storage_offset;    frame->expendible_offset = 0;    frame->args = args; +  frame->scope = NULL;    frame->num_locals = 0;    frame->num_args = 0; -  frame->scope = scope; +     frame->return_addr = NULL;       check_stack(256);    check_mark_stack(256);       if (PIKE_NEEDS_TRACE())    callsite_trace_call_fun(c);   }      PMOD_EXPORT void callsite_resolve_lfun(struct pike_callsite *c, struct object *o, int lfun) {