summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2023-07-10 11:28:07 +0200
committerAndy Wingo <wingo@pobox.com>2023-07-10 11:28:07 +0200
commita5d66b6d6f5802c734129de23ec926f847ffefe6 (patch)
tree00fb25560fe10e1676bfae10b2c6bc1f8a0f07d2
parent528482042d95c00e772101f7871b0cb7f988baba (diff)
downloadguile-a5d66b6d6f5802c734129de23ec926f847ffefe6.tar.gz
Fix prompt tailification
* module/language/cps/hoot/tailify.scm (tailify-tail): Fix control flow when pushing a prompt. (compute-tails): Prompt handlers are in the initial split set.
-rw-r--r--module/language/cps/hoot/tailify.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/language/cps/hoot/tailify.scm b/module/language/cps/hoot/tailify.scm
index f45e66e2a..6888019ed 100644
--- a/module/language/cps/hoot/tailify.scm
+++ b/module/language/cps/hoot/tailify.scm
@@ -279,7 +279,7 @@ be rewritten to continue to the tail's ktail."
((rename-var tag) handler)))))
(letk kcode ($kargs () ()
($continue kpush src ($code (intmap-ref entries kh)))))
- (build-term ($continue kpush src
+ (build-term ($continue kcode src
($primcall 'save reprs vars)))))))
(($ $throw src op param args)
(with-cps cps
@@ -524,6 +524,8 @@ body, as an intset."
(match (intmap-ref cps k)
(($ $ktail) splits)
((or ($ $kargs) ($ $kreceive)) (intmap-add splits k k))))
+ (($ $kargs names vars ($ $prompt k kh src escape? tag))
+ (intmap-add splits kh kh))
(_
splits)))
;; Then we build tails by propagating splits forward in the CFG,