public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1694] [Ada] Optimization of System.Value_N
@ 2021-06-21 11:06 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-06-21 11:06 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:a61fd32dd1f8a4f8a65564f7d2f3b7fbc73167c4

commit r12-1694-ga61fd32dd1f8a4f8a65564f7d2f3b7fbc73167c4
Author: Bob Duff <duff@adacore.com>
Date:   Tue Apr 6 10:27:26 2021 -0400

    [Ada] Optimization of System.Value_N
    
    gcc/ada/
    
            * libgnat/s-valuen.ads (Value_Enumeration,
            Valid_Enumeration_Value): Inline.
            (Value_Enumeration_Pos): Add Pure_Function.

Diff:
---
 gcc/ada/libgnat/s-valuen.ads | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/ada/libgnat/s-valuen.ads b/gcc/ada/libgnat/s-valuen.ads
index 258d27953d1..7ef053914ac 100644
--- a/gcc/ada/libgnat/s-valuen.ads
+++ b/gcc/ada/libgnat/s-valuen.ads
@@ -48,7 +48,7 @@ package System.Value_N is
       Hash    : Hash_Function_Ptr;
       Num     : Natural;
       Str     : String)
-      return    Natural;
+      return    Natural with Inline;
    --  Used to compute Enum'Value (Str) where Enum is some enumeration type
    --  other than those defined in package Standard. Names is a string with
    --  a lower bound of 1 containing the characters of all the enumeration
@@ -73,7 +73,7 @@ package System.Value_N is
       Hash    : Hash_Function_Ptr;
       Num     : Natural;
       Str     : String)
-      return    Boolean;
+      return    Boolean with Inline;
    --  Returns True if Str is a valid Image of some enumeration literal, False
    --  otherwise. That is, returns False if and only if Value_Enumeration would
    --  raise Constraint_Error. The parameters have the same meaning as for
@@ -87,7 +87,7 @@ package System.Value_N is
       Hash    : Hash_Function_Ptr;
       Num     : Natural;
       Str     : String)
-      return    Integer;
+      return    Integer with Pure_Function;
    --  Same as Value_Enumeration, except returns Invalid if Value_Enumeration
    --  would raise Constraint_Error.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-21 11:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21 11:06 [gcc r12-1694] [Ada] Optimization of System.Value_N Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).