1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-28 07:50:20 +02:00

Fix another intset transient bug

* module/language/cps/intset.scm (intset-add!): If the root is a
  branch but isn't editable, be sure to actually update the transient
  intset's root to store the writable root.
This commit is contained in:
Andy Wingo 2015-05-09 14:52:47 +02:00
parent f95a794a3d
commit 7fedd7b7ad

View file

@ -232,7 +232,10 @@
;; Add element to set; level will not change.
(if (= shift *leaf-bits*)
(set-transient-intset-root! bs (adjoin-leaf (- i min) root))
(adjoin-branch! (- i min) shift root)))
(let ((root* (writable-branch root edit)))
(unless (eq? root root*)
(set-transient-intset-root! bs root*))
(adjoin-branch! (- i min) shift root*))))
(else
(let lp ((min min)
(shift shift)