From 3b1f124b6af9b0d571f5c675c154bc8e77e2f891 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Thu, 27 Sep 2018 17:32:04 -0400 Subject: [PATCH] Check for prim:cont when known function is called via k --- scheme/cyclone/cps-optimizations.sld | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scheme/cyclone/cps-optimizations.sld b/scheme/cyclone/cps-optimizations.sld index 2a74fdf8..9f1e6e64 100644 --- a/scheme/cyclone/cps-optimizations.sld +++ b/scheme/cyclone/cps-optimizations.sld @@ -2098,7 +2098,9 @@ ;; Allow candidates to remain if they are just function calls ;; and they are called by the same function that defines them ((and cand - (equal? (ast:lambda-id cand) scope)) + (equal? (ast:lambda-id cand) scope) + (not (any prim-call/cont? (cdr exp))) + ) (cdr exp)) (else exp))))