diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-04-30 17:43:26 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-04-30 17:43:26 -0300 |
commit | 8634b2a0119e698e362fdb765f30258e79e1dfd0 (patch) | |
tree | c20c79efbbf0bc8fa565c34932e283fc428c9219 /lgc.c | |
parent | 5ecb31003f8086f057444468d0356771526ec7b4 (diff) | |
download | lua-8634b2a0119e698e362fdb765f30258e79e1dfd0.tar.gz lua-8634b2a0119e698e362fdb765f30258e79e1dfd0.tar.bz2 lua-8634b2a0119e698e362fdb765f30258e79e1dfd0.zip |
added 'cachemiss' field to prototype to avoid wasting time checking
hits that fail too often
Diffstat (limited to '')
-rw-r--r-- | lgc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lgc.c,v 2.225 2017/04/24 16:59:26 roberto Exp $ | 2 | ** $Id: lgc.c,v 2.226 2017/04/24 17:52:18 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 | */ |
@@ -485,6 +485,7 @@ static int traverseproto (global_State *g, Proto *f) { | |||
485 | int i; | 485 | int i; |
486 | if (f->cache && iswhite(f->cache)) | 486 | if (f->cache && iswhite(f->cache)) |
487 | f->cache = NULL; /* allow cache to be collected */ | 487 | f->cache = NULL; /* allow cache to be collected */ |
488 | f->cachemiss = 0; /* restart counting */ | ||
488 | markobjectN(g, f->source); | 489 | markobjectN(g, f->source); |
489 | for (i = 0; i < f->sizek; i++) /* mark literals */ | 490 | for (i = 0; i < f->sizek; i++) /* mark literals */ |
490 | markvalue(g, &f->k[i]); | 491 | markvalue(g, &f->k[i]); |