diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-03-15 18:04:33 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-03-15 18:04:33 -0300 |
commit | a4e1230f95223f2106cf0e118426ba91f1017d89 (patch) | |
tree | bc6b67ae14a3381498a203e715d48e8d059b6fef /lgc.h | |
parent | 9804467eeb9836bc147adffee411b21e6257da6b (diff) | |
download | lua-a4e1230f95223f2106cf0e118426ba91f1017d89.tar.gz lua-a4e1230f95223f2106cf0e118426ba91f1017d89.tar.bz2 lua-a4e1230f95223f2106cf0e118426ba91f1017d89.zip |
better way to control open upvalues
Diffstat (limited to 'lgc.h')
-rw-r--r-- | lgc.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lgc.h,v 2.3 2004/02/16 19:09:52 roberto Exp roberto $ | 2 | ** $Id: lgc.h,v 2.4 2004/03/09 17:34:35 roberto Exp roberto $ |
3 | ** Garbage Collector | 3 | ** Garbage Collector |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -58,7 +58,7 @@ | |||
58 | 58 | ||
59 | #define iswhite(x) test2bits((x)->gch.marked, WHITE0BIT, WHITE1BIT) | 59 | #define iswhite(x) test2bits((x)->gch.marked, WHITE0BIT, WHITE1BIT) |
60 | #define isblack(x) testbit((x)->gch.marked, BLACKBIT) | 60 | #define isblack(x) testbit((x)->gch.marked, BLACKBIT) |
61 | 61 | #define isgray(x) (!isblack(x) && !iswhite(x)) | |
62 | 62 | ||
63 | #define otherwhite(g) (g->currentwhite ^ bit2mask(WHITE0BIT, WHITE1BIT)) | 63 | #define otherwhite(g) (g->currentwhite ^ bit2mask(WHITE0BIT, WHITE1BIT)) |
64 | #define isdead(g,v) ((v)->gch.marked & otherwhite(g)) | 64 | #define isdead(g,v) ((v)->gch.marked & otherwhite(g)) |
@@ -87,6 +87,7 @@ void luaC_sweepall (lua_State *L); | |||
87 | void luaC_step (lua_State *L); | 87 | void luaC_step (lua_State *L); |
88 | void luaC_fullgc (lua_State *L); | 88 | void luaC_fullgc (lua_State *L); |
89 | void luaC_link (lua_State *L, GCObject *o, lu_byte tt); | 89 | void luaC_link (lua_State *L, GCObject *o, lu_byte tt); |
90 | void luaC_linkupval (lua_State *L, UpVal *uv); | ||
90 | void luaC_barrierf (lua_State *L, GCObject *o, GCObject *v); | 91 | void luaC_barrierf (lua_State *L, GCObject *o, GCObject *v); |
91 | 92 | ||
92 | 93 | ||