aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2020-08-09 23:12:48 +0200
committerMike Pall <mike>2020-08-09 23:12:48 +0200
commit94d4abcca966df2cc423e821bcacd04898f73117 (patch)
tree4ae1ee5d806e445b56747436a2562beb94ac2032
parent46a6d06dc57a52da9d0f295914094ee7d89b4a9c (diff)
parente296f56b825c688c3530a981dc6b495d972f3d01 (diff)
downloadluajit-94d4abcca966df2cc423e821bcacd04898f73117.tar.gz
luajit-94d4abcca966df2cc423e821bcacd04898f73117.tar.bz2
luajit-94d4abcca966df2cc423e821bcacd04898f73117.zip
Merge branch 'master' into v2.1
-rw-r--r--src/lj_debug.c1
-rw-r--r--src/lj_dispatch.h2
-rw-r--r--src/lj_err.c2
-rw-r--r--src/lj_err.h2
-rw-r--r--src/lj_trace.c4
-rw-r--r--src/vm_arm.dasc3
-rw-r--r--src/vm_arm64.dasc3
-rw-r--r--src/vm_mips.dasc5
-rw-r--r--src/vm_mips64.dasc5
-rw-r--r--src/vm_ppc.dasc3
-rw-r--r--src/vm_x64.dasc4
-rw-r--r--src/vm_x86.dasc4
12 files changed, 15 insertions, 23 deletions
diff --git a/src/lj_debug.c b/src/lj_debug.c
index c1f0f314..273dd078 100644
--- a/src/lj_debug.c
+++ b/src/lj_debug.c
@@ -94,6 +94,7 @@ static BCPos debug_framepc(lua_State *L, GCfunc *fn, cTValue *nextframe)
94 } 94 }
95 } 95 }
96 ins = cframe_pc(cf); 96 ins = cframe_pc(cf);
97 if (!ins) return NO_BCPOS;
97 } 98 }
98 } 99 }
99 pt = funcproto(fn); 100 pt = funcproto(fn);
diff --git a/src/lj_dispatch.h b/src/lj_dispatch.h
index 58ddff51..187bd5ca 100644
--- a/src/lj_dispatch.h
+++ b/src/lj_dispatch.h
@@ -46,7 +46,7 @@ extern double __divdf3(double a, double b);
46 _(asin) _(acos) _(atan) _(sinh) _(cosh) _(tanh) _(frexp) _(modf) _(atan2) \ 46 _(asin) _(acos) _(atan) _(sinh) _(cosh) _(tanh) _(frexp) _(modf) _(atan2) \
47 _(pow) _(fmod) _(ldexp) _(lj_vm_modi) \ 47 _(pow) _(fmod) _(ldexp) _(lj_vm_modi) \
48 _(lj_dispatch_call) _(lj_dispatch_ins) _(lj_dispatch_stitch) \ 48 _(lj_dispatch_call) _(lj_dispatch_ins) _(lj_dispatch_stitch) \
49 _(lj_dispatch_profile) _(lj_err_throw) \ 49 _(lj_dispatch_profile) _(lj_err_throw) _(lj_err_run) \
50 _(lj_ffh_coroutine_wrap_err) _(lj_func_closeuv) _(lj_func_newL_gc) \ 50 _(lj_ffh_coroutine_wrap_err) _(lj_func_closeuv) _(lj_func_newL_gc) \
51 _(lj_gc_barrieruv) _(lj_gc_step) _(lj_gc_step_fixtop) _(lj_meta_arith) \ 51 _(lj_gc_barrieruv) _(lj_gc_step) _(lj_gc_step_fixtop) _(lj_meta_arith) \
52 _(lj_meta_call) _(lj_meta_cat) _(lj_meta_comp) _(lj_meta_equal) \ 52 _(lj_meta_call) _(lj_meta_cat) _(lj_meta_comp) _(lj_meta_equal) \
diff --git a/src/lj_err.c b/src/lj_err.c
index 3de19a0b..47f88740 100644
--- a/src/lj_err.c
+++ b/src/lj_err.c
@@ -598,7 +598,7 @@ static ptrdiff_t finderrfunc(lua_State *L)
598} 598}
599 599
600/* Runtime error. */ 600/* Runtime error. */
601LJ_NOINLINE void lj_err_run(lua_State *L) 601LJ_NOINLINE void LJ_FASTCALL lj_err_run(lua_State *L)
602{ 602{
603 ptrdiff_t ef = finderrfunc(L); 603 ptrdiff_t ef = finderrfunc(L);
604 if (ef) { 604 if (ef) {
diff --git a/src/lj_err.h b/src/lj_err.h
index ed148d79..4ae637d4 100644
--- a/src/lj_err.h
+++ b/src/lj_err.h
@@ -23,7 +23,7 @@ LJ_DATA const char *lj_err_allmsg;
23LJ_FUNC GCstr *lj_err_str(lua_State *L, ErrMsg em); 23LJ_FUNC GCstr *lj_err_str(lua_State *L, ErrMsg em);
24LJ_FUNCA_NORET void LJ_FASTCALL lj_err_throw(lua_State *L, int errcode); 24LJ_FUNCA_NORET void LJ_FASTCALL lj_err_throw(lua_State *L, int errcode);
25LJ_FUNC_NORET void lj_err_mem(lua_State *L); 25LJ_FUNC_NORET void lj_err_mem(lua_State *L);
26LJ_FUNC_NORET void lj_err_run(lua_State *L); 26LJ_FUNCA_NORET void LJ_FASTCALL lj_err_run(lua_State *L);
27LJ_FUNC_NORET void lj_err_msg(lua_State *L, ErrMsg em); 27LJ_FUNC_NORET void lj_err_msg(lua_State *L, ErrMsg em);
28LJ_FUNC_NORET void lj_err_lex(lua_State *L, GCstr *src, const char *tok, 28LJ_FUNC_NORET void lj_err_lex(lua_State *L, GCstr *src, const char *tok,
29 BCLine line, ErrMsg em, va_list argp); 29 BCLine line, ErrMsg em, va_list argp);
diff --git a/src/lj_trace.c b/src/lj_trace.c
index 60da7fcd..a3980891 100644
--- a/src/lj_trace.c
+++ b/src/lj_trace.c
@@ -789,8 +789,8 @@ typedef struct ExitDataCP {
789static TValue *trace_exit_cp(lua_State *L, lua_CFunction dummy, void *ud) 789static TValue *trace_exit_cp(lua_State *L, lua_CFunction dummy, void *ud)
790{ 790{
791 ExitDataCP *exd = (ExitDataCP *)ud; 791 ExitDataCP *exd = (ExitDataCP *)ud;
792 cframe_errfunc(L->cframe) = -1; /* Inherit error function. */ 792 /* Always catch error here and don't call error function. */
793 /* Always catch error here. */ 793 cframe_errfunc(L->cframe) = 0;
794 cframe_nres(L->cframe) = -2*LUAI_MAXSTACK*(int)sizeof(TValue); 794 cframe_nres(L->cframe) = -2*LUAI_MAXSTACK*(int)sizeof(TValue);
795 exd->pc = lj_snap_restore(exd->J, exd->exptr); 795 exd->pc = lj_snap_restore(exd->J, exd->exptr);
796 UNUSED(dummy); 796 UNUSED(dummy);
diff --git a/src/vm_arm.dasc b/src/vm_arm.dasc
index 770a8e21..6b5572b7 100644
--- a/src/vm_arm.dasc
+++ b/src/vm_arm.dasc
@@ -2245,9 +2245,8 @@ static void build_subroutines(BuildCtx *ctx)
2245 | b <2 2245 | b <2
2246 | 2246 |
2247 |9: // Rethrow error from the right C frame. 2247 |9: // Rethrow error from the right C frame.
2248 | rsb CARG2, CARG1, #0
2249 | mov CARG1, L 2248 | mov CARG1, L
2250 | bl extern lj_err_throw // (lua_State *L, int errcode) 2249 | bl extern lj_err_run // (lua_State *L)
2251 |.endif 2250 |.endif
2252 | 2251 |
2253 |//----------------------------------------------------------------------- 2252 |//-----------------------------------------------------------------------
diff --git a/src/vm_arm64.dasc b/src/vm_arm64.dasc
index 4a729f65..1dc4d78e 100644
--- a/src/vm_arm64.dasc
+++ b/src/vm_arm64.dasc
@@ -2035,9 +2035,8 @@ static void build_subroutines(BuildCtx *ctx)
2035 | b <2 2035 | b <2
2036 | 2036 |
2037 |9: // Rethrow error from the right C frame. 2037 |9: // Rethrow error from the right C frame.
2038 | neg CARG2, CARG1
2039 | mov CARG1, L 2038 | mov CARG1, L
2040 | bl extern lj_err_throw // (lua_State *L, int errcode) 2039 | bl extern lj_err_run // (lua_State *L)
2041 |.endif 2040 |.endif
2042 | 2041 |
2043 |//----------------------------------------------------------------------- 2042 |//-----------------------------------------------------------------------
diff --git a/src/vm_mips.dasc b/src/vm_mips.dasc
index 91de4b5c..1cb94785 100644
--- a/src/vm_mips.dasc
+++ b/src/vm_mips.dasc
@@ -2520,9 +2520,8 @@ static void build_subroutines(BuildCtx *ctx)
2520 |. addu RA, RA, BASE 2520 |. addu RA, RA, BASE
2521 | 2521 |
2522 |9: // Rethrow error from the right C frame. 2522 |9: // Rethrow error from the right C frame.
2523 | load_got lj_err_throw 2523 | load_got lj_err_run
2524 | negu CARG2, CRET1 2524 | call_intern lj_err_run // (lua_State *L)
2525 | call_intern lj_err_throw // (lua_State *L, int errcode)
2526 |. move CARG1, L 2525 |. move CARG1, L
2527 |.endif 2526 |.endif
2528 | 2527 |
diff --git a/src/vm_mips64.dasc b/src/vm_mips64.dasc
index 71acf9ed..8e71f362 100644
--- a/src/vm_mips64.dasc
+++ b/src/vm_mips64.dasc
@@ -2622,9 +2622,8 @@ static void build_subroutines(BuildCtx *ctx)
2622 |. daddu RA, RA, BASE 2622 |. daddu RA, RA, BASE
2623 | 2623 |
2624 |9: // Rethrow error from the right C frame. 2624 |9: // Rethrow error from the right C frame.
2625 | load_got lj_err_throw 2625 | load_got lj_err_run
2626 | negu CARG2, CRET1 2626 | call_intern lj_err_run // (lua_State *L)
2627 | call_intern lj_err_throw // (lua_State *L, int errcode)
2628 |. move CARG1, L 2627 |. move CARG1, L
2629 |.endif 2628 |.endif
2630 | 2629 |
diff --git a/src/vm_ppc.dasc b/src/vm_ppc.dasc
index 18fc6f93..3070d86e 100644
--- a/src/vm_ppc.dasc
+++ b/src/vm_ppc.dasc
@@ -3090,9 +3090,8 @@ static void build_subroutines(BuildCtx *ctx)
3090 | bctr 3090 | bctr
3091 | 3091 |
3092 |9: // Rethrow error from the right C frame. 3092 |9: // Rethrow error from the right C frame.
3093 | neg CARG2, CARG1
3094 | mr CARG1, L 3093 | mr CARG1, L
3095 | bl extern lj_err_throw // (lua_State *L, int errcode) 3094 | bl extern lj_err_run // (lua_State *L)
3096 |.endif 3095 |.endif
3097 | 3096 |
3098 |//----------------------------------------------------------------------- 3097 |//-----------------------------------------------------------------------
diff --git a/src/vm_x64.dasc b/src/vm_x64.dasc
index 14a54e34..7cace399 100644
--- a/src/vm_x64.dasc
+++ b/src/vm_x64.dasc
@@ -2509,10 +2509,8 @@ static void build_subroutines(BuildCtx *ctx)
2509 | jmp <2 2509 | jmp <2
2510 | 2510 |
2511 |9: // Rethrow error from the right C frame. 2511 |9: // Rethrow error from the right C frame.
2512 | neg RD
2513 | mov CARG1, L:RB 2512 | mov CARG1, L:RB
2514 | mov CARG2, RD 2513 | call extern lj_err_run // (lua_State *L)
2515 | call extern lj_err_throw // (lua_State *L, int errcode)
2516 |.endif 2514 |.endif
2517 | 2515 |
2518 |//----------------------------------------------------------------------- 2516 |//-----------------------------------------------------------------------
diff --git a/src/vm_x86.dasc b/src/vm_x86.dasc
index f9bea426..b26cde4f 100644
--- a/src/vm_x86.dasc
+++ b/src/vm_x86.dasc
@@ -2960,10 +2960,8 @@ static void build_subroutines(BuildCtx *ctx)
2960 | jmp <2 2960 | jmp <2
2961 | 2961 |
2962 |9: // Rethrow error from the right C frame. 2962 |9: // Rethrow error from the right C frame.
2963 | neg RD
2964 | mov FCARG1, L:RB 2963 | mov FCARG1, L:RB
2965 | mov FCARG2, RD 2964 | call extern lj_err_run@4 // (lua_State *L)
2966 | call extern lj_err_throw@8 // (lua_State *L, int errcode)
2967 |.endif 2965 |.endif
2968 | 2966 |
2969 |//----------------------------------------------------------------------- 2967 |//-----------------------------------------------------------------------