documentation for write barriers

This commit is contained in:
Roberto Ierusalimschy
2002-11-14 14:15:53 -02:00
parent a845a46cc8
commit 41fd639cab
8 changed files with 25 additions and 25 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lfunc.c,v 1.61 2002/10/21 20:41:46 roberto Exp roberto $
** $Id: lfunc.c,v 1.62 2002/11/13 11:31:39 roberto Exp roberto $
** Auxiliary functions to manipulate prototypes and closures
** See Copyright Notice in lua.h
*/
@@ -64,7 +64,7 @@ UpVal *luaF_findupval (lua_State *L, StkId level) {
void luaF_close (lua_State *L, StkId level) {
UpVal *p;
while ((p = ngcotouv(L->openupval)) != NULL && p->v >= level) {
setobj(&p->value, p->v); /* save current value */
setobj(&p->value, p->v); /* save current value (write barrier) */
p->v = &p->value; /* now current value lives here */
L->openupval = p->next; /* remove from `open' list */
luaC_link(L, valtogco(p), LUA_TUPVAL);