More debugging:
authorKim Nguyễn <kn@lri.fr>
Thu, 12 Apr 2012 14:32:33 +0000 (16:32 +0200)
committerKim Nguyễn <kn@lri.fr>
Thu, 12 Apr 2012 14:32:33 +0000 (16:32 +0200)
     remove progress printing during parsing
     add debuging trace in resJIT (show which node is added to the result set)

src/resJIT.ml
src/tree.ml

index 1c32357..a60a7fa 100644 (file)
@@ -238,30 +238,41 @@ DEFINE EXEC_CODE_TEMPLATE(ns) = fun slot slot1 slot2 t dst code ->
         SET (slot.(dst) , ns.concat4 slot1.(src1) slot1.(src2) slot2.(src3) slot2.(src4))
 
     | OP_SELF _ ->
-       slot.(dst) <- ns.singleton t
+      LOG(__ "res-jit" 1 "Putting Node %i in the result set\n" (Node.to_int t));
+      slot.(dst) <- ns.singleton t
 
-    | OP_SELF_LEFT1 src -> slot.(dst) <- ns.cons t slot1.(src)
+    | OP_SELF_LEFT1 src ->
+      LOG(__ "res-jit" 1 "Putting Node %i in the result set\n" (Node.to_int t));
+      slot.(dst) <- ns.cons t slot1.(src)
 
     | OP_SELF_LEFT2 (src1, src2) ->
-       slot.(dst) <- ns.conscat t slot1.(src1) slot1.(src2)
+      LOG(__ "res-jit" 1 "Putting Node %i in the result set\n" (Node.to_int t));
+      slot.(dst) <- ns.conscat t slot1.(src1) slot1.(src2)
 
-    | OP_SELF_RIGHT1 src -> slot.(dst) <- ns.cons t slot2.(src)
+    | OP_SELF_RIGHT1 src ->
+      LOG(__ "res-jit" 1 "Putting Node %i in the result set\n" (Node.to_int t));
+      slot.(dst) <- ns.cons t slot2.(src)
 
     | OP_SELF_RIGHT2 (src1, src2) ->
-       slot.(dst) <- ns.conscat t slot2.(src1) slot2.(src2)
+      LOG(__ "res-jit" 1 "Putting Node %i in the result set\n" (Node.to_int t));
+      slot.(dst) <- ns.conscat t slot2.(src1) slot2.(src2)
 
     | OP_SELF_LEFT1_RIGHT1 (src1, src2) ->
-       slot.(dst) <- ns.conscat t slot1.(src1) slot2.(src2)
+      LOG(__ "res-jit" 1 "Putting Node %i in the result set\n" (Node.to_int t));
+      slot.(dst) <- ns.conscat t slot1.(src1) slot2.(src2)
 
     | OP_SELF_LEFT2_RIGHT1 (src1, src2, src3) ->
-       slot.(dst) <- ns.conscat3 t slot1.(src1) slot1.(src2) slot2.(src3)
+      LOG(__ "res-jit" 1 "Putting Node %i in the result set\n" (Node.to_int t));
+      slot.(dst) <- ns.conscat3 t slot1.(src1) slot1.(src2) slot2.(src3)
 
     | OP_SELF_LEFT1_RIGHT2 (src1, src2, src3) ->
-       slot.(dst) <- ns.conscat3 t slot1.(src1) slot2.(src2) slot2.(src3)
+      LOG(__ "res-jit" 1 "Putting Node %i in the result set\n" (Node.to_int t));
+      slot.(dst) <- ns.conscat3 t slot1.(src1) slot2.(src2) slot2.(src3)
 
     | OP_SELF_LEFT2_RIGHT2 (src1, src2, src3, src4) ->
-       slot.(dst) <-
-         ns.conscat4 t slot1.(src1) slot1.(src2) slot2.(src3) slot2.(src4)
+      LOG(__ "res-jit" 1 "Putting Node %i in the result set\n" (Node.to_int t));
+      slot.(dst) <-
+       ns.conscat4 t slot1.(src1) slot1.(src2) slot2.(src3) slot2.(src4)
     | OP_OTHER line ->
       let acc = ref ns.empty in
       let len = Array.length line - 1 in
index bc81cf4..166eeea 100644 (file)
@@ -96,7 +96,6 @@ struct
     close_tag b atname
 
   let start_element_handler parser_ b t tag attr_list =
-    display_count parser_;
     do_text b t;
     open_tag b tag;
     match attr_list with
@@ -108,12 +107,10 @@ struct
 
 
   let end_element_handler parser_ b t tag =
-    display_count parser_;
     do_text b t;
     close_tag b tag
 
   let character_data_handler parser_ _ t text =
-    display_count parser_;
     Buffer.add_string t text
 
   let create_parser () =