mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 09:10:22 +02:00
Root higher-order CPS term is always $kfun $cont
* module/language/cps/arities.scm: * module/language/cps/closure-conversion.scm: * module/language/cps/compile-bytecode.scm: * module/language/cps/constructors.scm: * module/language/cps/contification.scm: * module/language/cps/cse.scm: * module/language/cps/dce.scm: * module/language/cps/elide-values.scm: * module/language/cps/prune-bailouts.scm: * module/language/cps/prune-top-level-scopes.scm: * module/language/cps/renumber.scm: * module/language/cps/self-references.scm: * module/language/cps/simplify.scm: * module/language/cps/specialize-primcalls.scm: * module/language/tree-il/compile-cps.scm: Adapt to produce and consume raw $kfun $cont instances. * .dir-locals.el: Update $letrec indentation.
This commit is contained in:
parent
b85f5f851f
commit
a0329d0109
16 changed files with 212 additions and 223 deletions
|
@ -39,9 +39,7 @@
|
|||
#:export (contify))
|
||||
|
||||
(define (compute-contification fun)
|
||||
(let* ((dfg (match fun
|
||||
(($ $fun free body)
|
||||
(compute-dfg body))))
|
||||
(let* ((dfg (compute-dfg fun))
|
||||
(scope-table (make-hash-table))
|
||||
(call-substs '())
|
||||
(cont-substs '())
|
||||
|
@ -294,7 +292,7 @@
|
|||
(visit-fun exp)))
|
||||
(_ #t)))))
|
||||
|
||||
(visit-fun fun)
|
||||
(visit-cont fun)
|
||||
(values call-substs cont-substs fun-elisions cont-splices)))
|
||||
|
||||
(define (apply-contification fun call-substs cont-substs fun-elisions cont-splices)
|
||||
|
@ -401,7 +399,7 @@
|
|||
(or (contify-call src proc args)
|
||||
(continue k src exp)))
|
||||
(_ (continue k src exp)))))))
|
||||
(visit-fun fun))
|
||||
(visit-cont fun))
|
||||
|
||||
(define (contify fun)
|
||||
(call-with-values (lambda () (compute-contification fun))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue