* module/language/tree-il/letrectify.scm (letrectify): Inline "let"
bindings inside residualized "letrec*" forms, to allow the dominator
relationship to be reflected in the scope tree. Also, detect
"define-module*" invocations, and add these to the mod-vars set, so that
residualized "module-ensure-local-variable!" primcalls can clearly
denote their module without having to use "current-module".
* module/language/tree-il/letrectify.scm (compute-procedures-without-identity):
(letrectify): Only eta-expand lambda references that appear outside
the operator position more than once. This should restore peoples'
expectations that (eqv? f f) without penalizing optimization.
* module/language/tree-il/letrectify.scm (compute-private-toplevels):
New function; computes the subset of declarative bindings that are
private to a module. If the module exports a macro, all bindings are
public, as we have no way to know what binding might be exported.
(letrectify): Add #:seal-private-bindings? keyword arg. If true, avoid
making boxes for private definitions.
* module/language/tree-il/optimize.scm (optimize): Add
-Oseal-private-bindings, enabled at -O3.
* test-suite/tests/srfi-64-test.scm: Skip a couple of tests that have
unspecified result due to eq? being unspecified on procedures.
* module/language/tree-il/letrectify.scm (letrectify): Add a comment.
* doc/ref/api-modules.texi (Declarative Modules): New subsection.
* module/ice-9/boot-9.scm (module): Change eval-closure slot, which was
deprecated and unused, to be a "declarative?" slot, indicating that
definitions from the module are declarative.
(user-modules-declarative?): New parameter.
(make-fresh-user-module): Set declarative according to parameter.
(define-module*, define-module): Add #:declarative? keyword argument,
defaulting to the value of user-modules-declarative? parameter when
the module was expanded.
(guile-user): This module is not declarative.
* module/language/tree-il/letrectify.scm (compute-declarative-toplevels):
Use the new declarative? module flag.
* module/language/tree-il/letrectify.scm: New pass, not wired up yet.
Adds lexical definitions for declarative top-level definitions, for
better inlining and contification within a compilation unit.
* am/bootstrap.am:
* module/Makefile.am: Add to build.