From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5718 invoked by alias); 12 Jun 2002 10:35:42 -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 5689 invoked from network); 12 Jun 2002 10:35:40 -0000 Received: from unknown (HELO executor.cambridge.redhat.com) (195.224.55.237) by sources.redhat.com with SMTP; 12 Jun 2002 10:35:40 -0000 Received: from cuddles.cambridge.redhat.com (vpn50-1.rdu.redhat.com [172.16.50.1]) by executor.cambridge.redhat.com (Postfix) with ESMTP id E5AA1ABAFC; Wed, 12 Jun 2002 11:35:37 +0100 (BST) Received: (from aph@localhost) by cuddles.cambridge.redhat.com (8.11.6/8.11.0) id g5CAZad19675; Wed, 12 Jun 2002 11:35:36 +0100 X-Authentication-Warning: cuddles.cambridge.redhat.com: aph set sender to aph@cambridge.redhat.com using -f From: Andrew Haley MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15623.9208.642965.405636@cuddles.cambridge.redhat.com> Date: Wed, 12 Jun 2002 04:47:00 -0000 To: Per Bothner Cc: Mark Mitchell , Fergus Henderson , gcc@gcc.gnu.org, java@gcc.gnu.org Subject: Re: RFC: Java inliner In-Reply-To: <3D07096A.5010102@bothner.com> References: <3460000.1023847519@localhost> <3D07096A.5010102@bothner.com> X-SW-Source: 2002-06/txt/msg00782.txt.bz2 Per Bothner writes: > 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. I agree. Java needs an inliner. It seems to me completely crazy to convert the front end to require Java to use C++ trees in order to get it. I'm going to look at doing what Per suggests. If it turns out not to be a clean patch I'll abandon the idea. Andrew.