Is it possible to get a list of global variables used in a function
from the compiler? Currently, I am using clisp with maxima, and
xref is being used to do a crossreference. However it lists
local variables and global without indicating which ones are global,
and that information would be a big help.
From: Sam Steingold <sds@gn...> - 2002-12-16 19:38:14
> * In message <E18O05b-0004Cx-00@...>
> * On the subject of "[clisp-list] Question about the compiler"
> * Sent on Mon, 16 Dec 2002 11:35:39 -0700 (MST)
> * Honorable dan.stanger@... writes:
> Is it possible to get a list of global variables used in a function
> from the compiler?
if the function is a compiled closure, then yes: look at the
GETVALUE and SETVALUE instructions in the byte code.
if it is an interpreted closure, the code-walker would need to be
modified to do this..
if it is a built-in function written in C, no.
it would be nice to display this information in the disassembly...
you probably want a CLOSURE-FREE-VARIABLES function, right?
Sam Steingold (http://www.podval.org/~sds) running RedHat8 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
Booze is the answer. I can't remember the question.