From 5a7aacd18052583ef1ed9620c20e25cc77c35938 Mon Sep 17 00:00:00 2001 From: Bob Duff Date: Fri, 25 May 2018 09:03:19 +0000 Subject: [PATCH] [Ada] Unbounded strings: inline Initialize and Adjust Procedures Initialize and Adjust in the Ada.[Wide_[Wide_]]Strings.Unbounded package are now inlined for nondispatching calls. No test available (efficiency issue only). 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. From-SVN: r260719 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/libgnat/a-strunb__shared.ads | 1 + gcc/ada/libgnat/a-stwiun__shared.ads | 1 + gcc/ada/libgnat/a-stzunb__shared.ads | 1 + 4 files changed, 8 insertions(+) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 132037c752c..1b95eb53d2f 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-05-25 Bob Duff + + * libgnat/a-strunb__shared.ads, libgnat/a-stwiun__shared.ads, + libgnat/a-stzunb__shared.ads: (Initialize, Adjust): Add pragma Inline. + 2018-05-25 Bob Duff * sem_util.ads: Minor comment fix. diff --git a/gcc/ada/libgnat/a-strunb__shared.ads b/gcc/ada/libgnat/a-strunb__shared.ads index 92796631eda..973910440a1 100644 --- a/gcc/ada/libgnat/a-strunb__shared.ads +++ b/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 diff --git a/gcc/ada/libgnat/a-stwiun__shared.ads b/gcc/ada/libgnat/a-stwiun__shared.ads index c00e53c67f3..87b67dc9122 100644 --- a/gcc/ada/libgnat/a-stwiun__shared.ads +++ b/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 diff --git a/gcc/ada/libgnat/a-stzunb__shared.ads b/gcc/ada/libgnat/a-stzunb__shared.ads index 11ee7431217..93d492f49ee 100644 --- a/gcc/ada/libgnat/a-stzunb__shared.ads +++ b/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 -- 2.30.2