public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bryce McKinlay <bmckinlay@gmail.com>
To: Li junsong <ljs.darkfish@gmail.com>
Cc: java@gcc.gnu.org
Subject: Re: About compiling process in GCJ and garbage collection
Date: Mon, 12 Sep 2011 10:08:00 -0000	[thread overview]
Message-ID: <CALUNu-pjh-ktr+kSMme1Tg8m8Fvxkn1Q_Ftz6nKLkeWuZ9c1vw@mail.gmail.com> (raw)
In-Reply-To: <CA+kGxtN0jtDYRJjwBeifQ7amuqOdXN2JS+7HCt5mWT1K4YiT3g@mail.gmail.com>

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

      reply	other threads:[~2011-09-12 10:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-11 19:23 Li junsong
2011-09-12 10:08 ` Bryce McKinlay [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALUNu-pjh-ktr+kSMme1Tg8m8Fvxkn1Q_Ftz6nKLkeWuZ9c1vw@mail.gmail.com \
    --to=bmckinlay@gmail.com \
    --cc=java@gcc.gnu.org \
    --cc=ljs.darkfish@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).