diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-08-16 15:55:49 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-08-16 15:55:49 -0300 |
commit | 439d74e29f3234a034777f88b260523afe8c0446 (patch) | |
tree | a3ee160dccfd3cf0f065edbba07290c4ba9af93d /lvm.c | |
parent | 3679d33b02782ff7d7d0fa163b815902b189c89e (diff) | |
download | lua-439d74e29f3234a034777f88b260523afe8c0446.tar.gz lua-439d74e29f3234a034777f88b260523afe8c0446.tar.bz2 lua-439d74e29f3234a034777f88b260523afe8c0446.zip |
added 'local' bit (true => object is only refered by local variables)
Diffstat (limited to 'lvm.c')
-rw-r--r-- | lvm.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 2.175 2013/06/20 15:02:49 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 2.176 2013/07/10 17:15:12 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 | */ |
@@ -416,6 +416,7 @@ static void pushclosure (lua_State *L, Proto *p, UpVal **encup, StkId base, | |||
416 | ncl->l.upvals[i] = luaF_findupval(L, base + uv[i].idx); | 416 | ncl->l.upvals[i] = luaF_findupval(L, base + uv[i].idx); |
417 | else /* get upvalue from enclosing function */ | 417 | else /* get upvalue from enclosing function */ |
418 | ncl->l.upvals[i] = encup[uv[i].idx]; | 418 | ncl->l.upvals[i] = encup[uv[i].idx]; |
419 | /* new closure is white and local, so we do not need a barrier here */ | ||
419 | } | 420 | } |
420 | luaC_barrierproto(L, p, ncl); | 421 | luaC_barrierproto(L, p, ncl); |
421 | p->cache = ncl; /* save it on cache for reuse */ | 422 | p->cache = ncl; /* save it on cache for reuse */ |