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)
|
||||
(with-var v (lambda (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
|
||||
;; are inlining to. Also, does not catch cases where the
|
||||
(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
|
||||
;; var might be mutated by a function call outside this
|
||||
;; module (but hopefully we already catch that elsewhere).
|
||||
(set! cannot-inline #t))
|
||||
|
@ -1463,8 +1463,9 @@
|
|||
;; case we do not want to beta-expand as a contraction
|
||||
;; because duplicate instances of the same code may be
|
||||
;; introduced, causing problems downstream.
|
||||
(or (not called-once?)
|
||||
(and called-once?
|
||||
(not (contains-if? (ast:lambda-body fnc))))
|
||||
(not (contains-if? (ast:lambda-body fnc)))))
|
||||
))
|
||||
)))
|
||||
(else #f)))
|
||||
|
|
Loading…
Add table
Reference in a new issue