details (a few casts moved from macro invocation to macro definition)

This commit is contained in:
Roberto Ierusalimschy
2013-08-29 10:49:57 -03:00
parent b5e75fde4e
commit 26629d0af1
3 changed files with 8 additions and 8 deletions

6
lgc.h
View File

@@ -1,5 +1,5 @@
/*
** $Id: lgc.h,v 2.67 2013/08/27 18:53:35 roberto Exp roberto $
** $Id: lgc.h,v 2.68 2013/08/27 20:04:00 roberto Exp roberto $
** Garbage Collector
** See Copyright Notice in lua.h
*/
@@ -117,7 +117,7 @@
#define luaC_barrierback(L,p,v) { \
if (iscollectable(v) && \
(nolocal(gcvalue(v)), isblack(obj2gco(p)) && iswhite(gcvalue(v)))) \
luaC_barrierback_(L,p); }
luaC_barrierback_(L,obj2gco(p)); }
#define luaC_objbarrier(L,p,o) { \
if (nolocal(obj2gco(o)), isblack(obj2gco(p)) && iswhite(obj2gco(o))) \
@@ -125,7 +125,7 @@
#define luaC_objbarrierback(L,p,o) \
{ if (nolocal(obj2gco(o)), isblack(obj2gco(p)) && iswhite(obj2gco(o))) \
luaC_barrierback_(L,p); }
luaC_barrierback_(L,obj2gco(p)); }
#define luaC_upvalbarrier(L,uv) \
{ if (iscollectable((uv)->v) && !upisopen(uv)) \

View File

@@ -1,5 +1,5 @@
/*
** $Id: ltable.c,v 2.80 2013/08/27 20:04:00 roberto Exp roberto $
** $Id: ltable.c,v 2.81 2013/08/28 18:30:26 roberto Exp roberto $
** Lua tables (hash)
** See Copyright Notice in lua.h
*/
@@ -461,7 +461,7 @@ TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key) {
}
}
setobj2t(L, gkey(mp), key);
luaC_barrierback(L, obj2gco(t), key);
luaC_barrierback(L, t, key);
lua_assert(ttisnil(gval(mp)));
return gval(mp);
}

6
lvm.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: lvm.c,v 2.178 2013/08/19 14:18:43 roberto Exp roberto $
** $Id: lvm.c,v 2.179 2013/08/27 18:53:35 roberto Exp roberto $
** Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -145,7 +145,7 @@ void luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) {
/* no metamethod and (now) there is an entry with given key */
setobj2t(L, oldval, val); /* assign new value to that entry */
invalidateTMcache(h);
luaC_barrierback(L, obj2gco(h), val);
luaC_barrierback(L, h, val);
return;
}
/* else will try the metamethod */
@@ -914,7 +914,7 @@ void luaV_execute (lua_State *L) {
for (; n > 0; n--) {
TValue *val = ra+n;
luaH_setint(L, h, last--, val);
luaC_barrierback(L, obj2gco(h), val);
luaC_barrierback(L, h, val);
}
L->top = ci->top; /* correct top (in case of previous open call) */
)