On Thu 23 Jul 2009 23:21, l...@gnu.org (Ludovic Courtès) writes:

> ¡Hola!
>
> Andy Wingo <wi...@pobox.com> writes:
>
>> OK, here's another idea. Why don't we keep this as a separate pass --
>> enabled if you pass a compilation option. That way it can be more
>> functional, and you can keep approximate source information.
>
> By "pass", you mean a new "language" in the tower?  As in
> `lookup-compilation-order'?

No, just a procedure to run on the tree-il, after tree-il optimization
but before tree-il->glil compilation

>> At each node you have a set of identifiers that are bound but not
>> referenced. If the node is a reference, you remove that identifier
>> from the set. If it is a binding, you add the bindings, traverse
>> subexpressions, then do a set difference between your bindings and the
>> return value from subexpression traversal -- that's your unused
>> bindings.
>
> Yes, this is roughly what I initially did[*], so that sounds reasonable.
> [*] http://thread.gmane.org/gmane.lisp.guile.devel/8795

Apologies for being MIA, then ;-)

Cheers,

Andy
-- 
http://wingolog.org/


Reply via email to