Well, i think you could look at what symbols are avaiable when JScheme starts
and when you want to reset, just removed the symbols that aren't in this list.
Symbol.symbolTable$ is the symbol table.
Also look at elf/classpath.scm the procedure replaceClassLoaders resets all the internal caches.
k
At 12:00 AM 3/5/2004 -0500, Borislav Iordanov wrote:
>Hi,
>
>This is a question for the Jscheme developers. I would like to be able
>to reset the interpreter to a clean state without having the restart the
>JVM. I'm not sure how this should be done, but because the interpreter
>interface consists of static methods, it seems that I would need to
>"manually" empty environments and the like (imports, classpaths...). My
>goal is for the interpreter to behave as if started in a fresh JVM. I
>could read the code and figure it out, but some guidance would save me
>time and I'd appreciate it.
>
>BTW, this is in the context of a NetBeans plugin for JScheme I started
>writing a few days ago. I know there is an Eclipse plugin, but I use
>NetBeans so I want a NetBeans one ;). I'll make it available for other
>NetBeans/Jscheme users (please let me know if there is some interest -
>it's good motivation) once it's more useful. So far, it just does syntax
>coloring, runs the interpreter within NetBeans and has a "Load in
>Jscheme" context menu item in the editor. Resetting the interpreter is
>useful when opening a different project in the IDE.
>
>Thanks a lot in advance.
>Boris
|