mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 04:10:18 +02:00
Stabilize renumber.scm:sort-conts.
* module/language/cps/renumber.scm (sort-conts): Prevent spurious continuation reordering.
This commit is contained in:
parent
3ddd438179
commit
cf7a884f12
1 changed files with 8 additions and 1 deletions
|
@ -66,7 +66,14 @@
|
||||||
(let ((k-len (vector-ref path-lengths k))
|
(let ((k-len (vector-ref path-lengths k))
|
||||||
(kt-len (vector-ref path-lengths kt)))
|
(kt-len (vector-ref path-lengths kt)))
|
||||||
(cond
|
(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 k)
|
||||||
(maybe-visit kt))
|
(maybe-visit kt))
|
||||||
(else
|
(else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue