mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 14:50:19 +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:
parent
09869e781b
commit
0f082bd3f7
1 changed files with 4 additions and 1 deletions
|
@ -174,7 +174,10 @@
|
||||||
(#f (let ((v (new-branch edit)))
|
(#f (let ((v (new-branch edit)))
|
||||||
(vector-set! root idx v)
|
(vector-set! root idx v)
|
||||||
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)
|
(define (adjoin! i shift root)
|
||||||
(let* ((shift (- shift *branch-bits*))
|
(let* ((shift (- shift *branch-bits*))
|
||||||
(idx (logand (ash i (- shift)) *branch-mask*)))
|
(idx (logand (ash i (- shift)) *branch-mask*)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue