1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 03:30:27 +02:00

Fix bugs introduced when allowing $kfun -> $kargs

* module/language/cps/dce.scm (compute-known-allocations):
* module/language/cps/simplify.scm (eta-reduce): Allow the case-lambda
without clauses.
This commit is contained in:
Andy Wingo 2021-04-25 13:33:06 +02:00
parent 39619988e4
commit 5809279b99
2 changed files with 6 additions and 3 deletions

View file

@ -89,7 +89,10 @@ sites."
(($ $kreceive arity kargs)
(values known (intset-add! unknown kargs)))
(($ $kfun src meta self tail entry)
(values known (intset-add! unknown entry)))
(values known
(if entry
(intset-add! unknown entry)
unknown)))
(($ $kclause arity body alt)
(values known (intset-add! unknown body)))
(($ $ktail)
@ -270,7 +273,7 @@ sites."
(($ $kfun src meta self tail entry)
(values live-labels
(adjoin-vars
(or (cont-defs entry) '())
(or (and entry (cont-defs entry)) '())
(if self (adjoin-var self live-vars) live-vars))))
(($ $ktail)
(values live-labels live-vars))))

View file

@ -178,7 +178,7 @@
(($ $kclause arity body alt)
($kclause ,arity (subst body) alt))
(($ $kfun src meta self tail entry)
($kfun src meta self tail (subst entry)))
($kfun src meta self tail (and entry (subst entry))))
(_ ,cont))))
conts)))