mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
If prim mutates args, ignore ivar if not mutated
This commit is contained in:
parent
79cde357b1
commit
7389417e39
1 changed files with 11 additions and 11 deletions
|
@ -959,17 +959,17 @@
|
||||||
(analyze:find-inlinable-vars e args)))
|
(analyze:find-inlinable-vars e args)))
|
||||||
(cdr exp)))
|
(cdr exp)))
|
||||||
;(reverse (cdr exp))))
|
;(reverse (cdr exp))))
|
||||||
;; If primitive mutates its args, ignore if ivar is not mutated (??)
|
;; If primitive mutates its args, ignore ivar if it is not mutated
|
||||||
;((and (prim? (car exp))
|
((and (prim? (car exp))
|
||||||
; (prim:mutates? (car exp))
|
(prim:mutates? (car exp))
|
||||||
; (> (length exp) 1))
|
(> (length exp) 1))
|
||||||
; (analyze:find-inlinable-vars (cadr exp) args)
|
(analyze:find-inlinable-vars (cadr exp) args)
|
||||||
; ;; First param is always mutated
|
;; First param is always mutated
|
||||||
; (for-each
|
(for-each
|
||||||
; (lambda (e)
|
(lambda (e)
|
||||||
; (if (not (ref? e))
|
(if (not (ref? e))
|
||||||
; (analyze:find-inlinable-vars e args)))
|
(analyze:find-inlinable-vars e args)))
|
||||||
; (cddr exp)))
|
(cddr exp)))
|
||||||
((and (not (prim? (car exp)))
|
((and (not (prim? (car exp)))
|
||||||
(ref? (car exp)))
|
(ref? (car exp)))
|
||||||
(define ref-formals '())
|
(define ref-formals '())
|
||||||
|
|
Loading…
Add table
Reference in a new issue