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

Stabilize renumber.scm:sort-conts.

* module/language/cps/renumber.scm (sort-conts): Prevent spurious
  continuation reordering.
This commit is contained in:
Andy Wingo 2014-07-21 12:19:33 +02:00
parent 3ddd438179
commit cf7a884f12

View file

@ -66,7 +66,14 @@
(let ((k-len (vector-ref path-lengths k))
(kt-len (vector-ref path-lengths kt)))
(cond
((and k-len kt-len (< k-len kt-len))
((if kt-len
(or (not k-len)
(< k-len kt-len)
;; If the path lengths are the
;; same, preserve original order
;; to avoid squirreliness.
(and (= k-len kt-len) (< kt k)))
(if k-len #f (< kt k)))
(maybe-visit k)
(maybe-visit kt))
(else