diff options
author | Mike Pall <mike> | 2011-03-18 23:38:05 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2011-03-18 23:38:05 +0100 |
commit | 642ae06916ecb36fb3f8ea5902de38a612cba356 (patch) | |
tree | 32ca483604ee926a820eb99b777fdc1d791b26d9 /src/lj_api.c | |
parent | 063182d79c4152b1b1e74b1226b5a7139969b8cf (diff) | |
download | luajit2-642ae06916ecb36fb3f8ea5902de38a612cba356.tar.gz |
x64: Use external unwinding for lua_yield().
Diffstat (limited to 'src/lj_api.c')
-rw-r--r-- | src/lj_api.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lj_api.c b/src/lj_api.c index 70834f8d..4942c1d6 100644 --- a/src/lj_api.c +++ b/src/lj_api.c @@ -1107,9 +1107,13 @@ LUA_API int lua_yield(lua_State *L, int nresults) top[2].fr.tp.ftsz = (int)((char *)(top+3)-(char *)L->base)+FRAME_CONT; L->top = L->base = top+3; } +#if LJ_TARGET_X64 + lj_err_throw(L, LUA_YIELD); +#else L->cframe = NULL; L->status = LUA_YIELD; lj_vm_unwind_c(cf, LUA_YIELD); +#endif } lj_err_msg(L, LJ_ERR_CYIELD); return 0; /* unreachable */ |