aboutsummaryrefslogtreecommitdiff
path: root/src/lj_err.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_err.c')
-rw-r--r--src/lj_err.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lj_err.c b/src/lj_err.c
index 34736b34..3ee8cf43 100644
--- a/src/lj_err.c
+++ b/src/lj_err.c
@@ -598,7 +598,7 @@ LJ_NOINLINE void lj_err_lex(lua_State *L, GCstr *src, const char *tok,
598/* Typecheck error for operands. */ 598/* Typecheck error for operands. */
599LJ_NOINLINE void lj_err_optype(lua_State *L, cTValue *o, ErrMsg opm) 599LJ_NOINLINE void lj_err_optype(lua_State *L, cTValue *o, ErrMsg opm)
600{ 600{
601 const char *tname = typename(o); 601 const char *tname = lj_typename(o);
602 const char *opname = err2msg(opm); 602 const char *opname = err2msg(opm);
603 if (curr_funcisL(L)) { 603 if (curr_funcisL(L)) {
604 GCproto *pt = curr_proto(L); 604 GCproto *pt = curr_proto(L);
@@ -614,8 +614,8 @@ LJ_NOINLINE void lj_err_optype(lua_State *L, cTValue *o, ErrMsg opm)
614/* Typecheck error for ordered comparisons. */ 614/* Typecheck error for ordered comparisons. */
615LJ_NOINLINE void lj_err_comp(lua_State *L, cTValue *o1, cTValue *o2) 615LJ_NOINLINE void lj_err_comp(lua_State *L, cTValue *o1, cTValue *o2)
616{ 616{
617 const char *t1 = typename(o1); 617 const char *t1 = lj_typename(o1);
618 const char *t2 = typename(o2); 618 const char *t2 = lj_typename(o2);
619 err_msgv(L, t1 == t2 ? LJ_ERR_BADCMPV : LJ_ERR_BADCMPT, t1, t2); 619 err_msgv(L, t1 == t2 ? LJ_ERR_BADCMPV : LJ_ERR_BADCMPT, t1, t2);
620 /* This assumes the two "boolean" entries are commoned by the C compiler. */ 620 /* This assumes the two "boolean" entries are commoned by the C compiler. */
621} 621}
@@ -629,7 +629,7 @@ LJ_NOINLINE void lj_err_optype_call(lua_State *L, TValue *o)
629 */ 629 */
630 const BCIns *pc = cframe_Lpc(L); 630 const BCIns *pc = cframe_Lpc(L);
631 if (((ptrdiff_t)pc & FRAME_TYPE) != FRAME_LUA) { 631 if (((ptrdiff_t)pc & FRAME_TYPE) != FRAME_LUA) {
632 const char *tname = typename(o); 632 const char *tname = lj_typename(o);
633 setframe_pc(o, pc); 633 setframe_pc(o, pc);
634 setframe_gc(o, obj2gco(L)); 634 setframe_gc(o, obj2gco(L));
635 L->top = L->base = o+1; 635 L->top = L->base = o+1;
@@ -722,7 +722,7 @@ LJ_NOINLINE void lj_err_arg(lua_State *L, int narg, ErrMsg em)
722LJ_NOINLINE void lj_err_argtype(lua_State *L, int narg, const char *xname) 722LJ_NOINLINE void lj_err_argtype(lua_State *L, int narg, const char *xname)
723{ 723{
724 TValue *o = narg < 0 ? L->top + narg : L->base + narg-1; 724 TValue *o = narg < 0 ? L->top + narg : L->base + narg-1;
725 const char *tname = o < L->top ? typename(o) : lj_obj_typename[0]; 725 const char *tname = o < L->top ? lj_typename(o) : lj_obj_typename[0];
726 const char *msg = lj_str_pushf(L, err2msg(LJ_ERR_BADTYPE), xname, tname); 726 const char *msg = lj_str_pushf(L, err2msg(LJ_ERR_BADTYPE), xname, tname);
727 err_argmsg(L, narg, msg); 727 err_argmsg(L, narg, msg);
728} 728}