wingo pushed a commit to branch wip-tailify in repository guile. commit 18414f92a85ba7d3a1377f7962fa42be88837462 Author: Andy Wingo <wi...@pobox.com> AuthorDate: Mon May 15 11:09:13 2023 +0200
Tailify issues `restore` instead of `restore1` Unify handling of stack-allocated continuations --- module/language/cps/tailify.scm | 4 ++-- module/language/cps/utils.scm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/language/cps/tailify.scm b/module/language/cps/tailify.scm index d03692943..9840c8cfe 100644 --- a/module/language/cps/tailify.scm +++ b/module/language/cps/tailify.scm @@ -212,7 +212,7 @@ be rewritten to continue to the tail's ktail." ($continue local-ktail src ($calli args ret)))) (build-term ($continue kcall src - ($primcall 'restore1 'ptr ()))))) + ($primcall 'restore '(ptr) ()))))) ((or ($ $call) ($ $callk) ($ $calli)) ;; Otherwise the original term was a tail call. (with-cps cps @@ -637,7 +637,7 @@ to tail-call the saved continuation." ($continue k src ($calli args ret)))) (setk label ($kargs names vars ($continue kcall src - ($primcall 'restore1 'ptr ())))))) + ($primcall 'restore '(ptr) ())))))) (_ cps))) (intset-fold rewrite-return-to-pop-and-calli body cps)) diff --git a/module/language/cps/utils.scm b/module/language/cps/utils.scm index f6224fd22..46fcbd287 100644 --- a/module/language/cps/utils.scm +++ b/module/language/cps/utils.scm @@ -419,7 +419,7 @@ by a label, respectively." (($ $primcall (or 'pointer-ref/immediate 'tail-pointer-ref/immediate)) (intmap-add representations var 'ptr)) - (($ $primcall 'restore1 repr ()) + (($ $primcall 'restore (repr) ()) (intmap-add representations var repr)) (($ $code) (intmap-add representations var 'ptr))