Finish adapting to new libxml-tree API
[SXSI/xpathcomp.git] / src / runtime.ml
index a7103f1..3082f50 100644 (file)
@@ -175,11 +175,11 @@ module Make (U : ResJIT.S) : S with type result_set = U.NS.t =
 DEFINE LOOP (t, states, ctx) = (
   let _t = t in
   LOG(__ "top-down-run" 3
-      "Entering node %i with loop (tag %s, context %i) with states %a"
-       (Node.to_int _t)
-       (Tag.to_string (Tree.tag tree _t))
-       (Node.to_int (ctx))
-       (StateSet.print) (states));
+        "Entering node %i with loop (tag %s, context %i) with states %a"
+        (Node.to_int _t)
+        (Tag.to_string (Tree.tag tree _t))
+        (Node.to_int (ctx))
+        (StateSet.print) (states));
   if _t == Tree.nil then nil_res
   else
     let tag = Tree.tag tree _t in
@@ -254,6 +254,9 @@ DEFINE LOOP_TAG (t, states, tag, ctx) = (
                l3jit_dispatch tr_list res1 res2 t slot1 slot2
 
     and l2jit_dispatch_instr t ctx instr =
+        let () = LOG(__ "top-down-run" 3 "Dispatching instr: %a on node %i (context=%i)"
+              L2JIT.print_jump instr (Node.to_int t) (Node.to_int ctx))
+        in
        match instr with
        | L2JIT.NOP () -> nil_res
        | L2JIT.FIRST_CHILD s -> LOOP ((Tree.first_child tree t), s, ctx)