merge 5.3.2 bug fix

pull/81/head
Dibyendu Majumdar 8 years ago
parent ccdf69ae03
commit 37759ee08e

@ -186,7 +186,7 @@ end
if ravi.jit() then
assert(ravi.compile(cast))
assert(ravi.compilen(matrix, {omitArrayGetRangeCheck=1}))
assert(ravi.compile(matrix, {omitArrayGetRangeCheck=1}))
--ravi.dumpir(matrix.new)
end

@ -204,17 +204,19 @@ void luaV_finishset (lua_State *L, const TValue *t, TValue *key,
const TValue *tm;
if (oldval != NULL) {
lua_assert(ttistable(t) && ttisnil(oldval));
Table *h = hvalue(t); /* save 't' table */
lua_assert(ttisnil(oldval));
/* must check the metamethod */
if ((tm = fasttm(L, hvalue(t)->metatable, TM_NEWINDEX)) == NULL &&
if ((tm = fasttm(L, h->metatable, TM_NEWINDEX)) == NULL &&
/* no metamethod; is there a previous entry in the table? */
(oldval != luaO_nilobject ||
/* no previous entry; must create one. (The next test is
always true; we only need the assignment.) */
(oldval = luaH_newkey(L, hvalue(t), key), 1))) {
(oldval = luaH_newkey(L, h, key), 1))) {
/* no metamethod and (now) there is an entry with given key */
setobj2t(L, cast(TValue *, oldval), val);
invalidateTMcache(hvalue(t));
luaC_barrierback(L, hvalue(t), val);
invalidateTMcache(h);
luaC_barrierback(L, h, val);
return;
}
/* else will try the metamethod */

@ -252,8 +252,7 @@ static int ravi_listcode(lua_State *L) {
}
static const luaL_Reg ravilib[] = {{"iscompiled", ravi_is_compiled},
{"compile", ravi_compile},
{"compilen", ravi_compile_n},
{"compile", ravi_compile_n},
{"dumplua", ravi_dump_luacode},
{"dumpllvm", ravi_dump_ir},
{"dumpir", ravi_dump_ir},

Loading…
Cancel
Save