guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] 01/07: Fix intset-add! transient bug


From: Andy Wingo
Subject: [Guile-commits] 01/07: Fix intset-add! transient bug
Date: Mon, 11 May 2015 20:46:10 +0000

wingo pushed a commit to branch master
in repository guile.

commit f95a794a3d0f560c2f6f972820fd4545369ad6e7
Author: Andy Wingo <address@hidden>
Date:   Sat May 9 11:51:06 2015 +0200

    Fix intset-add! transient bug
    
    * module/language/cps/intset.scm (intset-add!): Fix as in
      0f082bd3f7ad4854333728c6d0f71ef7df1fbec3.
---
 module/language/cps/intset.scm |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/module/language/cps/intset.scm b/module/language/cps/intset.scm
index fb42a1f..9fc44bd 100644
--- a/module/language/cps/intset.scm
+++ b/module/language/cps/intset.scm
@@ -203,7 +203,10 @@
         (#f (let ((v (new-branch edit)))
               (vector-set! root idx v)
               v))
-        (v (writable-branch v edit)))))
+        (v (let ((v* (writable-branch v edit)))
+             (unless (eq? v v*)
+               (vector-set! root idx v*))
+             v*)))))
   (define (adjoin-branch! i shift root)
     (let* ((shift (- shift *branch-bits*))
            (idx (logand (ash i (- shift)) *branch-mask*)))



reply via email to

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