Fix contification of non-recursive closures
authorAndy Wingo <wingo@pobox.com>
Fri, 1 Nov 2013 17:22:58 +0000 (18:22 +0100)
committerAndy Wingo <wingo@pobox.com>
Fri, 1 Nov 2013 17:22:58 +0000 (18:22 +0100)
commitb681671ede9cefcbfa9d59169030b013f5ddfc6a
tree906fab18e169d8515cf8e79e4d6ff8534e540183
parentd258fcccee2d96dc3cf90cecf3f3ee9ebb25b9db
Fix contification of non-recursive closures

* module/language/cps/contification.scm (compute-contification): When
  eliding let-bound functions, also record the cont that declares the
  function.
  (apply-contification): Instead of reifying ($values ()) gotos instead
  of the elided function, inline the body that binds the function
  directly.  This ensures that the function gets contified in its own
  scope.
module/language/cps/contification.scm