1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-28 16:00:22 +02:00

better pure-expression?

* module/language/tree-il/optimize.scm (peval): Allow dynref, fix, and
  let-values to be pure expressions.
This commit is contained in:
Andy Wingo 2011-09-21 08:46:44 +02:00
parent ddbee5c00f
commit 2605b6ba27

View file

@ -320,6 +320,7 @@ it does not handle <fix> and <let-values>, it should be called before
(($ <lexical-ref>) #t)
(($ <toplevel-ref>) #t)
(($ <primitive-ref>) #t)
(($ <dynref> _ fluid) (loop fluid))
(($ <conditional> _ condition subsequent alternate)
(and (loop condition) (loop subsequent) (loop alternate)))
(($ <application> _ ($ <primitive-ref> _ name) args)
@ -334,6 +335,10 @@ it does not handle <fix> and <let-values>, it should be called before
(and (every loop vals) (loop body)))
(($ <letrec> _ _ _ _ vals body)
(and (every loop vals) (loop body)))
(($ <fix> _ _ _ vals body)
(and (every loop vals) (loop body)))
(($ <let-values> _ exp body)
(and (loop exp) (loop body)))
(_ #f))))
(define (mutable? exp)