1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-17 20:52:24 +02:00

Add "pop" field to $prompt

* module/language/cps.scm ($prompt): Add a "pop" field, indicating the
  continuation at which this prompt is popped.  The body of the prompt
  is dominated by the prompt, and post-dominated by the pop.  Adapt all
  builders and users.

* module/language/cps/closure-conversion.scm:
* module/language/cps/compile-rtl.scm:
* module/language/cps/slot-allocation.scm:
* module/language/cps/verify.scm:
* module/language/tree-il/compile-cps.scm: Adapt.

* module/language/cps/dfg.scm (visit-fun): Add an arc from the pop to
  the handler, to keep handler variables alive through the prompt body.
This commit is contained in:
Andy Wingo 2013-10-29 22:57:29 +01:00
parent 2700f19833
commit 96af4a18b8
7 changed files with 31 additions and 17 deletions

View file

@ -272,7 +272,7 @@
(($ $primcall name args)
(error "unhandled primcall in seq context" name))
(($ $values ()) #f)
(($ $prompt escape? tag handler)
(($ $prompt escape? tag handler pop)
(match (lookup-cont handler cont-table)
(($ $ktrunc ($ $arity req () rest () #f) khandler-body)
(let ((receive-args (gensym "handler"))