From 58cc468ca33a1b3f02e8e0727696afd7ea792a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Bastian?= Date: Fri, 16 Feb 2018 18:25:09 +0100 Subject: [PATCH] Clean unused values from pattern matching --- src/CPS.ml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/CPS.ml b/src/CPS.ml index 3f21702..37ad1b9 100644 --- a/src/CPS.ml +++ b/src/CPS.ml @@ -35,16 +35,8 @@ let rec has_calls (t: S.term): bool = match t with (* A lambda itself may contain calls, but this call is not evaluated at * declaration time *) | S.App _ -> true -| S.IfZero (cond, tIf, tElse) -> - (* Cannot optimize continuation creation - List.exists has_calls [cond; tIf; tElse] - *) - true -| S.Print value -> - (* Cannot optimize continuation creation - has_calls value - *) - true +| S.IfZero _ -> true (* Cannot optimize that with the current languages *) +| S.Print _ -> true (* Cannot optimize that with the current languages *) | S.Let (_, value, next) -> List.exists has_calls [value; next]