diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-05-04 10:32:01 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-05-04 10:32:01 -0300 |
commit | 2376eb634751f92e6bcb9dc8dbc1ef88b9873319 (patch) | |
tree | 579780bc7ff3d1374a701298749eca3634a17edb /lfunc.h | |
parent | 8634b2a0119e698e362fdb765f30258e79e1dfd0 (diff) | |
download | lua-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 'lfunc.h')
-rw-r--r-- | lfunc.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lfunc.h,v 2.15 2015/01/13 15:49:11 roberto Exp roberto $ | 2 | ** $Id: lfunc.h,v 2.16 2017/04/11 18:41:09 roberto Exp roberto $ |
3 | ** Auxiliary functions to manipulate prototypes and closures | 3 | ** Auxiliary functions to manipulate prototypes and closures |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -32,6 +32,13 @@ | |||
32 | #define upisopen(up) ((up)->v != &(up)->u.value) | 32 | #define upisopen(up) ((up)->v != &(up)->u.value) |
33 | 33 | ||
34 | 34 | ||
35 | /* | ||
36 | ** maximum number of misses before giving up the cache of closures | ||
37 | ** in prototypes | ||
38 | */ | ||
39 | #define MAXMISS 10 | ||
40 | |||
41 | |||
35 | LUAI_FUNC Proto *luaF_newproto (lua_State *L); | 42 | LUAI_FUNC Proto *luaF_newproto (lua_State *L); |
36 | LUAI_FUNC CClosure *luaF_newCclosure (lua_State *L, int nelems); | 43 | LUAI_FUNC CClosure *luaF_newCclosure (lua_State *L, int nelems); |
37 | LUAI_FUNC LClosure *luaF_newLclosure (lua_State *L, int nelems); | 44 | LUAI_FUNC LClosure *luaF_newLclosure (lua_State *L, int nelems); |