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]

Re: gcj bug



Tom Tromey writes:

> Compile the appended program with `gcj -C'.
> Notice how it fails.
> Then compile with javac and see it succeed.

The exception is being generated by a synthetic function:
class$(java.lang.String)java.lang.Class.

Both class$ in both bytecode outputs are identical and they're invoked
the same way except that javac maintains caches of the retrieved
values.

We don't do that (for several reasons: generating optimized bytecode
isn't really our priority, it wasn't an worth spending the time to
implement it at the time, etc... Note that this could be fixed if
there's a good reason for it.) As a result, in the gcj generated
bytecode, class$ is called twice with different arguments and failed
the second time. Could it be a VM problem?

./A


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