Re: Release [was: Re: [Sablevm-developer] Alpha inlined threading works now, but...]
Brought to you by:
egagnon
From: Archie C. <ar...@de...> - 2003-02-20 06:33:12
|
Prof. Etienne M. Gagnon wrote: > Maybe you could get the jikes maintainer to add a jikes1.15 package in > unstable. I already tried, but I think he does not like the idea. FWIW, I think practically speaking you could modify SableVM to accept classfiles with major version numbers up to 48 without any problems. I asked on the jikes mailing list about their changes and what spec they were reading from. Nobody could produce the spec, but I did get some useful info (see below). -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com > From jik...@ww... Sat Feb 15 10:20:01 2003 > From: Eric Blake <eb...@em...> > Subject: Re: [Jikes-dev] New class file format > To: jik...@ww... > Message-ID: <3E4...@em...> > MIME-Version: 1.0 > Content-Type: text/plain; format=flowed; charset=us-ascii > Content-Transfer-Encoding: 7bit > Sender: jik...@ww... > List-Archive: <http://www-124.ibm.com/pipermail/jikes-dev/> > Date: Sat, 15 Feb 2003 11:18:01 -0700 > Status: ORr > > Archie Cobbs wrote: > >> > >>So are you saying: the classfiles that jikes generates are exactly > >>the same - except for the major/minor version number - no matter > >>what -target flag is given? (If not, can you be specific about what > >>the differences are?) Is this also true for Sun's javac? > > > > To answer my own question: it appears to me from looking at the source > > that the only differences in the classfile is synthetic code generated > > to handle "Foo.class", e.g., using exception chaining. > > > > So the -target flag (so far) only "targets" the version of the base > > Java classes, rather than the virtual machine. > > > > Let me know if I've gotten myself confused :-) > > Read the source code in src/bytecode.cpp to see the different code > sequences that jikes outputs depending on the -target option (search for > control.option.target). For example, this code is different in 1.3 and 1.4: > > class A { > void m(final int i) { > class B { > int j = i; > } > } > } > > In 1.3, Sun's VM violated the JVMS, and didn't permit the initialization > of instance variables before calling the superconstructor. Therefore, > compiling with -target 1.3 will issue a constructor that looks like this > (this.this$0 and this.val$i are synthetic variables necessary to make > the local class work correctly): > > A$1B(A this$0, int val$i) { > super(); > this.this$0 = this$0; > this.val$i = val$i; > j = this.val$i; > } > > However, this is semantically incorrect, as setting the this$0 variable > after the superconstructor can cause spurious NullPointerExceptions. > > In their 1.4 release, Sun corrected their bug and now obey the JLS. > Therefore, compiling with -target 1.4 will issue a constructor like this > (although this is not valid Java, it is valid in the VM): > > A$1B(A this$0, int val$i) { > this.this$0 = this$0; > this.val$i = val$i; > super(); > j = this.val$i; > } > > There are several other changes in emitted code, conditional on the > -target flag. > > -- > This signature intentionally left boring. > > Eric Blake eb...@em... > BYU student, free software programmer > > ---- > To leave the Jikes-dev mailing list send a message to > Jik...@ww... with the word > unsubscribe in the body. For more subscription management: > http://www-124.ibm.com/developerworks/oss/mailman/listinfo/jikes-dev |