x64: Use external unwinding for lua_yield().

This commit is contained in:
Mike Pall
2011-03-18 23:38:05 +01:00
parent 063182d79c
commit 642ae06916
2 changed files with 18 additions and 11 deletions

View File

@@ -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 */