From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12934 invoked by alias); 12 Jun 2002 08:39:25 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 12881 invoked from network); 12 Jun 2002 08:39:23 -0000 Received: from unknown (HELO bothner.com) (216.102.199.253) by sources.redhat.com with SMTP; 12 Jun 2002 08:39:23 -0000 Received: from bothner.com (eureka.bothner.com [192.168.1.9]) by bothner.com (8.11.6/8.11.6) with ESMTP id g5C8hrS28359; Wed, 12 Jun 2002 01:43:53 -0700 Message-ID: <3D07096A.5010102@bothner.com> Date: Wed, 12 Jun 2002 02:24:00 -0000 From: Per Bothner User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mark Mitchell CC: Andrew Haley , Fergus Henderson , gcc@gcc.gnu.org, java@gcc.gnu.org Subject: Re: RFC: Java inliner References: <3460000.1023847519@localhost> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-06/txt/msg00776.txt.bz2 Mark Mitchell wrote: > The right thing to do is clear: convert the Java front end to use trees > that are more like the C/C++ trees. Let us recap: (1) Gcc orignally has a set of generic tree codes designed to be more-or-less language-independent. (2) Java carefully adds a few new tree codes in the sprit of the original, re-using existing tree-codes where it makes sense, for example using COMPOUND_EXPR for (e1; e3;) and COND_EXPR for if-then-else. (3) The C++ people add a whole new slew of tree-codes that are (a) redundant, and (b) less general and only suitable for C/C++ (e.g. not it appears useful for expression languages). (4) The C++ people want the Java people to switch to using their tree-codes, and say this is "the right thing to do". I beg to disagree. I believe the right thing to do in the short term is extend the C/C++ inliner to understand the Java trees. Almost all of the tree codes encountered will be generic tree codes defined in tree.def. There are some tree-codes in java-tree.def; most of these are specific to parse.y, and will have disappeared by the time they reach the inliner. Now it may turn out that some of the Java tree representations should be changed, but switching e.g. to using IF_STMT is a step in the wrong direction. -- --Per Bothner per@bothner.com http://www.bothner.com/per/