This is the mail archive of the java@gcc.gnu.org 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]
Other format: [Raw text]

Re: dealing with non-self-contained jars?


On 5/21/07, Adam Megacz <adam@megacz.com> wrote:

Apparently this works because people are accustomed to using this code
in JVMs that do lazy linking, and the dangling references are in
methods which don't get called.  Unfortunately, these become a problem
when compiling with gcj -- it compiles the method bodies eagerly.

Is there a trick to getting around this?  Perhaps some flag for gcj
that says "if a method has compile-time-undefined references, just
emit code to throw an instruction where the method body ought to be"?

Absolutely. See -findirect-dispatch


http://gcc.gnu.org/onlinedocs/gcj/Code-Generation.html#Code-Generation

Bryce


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