diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-23 13:04:01 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-23 13:04:01 +0000 |
commit | 5f443c6d8f5757ebc8bbc69462207059c2618ab5 (patch) | |
tree | dff0f664288fdfea6014177ce744d3e81f47c203 /gcc/ada/sinfo.ads | |
parent | e4192fd67c61a0661c59bd8f18d01227881a5a9d (diff) | |
download | gcc-5f443c6d8f5757ebc8bbc69462207059c2618ab5.tar.gz |
2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
* contracts.ads, contracts.adb: New unit.
* exp_ch6.adb Add with and use clauses for Contracts.
(Expand_Subprogram_Contract): Moved to Contracts.
* exp_ch6.ads (Expand_Subprogram_Contract): Moved to Contracts.
* sem_ch3.adb Add with and use clauses for Contracts.
(Analyze_Object_Contract): Moved to Contracts.
(Analyze_Declarations): Remove local variable Pack_Decl. Do not
capture global references in contracts. Check the hidden states
of a package body.
* sem_ch6.adb Add with and use clauses in Contracts.
(Analyze_Generic_Subprogram_Body): Do not capture global
references in contracts.
(Analyze_Subprogram_Body_Contract):
Moved to Contracts.
(Analyze_Subprogram_Body_Helper): Freeze the
contract of the nearest enclosing package body. Always analyze
the subprogram body contract. Do not expand the subprogram
body contract.
(Analyze_Subprogram_Contract): Moved to Contracts.
* sem_ch6.ads (Analyze_Subprogram_Body_Contract): Moved to Contracts.
(Analyze_Subprogram_Contract): Moved to Contracts.
* sem_ch7.adb Add with and use clauses for Contracts.
(Analyze_Package_Body_Contract): Moved to Contracts.
(Analyze_Package_Body_Helper): Freeze the contract of the
nearest enclosing package body.
(Analyze_Package_Contract): Moved to Contracts.
* sem_ch7.ads (Analyze_Package_Body_Contract): Moved to Contracts.
(Analyze_Package_Contract): Moved to Contracts.
* sem_ch10.adb Add with and use clauses for Contracts.
(Analyze_Compilation_Unit): Do not capture global references
in contracts.
(Analyze_Subprogram_Body_Stub_Contract): Moved to Contracts.
* sem_ch10.ads (Analyze_Subprogram_Body_Stub_Contract): Moved
to Contracts.
* sem_ch12.adb Add with and use clauses for Contracts.
(Analyze_Subprogram_Instantiation): Update the call to
Instantiate_Subprogram_Contract.
(Instantiate_Package_Body):
Do not copy the entity of the spec when creating an entity
for the body. Construct a brand new defining identifier for
the body and inherit the Comes_From_Source flag from the spec.
(Instantiate_Subprogram_Body): Remove Anon_Id to Act_Decl_Id
and update all occurrences. Construct a brand new defining
identifier for the body and inherit the Comes_From_Source
flag from the spec.
(Instantiate_Subprogram_Contract): Moved
to Contracts.
(Save_Global_References_In_Aspects): Moved to
the spec of Sem_Ch12.
(Save_Global_References_In_Contract):
Moved to Contracts.
* sem_ch12.ads (Save_Global_References_In_Aspects): Moved from
the body of Sem_Ch12.
(Save_Global_References_In_Contract):
Moved to Contracts.
* sem_prag.adb Add with and use clauses for Contracts.
(Add_Item): Removed. All references to this routine have been
replaced with calls to Append_New_Elmt.
(Analyze_Constituent):
Add special diagnostics for errors caused by freezing of
contracts.
(Analyze_Refined_State_In_Decl_Part): Add formal
parameter Freeze_Id. Add new global variable Freeze_Posted.
(Collect_Body_States): Removed.
(Report_Unused_States): Removed.
* sem_prag.ads (Analyze_Defined_State_In_Decl_Part): Add formal
parameter Freeze_Id and update comment on usage.
* sem_util.adb Remove with and use clauses for
Sem_Ch12.
(Add_Contract_Item): Moved to Contracts.
(Check_Unused_Body_States): New routine.
(Collect_Body_States):
New routine.
(Create_Generic_Contract): Moved to Contracts.
(Inherit_Subprogram_Contract): Moved to Contracts.
(Report_Unused_Body_States): New routine.
* sem_util.ads (Add_Contract_Item): Moved to Contracts.
(Check_Unused_Body_States): New routine.
(Collect_Body_States): New routine.
(Create_Generic_Contract): Moved to Contracts.
(Inherit_Subprogram_Contract): Moved to Contracts.
(Report_Unused_Body_States): New routine.
* sinfo.adb (Is_Expanded_Contract): New routine.
(Set_Is_Expanded_Contract): New routine.
* sinfo.ads New attribute Is_Expanded_Contract along with
placement in nodes.
(Is_Expanded_Contract): New routine along
with pragma Inline.
(Set_Is_Expanded_Contract): New routine
along with pragma Inline.
* gcc-interface/Make-lang.in: Add entry for contracts.o
2015-10-23 Bob Duff <duff@adacore.com>
* bindgen.adb, init.c, opt.ads, switch-b.adb: Implement new -Ea and
-Es switches.
* switch-b.ads: Minor comment fix.
* bindusg.adb: Document new -Ea and -Es switches.
* s-exctra.ads: Use -Es instead of -E.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229253 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sinfo.ads')
-rw-r--r-- | gcc/ada/sinfo.ads | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index 218f4bcd3c8..5f2f0920eaf 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -1542,6 +1542,10 @@ package Sinfo is -- is called in a dispatching context. Used to prevent a formal/actual -- mismatch when the call is rewritten as a dispatching call. + -- Is_Expanded_Contract (Flag1-Sem) + -- Present in N_Contract nodes. Set if the contract has already undergone + -- expansion activities. + -- Is_Asynchronous_Call_Block (Flag7-Sem) -- A flag set in a Block_Statement node to indicate that it is the -- expansion of an asynchronous entry call. Such a block needs cleanup @@ -7564,6 +7568,7 @@ package Sinfo is -- Pre_Post_Conditions (Node1-Sem) (set to Empty if none) -- Contract_Test_Cases (Node2-Sem) (set to Empty if none) -- Classifications (Node3-Sem) (set to Empty if none) + -- Is_Expanded_Contract (Flag1-Sem) -- Pre_Post_Conditions contains a collection of pragmas that correspond -- to pre- and postconditions associated with an entry or a subprogram @@ -7592,9 +7597,11 @@ package Sinfo is -- Abstract_States -- Async_Readers -- Async_Writers + -- Constant_After_Elaboration -- Depends -- Effective_Reads -- Effective_Writes + -- Extensions_Visible -- Global -- Initial_Condition -- Initializes @@ -7602,6 +7609,7 @@ package Sinfo is -- Refined_Depends -- Refined_Global -- Refined_States + -- Volatile_Function -- The ordering is in LIFO fashion. ------------------- @@ -9322,6 +9330,9 @@ package Sinfo is function Is_Expanded_Build_In_Place_Call (N : Node_Id) return Boolean; -- Flag11 + function Is_Expanded_Contract + (N : Node_Id) return Boolean; -- Flag1 + function Is_Finalization_Wrapper (N : Node_Id) return Boolean; -- Flag9 @@ -10348,6 +10359,9 @@ package Sinfo is procedure Set_Is_Expanded_Build_In_Place_Call (N : Node_Id; Val : Boolean := True); -- Flag11 + procedure Set_Is_Expanded_Contract + (N : Node_Id; Val : Boolean := True); -- Flag1 + procedure Set_Is_Finalization_Wrapper (N : Node_Id; Val : Boolean := True); -- Flag9 @@ -12748,6 +12762,7 @@ package Sinfo is pragma Inline (Is_Elsif); pragma Inline (Is_Entry_Barrier_Function); pragma Inline (Is_Expanded_Build_In_Place_Call); + pragma Inline (Is_Expanded_Contract); pragma Inline (Is_Finalization_Wrapper); pragma Inline (Is_Folded_In_Parser); pragma Inline (Is_Generic_Contract_Pragma); @@ -13085,6 +13100,7 @@ package Sinfo is pragma Inline (Set_Is_Elsif); pragma Inline (Set_Is_Entry_Barrier_Function); pragma Inline (Set_Is_Expanded_Build_In_Place_Call); + pragma Inline (Set_Is_Expanded_Contract); pragma Inline (Set_Is_Finalization_Wrapper); pragma Inline (Set_Is_Folded_In_Parser); pragma Inline (Set_Is_Generic_Contract_Pragma); |