From patchwork Tue Aug 2 14:57:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Charlet X-Patchwork-Id: 107939 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 6160FB71D4 for ; Wed, 3 Aug 2011 00:57:29 +1000 (EST) Received: (qmail 23269 invoked by alias); 2 Aug 2011 14:57:27 -0000 Received: (qmail 23260 invoked by uid 22791); 2 Aug 2011 14:57:27 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,TW_TM X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 02 Aug 2011 14:57:13 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id CDDE62BACFF; Tue, 2 Aug 2011 10:57:12 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id T30KjGnxGHrX; Tue, 2 Aug 2011 10:57:12 -0400 (EDT) Received: from kwai.gnat.com (kwai.gnat.com [205.232.38.4]) by rock.gnat.com (Postfix) with ESMTP id BA3332BACDF; Tue, 2 Aug 2011 10:57:12 -0400 (EDT) Received: by kwai.gnat.com (Postfix, from userid 4192) id B4FF03FEE8; Tue, 2 Aug 2011 10:57:12 -0400 (EDT) Date: Tue, 2 Aug 2011 10:57:12 -0400 From: Arnaud Charlet To: gcc-patches@gcc.gnu.org Cc: Javier Miranda Subject: [Ada] Code cleanup Message-ID: <20110802145712.GA14487@adacore.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This patch does not change the functionality of the compiler. It removes one argument that can be evaluated by the called routine. No test required. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-02 Javier Miranda * exp_atag.ads, exp_atag.adb (Build_Common_Dispatching_Select_Statements): Remove argument Loc since its value is implicitly passed in argument Typ. * exp_disp.adb (Make_Disp_Conditional_Select_Body, Make_Disp_Timed_Select_Body): Remove Loc in calls to routine Build_Common_Dispatching_Select_Statements. Index: exp_atag.adb =================================================================== --- exp_atag.adb (revision 177168) +++ exp_atag.adb (working copy) @@ -71,10 +71,10 @@ ------------------------------------------------ procedure Build_Common_Dispatching_Select_Statements - (Loc : Source_Ptr; - Typ : Entity_Id; + (Typ : Entity_Id; Stmts : List_Id) is + Loc : constant Source_Ptr := Sloc (Typ); Tag_Node : Node_Id; begin Index: exp_atag.ads =================================================================== --- exp_atag.ads (revision 177169) +++ exp_atag.ads (working copy) @@ -35,12 +35,11 @@ -- location used in constructing the corresponding nodes. procedure Build_Common_Dispatching_Select_Statements - (Loc : Source_Ptr; - Typ : Entity_Id; + (Typ : Entity_Id; Stmts : List_Id); - -- Ada 2005 (AI-345): Generate statements that are common between timed, - -- asynchronous, and conditional select expansion. - -- Comments required saying what parameters mean ??? + -- Ada 2005 (AI-345): Build statements that are common to the expansion of + -- timed, asynchronous, and conditional select and append them to Stmts. + -- Typ is the tagged type used for dispatching calls. procedure Build_CW_Membership (Loc : Source_Ptr; Index: exp_disp.adb =================================================================== --- exp_disp.adb (revision 177169) +++ exp_disp.adb (working copy) @@ -2623,7 +2623,7 @@ -- return; -- end if; - Build_Common_Dispatching_Select_Statements (Loc, Typ, Stmts); + Build_Common_Dispatching_Select_Statements (Typ, Stmts); -- Generate: -- Bnn : Communication_Block; @@ -3470,7 +3470,7 @@ -- return; -- end if; - Build_Common_Dispatching_Select_Statements (Loc, Typ, Stmts); + Build_Common_Dispatching_Select_Statements (Typ, Stmts); -- Generate: -- I := Get_Entry_Index (tag! (VP), S);