Major rewrite of error handling to allow external/internal unwinding.
Make external unwinding the default on x64. It's mandatory on WIN64 due to the abundance of callee-saved regs. Allow piecewise internal frame unwinding and optional cleanup. Store ERRMEM, ERRERR and ERRCPP early and copy down later. Use FRAME_CP for lj_vm_resume. Add lj_vm_unwind_*_eh variants as landing pads for external unwinder. Use fastcall for lj_vm_unwind_*. Can drop r12/r13 saves in POSIX/x64 interpreter now.
This commit is contained in:
@@ -19,6 +19,7 @@ typedef enum {
|
||||
|
||||
LJ_FUNC GCstr *lj_err_str(lua_State *L, ErrMsg em);
|
||||
LJ_FUNC_NORET void lj_err_throw(lua_State *L, int errcode);
|
||||
LJ_FUNC_NORET void lj_err_mem(lua_State *L);
|
||||
LJ_FUNC_NORET void lj_err_run(lua_State *L);
|
||||
LJ_FUNC_NORET void lj_err_msg(lua_State *L, ErrMsg em);
|
||||
LJ_FUNC_NORET void lj_err_lex(lua_State *L, const char *src, const char *tok,
|
||||
|
||||
Reference in New Issue
Block a user