This commit is contained in:
Justin Ethier 2019-01-15 15:16:01 -05:00
parent 55d561fe98
commit f02b561fb6

View file

@ -1196,8 +1196,8 @@
(lambda (v) (lambda (v)
(with-var v (lambda (var) (with-var v (lambda (var)
(if (or (member scope-sym (adbv:mutated-indirectly var)) (if (or (member scope-sym (adbv:mutated-indirectly var))
(adbv:mutated-by-set? var)) ;; TOO restrictive, only matters if set! occurs in body we (adbv:mutated-by-set? var) ;; TOO restrictive, only matters if set! occurs in body we
;; are inlining to. Also, does not catch cases where the ) ;; are inlining to. Also, does not catch cases where the
;; var might be mutated by a function call outside this ;; var might be mutated by a function call outside this
;; module (but hopefully we already catch that elsewhere). ;; module (but hopefully we already catch that elsewhere).
(set! cannot-inline #t)) (set! cannot-inline #t))
@ -1463,8 +1463,9 @@
;; case we do not want to beta-expand as a contraction ;; case we do not want to beta-expand as a contraction
;; because duplicate instances of the same code may be ;; because duplicate instances of the same code may be
;; introduced, causing problems downstream. ;; introduced, causing problems downstream.
(and called-once? (or (not called-once?)
(not (contains-if? (ast:lambda-body fnc)))) (and called-once?
(not (contains-if? (ast:lambda-body fnc)))))
)) ))
))) )))
(else #f))) (else #f)))