Why interpret dynamically loaded classes?

Elmar Haneke elmar@haneke.de
Wed Aug 23 01:25:00 GMT 2000


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


More information about the Java mailing list