mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-09 21:40:33 +02:00
Compute-contification also visits body
* module/language/cps/contification.scm (compute-contification): If we decide to contify, don't forget to visit the body. Should make contification converge faster.
This commit is contained in:
parent
22d425ec55
commit
7338a49fa1
1 changed files with 6 additions and 3 deletions
|
@ -219,8 +219,9 @@
|
|||
(($ $cont _ ($ $kclause arity body))
|
||||
...))))
|
||||
...)
|
||||
(unless (contify-funs term-k sym self tail-k arity body)
|
||||
(for-each visit-fun fun)))))))
|
||||
(if (contify-funs term-k sym self tail-k arity body)
|
||||
(for-each (cut for-each visit-cont <>) body)
|
||||
(for-each visit-fun fun)))))))
|
||||
(visit-term body term-k)
|
||||
(for-each visit-component
|
||||
(split-components (map list names syms funs))))
|
||||
|
@ -234,7 +235,9 @@
|
|||
(if (and=> (bound-symbol k)
|
||||
(lambda (sym)
|
||||
(contify-fun term-k sym self tail-k arity body)))
|
||||
(elide-function! k (lookup-cont k cont-table))
|
||||
(begin
|
||||
(elide-function! k (lookup-cont k cont-table))
|
||||
(for-each visit-cont body))
|
||||
(visit-fun exp)))
|
||||
(_ #t)))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue