1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-24 05:20:30 +02:00
guile/module/language/tree-il
Ludovic Courtès 11671bbacb Add a partial evaluator for use in the compiler.
Thanks to William R. Cook for his excellent tutorial,
<http://softlang.uni-koblenz.de/dsl11/>.

* module/language/tree-il/optimize.scm (optimize!): Call `peval' unless
  the #:partial-eval? option asks otherwise.
  (peval): New procedure.

* module/language/tree-il/inline.scm: Add comment.

* module/language/tree-il/primitives.scm (*primitive-constructors*): New
  variable.
  (*effect-free-primitives*): Use it.
  (constructor-primitive?): New primitive.

* test-suite/tests/tree-il.test (assert-tree-il->glil): Extend to
  support `with-partial-evaluation', `without-partial-evaluation', and
  `with-options'.
  (peval): New binding.
  (pass-if-peval): New macro.
  ("lexical refs"): Run tests without partial evaluation.
  ("letrec"): Likewise.
  ("the or hack"): Likewise.
  ("conditional"): Likewise, for some tests.
  ("sequence"): Adjust to new generated code.
  ("partial evaluation"): New test prefix.
2011-09-09 00:05:34 +02:00
..
analyze.scm Use (ice-9 match) instead of `record-case' where it improves readability. 2011-09-06 00:18:36 +02:00
compile-glil.scm fix invalid transformation of (values x) -> x, (+ x) -> x, etc 2011-06-17 19:42:55 +02:00
fix-letrec.scm fix-letrec tweaks 2011-03-09 22:38:11 +01:00
inline.scm Add a partial evaluator for use in the compiler. 2011-09-09 00:05:34 +02:00
optimize.scm Add a partial evaluator for use in the compiler. 2011-09-09 00:05:34 +02:00
primitives.scm Add a partial evaluator for use in the compiler. 2011-09-09 00:05:34 +02:00
spec.scm remove `version' field from <language> 2010-05-02 11:19:13 +02:00