question about ecj integration

Jakob Praher jp@hapra.at
Sat Mar 4 11:13:00 GMT 2006


hi Andrew,

thanks for the info.

Andrew Haley schrieb:
> Jakob Praher writes:
>  > hi,
>  > 
>  > I am sorry to not attending this years FOSDEM. I know it was great. :-(
>  > I hope to make it next year.
>  > 
>  > Since you really consider using ecj as the "jstage2" java frontend, I
>  > have a question:
>  > 
>  > How do you generate code with ecj?
> 
> Bytecode is the internmediate langauge.
> 
> source -> bytecode -> asm -> object
>        ecj        jc1     as
> 
Sounds reasonable. Given that many of the 5.0 features are language
features and syntactic sugar this is a good approach.

>  > -> Do you have a CNI interface to gcc's TREE language?
>  > -> Do you directly generate gnu assmembler (which is not a real option,
>  > since you miss all the GIMPLE/SSA and RTL optimization passes)
> 
> We read bytecode and write asm.
> 
>  > I think I remember to having heard that you use the jc1 compiler to
>  > compile the ecj source files to native code in the first run.
> 
> That's what we do at the monment, yes.  But if we have ecj integrated
> into gcj it can compile itself, so we won't be limited to 1.4.
>
Aha ok. So you have a ecj compiled into bytecode in the gcj source tree
and compile this using jc1.
Do you host sources of ecj too? Perhaps using a 2 stage ecj approach.
Compiling the jar version to native code and then compile the source
files using the stage 1 ecj?
Are there many things to change in ecj? Sorry about my ignorance, but is
ecj currently capable of producing bytecodes or is it just producing an
intermedate/AST suitable for eclipse?

>  > Are the folks at eclipse restricting ecj to java 1.4 language features?
>  > Or do you provide patches for converting the ecj features to whatever
>  > jc1 is able to compile?
> 
> We don't need to do that.  Once we have ecj compiled into portable
> bytecode we compile that.  We don't have to compile ecj from source
> when bootstrapping, as long as we have an ecj binary.
Makes sense.

Thanks for the info.
-- Jakob
> 



More information about the Java mailing list