[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reporting unused local variables
From: |
Ludovic Courtès |
Subject: |
Re: Reporting unused local variables |
Date: |
Thu, 23 Jul 2009 23:21:25 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
¡Hola!
Andy Wingo <address@hidden> 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'?
> 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.
Thanks!
Ludo'.
[*] http://thread.gmane.org/gmane.lisp.guile.devel/8795