This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Dynamic loading - solutions and more problems


Matt Welsh wrote:

> Right. The problem here is that then somehow I need to know a priori
> that ToLoadIF is required by MainProgram.so. Is there some automatic way
> of making that determination?

Yes: gcj -M MainProgram.java

> it would be great if gij could really use precompiled .so files
> in place of .class files, without having the programmer to do anything
> special.

That would be way cool (at least in theory), because I don't like the idea (both
from a file-size and complexity pov) of having to distribute complete .class
files along with every precompiled .so library. I don't think there is any
fundamental reason why it couldnt be done, assuming everything you need to
compile is available via reflection data, but I would imaging it will be a lot of
work to change the compiler to do this.

However, my gut feeling is that creating hundreds of .so files (one for every
class or so) and loading each one dynamically is a bad idea. You're adding back a
LOT of overhead (resolving, loading individual classes) that was avoided by
native compilation in the first place. If this is what you want to do, I think
you'd be better off using .class files and a good JIT.

>  My users are frustrated by having to write complex makefiles to
> use gcj ...

I agree that makefile complexity is a serious issue. However, I personally don't
like the idea of *ever* having to write a Makefile - its not just a gcj thing.
Writing a makefile for a gcj program is no more complex than writing one for a C
program. I think yours is the wrong solution for this problem.

> It looks like the -fno-assume-compiled
> mechanism is seriously broken if I can't use it for *anything*.

I'm guessing it has suffered bit-rot because nobody uses it. It isn't even clear
to me (exactly) what it is supposed to do.

regards

  [ bryce ]



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]