diff options
Diffstat (limited to 'src/lj_api.c')
-rw-r--r-- | src/lj_api.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lj_api.c b/src/lj_api.c index a19f0b33..aac3b4c9 100644 --- a/src/lj_api.c +++ b/src/lj_api.c | |||
@@ -196,7 +196,8 @@ LUA_API int lua_type(lua_State *L, int idx) | |||
196 | return LUA_TNONE; | 196 | return LUA_TNONE; |
197 | } else { /* Magic internal/external tag conversion. ORDER LJ_T */ | 197 | } else { /* Magic internal/external tag conversion. ORDER LJ_T */ |
198 | int t = ~itype(o); | 198 | int t = ~itype(o); |
199 | return (int)(((t < 8 ? 0x98a42110 : 0x75b6) >> 4*(t&7)) & 15u); | 199 | lua_assert(itype(o) != LJ_TUPVAL); |
200 | return (int)(((t < 8 ? 0x98042110 : 0x7506) >> 4*(t&7)) & 15u); | ||
200 | } | 201 | } |
201 | } | 202 | } |
202 | 203 | ||
@@ -631,7 +632,7 @@ LUALIB_API int luaL_newmetatable(lua_State *L, const char *tname) | |||
631 | GCtab *mt = lj_tab_new(L, 0, 1); | 632 | GCtab *mt = lj_tab_new(L, 0, 1); |
632 | settabV(L, tv, mt); | 633 | settabV(L, tv, mt); |
633 | settabV(L, L->top++, mt); | 634 | settabV(L, L->top++, mt); |
634 | lj_gc_objbarriert(L, regt, mt); | 635 | lj_gc_anybarriert(L, regt); |
635 | return 1; | 636 | return 1; |
636 | } else { | 637 | } else { |
637 | copyTV(L, L->top++, tv); | 638 | copyTV(L, L->top++, tv); |
@@ -899,7 +900,7 @@ LUA_API void lua_rawset(lua_State *L, int idx) | |||
899 | key = L->top-2; | 900 | key = L->top-2; |
900 | dst = lj_tab_set(L, t, key); | 901 | dst = lj_tab_set(L, t, key); |
901 | copyTV(L, dst, key+1); | 902 | copyTV(L, dst, key+1); |
902 | lj_gc_barriert(L, t, dst); | 903 | lj_gc_anybarriert(L, t); |
903 | L->top = key; | 904 | L->top = key; |
904 | } | 905 | } |
905 | 906 | ||