From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10974 invoked by alias); 7 Jul 2004 19:47:32 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 10964 invoked from network); 7 Jul 2004 19:47:31 -0000 Received: from unknown (HELO mail.codesourcery.com) (65.74.133.5) by sourceware.org with SMTP; 7 Jul 2004 19:47:31 -0000 Received: (qmail 22566 invoked from network); 7 Jul 2004 19:47:16 -0000 Received: from localhost (HELO codesourcery.com) (mitchell@127.0.0.1) by mail.codesourcery.com with SMTP; 7 Jul 2004 19:47:16 -0000 Message-ID: <40EC5342.7070201@codesourcery.com> Date: Wed, 07 Jul 2004 20:29:00 -0000 From: Mark Mitchell Organization: CodeSourcery, LLC User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 MIME-Version: 1.0 To: Richard Henderson CC: Jason Merrill , gcc-patches@gcc.gnu.org Subject: Re: Bug 16115, C++ invisible references References: <200407060723.i667NhMd023945@sirius.codesourcery.com> <40EB28A1.8060305@codesourcery.com> <40EC3B25.3020404@codesourcery.com> <20040707191256.GB8214@redhat.com> In-Reply-To: <20040707191256.GB8214@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-07/txt/msg00656.txt.bz2 Richard Henderson wrote: >But once we start trying to add semantics to the representation, >in particular anything that needs strict logical nesting, then >I think we should drop all requirement that we match up directly >with the source. > > What do you mean by "semantics"? Certainly, unlowered EDG IL is semantic, in the sense that it would be easy to execute. For example, a call to an overloaded function is resolved into a call to a particular function, and implicit conversions (say, using an overloaded "operator int" on a class) are represented explicitly as function calls. However, things are still at the level of C++; for example, calls to virtual functions are represented as such (without any reference to vtables). I believe the only dependency on the particular C/C++ ABI is in determining the sizes and alignment of objects. This representation is perfect for cross-reference tools and source-level analysis tools (like lint); you can compute call graphs, you can find all the places where a given variable is used, etc. -- Mark Mitchell CodeSourcery, LLC (916) 791-8304 mark@codesourcery.com