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] |
Eric Blake wrote:
Javac 1.4 (and the soon-to-be-released jikes 1.16) handles this by two different compilation modes. By default (no -source command-line option, or with `-source 1.3'), the this$0 field is initialized after the superconstructor, producing code that will verify with java 1.3, but which runs the risk of a NullPointerException if the superconstructor invokes any polymorphic methods that refer to this$0. Using the `-source 1.4' command-line option initializes the field before the superconstructor, and which never fails with a 1.4 VM but causes VerifyErrors on earlier VMs.
I guess my preference would be for us by default to do the same thing that JDK 1.4 does - i.e. emit compatible bytecode. However, time is finite, and if the current implementation generates correct but non-compatible bytecode, that is fine too. -- --Per Bothner per@bothner.com http://www.bothner.com/per/
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |