Change the logging infrastructure:
[SXSI/xpathcomp.git] / src / resJIT.ml
index 64c9624..1c32357 100644 (file)
@@ -1,6 +1,6 @@
 INCLUDE "debug.ml"
 INCLUDE "utils.ml"
-INCLUDE "trace.ml"
+INCLUDE "log.ml"
 
 open Format
 
@@ -275,7 +275,7 @@ DEFINE EXEC_REC_TEMPLATE =
          (match code with
          | Nil -> ()
          | Cons(dst, opcode, code1) ->
-           TRACE("res-jit", 3, __ "  %a := %a\n%!"
+           LOG(__ "res-jit" 3 " %a := %a"
              State.print dst print_opcode opcode;
            );
            exec_code slot slot1 slot2 t dst opcode;
@@ -283,7 +283,7 @@ DEFINE EXEC_REC_TEMPLATE =
              match code1 with
            | Nil -> ()
            | Cons(dst, opcode, code1) ->
-             TRACE("res-jit", 3, __ "  %a := %a\n%!"
+             LOG(__ "res-jit" 3 " %a := %a"
                State.print dst print_opcode opcode;
              );
              exec_code slot slot1 slot2 t dst opcode;
@@ -292,11 +292,11 @@ DEFINE EXEC_REC_TEMPLATE =
            end)
 
 DEFINE EXEC_TEMPLATE =
-         (TRACE("res-jit", 3, __ "Node %i:\n" (Node.to_int t));
-          TRACE("res-jit", 3, __ " LEFT  : %a\n" pr_slot slot1);
-          TRACE("res-jit", 3, __ " RIGHT : %a\n" pr_slot slot2);
+         (LOG(__ "res-jit" 3 "Node %i:@\nLEFT  : %a@\nRIGHT : %a"
+                (Node.to_int t) print slot1 print slot2
+          );
           exec slot slot1 slot2 t code;
-          TRACE("res-jit", 3, __ " RES   : %a\n\n%!" pr_slot slot))
+          LOG(__ "res-jit"  3  "RES   : %a" print slot))
 
 
 module type S =