mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-29 22:40:34 +02:00
intmap-remove returns empty-intmap if appropriate
* module/language/cps/intmap.scm (intmap-remove): Return empty-intmap if the result is indeed empty.
This commit is contained in:
parent
a3173d1758
commit
bd2c690901
1 changed files with 4 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
;;; Functional name maps
|
||||
;;; Copyright (C) 2014, 2015 Free Software Foundation, Inc.
|
||||
;;; Copyright (C) 2014, 2015, 2017 Free Software Foundation, Inc.
|
||||
;;;
|
||||
;;; This library is free software: you can redistribute it and/or modify
|
||||
;;; it under the terms of the GNU Lesser General Public License as
|
||||
|
@ -386,7 +386,9 @@ already, and always calls the meet procedure."
|
|||
(let ((root* (remove (- i min) shift root)))
|
||||
(if (eq? root root*)
|
||||
map
|
||||
(make-intmap/prune min shift root*))))
|
||||
(if (absent? root*)
|
||||
empty-intmap
|
||||
(make-intmap/prune min shift root*)))))
|
||||
(else map)))
|
||||
(($ <transient-intmap>)
|
||||
(intmap-remove (persistent-intmap map) i))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue