mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-22 19:44:10 +02:00
Add intmap-replace!.
* module/language/cps/intmap.scm (intmap-replace!): New interface. * module/language/cps2/dce.scm (elide-type-checks): * module/language/cps2/simplify.scm (transform-conts): * module/language/cps2/utils.scm (intmap-map): * module/language/tree-il/compile-cps2.scm (cps-convert/thunk): Use intmap-replace!.
This commit is contained in:
parent
ad29059ff8
commit
23379467ae
5 changed files with 50 additions and 13 deletions
|
@ -106,9 +106,7 @@
|
|||
|
||||
(define (intmap-map proc map)
|
||||
(persistent-intmap
|
||||
(intmap-fold (lambda (k v out)
|
||||
(intmap-add! out k (proc k v)
|
||||
(lambda (old new) new)))
|
||||
(intmap-fold (lambda (k v out) (intmap-replace! out k (proc k v)))
|
||||
map
|
||||
map)))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue