1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 13:30:26 +02:00

Small expression-effects tweak

* module/language/cps/effects-analysis.scm (expression-effects):
  Closures with zero free vars don't allocate.
This commit is contained in:
Andy Wingo 2015-07-24 12:21:00 +02:00
parent ec9554d138
commit bcfa9fe70e

View file

@ -438,6 +438,8 @@ is or might be a read or a write to the same location as A."
(match exp
((or ($ $const) ($ $prim) ($ $values))
&no-effects)
(($ $closure _ 0)
&no-effects)
((or ($ $fun) ($ $rec) ($ $closure))
(&allocate &unknown-memory-kinds))
(($ $prompt)