guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 03/07: compute-dom-edges returns a persistent intmap


From: Andy Wingo
Subject: [Guile-commits] 03/07: compute-dom-edges returns a persistent intmap
Date: Mon, 11 May 2015 20:46:11 +0000

wingo pushed a commit to branch master
in repository guile.

commit 219b6f82a2f52b07ac5e11941e98294ceb612449
Author: Andy Wingo <address@hidden>
Date:   Sat May 9 16:51:40 2015 +0200

    compute-dom-edges returns a persistent intmap
    
    * module/language/cps/utils.scm (compute-dom-edges): Return a
      persistent intmap.  Fixes strange bootstrapping failures that I
      don't understand :/.
---
 module/language/cps2/utils.scm |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/module/language/cps2/utils.scm b/module/language/cps2/utils.scm
index 8ef5f20..d07356b 100644
--- a/module/language/cps2/utils.scm
+++ b/module/language/cps2/utils.scm
@@ -219,10 +219,11 @@
 ;; it immediately dominates.  These are the "D" edges in the DJ tree.
 (define (compute-dom-edges idoms)
   (define (snoc cdr car) (cons car cdr))
-  (intmap-fold (lambda (label idom doms)
-                 (let ((doms (intmap-add! doms label '())))
-                   (cond
-                    ((< idom 0) doms) ;; No edge to entry.
-                    (else (intmap-add! doms idom label snoc)))))
-               idoms
-               empty-intmap))
+  (persistent-intmap
+   (intmap-fold (lambda (label idom doms)
+                  (let ((doms (intmap-add! doms label '())))
+                    (cond
+                     ((< idom 0) doms) ;; No edge to entry.
+                     (else (intmap-add! doms idom label snoc)))))
+                idoms
+                empty-intmap)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]