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]

Re: About compiling process in GCJ and garbage collection


On Sun, Sep 11, 2011 at 8:22 PM, Li junsong <ljs.darkfish@gmail.com> wrote:

> if I use GCJ to compile the java source code to machine code directly,
> ?it will first use ecj to compile java source to bytecode, and then
> compile the bytecode(or other information) to machine code.( right? )

Correct.

> BUT, I write a plugin, which removes a certain statement in gimple
> tree, and the gcj dump the gimple tree into file. The plugin works.
> That means that ?GCJ does do something in the process ?of compiling
> the source code, otherwise the ecj MUST use the same tree
> structure(GENERIC, GIMPLE) as gcc does

No, ecj does not share any tree data with GCC, other than the bytecode
itself. ecj produces .class files, which gcj parses to produce the
GENERIC tree which is dispatched to GCC's optimizers and back end.
Your plugin runs at this stage of the compile process.

> I have tried the usage of "gcj -v" to print the compiling information,
> and I see there are a few files being produced in /tmp, I think that
> it is the bytecode of java code, or the STRING type stuff( because I
> didn't find any string in the dumped file. )

Try using -save-temps as well to get more human-readable names for the
intermediate files.

Bryce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]