1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-22 12:30:32 +02:00
guile/module/language
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
..
assembly more define-syntax-rule usage 2011-09-02 11:36:14 +02:00
brainfuck remove `version' field from <language> 2010-05-02 11:19:13 +02:00
bytecode remove `version' field from <language> 2010-05-02 11:19:13 +02:00
ecmascript more define-syntax-rule usage 2011-09-02 11:36:14 +02:00
elisp core modules use (ice-9 binary-ports) instead of (rnrs io ports) 2011-02-18 16:01:25 +01:00
glil fix some duplication in object tables 2011-05-08 22:55:05 +02:00
objcode fix error message on ,disassemble "non-procedure" 2011-03-29 12:38:18 +02:00
scheme read-enable 'positions by default 2011-02-13 15:06:11 +01:00
tree-il Add a partial evaluator for use in the compiler. 2011-09-09 00:05:34 +02:00
value remove `version' field from <language> 2010-05-02 11:19:13 +02:00
assembly.scm silly "optimization" in (language assembly) 2011-05-05 11:43:12 +02:00
glil.scm prompt handlers are always inline 2010-02-19 15:30:34 +01:00
objcode.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
tree-il.scm more define-syntax-rule usage 2011-09-02 11:36:14 +02:00