Add command line option to disable caching and jumping
[SXSI/xpathcomp.git] / src / runtime.ml
index 52583c0..46e1b01 100644 (file)
@@ -152,7 +152,8 @@ module Make (U : ResJIT.S) : S with type result_set = U.NS.t =
           let f = gen_code auto tlist s1 s2 in
           LOG(__ "grammar" 2 "Inserting: %i, %a, %a\n%!"
             (Uid.to_int tlist.Translist.Node.id) StateSet.print s1 StateSet.print s2);
-          add cache tlist s1 s2 f; f
+          if not !Options.no_cache then add cache tlist s1 s2 f;
+         f
       end
 
 DEFINE LOOP (t, states, ctx) = (
@@ -295,6 +296,7 @@ DEFINE LOOP_TAG (t, states, tag, ctx) = (
 
     let top_down_run auto tree root =
       Ata.init ();
+      L2JIT.init();
       let res, slot = full_top_down_run auto auto.init tree root in
       slot.(StateSet.min_elt auto.topdown_marking_states)