diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-04-06 10:08:56 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-04-06 10:08:56 -0300 |
| commit | 2331e1beec01babf78ca09fea8701b5bb3c78d4c (patch) | |
| tree | d6d5a05daf5338b383e7c5681503272318a62958 /lgc.c | |
| parent | e4287da3a6b0b167da465fd449e5191b9ac9ef46 (diff) | |
| download | lua-2331e1beec01babf78ca09fea8701b5bb3c78d4c.tar.gz lua-2331e1beec01babf78ca09fea8701b5bb3c78d4c.tar.bz2 lua-2331e1beec01babf78ca09fea8701b5bb3c78d4c.zip | |
small changes in 'luaC_upvalbarrier'
Diffstat (limited to 'lgc.c')
| -rw-r--r-- | lgc.c | 8 |
1 files changed, 3 insertions, 5 deletions
| @@ -186,13 +186,11 @@ void luaC_barrierback_ (lua_State *L, Table *t) { | |||
| 186 | ** closures pointing to it. So, we assume that the object being assigned | 186 | ** closures pointing to it. So, we assume that the object being assigned |
| 187 | ** must be marked. | 187 | ** must be marked. |
| 188 | */ | 188 | */ |
| 189 | void luaC_upvalbarrier_ (lua_State *L, UpVal *uv) { | 189 | void luaC_upvalbarrier_ (lua_State *L, GCObject *o) { |
| 190 | global_State *g = G(L); | 190 | global_State *g = G(L); |
| 191 | GCObject *o = gcvalue(uv->v); | 191 | if (keepinvariant(g) && !isold(o)) { |
| 192 | if (keepinvariant(g)) { | ||
| 193 | markobject(g, o); | 192 | markobject(g, o); |
| 194 | if (!isold(o)) | 193 | setage(o, G_OLD0); |
| 195 | setage(o, G_OLD0); | ||
| 196 | } | 194 | } |
| 197 | } | 195 | } |
| 198 | 196 | ||
