1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

Avoid attempting to eta-reduce self-loops.

* module/language/cps/simplify.scm (compute-eta-reductions): Avoid
  trying to eta-reduce a jump-to-self, as in (let lp () (lp)).  This
  caused the compiler to hang.
This commit is contained in:
Andy Wingo 2014-02-22 15:34:46 +01:00
parent e4a8775ddb
commit 90c8094aec

View file

@ -60,7 +60,7 @@
(for-each visit-fun funs)
(visit-term body term-k term-args))
(($ $continue k src ($ $values args))
(when (equal? term-args args)
(when (and (equal? term-args args) (not (eq? k term-k)))
(hashq-set! table term-k k)))
(($ $continue k src (and fun ($ $fun)))
(visit-fun fun))