]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Fri, 6 Jan 2017 11:42:39 +0000 (12:42 +0100)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 6 Jan 2017 11:42:39 +0000 (12:42 +0100)
2017-01-06  Bob Duff  <duff@adacore.com>

* sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
dummy implementation of Map_Pragma_Name.

2017-01-06  Tristan Gingold  <gingold@adacore.com>

* exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
entry_body variable constant.
* s-taprob.ads (Entry_Body_Access): Move to s-tposen.
* s-tpoben.ads (Protected_Entry_Body_Access): Now access
to constant.
* s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
now access to constant.

From-SVN: r244141

gcc/ada/ChangeLog
gcc/ada/exp_ch9.adb
gcc/ada/s-taprob.ads
gcc/ada/s-tpoben.ads
gcc/ada/s-tposen.ads
gcc/ada/sinfo.adb
gcc/ada/sinfo.ads

index e465f9fc622be174f9f350d2adcd31ed80eac87b..aca2564c7636c1babe212e79cbecdcb65f65d617 100644 (file)
@@ -1,3 +1,18 @@
+2017-01-06  Bob Duff  <duff@adacore.com>
+
+       * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
+       dummy implementation of Map_Pragma_Name.
+
+2017-01-06  Tristan Gingold  <gingold@adacore.com>
+
+       * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
+       entry_body variable constant.
+       * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
+       * s-tpoben.ads (Protected_Entry_Body_Access): Now access
+       to constant.
+       * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
+       now access to constant.
+
 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
 
        * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
index 18a56aeb463d26f8ab7e73fc0b28da87420df682..56e426bbd837ffaf568de1735f8e75dcd349f8ec 100644 (file)
@@ -9888,7 +9888,8 @@ package body Exp_Ch9 is
              Defining_Identifier => Body_Id,
              Aliased_Present     => True,
              Object_Definition   => Obj_Def,
-             Expression          => Expr);
+             Expression          => Expr,
+             Constant_Present    => True);
 
          --  A pointer to this array will be placed in the corresponding record
          --  by its initialization procedure so this needs to be analyzed here.
@@ -14203,7 +14204,7 @@ package body Exp_Ch9 is
             --  null if there is no limit for all entries (usual case).
 
             if Has_Entry
-              and then Pkg_Id /= System_Tasking_Protected_Objects_Single_Entry
+              and then Pkg_Id = System_Tasking_Protected_Objects_Entries
             then
                if Present (Entry_Max_Queue_Lengths_Array (Ptyp)) then
                   Append_To (Args,
index fa2a99fa79423c7e36ab564892cdcf9891dfb9dc..98bc4b2b36db2edc8375949672b349828fd76eae 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                  S p e c                                 --
 --                                                                          --
---          Copyright (C) 1992-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2016, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNARL is free software; you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -152,9 +152,8 @@ package System.Tasking.Protected_Objects is
       Action  : Entry_Action_Pointer;
    end record;
    --  The compiler-generated code passes objects of this type to the GNARL
-   --  to allow it to access the executable code of an entry body.
-
-   type Entry_Body_Access is access all Entry_Body;
+   --  to allow it to access the executable code of an entry body and its
+   --  barrier.
 
    type Protection is limited private;
    --  This type contains the GNARL state of a protected object. The
index 90bfa89f3983d4fe5a2519f6471865a0da7a62d3..6bd09879946a7ff6a3897739b7b7027462276b38 100644 (file)
@@ -50,18 +50,22 @@ package System.Tasking.Protected_Objects.Entries is
 
    subtype Positive_Protected_Entry_Index is
      Protected_Entry_Index range  1 .. Protected_Entry_Index'Last;
+   --  Index of the entry (and in some cases of the queue)
 
    type Find_Body_Index_Access is access
      function
        (O : System.Address;
         E : Protected_Entry_Index)
         return Protected_Entry_Index;
+   --  Convert a queue index to an entry index (an entries family has one entry
+   --  index for several queue index).
 
    type Protected_Entry_Body_Array is
      array (Positive_Protected_Entry_Index range <>) of Entry_Body;
    --  Contains executable code for all entry bodies of a protected type
 
-   type Protected_Entry_Body_Access is access all Protected_Entry_Body_Array;
+   type Protected_Entry_Body_Access is
+     access constant Protected_Entry_Body_Array;
 
    type Protected_Entry_Queue_Array is
      array (Protected_Entry_Index range <>) of Entry_Queue;
index b4ad29a8570e817febefe26b5c2a8fb8878a6bbf..ea0513a17922f6bef1092b6b56548f1d7dd8267a 100644 (file)
@@ -182,6 +182,9 @@ package System.Tasking.Protected_Objects.Single_Entry is
 
    type Protection_Entry_Access is access all Protection_Entry;
 
+   type Entry_Body_Access is access constant Entry_Body;
+   --  Access to barrier and action function of an entry
+
    procedure Initialize_Protection_Entry
      (Object           : Protection_Entry_Access;
       Ceiling_Priority : Integer;
index c4e97a6d5e604a8631577ea603037b27f9acc880..30960b4a1b742769da9ebfc8fe35334587494d0a 100644 (file)
@@ -6818,6 +6818,15 @@ package body Sinfo is
       return Chars (Pragma_Identifier (N));
    end Pragma_Name;
 
+   ---------------------
+   -- Map_Pragma_Name --
+   ---------------------
+
+   procedure Map_Pragma_Name (From, To : Name_Id) is
+   begin
+      null; -- not yet implemented
+   end Map_Pragma_Name;
+
    ------------------------
    -- Pragma_Name_Mapped --
    ------------------------
index 79b56a12ae241ed99260bba8f585af88dc1d9ba0..4a01505dee1dc5f00d7232ee23de5494f040ae3c 100644 (file)
@@ -11010,6 +11010,10 @@ package Sinfo is
    pragma Inline (Pragma_Name);
    --  Convenient function to obtain Chars field of Pragma_Identifier
 
+   procedure Map_Pragma_Name (From, To : Name_Id);
+   --  Used in the implementation of pragma Rename_Pragma. Maps pragma name
+   --  From to pragma name To, we From can be used as a synonym for To.
+
    function Pragma_Name_Mapped (N : Node_Id) return Name_Id;
    --  ????Work in progress.