diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-10-26 11:57:17 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-10-26 11:57:17 +0100 |
commit | 877a5a124a918f82f808c27b8cd64b5bd07f844f (patch) | |
tree | 0d8feb8c9db7f87829392d60519c795fc82583d1 /gcc/ada/sinfo.ads | |
parent | 078b1a5f6db354c2f8cf73c535542e2d32224e3a (diff) | |
download | gcc-877a5a124a918f82f808c27b8cd64b5bd07f844f.zip gcc-877a5a124a918f82f808c27b8cd64b5bd07f844f.tar.gz gcc-877a5a124a918f82f808c27b8cd64b5bd07f844f.tar.bz2 |
[multiple changes]
2015-10-26 Claire Dross <dross@adacore.com>
* sem_aux.ads (Number_Components): Can return 0 when called on
an empty record.
2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
* contracts.adb (Analyze_Subprogram_Body_Contract): Use
Unique_Defining_Entity instead of Corresponding_Spec_Of.
* einfo.adb SPARK_Pragma and SPARK_Aux_Pragma are now Node40 and
Node41 respectively.
(SPARK_Aux_Pragma): Update the assertion and node querry.
(SPARK_Aux_Pragma_Inherited): Update the assertion and node query.
(SPARK_Pragma): Update the assertion and node query.
(SPARK_Pragma_Inherited): Update the assertion and node query.
(Set_SPARK_Aux_Pragma): Update the assertion and node setting.
(Set_SPARK_Aux_Pragma_Inherited): Update the assertion and node setting.
(Set_SPARK_Pragma): Update the assertion and node setting.
(Set_SPARK_Pragma_Inherited): Update the assertion and node setting.
(Write_Field32_Name): Remove the output for SPARK_Pragma.
(Write_Field33_Name): Remove the output for SPARK_Aux_Pragma.
(Write_Field40_Name): Add output for SPARK_Pragma.
(Write_Field41_Name): Add output for SPARK_Aux_Pragma.
* einfo.ads Rewrite the documentation on attributes
SPARK_Pragma, SPARK_Aux_Pragma, SPARK_Pragma_Inherited and
SPARK_Aux_Pragma_Inherited. Update their uses in nodes.
* exp_ch4.adb (Create_Anonymous_Master): Use
Unique_Defining_Entity instead of Corresponding_Spec_Of.
* exp_ch9.adb (Expand_Entry_Declaration): Mark the barrier
function as such.
(Expand_N_Task_Body): Mark the task body as such.
(Expand_N_Task_Type_Declaration): Mark the task body as such.
* exp_unst.adb (Visit_Node): Use Unique_Defining_Entity instead
of Corresponding_Spec_Of.
* sem_attr.adb (Analyze_Attribute_Old_Result): Use
Unique_Defining_Entity instead of Corresponding_Spec_Of.
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Entry barrier
functions do not inherit the SPARK_Mode from the context.
(Build_Subprogram_Declaration): The matching spec is now marked
as a source construct to mimic the original stand alone body.
* sem_ch7.adb (Analyze_Package_Body_Helper): Code cleanup.
* sem_ch9.adb Add with and use clauses for Contracts.
(Analyze_Entry_Body): An entry body freezes the contract of
the nearest enclosing package body. The entry body now inherits
the SPARK_Mode from the context.
(Analyze_Entry_Declaration): A protected entry declaration now inherits
the SPARK_Mode from the context.
(Analyze_Protected_Body): A protected body freezes
the contract of the nearest enclosing package body. Set the
Etype of a protected body as this is neede for proper aspect
analysis. Protected bodies can now carry meaningful aspects and
those are now analyzed.
(Analyze_Protected_Type_Declaration): A protected type now inherits the
SPARK_Mode from the context.
(Analyze_Task_Body): A task body freezes the contract of the
nearest enclosing package body. Set the Etype of a task body
as this is needed for proper aspect analysis. A task body
now inherits the SPARK_Mode from the context. Task bodies
can now carry meaningful aspects and those are now analyzed.
(Analyze_Task_Type_Declaration): A task type declaration now
inherits the SPARK_Mode of from the context.
* sem_ch10.adb (Analyze_Protected_Body_Stub): Protected body
stubs can now carry meaningful aspects.
(Analyze_Task_Body_Stub): Task body stubs can now carry meaningful
aspects.
* sem_ch13.adb (Analyze_Aspect_Specifications): Aspects SPARK_Mode
Warnings now use routine Insert_Pragma as means of insertion into
the tree.
(Insert_After_SPARK_Mode): Clean up documentation.
(Insert_Pragma): Clean up documentation. The routine is now
capable of operating on synchronized units.
* sem_prag.adb (Add_Entity_To_Name_Buffer): New routine.
(Analyze_Contract_Cases_In_Decl_Part): Use
Unique_Defining_Entity instead of Corresponding_Spec_Of.
(Analyze_Depends_Global): Use Unique_Defining_Entity instead
of Corresponding_Spec_Of.
(Analyze_Depends_In_Decl_Part): Use Unique_Defining_Entity instead of
Corresponding_Spec_Of.
(Analyze_Global_In_Decl_Part): Use Unique_Defining_Entity instead of
Corresponding_Spec_Of.
(Analyze_Pragma): Use Unique_Defining_Entity instead of
Corresponding_Spec_Of.
Update the detection of an illegal pragma Ghost when it applies
to a task or protected unit. Reimplement the handling of
pragma SPARK_Mode.
(Analyze_Pre_Post_Condition_In_Decl_Part): Use Unique_Defining_Entity
instead of Corresponding_Spec_Of.
(Analyze_Test_Case_In_Decl_Part): Use Unique_Defining_Entity instead of
Corresponding_Spec_Of.
(Check_Library_Level_Entity): Update the comment on usage.
Reimplemented to offer a more specialized errror context.
(Check_Pragma_Conformance): Update profile and comment on usage.
Handle error message output on single protected or task units.
(Collect_Subprogram_Inputs_Outputs): Use Unique_Defining_Entity
instead of Corresponding_Spec_Of.
(Process_Body): New routine.
(Process_Overloadable): New routine.
(Process_Private_Part): New routine.
(Process_Statement_Part): New routine.
(Process_Visible_Part): New routine.
(Set_SPARK_Context): New routine.
(Set_SPARK_Flags): Removed.
* sem_util.adb (Corresponding_Spec_Of): Removed.
(Unique_Entity): Reimplemented to handle many more cases.
* sem_util.ads (Corresponding_Spec_Of): Removed.
(Unique_Defining_Entity): Update the comment on usage.
* sinfo.ads (Is_Entry_Barrier_Function): Update the assertion.
(Is_Task_Body_Procedure): New routine.
(Set_Is_Entry_Barrier_Function): Update the assertion.
(Set_Is_Task_Body_Procedure): New routine.
* sinfo.adb Update the documentation of attribute
Is_Entry_Barrier_Function along with use in nodes. Add new
attribute Is_Task_Body_Procedure along with use in nodes.
(Is_Task_Body_Procedure): New routine along with pragma Inline.
(Set_Is_Task_Body_Procedure): New routine along with pragma Inline.
From-SVN: r229328
Diffstat (limited to 'gcc/ada/sinfo.ads')
-rw-r--r-- | gcc/ada/sinfo.ads | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index 5f2f092..613ea4c6 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -1571,7 +1571,7 @@ package Sinfo is -- concatenation nodes in instances. -- Is_Controlling_Actual (Flag16-Sem) - -- This flag is set on in an expression that is a controlling argument in + -- This flag is set on an expression that is a controlling argument in -- a dispatching call. It is off in all other cases. See Sem_Disp for -- details of its use. @@ -1596,9 +1596,9 @@ package Sinfo is -- the enclosing object. -- Is_Entry_Barrier_Function (Flag8-Sem) - -- This flag is set in an N_Subprogram_Body node which is the expansion - -- of an entry barrier from a protected entry body. It is used for the - -- circuitry checking for incorrect use of Current_Task. + -- This flag is set on N_Subprogram_Declaration and N_Subprogram_Body + -- nodes which emulate the barrier function of a protected entry body. + -- The flag is used when checking for incorrect use of Current_Task. -- Is_Expanded_Build_In_Place_Call (Flag11-Sem) -- This flag is set in an N_Function_Call node to indicate that the extra @@ -1728,6 +1728,10 @@ package Sinfo is -- Expunge_Unactivated_Tasks to complete any tasks that have been -- allocated but not activated when the allocator completes abnormally. + -- Is_Task_Body_Procedure (Flag1-Sem) + -- This flag is set on N_Subprogram_Declaration and N_Subprogram_Body + -- nodes which emulate the body of a task unit. + -- Is_Task_Master (Flag5-Sem) -- A flag set in a Subprogram_Body, Block_Statement or Task_Body node to -- indicate that the construct is a task master (i.e. has declared tasks @@ -4953,6 +4957,8 @@ package Sinfo is -- Body_To_Inline (Node3-Sem) -- Corresponding_Body (Node5-Sem) -- Parent_Spec (Node4-Sem) + -- Is_Entry_Barrier_Function (Flag8-Sem) + -- Is_Task_Body_Procedure (Flag1-Sem) ------------------------------------------ -- 6.1 Abstract Subprogram Declaration -- @@ -5192,8 +5198,9 @@ package Sinfo is -- Acts_As_Spec (Flag4-Sem) -- Bad_Is_Detected (Flag15) used only by parser -- Do_Storage_Check (Flag17-Sem) - -- Is_Protected_Subprogram_Body (Flag7-Sem) -- Is_Entry_Barrier_Function (Flag8-Sem) + -- Is_Protected_Subprogram_Body (Flag7-Sem) + -- Is_Task_Body_Procedure (Flag1-Sem) -- Is_Task_Master (Flag5-Sem) -- Was_Originally_Stub (Flag13-Sem) -- Has_Relative_Deadline_Pragma (Flag9-Sem) @@ -9384,6 +9391,9 @@ package Sinfo is function Is_Task_Allocation_Block (N : Node_Id) return Boolean; -- Flag6 + function Is_Task_Body_Procedure + (N : Node_Id) return Boolean; -- Flag1 + function Is_Task_Master (N : Node_Id) return Boolean; -- Flag5 @@ -10413,6 +10423,9 @@ package Sinfo is procedure Set_Is_Task_Allocation_Block (N : Node_Id; Val : Boolean := True); -- Flag6 + procedure Set_Is_Task_Body_Procedure + (N : Node_Id; Val : Boolean := True); -- Flag1 + procedure Set_Is_Task_Master (N : Node_Id; Val : Boolean := True); -- Flag5 @@ -12780,6 +12793,7 @@ package Sinfo is pragma Inline (Is_Static_Expression); pragma Inline (Is_Subprogram_Descriptor); pragma Inline (Is_Task_Allocation_Block); + pragma Inline (Is_Task_Body_Procedure); pragma Inline (Is_Task_Master); pragma Inline (Iteration_Scheme); pragma Inline (Itype); @@ -13118,6 +13132,7 @@ package Sinfo is pragma Inline (Set_Is_Static_Expression); pragma Inline (Set_Is_Subprogram_Descriptor); pragma Inline (Set_Is_Task_Allocation_Block); + pragma Inline (Set_Is_Task_Body_Procedure); pragma Inline (Set_Is_Task_Master); pragma Inline (Set_Iteration_Scheme); pragma Inline (Set_Iterator_Specification); |