Commit 13230c68 by Arnaud Charlet

[multiple changes]

2017-01-23  Eric Botcazou  <ebotcazou@adacore.com>

	* checks.adb: Minor fix in comment.

2017-01-23  Philippe Gil  <gil@adacore.com>

	* g-debpoo.adb (Do_Report) remove freed chunks from chunks
	count in Sort = Memory_Usage or Allocations_Count

2017-01-23  Justin Squirek  <squirek@adacore.com>

	* sem_ch3.adb: Code cleanup.

2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
	variables to the local variable section. Update the profile
	of various nested routine that previously had visibility
	of those globals. One the matching phase has completed,
	remove certain classes of clauses which are considered noise.
	(Check_Dependency_Clause): Properly detect a match between two
	'Result attributes. Update the various post-match cases to use
	Is_Already_Matched as this routine now automatically recognizes
	a previously matched 'Result attribute.
	(Is_Already_Matched): New routine.
	(Remove_Extra_Clauses): New routine.
	(Report_Extra_Clauses): Remove the detection of ... => null
	clauses as this is now done in Remove_Extra_Clauses.

From-SVN: r244782
parent 0d1e3cc9
2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
* checks.adb: Minor fix in comment.
2017-01-23 Philippe Gil <gil@adacore.com>
* g-debpoo.adb (Do_Report) remove freed chunks from chunks
count in Sort = Memory_Usage or Allocations_Count
2017-01-23 Justin Squirek <squirek@adacore.com>
* sem_ch3.adb: Code cleanup.
2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
variables to the local variable section. Update the profile
of various nested routine that previously had visibility
of those globals. One the matching phase has completed,
remove certain classes of clauses which are considered noise.
(Check_Dependency_Clause): Properly detect a match between two
'Result attributes. Update the various post-match cases to use
Is_Already_Matched as this routine now automatically recognizes
a previously matched 'Result attribute.
(Is_Already_Matched): New routine.
(Remove_Extra_Clauses): New routine.
(Report_Extra_Clauses): Remove the detection of ... => null
clauses as this is now done in Remove_Extra_Clauses.
2017-01-23 Ed Schonberg <schonberg@adacore.com> 2017-01-23 Ed Schonberg <schonberg@adacore.com>
* sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
......
...@@ -826,10 +826,10 @@ package body Checks is ...@@ -826,10 +826,10 @@ package body Checks is
-- Apply_Arithmetic_Overflow_Strict -- -- Apply_Arithmetic_Overflow_Strict --
-------------------------------------- --------------------------------------
-- This routine is called only if the type is an integer type, and a -- This routine is called only if the type is an integer type and an
-- software arithmetic overflow check may be needed for op (add, subtract, -- arithmetic overflow check may be needed for op (add, subtract, or
-- or multiply). This check is performed only if Software_Overflow_Checking -- multiply). This check is performed if Backend_Overflow_Checks_On_Target
-- is enabled and Do_Overflow_Check is set. In this case we expand the -- is not enabled and Do_Overflow_Check is set. In this case we expand the
-- operation into a more complex sequence of tests that ensures that -- operation into a more complex sequence of tests that ensures that
-- overflow is properly caught. -- overflow is properly caught.
......
...@@ -2028,14 +2028,23 @@ package body GNAT.Debug_Pools is ...@@ -2028,14 +2028,23 @@ package body GNAT.Debug_Pools is
P := Percent (100.0 * Float (Total) / Grand_Total); P := Percent (100.0 * Float (Total) / Grand_Total);
if Sort = Marked_Blocks then case Sort is
Put (P'Img & "%:" when Memory_Usage | Allocations_Count | All_Reports =>
& Max (M).Count'Img & " chunks /" declare
& Integer (Grand_Total)'Img & " at"); Count : constant Natural :=
else Max (M).Count - Max (M).Frees;
Put (P'Img & "%:" & Total'Img & " bytes in" begin
& Max (M).Count'Img & " chunks at"); Put (P'Img & "%:" & Total'Img & " bytes in"
end if; & Count'Img & " chunks at");
end;
when Sort_Total_Allocs =>
Put (P'Img & "%:" & Total'Img & " bytes in"
& Max (M).Count'Img & " chunks at");
when Marked_Blocks =>
Put (P'Img & "%:"
& Max (M).Count'Img & " chunks /"
& Integer (Grand_Total)'Img & " at");
end case;
end; end;
for J in Max (M).Traceback'Range loop for J in Max (M).Traceback'Range loop
......
...@@ -2634,10 +2634,12 @@ package body Sem_Ch3 is ...@@ -2634,10 +2634,12 @@ package body Sem_Ch3 is
elsif not Analyzed (Next_Decl) and then Is_Body (Next_Decl) then elsif not Analyzed (Next_Decl) and then Is_Body (Next_Decl) then
-- If there is an array type that uses a private type from an -- Check for an edge case that may cause premature freezing of a
-- enclosing package which is in the same scope as an expression -- private type.
-- function that is not a completion then we cannot freeze here.
-- So identify the case here and delay freezing. -- If there is an array type which uses a private type from an
-- enclosing package that is in the same scope as a non-completing
-- expression function then we cannot freeze here.
Ignore_Freezing := False; Ignore_Freezing := False;
...@@ -2646,9 +2648,9 @@ package body Sem_Ch3 is ...@@ -2646,9 +2648,9 @@ package body Sem_Ch3 is
and then not Is_Compilation_Unit (Current_Scope) and then not Is_Compilation_Unit (Current_Scope)
and then not Is_Generic_Instance (Current_Scope) and then not Is_Generic_Instance (Current_Scope)
then then
-- Loop through all entities in the current scope to identify -- Loop through all entities in the current scope to identify
-- an instance of the edge case outlined above. -- an instance of the edge-case outlined above and ignore
-- freezeing if it is detected.
declare declare
Curr : Entity_Id := First_Entity (Current_Scope); Curr : Entity_Id := First_Entity (Current_Scope);
...@@ -2691,7 +2693,8 @@ package body Sem_Ch3 is ...@@ -2691,7 +2693,8 @@ package body Sem_Ch3 is
-- ??? A cleaner approach may be possible and/or this solution -- ??? A cleaner approach may be possible and/or this solution
-- could be extended to general-purpose late primitives, TBD. -- could be extended to general-purpose late primitives, TBD.
if not ASIS_Mode and then not Body_Seen if not ASIS_Mode
and then not Body_Seen
and then not Is_Body (Decl) and then not Is_Body (Decl)
then then
Body_Seen := True; Body_Seen := True;
......
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