Commit 07b3e137 by Arnaud Charlet

[multiple changes]

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

	* s-rident.ads (Profile_Info): Remove No_Entry_Queue from
	Gnat_Extended_Ravenscar.
	* exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.

2017-01-06  Gary Dismukes  <dismukes@adacore.com>

	* sem_util.ads: Minor typo fix and reformatting.

From-SVN: r244130
parent ac8380d5
2017-01-06 Tristan Gingold <gingold@adacore.com>
* s-rident.ads (Profile_Info): Remove No_Entry_Queue from
Gnat_Extended_Ravenscar.
* exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
2017-01-06 Gary Dismukes <dismukes@adacore.com>
* sem_util.ads: Minor typo fix and reformatting.
2017-01-06 Yannick Moy <moy@adacore.com> 2017-01-06 Yannick Moy <moy@adacore.com>
* ghost.adb Minor fixing of references to SPARK RM. * ghost.adb Minor fixing of references to SPARK RM.
......
...@@ -9769,22 +9769,23 @@ package body Exp_Ch9 is ...@@ -9769,22 +9769,23 @@ package body Exp_Ch9 is
if Has_Entries (Prot_Typ) then if Has_Entries (Prot_Typ) then
declare declare
Need_Array : Boolean := False;
Maxs : List_Id;
Count : Int; Count : Int;
Item : Entity_Id; Item : Entity_Id;
Maxs_Id : Entity_Id;
Max_Vals : Node_Id; Max_Vals : Node_Id;
Maxes : List_Id;
Maxes_Id : Entity_Id;
Need_Array : Boolean := False;
begin begin
-- First check if there is any Max_Queue_Length pragma -- First check if there is any Max_Queue_Length pragma
Item := First_Entity (Prot_Typ); Item := First_Entity (Prot_Typ);
while Present (Item) loop while Present (Item) loop
if Is_Entry (Item) and then Has_Max_Queue_Length (Item) then if Is_Entry (Item) and then Has_Max_Queue_Length (Item) then
Need_Array := True; Need_Array := True;
exit; exit;
end if; end if;
Next_Entity (Item); Next_Entity (Item);
end loop; end loop;
...@@ -9793,15 +9794,15 @@ package body Exp_Ch9 is ...@@ -9793,15 +9794,15 @@ package body Exp_Ch9 is
-- queue length. -- queue length.
if Need_Array then if Need_Array then
Maxs := New_List;
Count := 0; Count := 0;
Item := First_Entity (Prot_Typ); Item := First_Entity (Prot_Typ);
Maxes := New_List;
while Present (Item) loop while Present (Item) loop
if Is_Entry (Item) then if Is_Entry (Item) then
Count := Count + 1; Count := Count + 1;
Append_To (Maxs, Append_To (Maxes,
Make_Integer_Literal (Loc, Make_Integer_Literal
Get_Max_Queue_Length (Item))); (Loc, Get_Max_Queue_Length (Item)));
end if; end if;
Next_Entity (Item); Next_Entity (Item);
...@@ -9809,16 +9810,16 @@ package body Exp_Ch9 is ...@@ -9809,16 +9810,16 @@ package body Exp_Ch9 is
-- Create the declaration of the array object. Generate: -- Create the declaration of the array object. Generate:
-- Maxs_Id : aliased Protected_Entry_Queue_Max_Array -- Maxes_Id : aliased Protected_Entry_Queue_Max_Array
-- (1 .. Count) := (..., ...); -- (1 .. Count) := (..., ...);
Maxs_Id := Maxes_Id :=
Make_Defining_Identifier (Loc, Make_Defining_Identifier (Loc,
Chars => New_External_Name (Chars (Prot_Typ), 'B')); Chars => New_External_Name (Chars (Prot_Typ), 'B'));
Max_Vals := Max_Vals :=
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
Defining_Identifier => Maxs_Id, Defining_Identifier => Maxes_Id,
Aliased_Present => True, Aliased_Present => True,
Constant_Present => True, Constant_Present => True,
Object_Definition => Object_Definition =>
...@@ -9832,17 +9833,17 @@ package body Exp_Ch9 is ...@@ -9832,17 +9833,17 @@ package body Exp_Ch9 is
Make_Range (Loc, Make_Range (Loc,
Make_Integer_Literal (Loc, 1), Make_Integer_Literal (Loc, 1),
Make_Integer_Literal (Loc, Count))))), Make_Integer_Literal (Loc, Count))))),
Expression => Make_Aggregate (Loc, Maxs)); Expression => Make_Aggregate (Loc, Maxes));
-- A pointer to this array will be placed in the -- A pointer to this array will be placed in the corresponding
-- corresponding record by its initialization procedure so -- record by its initialization procedure so this needs to be
-- this needs to be analyzed here. -- analyzed here.
Insert_After (Current_Node, Max_Vals); Insert_After (Current_Node, Max_Vals);
Current_Node := Max_Vals; Current_Node := Max_Vals;
Analyze (Max_Vals); Analyze (Max_Vals);
Set_Entry_Max_Queue_Lengths_Array (Prot_Typ, Maxs_Id); Set_Entry_Max_Queue_Lengths_Array (Prot_Typ, Maxes_Id);
end if; end if;
end; end;
end if; end if;
...@@ -14192,7 +14193,7 @@ package body Exp_Ch9 is ...@@ -14192,7 +14193,7 @@ package body Exp_Ch9 is
raise Program_Error; raise Program_Error;
end case; end case;
-- Entry_Queue_Maxs parameter. This is an access to an array of -- Entry_Queue_Maxes parameter. This is an access to an array of
-- naturals representing the entry queue maximums for each entry -- naturals representing the entry queue maximums for each entry
-- in the protected type. Zero represents no max. The access is -- in the protected type. Zero represents no max. The access is
-- null if there is no limit for all entries (usual case). -- null if there is no limit for all entries (usual case).
......
...@@ -554,7 +554,6 @@ package System.Rident is ...@@ -554,7 +554,6 @@ package System.Rident is
No_Asynchronous_Control => True, No_Asynchronous_Control => True,
No_Dynamic_Attachment => True, No_Dynamic_Attachment => True,
No_Dynamic_Priorities => True, No_Dynamic_Priorities => True,
No_Entry_Queue => True,
No_Local_Protected_Objects => True, No_Local_Protected_Objects => True,
No_Protected_Type_Allocators => True, No_Protected_Type_Allocators => True,
No_Requeue_Statements => True, No_Requeue_Statements => True,
......
...@@ -171,12 +171,12 @@ package body System.Tasking.Protected_Objects.Entries is ...@@ -171,12 +171,12 @@ package body System.Tasking.Protected_Objects.Entries is
----------------------------------- -----------------------------------
procedure Initialize_Protection_Entries procedure Initialize_Protection_Entries
(Object : Protection_Entries_Access; (Object : Protection_Entries_Access;
Ceiling_Priority : Integer; Ceiling_Priority : Integer;
Compiler_Info : System.Address; Compiler_Info : System.Address;
Entry_Queue_Maxs : Protected_Entry_Queue_Max_Access; Entry_Queue_Maxes : Protected_Entry_Queue_Max_Access;
Entry_Bodies : Protected_Entry_Body_Access; Entry_Bodies : Protected_Entry_Body_Access;
Find_Body_Index : Find_Body_Index_Access) Find_Body_Index : Find_Body_Index_Access)
is is
Init_Priority : Integer := Ceiling_Priority; Init_Priority : Integer := Ceiling_Priority;
Self_ID : constant Task_Id := STPO.Self; Self_ID : constant Task_Id := STPO.Self;
...@@ -206,15 +206,15 @@ package body System.Tasking.Protected_Objects.Entries is ...@@ -206,15 +206,15 @@ package body System.Tasking.Protected_Objects.Entries is
Initialize_Lock (Init_Priority, Object.L'Access); Initialize_Lock (Init_Priority, Object.L'Access);
Initialization.Undefer_Abort_Nestable (Self_ID); Initialization.Undefer_Abort_Nestable (Self_ID);
Object.Ceiling := System.Any_Priority (Init_Priority); Object.Ceiling := System.Any_Priority (Init_Priority);
Object.New_Ceiling := System.Any_Priority (Init_Priority); Object.New_Ceiling := System.Any_Priority (Init_Priority);
Object.Owner := Null_Task; Object.Owner := Null_Task;
Object.Compiler_Info := Compiler_Info; Object.Compiler_Info := Compiler_Info;
Object.Pending_Action := False; Object.Pending_Action := False;
Object.Call_In_Progress := null; Object.Call_In_Progress := null;
Object.Entry_Queue_Maxs := Entry_Queue_Maxs; Object.Entry_Queue_Maxes := Entry_Queue_Maxes;
Object.Entry_Bodies := Entry_Bodies; Object.Entry_Bodies := Entry_Bodies;
Object.Find_Body_Index := Find_Body_Index; Object.Find_Body_Index := Find_Body_Index;
for E in Object.Entry_Queues'Range loop for E in Object.Entry_Queues'Range loop
Object.Entry_Queues (E).Head := null; Object.Entry_Queues (E).Head := null;
......
...@@ -150,9 +150,9 @@ package System.Tasking.Protected_Objects.Entries is ...@@ -150,9 +150,9 @@ package System.Tasking.Protected_Objects.Entries is
Entry_Queues : Protected_Entry_Queue_Array (1 .. Num_Entries); Entry_Queues : Protected_Entry_Queue_Array (1 .. Num_Entries);
Entry_Queue_Maxs : Protected_Entry_Queue_Max_Access; Entry_Queue_Maxes : Protected_Entry_Queue_Max_Access;
-- Access to an array of naturals representing the max value for -- Access to an array of naturals representing the max value for each
-- each entry's queue length. A value of 0 signifies no max. -- entry's queue length. A value of 0 signifies no max.
Entry_Names : Protected_Entry_Names_Access := null; Entry_Names : Protected_Entry_Names_Access := null;
-- An array of string names which denotes entry [family member] names. -- An array of string names which denotes entry [family member] names.
...@@ -185,12 +185,12 @@ package System.Tasking.Protected_Objects.Entries is ...@@ -185,12 +185,12 @@ package System.Tasking.Protected_Objects.Entries is
-- System.Tasking.Protected_Objects.Initialize_Protection. -- System.Tasking.Protected_Objects.Initialize_Protection.
procedure Initialize_Protection_Entries procedure Initialize_Protection_Entries
(Object : Protection_Entries_Access; (Object : Protection_Entries_Access;
Ceiling_Priority : Integer; Ceiling_Priority : Integer;
Compiler_Info : System.Address; Compiler_Info : System.Address;
Entry_Queue_Maxs : Protected_Entry_Queue_Max_Access; Entry_Queue_Maxes : Protected_Entry_Queue_Max_Access;
Entry_Bodies : Protected_Entry_Body_Access; Entry_Bodies : Protected_Entry_Body_Access;
Find_Body_Index : Find_Body_Index_Access); Find_Body_Index : Find_Body_Index_Access);
-- Initialize the Object parameter so that it can be used by the runtime -- Initialize the Object parameter so that it can be used by the runtime
-- to keep track of the runtime state of a protected object. -- to keep track of the runtime state of a protected object.
......
...@@ -2345,11 +2345,11 @@ package Sem_Util is ...@@ -2345,11 +2345,11 @@ package Sem_Util is
-- views of the same entity have the same unique defining entity: -- views of the same entity have the same unique defining entity:
-- * entry declaration and entry body -- * entry declaration and entry body
-- * package spec, package body, and package body stub -- * package spec, package body, and package body stub
-- * protected type declaration, protected body and protected body stub -- * protected type declaration, protected body, and protected body stub
-- * private view and full view of a deferred constant -- * private view and full view of a deferred constant
-- * private view and full view of a type -- * private view and full view of a type
-- * subprogram declaration, subprogram and subprogram body stub -- * subprogram declaration, subprogram, and subprogram body stub
-- * task type declaration, task body and task body stub -- * task type declaration, task body, and task body stub
-- In other cases, return the defining entity for N. -- In other cases, return the defining entity for N.
function Unique_Entity (E : Entity_Id) return Entity_Id; function Unique_Entity (E : Entity_Id) return Entity_Id;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment