[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, wip-on-demand, created. v2.0.2-150-g0c
From: |
Andy Wingo |
Subject: |
[Guile-commits] GNU Guile branch, wip-on-demand, created. v2.0.2-150-g0cb57e3 |
Date: |
Fri, 07 Oct 2011 23:49:51 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=0cb57e32c382838829850a20c0147687fd16f89b
The branch, wip-on-demand has been created
at 0cb57e32c382838829850a20c0147687fd16f89b (commit)
- Log -----------------------------------------------------------------
commit 0cb57e32c382838829850a20c0147687fd16f89b
Author: Andy Wingo <address@hidden>
Date: Sat Oct 8 01:49:36 2011 +0200
peval: visit operands on-demand, to inline mutually recursive bindings
This commit changes to use <operand> structures to hold the context
needed to visit lexical bindings lazily, in context, instead of eagerly
visiting them for value. This laziness enables inlining of mutually
recursive bindings.
On the meta-level, I agree that it is important to have comments in the
"residual code", but commit logs are to help in proving that changes
preserve correctness, so this commit is particularly verbose. I'm not
sure what should make it into the comments, but surely not all of this.
* module/language/tree-il/peval.scm (<var>): Remove comment about copy
propagation having to run build-var-table; things don't work like that
any more.
(build-var-table): Build <var> entries for all variables, even
unreferenced variables.
(alpha-rename): Remove. We will rename bindings on-demand now.
(peval lookup-var): New helper, to fetch the <var> of a gensym.
(peval fresh-gensyms): Fold here, under peval, and in it, handle
updating the store to record a mapping between new names and <var>
entries from the source program.
(peval record-source-expression): Don't call build-var-table on the
new expression, as alpha-renaming happens on-demand now.
(peval prune-bindings): Rewrite to work with mutually-recursive
bindings.
(peval extend-env): New helper.
(peval loop): OK, here goes... Remove the `operand' context, as now we
visit operands lazily. Add a `call' context, which does not
copy-propagate lambda expressions, used to residualize a call after
aborting an inlining attempt. Change the `env' to be a mapping of
gensym to <operand>. Instead of looking up the operand's binding then
alpha-renaming it, just rely on the fact that visiting the operand
will rename it if necessary.
If we residualize a lexical, do so with the fresh name from the
environment.
For let, letrec, fix, and lambda-case, instead of visiting the
bindings eagerly for value, simply record the source expressions and
environments in an <operand> and rely on copy-propagation to visit
them later in the right context. In the case of letrec and fix, this
allows mutually-recursive bindings to be inlined.
For applications, if we have to abort, process the procedure in call
context, which allows some folding but avoids inlining.
For lambdas, if we are processing for value, record the source
expression so we can detect recursion. This was previously done in
the lexical-ref copy propagator.
* test-suite/tests/tree-il.test ("partial evaluation"): Remove unused
recursive lexicals in a couple of cases. Add a couple test cases for
pruning.
In what is probably a bug, reduce the number of loops to unroll in
some cases, as the new evaluator is taking too long.
commit 42d459289112d23ab02dc9bf6c12e945d39c436a
Author: Andy Wingo <address@hidden>
Date: Thu Oct 6 10:56:12 2011 +0200
peval: add operand structure
* module/language/tree-il/peval.scm (<operand>): Add operand structure,
to be used by peval.
commit 384d891d1c9c969c51c94434d87335b6a95869de
Author: Andy Wingo <address@hidden>
Date: Fri Oct 7 15:49:36 2011 +0200
logging
commit 1082cbba47d3735a502c7cc631c5cc4a705b6a62
Author: Andy Wingo <address@hidden>
Date: Thu Oct 6 23:28:19 2011 +0200
peval: bugfix in constant-expression?
* module/language/tree-il/peval.scm (constant-expression?): Correctly
handle lambda-case alternates.
-----------------------------------------------------------------------
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, wip-on-demand, created. v2.0.2-150-g0cb57e3,
Andy Wingo <=