diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-11-12 11:15:12 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-11-12 11:15:12 +0000 |
commit | 3ff5e35d8e77b6046fe71bac165b432b248fb96b (patch) | |
tree | e64bca4ccba2bae360c698b80118fc5438cfdf20 /gcc/ada/einfo.adb | |
parent | 798dec7378088af3e425af2123abc87aa2a813de (diff) | |
download | gcc-3ff5e35d8e77b6046fe71bac165b432b248fb96b.tar.gz |
2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
* contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
Remove the guard concerning entry bodies as it is spurious.
(Analyze_Entry_Or_Subprogram_Contract): Skip the analysis of
Contract_Cases when not annotating the tree.
* einfo.adb: Node25 is now used as Contract_Wrapper.
(Contract_Wrapper): New routine.
(PPC_Wrapper): Removed.
(Set_Contract_Wrapper): New routine.
(Set_PPC_Wrapper): Removed.
(Write_Field25_Name): Add output for Contract_Wrapper. Remove
output for PPC_Wrapper.
* einfo.ads: New attribute Contract_Wrapper along with usage
in entities. Remove attribute PPC_Wrapper along with usage in nodes.
(Contract_Wrapper): New routine along with pragma Inline.
(PPC_Wrapper): Removed along with pragma Inline.
(Set_Contract_Wrapper): New routine along with pragma Inline.
(Set_PPC_Wrapper): Removed along with pragma Inline.
* exp_ch9.adb (Build_Contract_Wrapper): New routine.
(Build_PPC_Wrapper): Removed.
(Build_Protected_Entry): Code cleanup.
(Expand_Entry_Declaration): Create a contract wrapper
which now verifies Contract_Cases along with pre/postconditions.
(Expand_N_Task_Type_Declaration): There is no need to check
whether an entry has pre/postconditions as this is now done
in Build_Contract_Wrapper.
* sem_ch13.adb (Analyze_Aspect_Specifications): Pragma
Refined_Post is now properly inserted in entry bodies.
(Insert_Pragma): Add circuitry to insert in an entry body. Redo
the instance "header" circuitry. Remove the now obsolete special
case of inserting pre- conditions.
* sem_prag.adb (Analyze_Pragma): Pragma Contract_Cases now
applies to entries.
* sem_res.adb (Resolve_Entry_Call): Update the calls to
PPC_Wrapper.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230236 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/einfo.adb')
-rw-r--r-- | gcc/ada/einfo.adb | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb index 8769631e4c2..e8ee8730f9c 100644 --- a/gcc/ada/einfo.adb +++ b/gcc/ada/einfo.adb @@ -216,11 +216,11 @@ package body Einfo is -- Related_Expression Node24 -- Subps_Index Uint24 + -- Contract_Wrapper Node25 -- Debug_Renaming_Link Node25 -- DT_Offset_To_Top_Func Node25 -- Interface_Alias Node25 -- Interfaces Elist25 - -- PPC_Wrapper Node25 -- Related_Array_Object Node25 -- Static_Discrete_Predicate List25 -- Static_Real_Or_String_Predicate Node25 @@ -1231,6 +1231,12 @@ package body Einfo is return Node34 (Id); end Contract; + function Contract_Wrapper (Id : E) return E is + begin + pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family)); + return Node25 (Id); + end Contract_Wrapper; + function Entry_Parameters_Type (Id : E) return E is begin return Node15 (Id); @@ -2876,12 +2882,6 @@ package body Einfo is return Node14 (Id); end Postconditions_Proc; - function PPC_Wrapper (Id : E) return E is - begin - pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family)); - return Node25 (Id); - end PPC_Wrapper; - function Prival (Id : E) return E is begin pragma Assert (Is_Protected_Component (Id)); @@ -3877,6 +3877,12 @@ package body Einfo is Set_Node34 (Id, V); end Set_Contract; + procedure Set_Contract_Wrapper (Id : E; V : E) is + begin + pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family)); + Set_Node25 (Id, V); + end Set_Contract_Wrapper; + procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is begin pragma Assert @@ -5912,12 +5918,6 @@ package body Einfo is Set_Node14 (Id, V); end Set_Postconditions_Proc; - procedure Set_PPC_Wrapper (Id : E; V : E) is - begin - pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family)); - Set_Node25 (Id, V); - end Set_PPC_Wrapper; - procedure Set_Direct_Primitive_Operations (Id : E; V : L) is begin pragma Assert (Is_Tagged_Type (Id)); @@ -10003,6 +10003,10 @@ package body Einfo is E_Package => Write_Str ("Abstract_States"); + when E_Entry | + E_Entry_Family => + Write_Str ("Contract_Wrapper"); + when E_Variable => Write_Str ("Debug_Renaming_Link"); @@ -10026,10 +10030,6 @@ package body Einfo is when Task_Kind => Write_Str ("Task_Body_Procedure"); - when E_Entry | - E_Entry_Family => - Write_Str ("PPC_Wrapper"); - when Discrete_Kind => Write_Str ("Static_Discrete_Predicate"); |