From patchwork Fri May 25 09:06:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Marie de Rodat X-Patchwork-Id: 920332 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-478490-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="ditUAgq/"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40sgNk37k5z9s08 for ; Fri, 25 May 2018 19:06:46 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=qzr3xdWOJQUQpqfY5/J0EmWwnO3VbbNIbxtCWMSncawxxlQNcL kSfQCTql7G0G7wu2IoOhXFZs1rauknvp9NE3h5vK4TuqzIf6MVrGPkFkyosWpVL2 2ev2LI7bm2BxRiNvn+77HbIBJd1jXBBCtWwOSfpEoPVwRYwRQ5RNdai5Y= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=0YrvyjnjxMDNgSxiZRE2RmNgo7Y=; b=ditUAgq/DI1gcsV0amBA qolJpce4IcHSDIBk3vBwrp1yTUDvBBHHbRHR2KBs5toQ3BzZZWMxDKe2lWYR/oUm HnCopLDo7JFerl1eTM8zqL2RUol7pGtzccroZC9xATlgL4SKeILS492ikRmB19fS D0O8bqEtlOSyOVQyLpeHJwY= Received: (qmail 125217 invoked by alias); 25 May 2018 09:06:29 -0000 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 Received: (qmail 125108 invoked by uid 89); 25 May 2018 09:06:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=sk:strings, unbounded X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 25 May 2018 09:06:26 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 2F525117F67; Fri, 25 May 2018 05:06:25 -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 n3w7soFUWlC5; Fri, 25 May 2018 05:06:25 -0400 (EDT) Received: from tron.gnat.com (tron.gnat.com [205.232.38.10]) by rock.gnat.com (Postfix) with ESMTP id 1EDF2117F49; Fri, 25 May 2018 05:06:25 -0400 (EDT) Received: by tron.gnat.com (Postfix, from userid 4862) id 1DC06784; Fri, 25 May 2018 05:06:25 -0400 (EDT) Date: Fri, 25 May 2018 05:06:25 -0400 From: Pierre-Marie de Rodat To: gcc-patches@gcc.gnu.org Cc: Bob Duff Subject: [Ada] Unbounded strings: inline Initialize and Adjust Message-ID: <20180525090625.GA34582@adacore.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes Procedures Initialize and Adjust in the Ada.[Wide_[Wide_]]Strings.Unbounded package are now inlined for nondispatching calls. No test available (efficiency issue only). Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-25 Bob Duff gcc/ada/ * libgnat/a-strunb__shared.ads, libgnat/a-stwiun__shared.ads, libgnat/a-stzunb__shared.ads: (Initialize, Adjust): Add pragma Inline. --- gcc/ada/libgnat/a-strunb__shared.ads +++ gcc/ada/libgnat/a-strunb__shared.ads @@ -482,6 +482,7 @@ private overriding procedure Initialize (Object : in out Unbounded_String); overriding procedure Adjust (Object : in out Unbounded_String); overriding procedure Finalize (Object : in out Unbounded_String); + pragma Inline (Initialize, Adjust); Null_Unbounded_String : constant Unbounded_String := (AF.Controlled with --- gcc/ada/libgnat/a-stwiun__shared.ads +++ gcc/ada/libgnat/a-stwiun__shared.ads @@ -485,6 +485,7 @@ private overriding procedure Initialize (Object : in out Unbounded_Wide_String); overriding procedure Adjust (Object : in out Unbounded_Wide_String); overriding procedure Finalize (Object : in out Unbounded_Wide_String); + pragma Inline (Initialize, Adjust); Null_Unbounded_Wide_String : constant Unbounded_Wide_String := (AF.Controlled with --- gcc/ada/libgnat/a-stzunb__shared.ads +++ gcc/ada/libgnat/a-stzunb__shared.ads @@ -503,6 +503,7 @@ private (Object : in out Unbounded_Wide_Wide_String); overriding procedure Finalize (Object : in out Unbounded_Wide_Wide_String); + pragma Inline (Initialize, Adjust); Null_Unbounded_Wide_Wide_String : constant Unbounded_Wide_Wide_String := (AF.Controlled with