+2019-08-13 Justin Squirek <squirek@adacore.com>
+
+ * aspects.adb, aspects.ads: Register new aspect.
+ * par-prag.adb (Prag): Register new pragma
+ * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
+ for new aspect similar to Aspect_Max_Entry_Queue_Length.
+ * sem_prag.adb, sem_prag.ads (Analyze_Pragma): Register new
+ pragma and set it to use the same processing as
+ Pragma_Max_Queue_Length.
+ * snames.ads-tmpl: Move definition of
+ Name_Max_Entry_Queue_Length so that it can be processed as a
+ pragma in addition to a restriction and add an entry for the
+ pragma itself.
+
2019-08-13 Yannick Moy <moy@adacore.com>
* sem_ch4.adb (Analyze_Allocator): Do not insert subtype
Aspect_Lock_Free => Aspect_Lock_Free,
Aspect_Machine_Radix => Aspect_Machine_Radix,
Aspect_Max_Entry_Queue_Depth => Aspect_Max_Entry_Queue_Depth,
+ Aspect_Max_Entry_Queue_Length => Aspect_Max_Entry_Queue_Length,
Aspect_Max_Queue_Length => Aspect_Max_Queue_Length,
Aspect_No_Caching => Aspect_No_Caching,
Aspect_No_Elaboration_Code_All => Aspect_No_Elaboration_Code_All,
Aspect_Link_Name,
Aspect_Linker_Section, -- GNAT
Aspect_Machine_Radix,
- Aspect_Max_Entry_Queue_Depth,
+ Aspect_Max_Entry_Queue_Depth, -- GNAT
+ Aspect_Max_Entry_Queue_Length,
Aspect_Max_Queue_Length, -- GNAT
Aspect_No_Caching, -- GNAT
Aspect_Object_Size, -- GNAT
Aspect_Invariant => True,
Aspect_Lock_Free => True,
Aspect_Max_Entry_Queue_Depth => True,
+ Aspect_Max_Entry_Queue_Length => True,
Aspect_Max_Queue_Length => True,
Aspect_Object_Size => True,
Aspect_Persistent_BSS => True,
Aspect_Linker_Section => Expression,
Aspect_Machine_Radix => Expression,
Aspect_Max_Entry_Queue_Depth => Expression,
+ Aspect_Max_Entry_Queue_Length => Expression,
Aspect_Max_Queue_Length => Expression,
Aspect_No_Caching => Optional_Expression,
Aspect_Object_Size => Expression,
Aspect_Lock_Free => Name_Lock_Free,
Aspect_Machine_Radix => Name_Machine_Radix,
Aspect_Max_Entry_Queue_Depth => Name_Max_Entry_Queue_Depth,
+ Aspect_Max_Entry_Queue_Length => Name_Max_Entry_Queue_Length,
Aspect_Max_Queue_Length => Name_Max_Queue_Length,
Aspect_No_Caching => Name_No_Caching,
Aspect_No_Elaboration_Code_All => Name_No_Elaboration_Code_All,
Aspect_Initial_Condition => Never_Delay,
Aspect_Initializes => Never_Delay,
Aspect_Max_Entry_Queue_Depth => Never_Delay,
+ Aspect_Max_Entry_Queue_Length => Never_Delay,
Aspect_Max_Queue_Length => Never_Delay,
Aspect_No_Caching => Never_Delay,
Aspect_No_Elaboration_Code_All => Never_Delay,
| Pragma_Main
| Pragma_Main_Storage
| Pragma_Max_Entry_Queue_Depth
+ | Pragma_Max_Entry_Queue_Length
| Pragma_Max_Queue_Length
| Pragma_Memory_Size
| Pragma_No_Body
Insert_Pragma (Aitem);
goto Continue;
+ -- Max_Entry_Queue_Length
+
+ when Aspect_Max_Entry_Queue_Length =>
+ Make_Aitem_Pragma
+ (Pragma_Argument_Associations => New_List (
+ Make_Pragma_Argument_Association (Loc,
+ Expression => Relocate_Node (Expr))),
+ Pragma_Name => Name_Max_Entry_Queue_Length);
+
+ Decorate (Aspect, Aitem);
+ Insert_Pragma (Aitem);
+ goto Continue;
+
-- Max_Queue_Length
when Aspect_Max_Queue_Length =>
| Aspect_Initial_Condition
| Aspect_Initializes
| Aspect_Max_Entry_Queue_Depth
+ | Aspect_Max_Entry_Queue_Length
| Aspect_Max_Queue_Length
| Aspect_No_Caching
| Aspect_Obsolescent
end loop;
end Main_Storage;
- ----------------------
- -- Max_Queue_Length --
- ----------------------
+ ----------------------------
+ -- Max_Entry_Queue_Length --
+ ----------------------------
- -- pragma Max_Queue_Length (static_integer_EXPRESSION);
+ -- pragma Max_Entry_Queue_Length (static_integer_EXPRESSION);
- -- This processing is shared by Pragma_Max_Entry_Queue_Depth
+ -- This processing is shared by Pragma_Max_Entry_Queue_Depth and
+ -- Pragma_Max_Queue_Length.
- when Pragma_Max_Queue_Length
+ when Pragma_Max_Entry_Queue_Length
| Pragma_Max_Entry_Queue_Depth
+ | Pragma_Max_Queue_Length
=>
Max_Queue_Length : declare
Arg : Node_Id;
Val : Uint;
begin
- if Prag_Id = Pragma_Max_Queue_Length then
+ if Prag_Id = Pragma_Max_Entry_Queue_Depth
+ or else Prag_Id = Pragma_Max_Queue_Length
+ then
GNAT_Pragma;
end if;
Pragma_Main => -1,
Pragma_Main_Storage => -1,
Pragma_Max_Entry_Queue_Depth => 0,
+ Pragma_Max_Entry_Queue_Length => 0,
Pragma_Max_Queue_Length => 0,
Pragma_Memory_Size => 0,
Pragma_No_Body => 0,
-- Global
-- Initializes
-- Max_Entry_Queue_Depth
+ -- Max_Entry_Queue_Length
-- Max_Queue_Length
-- Post
-- Post_Class
Name_Machine_Attribute : constant Name_Id := N + $; -- GNAT
Name_Main : constant Name_Id := N + $; -- GNAT
Name_Main_Storage : constant Name_Id := N + $; -- GNAT
- Name_Max_Entry_Queue_Depth : constant Name_Id := N + $; -- Ada 12
+ Name_Max_Entry_Queue_Depth : constant Name_Id := N + $; -- GNAT
+ Name_Max_Entry_Queue_Length : constant Name_Id := N + $; -- Ada 12
Name_Max_Queue_Length : constant Name_Id := N + $; -- GNAT
Name_Memory_Size : constant Name_Id := N + $; -- Ada 83
Name_No_Body : constant Name_Id := N + $; -- GNAT
Name_Link_Name : constant Name_Id := N + $;
Name_Low_Order_First : constant Name_Id := N + $;
Name_Lowercase : constant Name_Id := N + $;
- Name_Max_Entry_Queue_Length : constant Name_Id := N + $;
Name_Max_Size : constant Name_Id := N + $;
Name_Mechanism : constant Name_Id := N + $;
Name_Message : constant Name_Id := N + $;
Pragma_Main,
Pragma_Main_Storage,
Pragma_Max_Entry_Queue_Depth,
+ Pragma_Max_Entry_Queue_Length,
Pragma_Max_Queue_Length,
Pragma_Memory_Size,
Pragma_No_Body,