Commit 57ae790f by Hristian Kirtchev Committed by Arnaud Charlet

2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>

	* einfo.adb Node36 is now used as Anonymous_Master. Flag253
	is now unused.
	(Anonymous_Master): New routine.
	(Has_Anonymous_Master): Removed.
	(Set_Anonymous_Master): New routine.
	(Set_Has_Anonymous_Master): Removed.
	(Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
	(Write_Field36_Name): Add output for Anonymous_Master.
	* einfo.ads Add new attribute Anonymous_Master along with
	occurrences in nodes. Remove attribute Has_Anonymous_Master along
	with occurrences in nodes.
	(Anonymous_Master): New routine along with pragma Inline.
	(Has_Anonymous_Master): Removed along with pragma Inline.
	(Set_Anonymous_Master): New routine along with pragma Inline.
	(Set_Has_Anonymous_Master): Removed along with pragma Inline.
	* exp_ch4.adb (Create_Anonymous_Master): New routine.
	(Current_Anonymous_Master): Reimplemented.

From-SVN: r223550
parent a79cdb2c
2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb Node36 is now used as Anonymous_Master. Flag253
is now unused.
(Anonymous_Master): New routine.
(Has_Anonymous_Master): Removed.
(Set_Anonymous_Master): New routine.
(Set_Has_Anonymous_Master): Removed.
(Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
(Write_Field36_Name): Add output for Anonymous_Master.
* einfo.ads Add new attribute Anonymous_Master along with
occurrences in nodes. Remove attribute Has_Anonymous_Master along
with occurrences in nodes.
(Anonymous_Master): New routine along with pragma Inline.
(Has_Anonymous_Master): Removed along with pragma Inline.
(Set_Anonymous_Master): New routine along with pragma Inline.
(Set_Has_Anonymous_Master): Removed along with pragma Inline.
* exp_ch4.adb (Create_Anonymous_Master): New routine.
(Current_Anonymous_Master): Reimplemented.
2015-05-22 Bob Duff <duff@adacore.com> 2015-05-22 Bob Duff <duff@adacore.com>
* freeze.adb (Freeze_Profile): Suppress warning if imported * freeze.adb (Freeze_Profile): Suppress warning if imported
......
...@@ -264,7 +264,8 @@ package body Einfo is ...@@ -264,7 +264,8 @@ package body Einfo is
-- Import_Pragma Node35 -- Import_Pragma Node35
-- (unused) Node36 -- Anonymous_Master Node36
-- (unused) Node38 -- (unused) Node38
-- (unused) Node39 -- (unused) Node39
-- (unused) Node40 -- (unused) Node40
...@@ -556,7 +557,6 @@ package body Einfo is ...@@ -556,7 +557,6 @@ package body Einfo is
-- Has_Implicit_Dereference Flag251 -- Has_Implicit_Dereference Flag251
-- Is_Processed_Transient Flag252 -- Is_Processed_Transient Flag252
-- Has_Anonymous_Master Flag253
-- Is_Implementation_Defined Flag254 -- Is_Implementation_Defined Flag254
-- Is_Predicate_Function Flag255 -- Is_Predicate_Function Flag255
-- Is_Predicate_Function_M Flag256 -- Is_Predicate_Function_M Flag256
...@@ -594,6 +594,7 @@ package body Einfo is ...@@ -594,6 +594,7 @@ package body Einfo is
-- Has_Volatile_Full_Access Flag285 -- Has_Volatile_Full_Access Flag285
-- Needs_Typedef Flag286 -- Needs_Typedef Flag286
-- (unused) Flag253
-- (unused) Flag287 -- (unused) Flag287
-- (unused) Flag288 -- (unused) Flag288
-- (unused) Flag289 -- (unused) Flag289
...@@ -753,6 +754,12 @@ package body Einfo is ...@@ -753,6 +754,12 @@ package body Einfo is
return Uint14 (Id); return Uint14 (Id);
end Alignment; end Alignment;
function Anonymous_Master (Id : E) return E is
begin
pragma Assert (Ekind_In (Id, E_Function, E_Package, E_Procedure));
return Node36 (Id);
end Anonymous_Master;
function Associated_Entity (Id : E) return E is function Associated_Entity (Id : E) return E is
begin begin
return Node37 (Id); return Node37 (Id);
...@@ -1375,13 +1382,6 @@ package body Einfo is ...@@ -1375,13 +1382,6 @@ package body Einfo is
return Flag79 (Id); return Flag79 (Id);
end Has_All_Calls_Remote; end Has_All_Calls_Remote;
function Has_Anonymous_Master (Id : E) return B is
begin
pragma Assert
(Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
return Flag253 (Id);
end Has_Anonymous_Master;
function Has_Atomic_Components (Id : E) return B is function Has_Atomic_Components (Id : E) return B is
begin begin
return Flag86 (Implementation_Base_Type (Id)); return Flag86 (Implementation_Base_Type (Id));
...@@ -3576,6 +3576,12 @@ package body Einfo is ...@@ -3576,6 +3576,12 @@ package body Einfo is
Set_Elist16 (Id, V); Set_Elist16 (Id, V);
end Set_Access_Disp_Table; end Set_Access_Disp_Table;
procedure Set_Anonymous_Master (Id : E; V : E) is
begin
pragma Assert (Ekind_In (Id, E_Function, E_Package, E_Procedure));
Set_Node36 (Id, V);
end Set_Anonymous_Master;
procedure Set_Associated_Entity (Id : E; V : E) is procedure Set_Associated_Entity (Id : E; V : E) is
begin begin
Set_Node37 (Id, V); Set_Node37 (Id, V);
...@@ -4246,13 +4252,6 @@ package body Einfo is ...@@ -4246,13 +4252,6 @@ package body Einfo is
Set_Flag79 (Id, V); Set_Flag79 (Id, V);
end Set_Has_All_Calls_Remote; end Set_Has_All_Calls_Remote;
procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
begin
pragma Assert
(Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
Set_Flag253 (Id, V);
end Set_Has_Anonymous_Master;
procedure Set_Has_Atomic_Components (Id : E; V : B := True) is procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
begin begin
pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id)); pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
...@@ -8634,7 +8633,6 @@ package body Einfo is ...@@ -8634,7 +8633,6 @@ package body Einfo is
W ("Has_Aliased_Components", Flag135 (Id)); W ("Has_Aliased_Components", Flag135 (Id));
W ("Has_Alignment_Clause", Flag46 (Id)); W ("Has_Alignment_Clause", Flag46 (Id));
W ("Has_All_Calls_Remote", Flag79 (Id)); W ("Has_All_Calls_Remote", Flag79 (Id));
W ("Has_Anonymous_Master", Flag253 (Id));
W ("Has_Atomic_Components", Flag86 (Id)); W ("Has_Atomic_Components", Flag86 (Id));
W ("Has_Biased_Representation", Flag139 (Id)); W ("Has_Biased_Representation", Flag139 (Id));
W ("Has_Completion", Flag26 (Id)); W ("Has_Completion", Flag26 (Id));
...@@ -10121,6 +10119,12 @@ package body Einfo is ...@@ -10121,6 +10119,12 @@ package body Einfo is
procedure Write_Field36_Name (Id : Entity_Id) is procedure Write_Field36_Name (Id : Entity_Id) is
begin begin
case Ekind (Id) is case Ekind (Id) is
when E_Function |
E_Operator |
E_Package |
E_Procedure =>
Write_Str ("Anonymous_Master");
when others => when others =>
Write_Str ("Field36??"); Write_Str ("Field36??");
end case; end case;
......
...@@ -436,6 +436,12 @@ package Einfo is ...@@ -436,6 +436,12 @@ package Einfo is
-- definition clause with an (obsolescent) mod clause is converted -- definition clause with an (obsolescent) mod clause is converted
-- into an attribute definition clause for this purpose. -- into an attribute definition clause for this purpose.
-- Anonymous_Master (Node36)
-- Defined in the entities of non-generic subprogram and package units.
-- Contains the entity of a special heterogeneous finalization master
-- that services most anonymous access-to-controlled allocations that
-- occur within the unit.
-- Associated_Entity (Node37) -- Associated_Entity (Node37)
-- Defined in all entities. This field is similar to Associated_Node, but -- Defined in all entities. This field is similar to Associated_Node, but
-- applied to entities. The attribute links an entity from the generic -- applied to entities. The attribute links an entity from the generic
...@@ -1423,13 +1429,6 @@ package Einfo is ...@@ -1423,13 +1429,6 @@ package Einfo is
-- entities, so the flag Is_Remote_Call_Interface will always be set if -- entities, so the flag Is_Remote_Call_Interface will always be set if
-- this flag is set. -- this flag is set.
-- Has_Anonymous_Master (Flag253)
-- Defined in units (top-level functions and procedures, library-level
-- packages). Set if the associated unit contains a heterogeneous
-- finalization master. The master's name is of the form <unit>AM and it
-- services anonymous access-to-controlled types with an undetermined
-- lifetime.
-- Has_Atomic_Components (Flag86) [implementation base type only] -- Has_Atomic_Components (Flag86) [implementation base type only]
-- Defined in all types and objects. Set only for an array type or -- Defined in all types and objects. Set only for an array type or
-- an array object if a valid pragma Atomic_Components applies to the -- an array object if a valid pragma Atomic_Components applies to the
...@@ -5833,6 +5832,7 @@ package Einfo is ...@@ -5833,6 +5832,7 @@ package Einfo is
-- Linker_Section_Pragma (Node33) -- Linker_Section_Pragma (Node33)
-- Contract (Node34) -- Contract (Node34)
-- Import_Pragma (Node35) (non-generic case only) -- Import_Pragma (Node35) (non-generic case only)
-- Anonymous_Master (Node36) (non-generic case only)
-- Body_Needed_For_SAL (Flag40) -- Body_Needed_For_SAL (Flag40)
-- Contains_Ignored_Ghost_Code (Flag279) -- Contains_Ignored_Ghost_Code (Flag279)
-- Default_Expressions_Processed (Flag108) -- Default_Expressions_Processed (Flag108)
...@@ -5840,7 +5840,6 @@ package Einfo is ...@@ -5840,7 +5840,6 @@ package Einfo is
-- Delay_Subprogram_Descriptors (Flag50) -- Delay_Subprogram_Descriptors (Flag50)
-- Discard_Names (Flag88) -- Discard_Names (Flag88)
-- Elaboration_Entity_Required (Flag174) -- Elaboration_Entity_Required (Flag174)
-- Has_Anonymous_Master (Flag253)
-- Has_Completion (Flag26) -- Has_Completion (Flag26)
-- Has_Controlling_Result (Flag98) -- Has_Controlling_Result (Flag98)
-- Has_Expanded_Contract (Flag240) (non-generic case only) -- Has_Expanded_Contract (Flag240) (non-generic case only)
...@@ -6050,6 +6049,7 @@ package Einfo is ...@@ -6050,6 +6049,7 @@ package Einfo is
-- SPARK_Pragma (Node32) -- SPARK_Pragma (Node32)
-- SPARK_Aux_Pragma (Node33) -- SPARK_Aux_Pragma (Node33)
-- Contract (Node34) -- Contract (Node34)
-- Anonymous_Master (Node36) (non-generic case only)
-- Delay_Subprogram_Descriptors (Flag50) -- Delay_Subprogram_Descriptors (Flag50)
-- Body_Needed_For_SAL (Flag40) -- Body_Needed_For_SAL (Flag40)
-- Contains_Ignored_Ghost_Code (Flag279) -- Contains_Ignored_Ghost_Code (Flag279)
...@@ -6058,7 +6058,6 @@ package Einfo is ...@@ -6058,7 +6058,6 @@ package Einfo is
-- Elaborate_Body_Desirable (Flag210) (non-generic case only) -- Elaborate_Body_Desirable (Flag210) (non-generic case only)
-- From_Limited_With (Flag159) -- From_Limited_With (Flag159)
-- Has_All_Calls_Remote (Flag79) -- Has_All_Calls_Remote (Flag79)
-- Has_Anonymous_Master (Flag253)
-- Has_Completion (Flag26) -- Has_Completion (Flag26)
-- Has_Forward_Instantiation (Flag175) -- Has_Forward_Instantiation (Flag175)
-- Has_Master_Entity (Flag21) -- Has_Master_Entity (Flag21)
...@@ -6089,7 +6088,6 @@ package Einfo is ...@@ -6089,7 +6088,6 @@ package Einfo is
-- Contract (Node34) -- Contract (Node34)
-- Contains_Ignored_Ghost_Code (Flag279) -- Contains_Ignored_Ghost_Code (Flag279)
-- Delay_Subprogram_Descriptors (Flag50) -- Delay_Subprogram_Descriptors (Flag50)
-- Has_Anonymous_Master (Flag253)
-- SPARK_Aux_Pragma_Inherited (Flag266) -- SPARK_Aux_Pragma_Inherited (Flag266)
-- SPARK_Pragma_Inherited (Flag265) -- SPARK_Pragma_Inherited (Flag265)
-- Scope_Depth (synth) -- Scope_Depth (synth)
...@@ -6139,6 +6137,7 @@ package Einfo is ...@@ -6139,6 +6137,7 @@ package Einfo is
-- Linker_Section_Pragma (Node33) -- Linker_Section_Pragma (Node33)
-- Contract (Node34) -- Contract (Node34)
-- Import_Pragma (Node35) (non-generic case only) -- Import_Pragma (Node35) (non-generic case only)
-- Anonymous_Master (Node36) (non-generic case only)
-- Body_Needed_For_SAL (Flag40) -- Body_Needed_For_SAL (Flag40)
-- Contains_Ignored_Ghost_Code (Flag279) -- Contains_Ignored_Ghost_Code (Flag279)
-- Delay_Cleanups (Flag114) -- Delay_Cleanups (Flag114)
...@@ -6148,7 +6147,6 @@ package Einfo is ...@@ -6148,7 +6147,6 @@ package Einfo is
-- Delay_Cleanups (Flag114) -- Delay_Cleanups (Flag114)
-- Delay_Subprogram_Descriptors (Flag50) -- Delay_Subprogram_Descriptors (Flag50)
-- Discard_Names (Flag88) -- Discard_Names (Flag88)
-- Has_Anonymous_Master (Flag253)
-- Has_Completion (Flag26) -- Has_Completion (Flag26)
-- Has_Expanded_Contract (Flag240) (non-generic case only) -- Has_Expanded_Contract (Flag240) (non-generic case only)
-- Has_Invariants (Flag232) -- Has_Invariants (Flag232)
...@@ -6647,6 +6645,7 @@ package Einfo is ...@@ -6647,6 +6645,7 @@ package Einfo is
function Address_Taken (Id : E) return B; function Address_Taken (Id : E) return B;
function Alias (Id : E) return E; function Alias (Id : E) return E;
function Alignment (Id : E) return U; function Alignment (Id : E) return U;
function Anonymous_Master (Id : E) return E;
function Associated_Entity (Id : E) return E; function Associated_Entity (Id : E) return E;
function Associated_Formal_Package (Id : E) return E; function Associated_Formal_Package (Id : E) return E;
function Associated_Node_For_Itype (Id : E) return N; function Associated_Node_For_Itype (Id : E) return N;
...@@ -6750,7 +6749,6 @@ package Einfo is ...@@ -6750,7 +6749,6 @@ package Einfo is
function Has_Aliased_Components (Id : E) return B; function Has_Aliased_Components (Id : E) return B;
function Has_Alignment_Clause (Id : E) return B; function Has_Alignment_Clause (Id : E) return B;
function Has_All_Calls_Remote (Id : E) return B; function Has_All_Calls_Remote (Id : E) return B;
function Has_Anonymous_Master (Id : E) return B;
function Has_Atomic_Components (Id : E) return B; function Has_Atomic_Components (Id : E) return B;
function Has_Biased_Representation (Id : E) return B; function Has_Biased_Representation (Id : E) return B;
function Has_Completion (Id : E) return B; function Has_Completion (Id : E) return B;
...@@ -7301,6 +7299,7 @@ package Einfo is ...@@ -7301,6 +7299,7 @@ package Einfo is
procedure Set_Address_Taken (Id : E; V : B := True); procedure Set_Address_Taken (Id : E; V : B := True);
procedure Set_Alias (Id : E; V : E); procedure Set_Alias (Id : E; V : E);
procedure Set_Alignment (Id : E; V : U); procedure Set_Alignment (Id : E; V : U);
procedure Set_Anonymous_Master (Id : E; V : E);
procedure Set_Associated_Entity (Id : E; V : E); procedure Set_Associated_Entity (Id : E; V : E);
procedure Set_Associated_Formal_Package (Id : E; V : E); procedure Set_Associated_Formal_Package (Id : E; V : E);
procedure Set_Associated_Node_For_Itype (Id : E; V : N); procedure Set_Associated_Node_For_Itype (Id : E; V : N);
...@@ -7403,7 +7402,6 @@ package Einfo is ...@@ -7403,7 +7402,6 @@ package Einfo is
procedure Set_Has_Aliased_Components (Id : E; V : B := True); procedure Set_Has_Aliased_Components (Id : E; V : B := True);
procedure Set_Has_Alignment_Clause (Id : E; V : B := True); procedure Set_Has_Alignment_Clause (Id : E; V : B := True);
procedure Set_Has_All_Calls_Remote (Id : E; V : B := True); procedure Set_Has_All_Calls_Remote (Id : E; V : B := True);
procedure Set_Has_Anonymous_Master (Id : E; V : B := True);
procedure Set_Has_Atomic_Components (Id : E; V : B := True); procedure Set_Has_Atomic_Components (Id : E; V : B := True);
procedure Set_Has_Biased_Representation (Id : E; V : B := True); procedure Set_Has_Biased_Representation (Id : E; V : B := True);
procedure Set_Has_Completion (Id : E; V : B := True); procedure Set_Has_Completion (Id : E; V : B := True);
...@@ -8076,6 +8074,7 @@ package Einfo is ...@@ -8076,6 +8074,7 @@ package Einfo is
pragma Inline (Address_Taken); pragma Inline (Address_Taken);
pragma Inline (Alias); pragma Inline (Alias);
pragma Inline (Alignment); pragma Inline (Alignment);
pragma Inline (Anonymous_Master);
pragma Inline (Associated_Entity); pragma Inline (Associated_Entity);
pragma Inline (Associated_Formal_Package); pragma Inline (Associated_Formal_Package);
pragma Inline (Associated_Node_For_Itype); pragma Inline (Associated_Node_For_Itype);
...@@ -8176,7 +8175,6 @@ package Einfo is ...@@ -8176,7 +8175,6 @@ package Einfo is
pragma Inline (Has_Aliased_Components); pragma Inline (Has_Aliased_Components);
pragma Inline (Has_Alignment_Clause); pragma Inline (Has_Alignment_Clause);
pragma Inline (Has_All_Calls_Remote); pragma Inline (Has_All_Calls_Remote);
pragma Inline (Has_Anonymous_Master);
pragma Inline (Has_Atomic_Components); pragma Inline (Has_Atomic_Components);
pragma Inline (Has_Biased_Representation); pragma Inline (Has_Biased_Representation);
pragma Inline (Has_Completion); pragma Inline (Has_Completion);
...@@ -8577,6 +8575,7 @@ package Einfo is ...@@ -8577,6 +8575,7 @@ package Einfo is
pragma Inline (Set_Address_Taken); pragma Inline (Set_Address_Taken);
pragma Inline (Set_Alias); pragma Inline (Set_Alias);
pragma Inline (Set_Alignment); pragma Inline (Set_Alignment);
pragma Inline (Set_Anonymous_Master);
pragma Inline (Set_Associated_Entity); pragma Inline (Set_Associated_Entity);
pragma Inline (Set_Associated_Formal_Package); pragma Inline (Set_Associated_Formal_Package);
pragma Inline (Set_Associated_Node_For_Itype); pragma Inline (Set_Associated_Node_For_Itype);
...@@ -8675,7 +8674,6 @@ package Einfo is ...@@ -8675,7 +8674,6 @@ package Einfo is
pragma Inline (Set_Has_Aliased_Components); pragma Inline (Set_Has_Aliased_Components);
pragma Inline (Set_Has_Alignment_Clause); pragma Inline (Set_Has_Alignment_Clause);
pragma Inline (Set_Has_All_Calls_Remote); pragma Inline (Set_Has_All_Calls_Remote);
pragma Inline (Set_Has_Anonymous_Master);
pragma Inline (Set_Has_Atomic_Components); pragma Inline (Set_Has_Atomic_Components);
pragma Inline (Set_Has_Biased_Representation); pragma Inline (Set_Has_Biased_Representation);
pragma Inline (Set_Has_Completion); pragma Inline (Set_Has_Completion);
......
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