Branch: Tag:

2017-03-20

2017-03-20 21:34:13 by Arne Goedeke <el@laramies.com>

Interpreter: do THREADS checks earlier

We do the thread checks in function lookup or frame reset now.

2074:    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:
2124:    }       if (C.type == CALLTYPE_PIKEFUN) { -  FAST_CHECK_THREADS_ON_CALL(); +     return C.ptr;    }   
2168:    */    if (C.frame == frame) {    if (C.type == CALLTYPE_PIKEFUN) { -  FAST_CHECK_THREADS_ON_CALL(); +     return C.ptr;    } else C.frame = NULL;    }
2195:       if (C.frame == frame) {    if (C.type == CALLTYPE_PIKEFUN) { -  FAST_CHECK_THREADS_ON_CALL(); +     return C.ptr;    } else C.frame = NULL;    }
3395:    frame->args = args;    frame->scope = NULL;    +  FAST_CHECK_THREADS_ON_CALL(); +     check_stack(256);    check_mark_stack(256);   
3477:   PMOD_EXPORT void callsite_reset_pikecall(struct pike_callsite *c) {    struct pike_frame *frame;    +  FAST_CHECK_THREADS_ON_CALL(); +    #ifdef PIKE_DEBUG    if (c->type != CALLTYPE_PIKEFUN)    Pike_fatal("Calling callsite_reset_pikecall() on non pike frame.\n");
3540:   static void callsite_return_slowpath(const struct pike_callsite *c);      PMOD_EXPORT void callsite_execute(const struct pike_callsite *c) { -  FAST_CHECK_THREADS_ON_CALL(); +     switch (c->type) {    default:    case CALLTYPE_NONE: