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)))
|
||||
(cdr exp)))
|
||||
;(reverse (cdr exp))))
|
||||
;; If primitive mutates its args, ignore if ivar is not mutated (??)
|
||||
;((and (prim? (car exp))
|
||||
; (prim:mutates? (car exp))
|
||||
; (> (length exp) 1))
|
||||
; (analyze:find-inlinable-vars (cadr exp) args)
|
||||
; ;; First param is always mutated
|
||||
; (for-each
|
||||
; (lambda (e)
|
||||
; (if (not (ref? e))
|
||||
; (analyze:find-inlinable-vars e args)))
|
||||
; (cddr exp)))
|
||||
;; If primitive mutates its args, ignore ivar if it is not mutated
|
||||
((and (prim? (car exp))
|
||||
(prim:mutates? (car exp))
|
||||
(> (length exp) 1))
|
||||
(analyze:find-inlinable-vars (cadr exp) args)
|
||||
;; First param is always mutated
|
||||
(for-each
|
||||
(lambda (e)
|
||||
(if (not (ref? e))
|
||||
(analyze:find-inlinable-vars e args)))
|
||||
(cddr exp)))
|
||||
((and (not (prim? (car exp)))
|
||||
(ref? (car exp)))
|
||||
(define ref-formals '())
|
||||
|
|
Loading…
Add table
Reference in a new issue