Commit 8830d1d2 by Arnaud Charlet

[multiple changes]

2011-08-02  Robert Dewar  <dewar@adacore.com>

	* sem_ch8.adb, aspects.ads: Minor reformatting.

2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>

	* sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
	* sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
	extracted from...
	(Analyze_Aspect_Specifications): ...here.  Call above procedure.

From-SVN: r177094
parent 7ff2d234
2011-08-02 Robert Dewar <dewar@adacore.com>
* sem_ch8.adb, aspects.ads: Minor reformatting.
2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
* sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
extracted from...
(Analyze_Aspect_Specifications): ...here. Call above procedure.
2011-08-02 Yannick Moy <moy@adacore.com>
* exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
......
......@@ -88,9 +88,11 @@ package Aspects is
Aspect_Universal_Data, -- GNAT
-- Remaining aspects have a static boolean value that turns the aspect
-- on or off. They all correspond to pragmas, and the flag Aspect_Cancel
-- is set on the pragma if the corresponding aspect is False. These are
-- also Boolean aspects as defined below.
-- on or off. They all correspond to pragmas, but are only converted to
-- the pragmas where the value is True. A value of False normally means
-- that the aspect is ignored, except in the case of derived types where
-- the aspect value is inherited from the parent, in which case, we do
-- not allow False if we inherit a True value from the parent.
Aspect_Ada_2005, -- GNAT
Aspect_Ada_2012, -- GNAT
......
......@@ -78,6 +78,16 @@ package body Sem_Ch13 is
-- inherited from a derived type that is no longer appropriate for the
-- new Esize value. In this case, we reset the Alignment to unknown.
procedure Analyze_Non_Null_Aspect_Specifications
(N : Node_Id;
E : Entity_Id;
L : List_Id);
-- This procedure is called to analyze aspect specifications for node N.
-- E is the corresponding entity declared by the declaration node N, and
-- L is the list of aspect specifications for this node. This procedure
-- does the real work, as opposed to Analyze_Aspect_Specifications which
-- is inlined to fast-track the common case.
procedure Build_Predicate_Function (Typ : Entity_Id; N : Node_Id);
-- If Typ has predicates (indicated by Has_Predicates being set for Typ,
-- then either there are pragma Invariant entries on the rep chain for the
......@@ -688,6 +698,25 @@ package body Sem_Ch13 is
E : Entity_Id;
L : List_Id)
is
begin
-- Return if no aspects
if L = No_List then
return;
end if;
Analyze_Non_Null_Aspect_Specifications (N, E, L);
end Analyze_Aspect_Specifications;
--------------------------------------------
-- Analyze_Non_Null_Aspect_Specifications --
--------------------------------------------
procedure Analyze_Non_Null_Aspect_Specifications
(N : Node_Id;
E : Entity_Id;
L : List_Id)
is
Aspect : Node_Id;
Aitem : Node_Id;
Ent : Node_Id;
......@@ -715,12 +744,6 @@ package body Sem_Ch13 is
-- Set True if delay is required
begin
-- Return if no aspects
if L = No_List then
return;
end if;
-- Loop through aspects
Aspect := First (L);
......@@ -1198,7 +1221,7 @@ package body Sem_Ch13 is
<<Continue>>
Next (Aspect);
end loop;
end Analyze_Aspect_Specifications;
end Analyze_Non_Null_Aspect_Specifications;
-----------------------
-- Analyze_At_Clause --
......
......@@ -46,6 +46,7 @@ package Sem_Ch13 is
-- the call is ignored. Note that we can't use a simpler interface of just
-- passing the node N, since the analysis of the node may cause it to be
-- rewritten to a node not permitting aspect specifications.
pragma Inline (Analyze_Aspect_Specifications);
procedure Adjust_Record_For_Reverse_Bit_Order (R : Entity_Id);
-- Called from Freeze where R is a record entity for which reverse bit
......
......@@ -2697,7 +2697,6 @@ package body Sem_Ch8 is
Mark := First (Subtype_Marks (N));
while Present (Mark) loop
Use_One_Type (Mark, Installed => True);
Next (Mark);
end loop;
......
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