1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 06:20:23 +02:00

Fix intmap-add! transient bug

* module/language/cps/intmap.scm (intmap-add!): Fix a bug creating a
  transient branch out of a persistent branch.
This commit is contained in:
Andy Wingo 2015-05-08 14:09:40 +02:00
parent 09869e781b
commit 0f082bd3f7

View file

@ -174,7 +174,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! i shift root)
(let* ((shift (- shift *branch-bits*))
(idx (logand (ash i (- shift)) *branch-mask*)))