aboutsummaryrefslogtreecommitdiff
path: root/lgc.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-05-04 10:32:01 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-05-04 10:32:01 -0300
commit2376eb634751f92e6bcb9dc8dbc1ef88b9873319 (patch)
tree579780bc7ff3d1374a701298749eca3634a17edb /lgc.h
parent8634b2a0119e698e362fdb765f30258e79e1dfd0 (diff)
downloadlua-2376eb634751f92e6bcb9dc8dbc1ef88b9873319.tar.gz
lua-2376eb634751f92e6bcb9dc8dbc1ef88b9873319.tar.bz2
lua-2376eb634751f92e6bcb9dc8dbc1ef88b9873319.zip
barrier for prototype's cache (with new gray list 'protogray' to keep
prototypes to have their caches visited again) + constant 'MAXMISS'
Diffstat (limited to 'lgc.h')
-rw-r--r--lgc.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lgc.h b/lgc.h
index 396f5a4e..6ee0b012 100644
--- a/lgc.h
+++ b/lgc.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lgc.h,v 2.95 2017/04/10 13:33:04 roberto Exp roberto $ 2** $Id: lgc.h,v 2.96 2017/04/11 18:41:09 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*/
@@ -151,6 +151,9 @@
151 (isblack(p) && iswhite(o)) ? \ 151 (isblack(p) && iswhite(o)) ? \
152 luaC_barrier_(L,obj2gco(p),obj2gco(o)) : cast_void(0)) 152 luaC_barrier_(L,obj2gco(p),obj2gco(o)) : cast_void(0))
153 153
154#define luaC_protobarrier(L,p,o) \
155 (isblack(p) ? luaC_protobarrier_(L,p) : cast_void(0))
156
154LUAI_FUNC void luaC_fix (lua_State *L, GCObject *o); 157LUAI_FUNC void luaC_fix (lua_State *L, GCObject *o);
155LUAI_FUNC void luaC_freeallobjects (lua_State *L); 158LUAI_FUNC void luaC_freeallobjects (lua_State *L);
156LUAI_FUNC void luaC_step (lua_State *L); 159LUAI_FUNC void luaC_step (lua_State *L);
@@ -159,6 +162,7 @@ LUAI_FUNC void luaC_fullgc (lua_State *L, int isemergency);
159LUAI_FUNC GCObject *luaC_newobj (lua_State *L, int tt, size_t sz); 162LUAI_FUNC GCObject *luaC_newobj (lua_State *L, int tt, size_t sz);
160LUAI_FUNC void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v); 163LUAI_FUNC void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v);
161LUAI_FUNC void luaC_barrierback_ (lua_State *L, Table *o); 164LUAI_FUNC void luaC_barrierback_ (lua_State *L, Table *o);
165LUAI_FUNC void luaC_protobarrier_ (lua_State *L, Proto *p);
162LUAI_FUNC void luaC_checkfinalizer (lua_State *L, GCObject *o, Table *mt); 166LUAI_FUNC void luaC_checkfinalizer (lua_State *L, GCObject *o, Table *mt);
163LUAI_FUNC void luaC_changemode (lua_State *L, int newmode); 167LUAI_FUNC void luaC_changemode (lua_State *L, int newmode);
164 168