[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)))
- [Guile-commits] branch master updated (d99fedc -> b31af02), Andy Wingo, 2015/05/11
- [Guile-commits] 01/07: Fix intset-add! transient bug, Andy Wingo, 2015/05/11
- [Guile-commits] 02/07: Fix another intset transient bug, Andy Wingo, 2015/05/11
- [Guile-commits] 03/07: compute-dom-edges returns a persistent intmap,
Andy Wingo <=
- [Guile-commits] 04/07: Tree-IL -> CPS2 -> CPS, Andy Wingo, 2015/05/11
- [Guile-commits] 06/07: Adapt return arities in Tree-IL -> CPS2 conversion, Andy Wingo, 2015/05/11
- [Guile-commits] 05/07: Build CPS2 with transient intmaps, Andy Wingo, 2015/05/11
- [Guile-commits] 07/07: Consolidate CPS2 above CPS in the compiler, Andy Wingo, 2015/05/11