From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18606 invoked by alias); 7 Nov 2002 23:37: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 18599 invoked from network); 7 Nov 2002 23:37:30 -0000 Received: from unknown (HELO localhost.localdomain) (66.60.148.227) by sources.redhat.com with SMTP; 7 Nov 2002 23:37:30 -0000 Received: from warlock.codesourcery.com (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.11.6/8.11.6) with ESMTP id gA7NYrJ22926; Thu, 7 Nov 2002 15:34:53 -0800 Date: Thu, 07 Nov 2002 15:37:00 -0000 From: Mark Mitchell To: Geoff Keating cc: "zack@codesourcery.com" , "jakub@redhat.com" , "aldyh@redhat.com" , "gcc-patches@gcc.gnu.org" , "jason@redhat.com" Subject: Re: [basic-improvements] try/finally support for c/c++ - more tests Message-ID: <126290000.1036712093@warlock.codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-SW-Source: 2002-11/txt/msg00516.txt.bz2 > (a) slow down normal C++ unwinding, because you have to keep looking > for runtime-installed cleanups? and That's pretty much a total non-issue, but it's true. It would be a quick check, and exceptions are expensive anyhow; as a percentage of EH-handling cost, let alone as a precentage of program time, this would be free. > (b) still require unwinding data for the C code? Only a very ittle. I'm not sure you'd even need the typical data; just enough to figure out what function invocation you're in. You certainly wouldn't need per-block-including-cleanup information, which is what would happen with try-finally. The key difference from try/finally in this respect is that the pthread_cleanup_push interface takes a function pointer and an argument; there's noting in there to allow you to access local variables, etc. So, you don't need to really unwind the frame; you just need to know that you need to call the function. -- Mark Mitchell mark@codesourcery.com CodeSourcery, LLC http://www.codesourcery.com