From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22345 invoked by alias); 11 Sep 2011 19:23:17 -0000 Received: (qmail 22331 invoked by uid 22791); 11 Sep 2011 19:23:16 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_GC,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-qy0-f182.google.com (HELO mail-qy0-f182.google.com) (209.85.216.182) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 11 Sep 2011 19:22:59 +0000 Received: by qyk4 with SMTP id 4so866717qyk.20 for ; Sun, 11 Sep 2011 12:22:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.37.234 with SMTP id y42mr564937qcd.34.1315768978945; Sun, 11 Sep 2011 12:22:58 -0700 (PDT) Received: by 10.229.49.199 with HTTP; Sun, 11 Sep 2011 12:22:58 -0700 (PDT) Date: Sun, 11 Sep 2011 19:23:00 -0000 Message-ID: Subject: About compiling process in GCJ and garbage collection From: Li junsong To: java@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2011-09/txt/msg00005.txt.bz2 Hi there, I have asked some questions about the plugin loading problem ( refer to Andrew's answer: http://gcc.gnu.org/ml/java/2011-09/msg00001.html and Bryce's answer: http://gcc.gnu.org/ml/java/2011-09/msg00003.html ) And now I know ecj is the workhorse when compiling source code to bytecode. I still have a question about the compiling process: 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? ) 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 to compile source code in order to provide information to the compiler of GCJ to do the rest process( in my case, to provide information for GCJ to remove a certain statement), which is kind of impossible since ecj is not part of gcc but GIMPLE is. Can you help correct me, and explain this? 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. ) Thanks, J. Li