Properties

Per Bothner perATbothner.com
Mon Sep 13 13:54:00 GMT 1999


Kresten Krab Thorup <krab@daimi.au.dk> writes:
> Also, this brings up the possibility for a compiled class (loaded in
> a .so) to inherit from an interpreted class.

The compiler by default generates code assume that all classes it
needs to refer to by name (including superclasses) are also
compiled. This improves performance, and doesn't remove any
useful functionality.
> One way to tacle some of these problems would be to rely less on the
> system's linker, and have the runtime system do the linking of
> classes, even for comiled ones.

Yes, the typical dlopen is really too low-level and inflexible.
One simple extension would be to pass in a callback function
to be used to resolve names. That callback function could do
lots of useful things. In addition to the resolving method
names as you mention, we could also use it to uniq (intern)
Utf8Consts and/or String objects: The compiler just emits
undefined references to all Utf8String and/or Strings, but
mangles them in a special. A static linker can generate unique
objects for each of the references strings, by re-creating
the string values form the mangling. A dynamic linker could
so the same thing - but only if it has a way to know which
strings are needed. The easiest way to do that is with a callback
function. Without it, it gets much more painful.
-- 
	--Per Bothner
bothner@pacbell.net per@bothner.com http://www.bothner.com/~per/


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /