From aa70c5ece96be6ff318c97bdf5bf44122c9bd310 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Thu, 10 Nov 2016 19:47:53 +0000 Subject: [PATCH] Updated comments --- scheme/cyclone/cps-optimizations.sld | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/scheme/cyclone/cps-optimizations.sld b/scheme/cyclone/cps-optimizations.sld index dcad45e4..4dcc0aed 100644 --- a/scheme/cyclone/cps-optimizations.sld +++ b/scheme/cyclone/cps-optimizations.sld @@ -717,7 +717,7 @@ (else (error `(Unexpected expression passed to inline prim check ,exp))))) - ;; Similar to above, but make a single pass across all the code to + ;; Similar to (inline-ok?) above, but this makes a single pass to ;; figure out which refs can be inlined and which ones are mutated or ;; otherwise used in such a way that they cannot be safely inlined. ;; @@ -735,20 +735,13 @@ (with-var exp (lambda (var) (adbv:set-inlinable! var #f))))) ((ast:lambda? exp) - ;; TODO: pass along immediate lambda args, and ignore if they + ;; Pass along immediate lambda args, and ignore if they ;; are used??? sort of makes sense because we want to inline ;; function arguments by replacing lambda args with the actual - ;; arguments. maybe we ignore lambda args within the lambda, but - ;; if they are used by another lambda (IE: closure) then flag - ;; them and do not allow an inline in that case (??). + ;; arguments. ;; - ;; not really flagging, we just pass args along always, and - ;; do not append to prev args when a new lambda is handled. - ;; - ;(for-each - ; (lambda (e) - ; (analyze:find-inlinable-vars e)) - ; (ast:lambda-formals->list exp)) + ;; This may still need some work to match what is going on + ;; in inline-ok. (let ((formals (ast:lambda-formals->list exp))) (for-each (lambda (e)