Mercurial > urweb
diff src/lru_cache.sml @ 2298:6e580e319077
Fix condition for installing new cache entries
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Thu, 19 Nov 2015 16:02:04 -0500 |
parents | 6d56080f495c |
children |
line wrap: on
line diff
--- a/src/lru_cache.sml Thu Nov 19 13:18:58 2015 -0500 +++ b/src/lru_cache.sml Thu Nov 19 16:02:04 2015 -0500 @@ -65,6 +65,7 @@ val revArgs = paramRepeatRev (fn p => "p" ^ p) ", " + val argNums = List.tabulate (params, fn i => "p" ^ Int.toString i) in Print.box [string ("static uw_Sqlcache_Cache cacheStruct" ^ i ^ " = {"), @@ -119,7 +120,12 @@ newline, string " } else {", newline, - (*string (" puts(\"SQLCACHE: miss " ^ i ^ ".\");"), + (*string (" printf(\"SQLCACHE: miss " ^ i ^ " " ^ String.concatWith ", " (List.tabulate (params, fn _ => "%s")) ^ ".\\n\""), + (case argNums of + [] => Print.box [] + | _ => Print.box [string ", ", + p_list string argNums]), + string ");", newline,*) string " uw_recordingStart(ctx);", newline, @@ -159,6 +165,8 @@ newline, string (" uw_Sqlcache_flush(ctx, cache" ^ i ^ ", ks);"), newline, + (*string (" puts(\"SQLCACHE: flushed " ^ i ^ ".\");"), + newline,*) string " return uw_unit_v;", newline, string "}",