On 19 Set, 19:34, Tim Daly <d...@axiom-developer.org> wrote:
>   In common lisp I use the (disassemble) function which generally
> gives back an assembler listing of the code that would be executed.
> Is there a Java function which will return the byte codes that get
> executed?

In general there isn't. In the particular situation in which a) the
Lisp implementation controls class loading and b) each Lisp function
is compiled to a distinct Java class, the implementation can arrange
to store the bytecode for each function and run a Java bytecode
decompiler on it to disassemble/decompile it.

> Could this be used to create a (disassemble) function for
> Clojure? Having such a function means that you don't have to guess
> what the program is actually doing.

I think Clojure respects point a) and b) above when not using gen-
class to compile multiple functions to a single Java class, so it
would be possible, but it requires support from the implementation, it
cannot be a library function.

Cheers,
Alessio

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to