diff options
Diffstat (limited to 'lgc.h')
-rw-r--r-- | lgc.h | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lgc.h,v 2.70 2013/08/30 19:14:26 roberto Exp roberto $ | 2 | ** $Id: lgc.h,v 2.71 2013/09/03 15:37:10 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 | */ |
@@ -79,7 +79,7 @@ | |||
79 | #define WHITE1BIT 1 /* object is white (type 1) */ | 79 | #define WHITE1BIT 1 /* object is white (type 1) */ |
80 | #define BLACKBIT 2 /* object is black */ | 80 | #define BLACKBIT 2 /* object is black */ |
81 | #define FINALIZEDBIT 3 /* object has been marked for finalization */ | 81 | #define FINALIZEDBIT 3 /* object has been marked for finalization */ |
82 | #define LOCALBIT 4 /* object is not local */ | 82 | #define NOLOCALBIT 4 /* object is not local */ |
83 | #define LOCALMARK 5 /* object is 'locally marked' or out of local list */ | 83 | #define LOCALMARK 5 /* object is 'locally marked' or out of local list */ |
84 | /* bit 7 is currently used by tests (luaL_checkmemory) */ | 84 | /* bit 7 is currently used by tests (luaL_checkmemory) */ |
85 | 85 | ||
@@ -90,7 +90,7 @@ | |||
90 | #define isblack(x) testbit((x)->gch.marked, BLACKBIT) | 90 | #define isblack(x) testbit((x)->gch.marked, BLACKBIT) |
91 | #define isgray(x) /* neither white nor black */ \ | 91 | #define isgray(x) /* neither white nor black */ \ |
92 | (!testbits((x)->gch.marked, WHITEBITS | bitmask(BLACKBIT))) | 92 | (!testbits((x)->gch.marked, WHITEBITS | bitmask(BLACKBIT))) |
93 | #define islocal(x) (!testbit((x)->gch.marked, LOCALBIT)) | 93 | #define islocal(x) (!testbit((x)->gch.marked, NOLOCALBIT)) |
94 | 94 | ||
95 | #define tofinalize(x) testbit((x)->gch.marked, FINALIZEDBIT) | 95 | #define tofinalize(x) testbit((x)->gch.marked, FINALIZEDBIT) |
96 | 96 | ||
@@ -101,7 +101,7 @@ | |||
101 | #define changewhite(x) ((x)->gch.marked ^= WHITEBITS) | 101 | #define changewhite(x) ((x)->gch.marked ^= WHITEBITS) |
102 | #define gray2black(x) l_setbit((x)->gch.marked, BLACKBIT) | 102 | #define gray2black(x) l_setbit((x)->gch.marked, BLACKBIT) |
103 | 103 | ||
104 | #define nolocal(x) l_setbit((x)->gch.marked, LOCALBIT) | 104 | #define nolocal(x) l_setbit((x)->gch.marked, NOLOCALBIT) |
105 | #define valnolocal(v) { if (iscollectable(v)) nolocal(gcvalue(v)); } | 105 | #define valnolocal(v) { if (iscollectable(v)) nolocal(gcvalue(v)); } |
106 | 106 | ||
107 | #define luaC_white(g) cast(lu_byte, (g)->currentwhite & WHITEBITS) | 107 | #define luaC_white(g) cast(lu_byte, (g)->currentwhite & WHITEBITS) |
@@ -140,8 +140,7 @@ LUAI_FUNC void luaC_step (lua_State *L); | |||
140 | LUAI_FUNC void luaC_forcestep (lua_State *L); | 140 | LUAI_FUNC void luaC_forcestep (lua_State *L); |
141 | LUAI_FUNC void luaC_runtilstate (lua_State *L, int statesmask); | 141 | LUAI_FUNC void luaC_runtilstate (lua_State *L, int statesmask); |
142 | LUAI_FUNC void luaC_fullgc (lua_State *L, int isemergency); | 142 | LUAI_FUNC void luaC_fullgc (lua_State *L, int isemergency); |
143 | LUAI_FUNC GCObject *luaC_newobj (lua_State *L, int tt, size_t sz, | 143 | LUAI_FUNC GCObject *luaC_newobj (lua_State *L, int tt, size_t sz); |
144 | GCObject **list, int offset); | ||
145 | LUAI_FUNC void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v); | 144 | LUAI_FUNC void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v); |
146 | LUAI_FUNC void luaC_barrierback_ (lua_State *L, GCObject *o); | 145 | LUAI_FUNC void luaC_barrierback_ (lua_State *L, GCObject *o); |
147 | LUAI_FUNC void luaC_barrierproto_ (lua_State *L, Proto *p, Closure *c); | 146 | LUAI_FUNC void luaC_barrierproto_ (lua_State *L, Proto *p, Closure *c); |