mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-09 05:57:34 +02:00
Issue #172 -
Cannot assume that just because a primitive deals with immutable objects that it is safe to inline. A (set!) could still mutate variables the primitive is using, causing invalid behavior.
This commit is contained in:
parent
d301592da6
commit
1f8fb3c20d
1 changed files with 5 additions and 1 deletions
|
@ -603,7 +603,11 @@
|
|||
(cdr exp)
|
||||
(ast:lambda-formals->list (car exp)))
|
||||
(or
|
||||
(prim-calls-inlinable? (cdr exp))
|
||||
; Issue #172 - Cannot assume that just because a primitive
|
||||
; deals with immutable objects that it is safe to inline.
|
||||
; A (set!) could still mutate variables the primitive is
|
||||
; using, causing invalid behavior.
|
||||
;(prim-calls-inlinable? (cdr exp))
|
||||
(inline-prim-call?
|
||||
(ast:lambda-body (car exp))
|
||||
(prim-calls->arg-variables (cdr exp))
|
||||
|
|
Loading…
Add table
Reference in a new issue