[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 09/11: Fix bug in CPS2 simplify's "transform-conts"
From: |
Andy Wingo |
Subject: |
[Guile-commits] 09/11: Fix bug in CPS2 simplify's "transform-conts" |
Date: |
Wed, 20 May 2015 17:32:59 +0000 |
wingo pushed a commit to branch master
in repository guile.
commit 7d4ede040d06fcd0fc86cc373505a8550a41b06d
Author: Andy Wingo <address@hidden>
Date: Wed May 20 11:37:28 2015 +0200
Fix bug in CPS2 simplify's "transform-conts"
* module/language/cps2/simplify.scm (transform-conts): Return a persistent
intmap.
---
module/language/cps2/simplify.scm | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/module/language/cps2/simplify.scm
b/module/language/cps2/simplify.scm
index 43960c6..7416aa2 100644
--- a/module/language/cps2/simplify.scm
+++ b/module/language/cps2/simplify.scm
@@ -53,13 +53,14 @@
(((x1 . l1) . (x2 . l2)) (lp l1 l2 (f x1 x2 seed))))))
(define (transform-conts f conts)
- (intmap-fold (lambda (k v out)
- (let ((v* (f k v)))
- (if (equal? v v*)
- out
- (intmap-add! out k v* (lambda (old new) new)))))
- conts
- conts))
+ (persistent-intmap
+ (intmap-fold (lambda (k v out)
+ (let ((v* (f k v)))
+ (if (equal? v v*)
+ out
+ (intmap-add! out k v* (lambda (old new) new)))))
+ conts
+ conts)))
;;; Continuations that simply forward their values to another may be
;;; elided via eta reduction over labels.
- [Guile-commits] branch master updated (ef5f2fc -> 48b2f19), Andy Wingo, 2015/05/20
- [Guile-commits] 04/11: Add two-argument fixpoint arity, Andy Wingo, 2015/05/20
- [Guile-commits] 02/11: Fix fixpoint, Andy Wingo, 2015/05/20
- [Guile-commits] 01/11: Fix sub/- primcall bug, Andy Wingo, 2015/05/20
- [Guile-commits] 03/11: Fix bug compiling fixpoint combinator, Andy Wingo, 2015/05/20
- [Guile-commits] 07/11: Add arity to worklist-fold, Andy Wingo, 2015/05/20
- [Guile-commits] 06/11: Variadic intset-fold, intmap-fold, Andy Wingo, 2015/05/20
- [Guile-commits] 08/11: intmaps and intsets print with abbreviated key ranges, Andy Wingo, 2015/05/20
- [Guile-commits] 09/11: Fix bug in CPS2 simplify's "transform-conts",
Andy Wingo <=
- [Guile-commits] 05/11: Intmaps do not treat #f specially as a value, Andy Wingo, 2015/05/20
- [Guile-commits] 10/11: Port effects analysis to CPS2, Andy Wingo, 2015/05/20
- [Guile-commits] 11/11: Port dead code elimination (DCE) pass to CPS2, Andy Wingo, 2015/05/20