diff options
Diffstat (limited to '')
| -rw-r--r-- | lvm.c | 5 |
1 files changed, 2 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lvm.c,v 2.268 2016/02/05 19:59:14 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 2.269 2017/04/06 13:08:56 roberto Exp roberto $ |
| 3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -642,7 +642,6 @@ static void pushclosure (lua_State *L, Proto *p, UpVal **encup, StkId base, | |||
| 642 | ncl->upvals[i] = luaF_findupval(L, base + uv[i].idx); | 642 | ncl->upvals[i] = luaF_findupval(L, base + uv[i].idx); |
| 643 | else /* get upvalue from enclosing function */ | 643 | else /* get upvalue from enclosing function */ |
| 644 | ncl->upvals[i] = encup[uv[i].idx]; | 644 | ncl->upvals[i] = encup[uv[i].idx]; |
| 645 | ncl->upvals[i]->refcount++; | ||
| 646 | /* new closure is white, so we do not need a barrier here */ | 645 | /* new closure is white, so we do not need a barrier here */ |
| 647 | } | 646 | } |
| 648 | if (!isblack(p)) /* cache will not break GC invariant? */ | 647 | if (!isblack(p)) /* cache will not break GC invariant? */ |
| @@ -855,7 +854,7 @@ void luaV_execute (lua_State *L) { | |||
| 855 | vmcase(OP_SETUPVAL) { | 854 | vmcase(OP_SETUPVAL) { |
| 856 | UpVal *uv = cl->upvals[GETARG_B(i)]; | 855 | UpVal *uv = cl->upvals[GETARG_B(i)]; |
| 857 | setobj(L, uv->v, ra); | 856 | setobj(L, uv->v, ra); |
| 858 | luaC_upvalbarrier(L, uv, ra); | 857 | luaC_barrier(L, uv, ra); |
| 859 | vmbreak; | 858 | vmbreak; |
| 860 | } | 859 | } |
| 861 | vmcase(OP_SETTABLE) { | 860 | vmcase(OP_SETTABLE) { |
