Commit 02848684 by Arnaud Charlet

einfo.ads: Minor fixes in comments.



	* einfo.ads: Minor fixes in comments.

2017-04-27  Ed Schonberg  <schonberg@adacore.com>

	* sem_prag.adb: disable clones in SPARK_Mode.

2017-04-27  Gary Dismukes  <dismukes@adacore.com>

	* sem_util.ads, contracts.adb: Minor reformatting.

From-SVN: r247315
parent 62c7d441
2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
* einfo.ads: Minor fixes in comments.
2017-04-27 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb: disable clones in SPARK_Mode.
2017-04-27 Gary Dismukes <dismukes@adacore.com>
* sem_util.ads, contracts.adb: Minor reformatting.
2017-04-27 Ed Schonberg <schonberg@adacore.com> 2017-04-27 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body): * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
......
...@@ -390,7 +390,7 @@ package body Contracts is ...@@ -390,7 +390,7 @@ package body Contracts is
begin begin
Analyze_Entry_Or_Subprogram_Contract (Subp_Id, Freeze_Id); Analyze_Entry_Or_Subprogram_Contract (Subp_Id, Freeze_Id);
-- If analysis of a classwide pre/postcondition indicates -- If analysis of a class-wide pre/postcondition indicates
-- that a class-wide clone is needed, analyze its declaration -- that a class-wide clone is needed, analyze its declaration
-- now. Its body is created when the body of the original -- now. Its body is created when the body of the original
-- operation is analyzed (and rewritten). -- operation is analyzed (and rewritten).
......
...@@ -3703,7 +3703,7 @@ package Einfo is ...@@ -3703,7 +3703,7 @@ package Einfo is
-- OK_To_Reorder_Components (Flag239) [base type only] -- OK_To_Reorder_Components (Flag239) [base type only]
-- Defined in record types. Set if the backend is permitted to reorder -- Defined in record types. Set if the backend is permitted to reorder
-- the components. If not set, the record must be layed out in the order -- the components. If not set, the record must be laid out in the order
-- in which the components are declared textually. Currently this flag -- in which the components are declared textually. Currently this flag
-- can only be set by debug switches. -- can only be set by debug switches.
...@@ -3793,7 +3793,7 @@ package Einfo is ...@@ -3793,7 +3793,7 @@ package Einfo is
-- non-contiguous enumeration index types). References the type used to -- non-contiguous enumeration index types). References the type used to
-- represent the packed array, which is either a modular type for short -- represent the packed array, which is either a modular type for short
-- static arrays or an array of System.Unsigned in the bit-packed case, -- static arrays or an array of System.Unsigned in the bit-packed case,
-- or a regular array in the non-standard enumeration index case). Note -- or a regular array in the non-standard enumeration index case. Note
-- that in some situations (internal types and references to fields of -- that in some situations (internal types and references to fields of
-- variant records), it is not always possible to construct this type in -- variant records), it is not always possible to construct this type in
-- advance of its use. If this field is empty, then the necessary type -- advance of its use. If this field is empty, then the necessary type
......
...@@ -24016,6 +24016,7 @@ package body Sem_Prag is ...@@ -24016,6 +24016,7 @@ package body Sem_Prag is
elsif not Is_Abstract_Subprogram (Spec_Id) elsif not Is_Abstract_Subprogram (Spec_Id)
and then No (Class_Wide_Clone (Spec_Id)) and then No (Class_Wide_Clone (Spec_Id))
and then not Has_Controlling_Result (Spec_Id) and then not Has_Controlling_Result (Spec_Id)
and then SPARK_Mode /= On
then then
Build_Class_Wide_Clone_Decl (Spec_Id); Build_Class_Wide_Clone_Decl (Spec_Id);
end if; end if;
...@@ -209,10 +209,10 @@ package Sem_Util is ...@@ -209,10 +209,10 @@ package Sem_Util is
-- Determine whether a selected component has a type that depends on -- Determine whether a selected component has a type that depends on
-- discriminants, and build actual subtype for it if so. -- discriminants, and build actual subtype for it if so.
-- Handling of inherited primitives whose ancestor have class-wide -- Handling of inherited primitives whose ancestors have class-wide
-- pre/post conditions. -- pre/postconditions.
-- If a primitive operation of a parent type has a class-wide pre/post -- If a primitive operation of a parent type has a class-wide pre/post-
-- condition that includes calls to other primitives, and that operation -- condition that includes calls to other primitives, and that operation
-- is inherited by a descendant type that also overrides some of these -- is inherited by a descendant type that also overrides some of these
-- other primitives, the condition that applies to the inherited -- other primitives, the condition that applies to the inherited
...@@ -227,7 +227,7 @@ package Sem_Util is ...@@ -227,7 +227,7 @@ package Sem_Util is
-- economically we create a subprogram body (a "class-wide clone") to -- economically we create a subprogram body (a "class-wide clone") to
-- which no pre/postconditions apply, and we create bodies for the -- which no pre/postconditions apply, and we create bodies for the
-- original and the inherited operation that have their respective -- original and the inherited operation that have their respective
-- pre/post conditions and simply call the clone. The following operations -- pre/postconditions and simply call the clone. The following operations
-- take care of constructing declaration and body of the clone, and -- take care of constructing declaration and body of the clone, and
-- building the calls to it within the appropriate wrappers. -- building the calls to it within the appropriate wrappers.
...@@ -250,7 +250,7 @@ package Sem_Util is ...@@ -250,7 +250,7 @@ package Sem_Util is
-- clone includes the proper conversion in a call the parent operation. -- clone includes the proper conversion in a call the parent operation.
procedure Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id); procedure Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id);
-- For a subprogram that has a clas-wide condition that contains calls -- For a subprogram that has a class-wide condition that contains calls
-- to other primitives, build an internal subprogram that is invoked -- to other primitives, build an internal subprogram that is invoked
-- through a type-specific wrapper for all inherited subprograms that -- through a type-specific wrapper for all inherited subprograms that
-- may have a modified condition. -- may have a modified condition.
......
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