aboutsummaryrefslogtreecommitdiff
path: root/src/lj_vm.h
diff options
context:
space:
mode:
authorMike Pall <mike>2010-01-02 17:42:11 +0100
committerMike Pall <mike>2010-01-02 17:42:11 +0100
commit93ee10642e285f972daff59492c05aa04dc2aa86 (patch)
treed1bb1c4060419a5cfbfed6f5e79b042d1720ec24 /src/lj_vm.h
parent8fc9430d067e255202f6b89fae7065bc50e0c668 (diff)
downloadluajit-93ee10642e285f972daff59492c05aa04dc2aa86.tar.gz
luajit-93ee10642e285f972daff59492c05aa04dc2aa86.tar.bz2
luajit-93ee10642e285f972daff59492c05aa04dc2aa86.zip
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.
Diffstat (limited to 'src/lj_vm.h')
-rw-r--r--src/lj_vm.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lj_vm.h b/src/lj_vm.h
index 3e4ea45c..05c590e6 100644
--- a/src/lj_vm.h
+++ b/src/lj_vm.h
@@ -15,8 +15,10 @@ typedef TValue *(*lua_CPFunction)(lua_State *L, lua_CFunction func, void *ud);
15LJ_ASMF int lj_vm_cpcall(lua_State *L, lua_CFunction func, void *ud, 15LJ_ASMF int lj_vm_cpcall(lua_State *L, lua_CFunction func, void *ud,
16 lua_CPFunction cp); 16 lua_CPFunction cp);
17LJ_ASMF int lj_vm_resume(lua_State *L, TValue *base, int nres1, ptrdiff_t ef); 17LJ_ASMF int lj_vm_resume(lua_State *L, TValue *base, int nres1, ptrdiff_t ef);
18LJ_ASMF_NORET void lj_vm_unwind_c(void *cframe, int errcode); 18LJ_ASMF_NORET void LJ_FASTCALL lj_vm_unwind_c(void *cframe, int errcode);
19LJ_ASMF_NORET void lj_vm_unwind_ff(void *cframe); 19LJ_ASMF_NORET void LJ_FASTCALL lj_vm_unwind_ff(void *cframe);
20LJ_ASMF void lj_vm_unwind_c_eh(void);
21LJ_ASMF void lj_vm_unwind_ff_eh(void);
20 22
21/* Miscellaneous functions. */ 23/* Miscellaneous functions. */
22#if LJ_TARGET_X86ORX64 24#if LJ_TARGET_X86ORX64