Updated comments

This commit is contained in:
Justin Ethier 2016-11-10 19:47:53 +00:00
parent ac021ef35e
commit aa70c5ece9

View file

@ -717,7 +717,7 @@
(else (else
(error `(Unexpected expression passed to inline prim check ,exp))))) (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 ;; 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. ;; otherwise used in such a way that they cannot be safely inlined.
;; ;;
@ -735,20 +735,13 @@
(with-var exp (lambda (var) (with-var exp (lambda (var)
(adbv:set-inlinable! var #f))))) (adbv:set-inlinable! var #f)))))
((ast:lambda? exp) ((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 ;; are used??? sort of makes sense because we want to inline
;; function arguments by replacing lambda args with the actual ;; function arguments by replacing lambda args with the actual
;; arguments. maybe we ignore lambda args within the lambda, but ;; arguments.
;; if they are used by another lambda (IE: closure) then flag
;; them and do not allow an inline in that case (??).
;; ;;
;; not really flagging, we just pass args along always, and ;; This may still need some work to match what is going on
;; do not append to prev args when a new lambda is handled. ;; in inline-ok.
;;
;(for-each
; (lambda (e)
; (analyze:find-inlinable-vars e))
; (ast:lambda-formals->list exp))
(let ((formals (ast:lambda-formals->list exp))) (let ((formals (ast:lambda-formals->list exp)))
(for-each (for-each
(lambda (e) (lambda (e)