[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 08/13: intset-intersect bugfix
From: |
Andy Wingo |
Subject: |
[Guile-commits] 08/13: intset-intersect bugfix |
Date: |
Wed, 22 Jul 2015 15:32:28 +0000 |
wingo pushed a commit to branch master
in repository guile.
commit 2df454b95b67029e28bbe041885001ce4a14adfd
Author: Andy Wingo <address@hidden>
Date: Wed Jul 22 16:59:47 2015 +0200
intset-intersect bugfix
* module/language/cps/intset.scm (intset-intersect): Remove new-leaf
procedure, inlining to single call site. An empty intersection
properly produces #f so that the set can be pruned.
---
module/language/cps/intset.scm | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/module/language/cps/intset.scm b/module/language/cps/intset.scm
index 8c7a23b..bb35a23 100644
--- a/module/language/cps/intset.scm
+++ b/module/language/cps/intset.scm
@@ -102,7 +102,6 @@
(root transient-intset-root set-transient-intset-root!)
(edit transient-intset-edit set-transient-intset-edit!))
-(define (new-leaf) 0)
(define-inlinable (clone-leaf-and-set leaf i val)
(if val
(if leaf
@@ -573,10 +572,10 @@
(else (make-intset a-min a-shift root)))))))))
(define (intset-intersect a b)
- (define tmp (new-leaf))
;; Intersect leaves.
(define (intersect-leaves a b)
- (logand a b))
+ (let ((leaf (logand a b)))
+ (if (eqv? leaf 0) #f leaf)))
;; Intersect A and B from index I; the result will be fresh.
(define (intersect-branches/fresh shift a b i fresh)
(let lp ((i 0))
- [Guile-commits] branch master updated (90aabcc -> aa7f0e2), Andy Wingo, 2015/07/22
- [Guile-commits] 04/13: CPS1 slot-allocation simplification, Andy Wingo, 2015/07/22
- [Guile-commits] 05/13: More slot-allocation simplification, Andy Wingo, 2015/07/22
- [Guile-commits] 03/13: Utils refactors, Andy Wingo, 2015/07/22
- [Guile-commits] 07/13: Fix bad return shuffles for multiply-used $kreceive conts, Andy Wingo, 2015/07/22
- [Guile-commits] 01/13: Reify primitives in CPS2, Andy Wingo, 2015/07/22
- [Guile-commits] 09/13: Fix CPS2 compute-successors, Andy Wingo, 2015/07/22
- [Guile-commits] 06/13: Fix error printing some wrong-num-args backtraces, Andy Wingo, 2015/07/22
- [Guile-commits] 02/13: Add intset-prev and intset-fold-right, Andy Wingo, 2015/07/22
- [Guile-commits] 11/13: Compile CPS2 directly to bytecode, Andy Wingo, 2015/07/22
- [Guile-commits] 08/13: intset-intersect bugfix,
Andy Wingo <=
- [Guile-commits] 10/13: Slot allocation and bytecode compilation from CPS2., Andy Wingo, 2015/07/22
- [Guile-commits] 12/13: Remove CPS1 language, Andy Wingo, 2015/07/22
- [Guile-commits] 13/13: Rename CPS2 to CPS, Andy Wingo, 2015/07/22