Subject: [clisp-list] Question about the compiler

From: [email-masked]
Date: Mon Dec 16 10:35:05 2002

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.
Thanks,
Dan Stanger

---

From: Sam Steingold <[email-masked]>
Date: Mon Dec 16 11:39:02 2002

> * In message <[email-masked]>
> * On the subject of "[clisp-list] Question about the compiler"
> * Sent on Mon, 16 Dec 2002 11:35:39 -0700 (MST)
> * Honorable [email-masked] writes:
>
> 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/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Booze is the answer. I can't remember the question.