[committed] allow assert in inner class
Per Bothner
per@bothner.com
Sun Feb 29 21:29:00 GMT 2004
Eric Blake wrote:
> Javac 1.4.2 only fails the test when you use the default -target 1.4.
> When Neal Gafter at Sun added the -target 1.4.2 switch to javac, one of
> the changes it makes is that javac no longer initializes a class
> referenced by a class literal. Likewise, jikes has not been
> initializing class literals for several releases now. And the upcoming
> java 1.5 VM (now in beta), which recognizes ldc class_constant, does not
> initialize the class referenced in ldc.
I took at look at the bytecode generated by -target 1.4.2 and by
JDK 1.5beta.
My recommendation: I don't think it's worth our time to implement
the bytecode 1.4.2 generated. We should just implement the
1.5 semantics using the 'ldc class_constant' bytecodes. However,
beta1 is a bit premature; we should probably wait until the actual
release, or at least a later beta.
Yes, this way we can't generate bytecode that will run correctly
on a 1.4.x JVM. I don't think that's important.
--
--Per Bothner
per@bothner.com http://per.bothner.com/
More information about the Java
mailing list