Commits

Matthew Hammer committed 67a2466

'dependee' dependence info is just for debugging

  • Participants
  • Parent commits c303b95
  • Branches nominal

Comments (0)

Files changed (1)

File Source/AdaptonZoo/Adapton.ml

     type atype
 
     IFDEF ADAPTON_LOG THEN
+    type 'a ifdef_adapton_log = 'a
+    ELSE
+    type 'a ifdef_adapton_log = unit
+    END
+
+    IFDEF ADAPTON_LOG THEN
     (* debug: record of debugging info is associated with each thunk. *)
     (* should be sufficient for traversing the DCG and creating a picture of it as a graph. *)
-    (* XXX TODO: some fields, such as mut_tgts, are not yet maintained by this module. *)
     type debug = {
       id          : int ;
       symbol      : Symbol.t option ;
             mutable flag : flag;
             mutable receipt : receipt;
             dependent : meta;
-            dependee  : meta; (* XXX -- For debugging *)
+            dependee  : meta ifdef_adapton_log;
         }
         and flag =
             | Clean
         begin match !lazy_stack with
           | ( dependent, dependencies, _mutations_ )::_ ->
               let dependency = Dependents.merge m.meta.dependents
-                { flag=Clean; receipt; dependent; dependee=m.meta }
+                { flag=Clean; receipt; dependent;
+                  dependee=(IFDEF ADAPTON_LOG THEN m.meta END); }
               in
               (* an existing dependency may be reused *)
               dependency.flag <- Clean;