From 045a86dc4450370dcd433f70a18c7644b029058e Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Mon, 24 Apr 2017 13:16:23 +0000 Subject: [PATCH] Do not inline functions w/mutating primitives --- scheme/cyclone/transforms.sld | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scheme/cyclone/transforms.sld b/scheme/cyclone/transforms.sld index b2411e5e..4efeac8f 100644 --- a/scheme/cyclone/transforms.sld +++ b/scheme/cyclone/transforms.sld @@ -1249,6 +1249,9 @@ ;; If function needs CPS, fail right away (if (or (not (prim? fnc)) ;; Eventually need to handle user functions, too (prim:cont? fnc) ;; Needs CPS + (prim:mutates? fnc) ;; This is too conservative, but basically + ;; there are restrictions about optimizing + ;; args to a mutator, so reject them for now ) (fail)) ;; Otherwise, check for valid args