From 2376eb634751f92e6bcb9dc8dbc1ef88b9873319 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 4 May 2017 10:32:01 -0300 Subject: barrier for prototype's cache (with new gray list 'protogray' to keep prototypes to have their caches visited again) + constant 'MAXMISS' --- lfunc.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lfunc.h') diff --git a/lfunc.h b/lfunc.h index 7d0eca4a..eca83e4f 100644 --- a/lfunc.h +++ b/lfunc.h @@ -1,5 +1,5 @@ /* -** $Id: lfunc.h,v 2.15 2015/01/13 15:49:11 roberto Exp roberto $ +** $Id: lfunc.h,v 2.16 2017/04/11 18:41:09 roberto Exp roberto $ ** Auxiliary functions to manipulate prototypes and closures ** See Copyright Notice in lua.h */ @@ -32,6 +32,13 @@ #define upisopen(up) ((up)->v != &(up)->u.value) +/* +** maximum number of misses before giving up the cache of closures +** in prototypes +*/ +#define MAXMISS 10 + + LUAI_FUNC Proto *luaF_newproto (lua_State *L); LUAI_FUNC CClosure *luaF_newCclosure (lua_State *L, int nelems); LUAI_FUNC LClosure *luaF_newLclosure (lua_State *L, int nelems); -- cgit v1.2.1