[armedbear-devel] Some thoughts on classloaders, ...

Alessio Stalla alessiostalla at gmail.com
Tue Sep 22 08:37:16 UTC 2009


On Tue, Sep 22, 2009 at 10:32 AM, Ville Voutilainen
<ville.voutilainen at gmail.com> wrote:
> 2009/9/22 Alessio Stalla <alessiostalla at gmail.com>:
>> That's what I think too, however currently the compiler emits calls to
>> loadCompiledFunction(classname) bypassing the standard classloader
>> machinery.
>
> That's odd. If we have a classloader present that's capable of loading
> our fasls, JVM will consult that loader when it needs a class. Therefore there
> should be no need to emit loadCompiledFunction calls, because the
> loader will do that automatically?

No, because IIRC we never ask the JVM for a class, we always do
everything on our own :D i.e. there's never a reference to a
compiler-generated class name, besides the string passed to
loadCompiledFunction. Our classloader is only used to load the main
class (top-level function) directly from the byte[], then everything
else is loaded by the class itself.

Ale




More information about the armedbear-devel mailing list