Branch: Tag:

2017-11-18

2017-11-18 10:13:14 by Arne Goedeke <el@laramies.com>

Interpreter: do THREADS checks earlier

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

2128:    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:
2178:    }       if (C.type == CALLTYPE_PIKEFUN) { -  FAST_CHECK_THREADS_ON_CALL(); +     return C.ptr;    }   
2222:    */    if (C.frame == frame) {    if (C.type == CALLTYPE_PIKEFUN) { -  FAST_CHECK_THREADS_ON_CALL(); +     return C.ptr;    } else C.frame = NULL;    }
2249:       if (C.frame == frame) {    if (C.type == CALLTYPE_PIKEFUN) { -  FAST_CHECK_THREADS_ON_CALL(); +     return C.ptr;    } else C.frame = NULL;    }
3454:    frame->args = args;    frame->scope = NULL;    +  FAST_CHECK_THREADS_ON_CALL(); +     check_stack(256);    check_mark_stack(256);   
3536:   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");
3599:   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: