separate peval and a new canonicalization pass into their own modules
authorAndy Wingo <wingo@pobox.com>
Wed, 28 Sep 2011 17:39:25 +0000 (19:39 +0200)
committerAndy Wingo <wingo@pobox.com>
Wed, 28 Sep 2011 17:39:39 +0000 (19:39 +0200)
commitb275fb2691af150cc57e395e65df5a66e315017e
treec16f6098aa757489c222509c3b946f6031761544
parentdf40b969780df2979f9f5e1c9ae8b9d6f09dbd9a
separate peval and a new canonicalization pass into their own modules

* module/language/tree-il/peval.scm: Move to its own file.  Remove the
  bits about <prompt> thunk-application bodies, as they are not
  optimizations, simply expectations of the compiler.  `canonicalize'
  handles that now.

* module/language/tree-il/optimize.scm: Use peval from its module.
  Don't call `inline!', as that's useless now.

* module/language/tree-il/canonicalize.scm: New file, implementing a
  pass that `compile-tree-il' runs on the result from the optimizer.
  The compiler currently expects a <let> form to have bindings, for
  example, and this pass turns a <let> without bindings into its body.

* module/language/tree-il/inline.scm: Deprecate, as `peval' does
  everything this function ever did.

* module/language/tree-il/compile-glil.scm: Canonicalize after
  optimizing.  This should allow us to skip the optimizer entirely, if
  we want.

* module/Makefile.am: Update and reorder a little bit.
module/Makefile.am
module/language/tree-il/canonicalize.scm [new file with mode: 0644]
module/language/tree-il/compile-glil.scm
module/language/tree-il/inline.scm
module/language/tree-il/optimize.scm
module/language/tree-il/peval.scm [copied from module/language/tree-il/optimize.scm with 95% similarity]