This is the mail archive of the
java-discuss@sources.redhat.com
mailing list for the Java project.
Re: Why interpret dynamically loaded classes?
- To: Jack Andrews <jack dot andrews at str dot com dot au>, java-discuss at sourceware dot cygnus dot com
- Subject: Re: Why interpret dynamically loaded classes?
- From: Elmar Haneke <elmar at haneke dot de>
- Date: Wed, 23 Aug 2000 09:33:02 +0200
- References: <91831350CC59D3118C88005004754C4624B93E@MELB_XMAIL>
Jack Andrews wrote:
> I note that both GCJ and TowerJ use a bytecode interpreter to handle dynamic
> class loading. But why not just compile the dynamically loaded class to a
> native shared object at *runtime*, then link at runtime, too?
This might be done!
But, I would expect it to be rather slow since invoking the native
compiler and linker is rather time consuming. Another problem might
raise from the number of temporaryly created dynamic link libs.
Using n (rather simple) interpreter should be an sufficient solution.
If performance of interpreted code is a problem, the interpreter can
be replaced by an JIT.
Elmar