Commit 5ad4969d by Robert Dewar Committed by Arnaud Charlet

gnat_rm.texi, [...]: Minor reformatting.

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

	* gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
	Minor reformatting.

From-SVN: r177160
parent 8c4ee6f5
2011-08-02 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
Minor reformatting.
2011-08-02 Ed Schonberg <schonberg@adacore.com> 2011-08-02 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
......
...@@ -304,10 +304,10 @@ private ...@@ -304,10 +304,10 @@ private
-- abstract interface type conversions (Ada 2005:AI-251) -- abstract interface type conversions (Ada 2005:AI-251)
SSD : Select_Specific_Data_Ptr; SSD : Select_Specific_Data_Ptr;
-- Pointer to a table of records used in dispatching selects. This -- Pointer to a table of records used in dispatching selects. This field
-- field has a meaningful value for all tagged types that implement -- has a meaningful value for all tagged types that implement a limited,
-- a limited, protected, synchronized or task interfaces and have -- protected, synchronized or task interfaces and have non-predefined
-- non-predefined primitive operations. -- primitive operations.
Tags_Table : Tag_Table (0 .. Idepth); Tags_Table : Tag_Table (0 .. Idepth);
-- Table of ancestor tags. Its size actually depends on the inheritance -- Table of ancestor tags. Its size actually depends on the inheritance
...@@ -414,12 +414,12 @@ private ...@@ -414,12 +414,12 @@ private
type Object_Specific_Data_Ptr is access all Object_Specific_Data; type Object_Specific_Data_Ptr is access all Object_Specific_Data;
pragma No_Strict_Aliasing (Object_Specific_Data_Ptr); pragma No_Strict_Aliasing (Object_Specific_Data_Ptr);
-- The following subprogram specifications are placed here instead of -- The following subprogram specifications are placed here instead of the
-- the package body to see them from the frontend through rtsfind. -- package body to see them from the frontend through rtsfind.
function Base_Address (This : System.Address) return System.Address; function Base_Address (This : System.Address) return System.Address;
-- Ada 2005 (AI-251): Displace "This" to point to the base address of -- Ada 2005 (AI-251): Displace "This" to point to the base address of the
-- the object (that is, the address of the primary tag of the object). -- object (that is, the address of the primary tag of the object).
procedure Check_TSD (TSD : Type_Specific_Data_Ptr); procedure Check_TSD (TSD : Type_Specific_Data_Ptr);
-- Ada 2012 (AI-113): Raise Program_Error if the external tag of this TSD -- Ada 2012 (AI-113): Raise Program_Error if the external tag of this TSD
...@@ -444,8 +444,8 @@ private ...@@ -444,8 +444,8 @@ private
function Get_Offset_Index function Get_Offset_Index
(T : Tag; (T : Tag;
Position : Positive) return Positive; Position : Positive) return Positive;
-- Ada 2005 (AI-251): Given a pointer to a secondary dispatch table (T) and -- Ada 2005 (AI-251): Given a pointer to a secondary dispatch table (T)
-- a position of an operation in the DT, retrieve the corresponding -- and a position of an operation in the DT, retrieve the corresponding
-- operation's position in the primary dispatch table from the Offset -- operation's position in the primary dispatch table from the Offset
-- Specific Data table of T. -- Specific Data table of T.
...@@ -460,9 +460,9 @@ private ...@@ -460,9 +460,9 @@ private
-- has controlled components, returns zero if no controlled components. -- has controlled components, returns zero if no controlled components.
pragma Export (Ada, Get_RC_Offset, "ada__tags__get_rc_offset"); pragma Export (Ada, Get_RC_Offset, "ada__tags__get_rc_offset");
-- This procedure is used in s-finimp to compute the deep routines -- This procedure is used in s-finimp to compute the deep routines. It is
-- it is exported manually in order to avoid changing completely the -- exported manually in order to avoid completely changing the organization
-- organization of the run time. -- of the run time.
function Get_Tagged_Kind (T : Tag) return Tagged_Kind; function Get_Tagged_Kind (T : Tag) return Tagged_Kind;
-- Ada 2005 (AI-345): Given a pointer to either a primary or a secondary -- Ada 2005 (AI-345): Given a pointer to either a primary or a secondary
...@@ -485,7 +485,7 @@ private ...@@ -485,7 +485,7 @@ private
function Offset_To_Top function Offset_To_Top
(This : System.Address) return SSE.Storage_Offset; (This : System.Address) return SSE.Storage_Offset;
-- Ada 2005 (AI-251): Returns the current value of the offset_to_top -- Ada 2005 (AI-251): Returns the current value of the Offset_To_Top
-- component available in the prologue of the dispatch table. If the parent -- component available in the prologue of the dispatch table. If the parent
-- of the tagged type has discriminants this value is stored in a record -- of the tagged type has discriminants this value is stored in a record
-- component just immediately after the tag component. -- component just immediately after the tag component.
...@@ -516,8 +516,8 @@ private ...@@ -516,8 +516,8 @@ private
-- access to function that must be called to evaluate the offset. -- access to function that must be called to evaluate the offset.
procedure Register_Tag (T : Tag); procedure Register_Tag (T : Tag);
-- Insert the Tag and its associated external_tag in a table for the -- Insert the Tag and its associated external_tag in a table for the sake
-- sake of Internal_Tag -- of Internal_Tag.
procedure Set_Dynamic_Offset_To_Top procedure Set_Dynamic_Offset_To_Top
(This : System.Address; (This : System.Address;
......
...@@ -5995,6 +5995,8 @@ package body Exp_Disp is ...@@ -5995,6 +5995,8 @@ package body Exp_Disp is
-- Check_TSD (TSD'Unrestricted_Access); -- Check_TSD (TSD'Unrestricted_Access);
-- Seems wrong to restrict this BI to Ada 2012 ???
if not No_Run_Time_Mode if not No_Run_Time_Mode
and then Ada_Version >= Ada_2012 and then Ada_Version >= Ada_2012
and then RTE_Available (RE_Check_TSD) and then RTE_Available (RE_Check_TSD)
......
...@@ -4562,7 +4562,8 @@ Note that Source_File_Name pragmas should not be used if you are using ...@@ -4562,7 +4562,8 @@ Note that Source_File_Name pragmas should not be used if you are using
project files. The reason for this rule is that the project manager is not project files. The reason for this rule is that the project manager is not
aware of these pragmas, and so other tools that use the projet file would not aware of these pragmas, and so other tools that use the projet file would not
be aware of the intended naming conventions. If you are using project files, be aware of the intended naming conventions. If you are using project files,
file naming is controlled by Source_File_Name_Project pragmas. A pragma file naming is controlled by Source_File_Name_Project pragmas, which are
usually supplied automatically by the project manager. A pragma
Source_File_Name cannot appear after a @ref{Pragma Source_File_Name_Project}. Source_File_Name cannot appear after a @ref{Pragma Source_File_Name_Project}.
For more details on the use of the @code{Source_File_Name} pragma, For more details on the use of the @code{Source_File_Name} pragma,
......
...@@ -2905,6 +2905,7 @@ package body Sem_Ch12 is ...@@ -2905,6 +2905,7 @@ package body Sem_Ch12 is
-- To capture global references, analyze the expressions of aspects, -- To capture global references, analyze the expressions of aspects,
-- and propagate information to original tree. Note that in this case -- and propagate information to original tree. Note that in this case
-- analysis of attributes is not delayed until the freeze point. -- analysis of attributes is not delayed until the freeze point.
-- It seems very hard to recreate the proper visibility of the generic -- It seems very hard to recreate the proper visibility of the generic
-- subprogram at a later point because the analysis of an aspect may -- subprogram at a later point because the analysis of an aspect may
-- create pragmas after the generic copies have been made ??? -- create pragmas after the generic copies have been made ???
...@@ -4303,9 +4304,9 @@ package body Sem_Ch12 is ...@@ -4303,9 +4304,9 @@ package body Sem_Ch12 is
Specification => Act_Spec); Specification => Act_Spec);
-- The aspects have been copied previously, but they have to be -- The aspects have been copied previously, but they have to be
-- linked explicitly to the new subprogram declaration. -- linked explicitly to the new subprogram declaration. Explicit
-- Explicit pre/postconditions on the instance are analyzed below, -- pre/postconditions on the instance are analyzed below, in a
-- in a separate step. -- separate step.
Move_Aspects (Act_Tree, Act_Decl); Move_Aspects (Act_Tree, Act_Decl);
Set_Categorization_From_Pragmas (Act_Decl); Set_Categorization_From_Pragmas (Act_Decl);
......
...@@ -1595,9 +1595,12 @@ package body Sem_Prag is ...@@ -1595,9 +1595,12 @@ package body Sem_Prag is
("aspect % requires ''Class for abstract subprogram"); ("aspect % requires ''Class for abstract subprogram");
end if; end if;
-- AI05-0230: the same restriction applies to null procedures. -- AI05-0230: The same restriction applies to null procedures. For
-- For compatibility with earlier uses of the Ada pragma, apply -- compatibility with earlier uses of the Ada pragma, apply this
-- this rule only to aspect specifications. -- rule only to aspect specifications.
-- The above discrpency needs documentation. Robert is dubious
-- about whether it is a good idea ???
elsif Nkind (PO) = N_Subprogram_Declaration elsif Nkind (PO) = N_Subprogram_Declaration
and then Nkind (Specification (PO)) = N_Procedure_Specification and then Nkind (Specification (PO)) = N_Procedure_Specification
...@@ -1752,7 +1755,7 @@ package body Sem_Prag is ...@@ -1752,7 +1755,7 @@ package body Sem_Prag is
elsif not Comes_From_Source (PO) then elsif not Comes_From_Source (PO) then
-- The condition may apply to a subprogram instantiation. -- The condition may apply to a subprogram instantiation
if Nkind (PO) = N_Subprogram_Declaration if Nkind (PO) = N_Subprogram_Declaration
and then Present (Generic_Parent (Specification (PO))) and then Present (Generic_Parent (Specification (PO)))
...@@ -1760,6 +1763,8 @@ package body Sem_Prag is ...@@ -1760,6 +1763,8 @@ package body Sem_Prag is
Chain_PPC (PO); Chain_PPC (PO);
return; return;
-- For all other cases of non source code, do nothing
else else
null; null;
end if; end if;
......
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