mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-19 05:39:17 +02:00
Issue #292
This commit is contained in:
parent
55d561fe98
commit
f02b561fb6
1 changed files with 5 additions and 4 deletions
|
@ -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)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue