Compilation ancestry of javac?

John Spicer jhs at edg.com
Mon Mar 18 17:06:48 PDT 2013


Well, I guess this is kind of like saying you are the Miss America contestant from the state that no-one knew existed, but Edison Design Group has had a Java compiler since 1999.    Most of our customers use the front end for source analysis.

We can generate class files and we can also generate native code using a limited subset of the libraries.   We also produce a very rich IL, which is why we are a good fit for source analysis.

We support 1.7, and we also provide compatibility with earlier versions of the Sun JDK.

The complete set of changes in the Oracle javac from 1.6 to 1.7(the compiler, not the language) is not publicly available, but we're working on figuring them out.

We are working on being able to make sure that "edgjfe --javac_version=1.6 t.java" is the same as "javac t.java" when using javac 1.6.    Currently, using "java -source 1.6 t.java" with Oracle JDK 1.7 is very different than "javac t.java" when using Oracle javac 1.6.

John.



On Mar 18, 2013, at 7:37 PM, Remi Forax <forax at univ-mlv.fr> wrote:

> On 03/18/2013 10:09 PM, Eric Lefevre-Ardant wrote:
>> Hi everyone,
>> 
>> I am preparing a presentation for the Devoxx conference in Paris, and I was hoping to present a slide of how javac is compiled.
>> Alex Buckley suggested that this might be the right place to get more information. Feel free to point me to some other place, though.
> 
> Hi Eric,
> Here is what I know with the name of the people that works
> on the different projects so you can contact them if you want more detail.
> 
> When I start to use Java, in October 1996, during 1.0/1.1 timeframe,
> javac was already written in Java (I think it was bootstraped from a C version
> by Gosling and al in the early days).
> As a trivia, I was using Java on HP-UX but they were no Java VM available from HP,
> so I was using the Java VM embeded in Netscape with the class library
> that I had copy/pasted from the Solaris JDK.
> 
> During 1.2 timeframe, IBM releases a fast java compiler written in C++
> known as IBM Jikes compiler.
> 
> In 1999, as part of the Kaffe Virtual Machine, a new Java compiler
> written in Java kjc was developed
> (You can ask Dalibor Topic for more info).
> 
> During 1.3 timeframe IBM starts the Eclipse project and release ECJ
> as a standalone compiler.
> SUN, a little later also develops a Java compiler written in C known as fastjavac
> that was used with the first versions of NetBeans.
> 
> During 1.3/1.4 time frame, GJC (generic java compiler) was written to add generics to Java
> (at least Bracha, Odersky, Stoutamire, and Wadler were involved).
> During 1.4 time frame, the old javac was replaced by GCJ, so at that time
> the new javac was a compiler using generics internally but compiling 1.4 Java code without generics.
> 
> At FOSDEM 2004, Andrew Haley (RedHat) and Mark Wielaard announce
> that GCJ (gcc frontend) and the GNU Classpath were merged.
> 
> With the release of Java 1.5, the new javac was faster than fastjavac and jikesc
> so both were never upgraded to recognize Java 5 features.
> 
> Since 2006/2007, Java is Open Source and only two compilers are still used,
> OpenJDK javac and Eclipse ECJ. GCJ now uses ECJ as front end.
> 
>> 
>> Specifically, my goal is to establish if javac is always compiled using the previous version of javac. That seems to be the case when looking at the documentation of recent JDKs (my main source is https://blogs.oracle.com/jjg/entry/building_javac_for_jdk7).
>> 
>>  * can someone confirmed that this has always been the case ?
>>  * how far does this go back? javac v1.0 ? v0.9.2 ?
>>  * finally, how was the bootstrap (not coded in Java) version of
>>    javac coded? in C? oak? shell script?
>> 
>> My guess is that, if I wanted to go back that far, then in theory I'd need a Solaris machine from 1995 or so, with the appropriate version of cc.
>> 
>>  * can anyone confirm this?
>>  * anyone knows what version of SunOS/cc/some other compiler would be
>>    required?
>>  * anyone knows whether that bootstrap code would be available? (via
>>    legal means)
>> 
>> My goal is to illustrate a point on compiler by showing how far back you could go on javac, if you wanted to build a "pure" version (that is, not based on another javac).
>> 
>> Many thanks for any help you might provide,
>> 
>> Eric
> 
> see you at DevoxxFR,
> Rémi
> 




More information about the compiler-dev mailing list