From 840e5143e212a51064ced7ffeff7a8c9d9c47b4c Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 13 Mar 2020 08:14:39 -0600 Subject: [PATCH] recognize long form of `call/cc` in optimization original commit: 05c31cd27455bce6d122188da14b4973d8a49d7a --- s/cpnanopass.ss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/s/cpnanopass.ss b/s/cpnanopass.ss index 8538b5fa48..85df5f56ac 100644 --- a/s/cpnanopass.ss +++ b/s/cpnanopass.ss @@ -1728,7 +1728,8 @@ [(call ,info ,mdcl ,pr (case-lambda ,info2 (clause (,x) ,interface ,[body (->in-get-cont mode) -> body]))) (guard (and (memq mode '(tail tail/none tail/some tail/reified)) - (eq? (primref-name pr) 'call/cc) + (or (eq? (primref-name pr) 'call/cc) + (eq? (primref-name pr) 'call-with-current-continuation)) (= interface 1))) ;; Since we're in tail position, we can just reify the continuation and ;; put the stack link in the argument variable.