X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=debug.ml;h=7ae4e753772efc1ccf76bbf699464b91fcea859f;hb=f0557f21878be17ddc75b1bc8f4f86da68c8e604;hp=f754993e179ee2f3d689cddc74df2ed81932a0c3;hpb=dc91851aaeac91a71eba2c266d0227adea0c5815;p=SXSI%2Fxpathcomp.git diff --git a/debug.ml b/debug.ml index f754993..7ae4e75 100644 --- a/debug.ml +++ b/debug.ml @@ -17,22 +17,14 @@ IFDEF DEBUG THEN module Loc = Camlp4.PreCast.Loc - -DEFINE D(x) = ignore(x); -DEFINE MM(v,l) = (let ____x = v in (Memory.register ____x (Loc.to_string (l)));____x) -let () = Memory.schedule_stats () - +DEFINE D_IGNORE_(e1,e2) = (let () = e1 in ();e2) +DEFINE D_IF_(e1,e2) = e1 ELSE +DEFINE D_IGNORE_(e1,e2) = (e2) -DEFINE D(x) = (); -DEFINE MM(v,l) = (v) - -END (* IFDEF DEBUG *) +DEFINE D_IF_(e1,e2) = e2 -IFDEF PROFILE -THEN DEFINE P(x) = ignore(x); -ELSE DEFINE P(x) = (); END (* IFDEF DEBUG *)