Commit b2c28399 by Arnaud Charlet

[multiple changes]

2013-07-08  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch4.adb (Create_Alternative): Removed.
	(Expand_N_If_Expression): Remove constant
	In_Case_Or_If_Expression. Add local variable
	Ptr_Typ. Inspect the "then" and "else" action lists
	for transient controlled objects and generate code to
	finalize them.	(Is_Controlled_Function_Call): Removed.
	(Process_Action): Update the comment on usage. Update the call
	to Process_Transient_Object. There is no need to continue the
	traversal of the object itself.
	(Process_Actions): New routine.
	(Process_Transient_Object): Moved to the top level of Exp_Ch4. Add
	a new formal and update the related comment on usage.
	* exp_util.adb (Within_Case_Or_If_Expression): Start the search
	from the parent of the node.

2013-07-08  Robert Dewar  <dewar@adacore.com>

	* a-cusyqu.ads, a-cbprqu.ads, s-interr.ads, a-cuprqu.ads,
	a-cbsyqu.ads: Minor reformatting (proper formatting of overriding).

From-SVN: r200759
parent a530b8bb
2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Create_Alternative): Removed.
(Expand_N_If_Expression): Remove constant
In_Case_Or_If_Expression. Add local variable
Ptr_Typ. Inspect the "then" and "else" action lists
for transient controlled objects and generate code to
finalize them. (Is_Controlled_Function_Call): Removed.
(Process_Action): Update the comment on usage. Update the call
to Process_Transient_Object. There is no need to continue the
traversal of the object itself.
(Process_Actions): New routine.
(Process_Transient_Object): Moved to the top level of Exp_Ch4. Add
a new formal and update the related comment on usage.
* exp_util.adb (Within_Case_Or_If_Expression): Start the search
from the parent of the node.
2013-07-08 Robert Dewar <dewar@adacore.com>
* a-cusyqu.ads, a-cbprqu.ads, s-interr.ads, a-cuprqu.ads,
a-cbsyqu.ads: Minor reformatting (proper formatting of overriding).
2013-07-08 Ed Schonberg <schonberg@adacore.com> 2013-07-08 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Attribute_Renaming): Treat 'Img as an attribute * sem_ch8.adb (Attribute_Renaming): Treat 'Img as an attribute
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2011, Free Software Foundation, Inc. -- -- Copyright (C) 2011-2013, Free Software Foundation, Inc. --
-- -- -- --
-- This specification is derived from the Ada Reference Manual for use with -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. The copyright notice above, and the license provisions that follow --
...@@ -101,13 +101,13 @@ package Ada.Containers.Bounded_Priority_Queues is ...@@ -101,13 +101,13 @@ package Ada.Containers.Bounded_Priority_Queues is
protected type Queue protected type Queue
(Capacity : Count_Type := Default_Capacity; (Capacity : Count_Type := Default_Capacity;
Ceiling : System.Any_Priority := Default_Ceiling) Ceiling : System.Any_Priority := Default_Ceiling)
with Priority => Ceiling is new Queue_Interfaces.Queue with with
Priority => Ceiling
is new Queue_Interfaces.Queue with
overriding overriding entry Enqueue (New_Item : Queue_Interfaces.Element_Type);
entry Enqueue (New_Item : Queue_Interfaces.Element_Type);
overriding overriding entry Dequeue (Element : out Queue_Interfaces.Element_Type);
entry Dequeue (Element : out Queue_Interfaces.Element_Type);
-- The priority queue operation Dequeue_Only_High_Priority had been a -- The priority queue operation Dequeue_Only_High_Priority had been a
-- protected entry in early drafts of AI05-0159, but it was discovered -- protected entry in early drafts of AI05-0159, but it was discovered
...@@ -116,22 +116,17 @@ package Ada.Containers.Bounded_Priority_Queues is ...@@ -116,22 +116,17 @@ package Ada.Containers.Bounded_Priority_Queues is
-- ARG meeting in Edinburgh (June 2011), with a different signature and -- ARG meeting in Edinburgh (June 2011), with a different signature and
-- semantics. -- semantics.
not overriding
procedure Dequeue_Only_High_Priority procedure Dequeue_Only_High_Priority
(At_Least : Queue_Priority; (At_Least : Queue_Priority;
Element : in out Queue_Interfaces.Element_Type; Element : in out Queue_Interfaces.Element_Type;
Success : out Boolean); Success : out Boolean);
overriding overriding function Current_Use return Count_Type;
function Current_Use return Count_Type;
overriding overriding function Peak_Use return Count_Type;
function Peak_Use return Count_Type;
private private
List : Implementation.List_Type (Capacity); List : Implementation.List_Type (Capacity);
end Queue; end Queue;
end Ada.Containers.Bounded_Priority_Queues; end Ada.Containers.Bounded_Priority_Queues;
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2011, Free Software Foundation, Inc. -- -- Copyright (C) 2011-2013, Free Software Foundation, Inc. --
-- -- -- --
-- This specification is derived from the Ada Reference Manual for use with -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. The copyright notice above, and the license provisions that follow --
...@@ -83,24 +83,20 @@ package Ada.Containers.Bounded_Synchronized_Queues is ...@@ -83,24 +83,20 @@ package Ada.Containers.Bounded_Synchronized_Queues is
protected type Queue protected type Queue
(Capacity : Count_Type := Default_Capacity; (Capacity : Count_Type := Default_Capacity;
Ceiling : System.Any_Priority := Default_Ceiling) Ceiling : System.Any_Priority := Default_Ceiling)
with Priority => Ceiling is new Queue_Interfaces.Queue with with
Priority => Ceiling
is new Queue_Interfaces.Queue with
overriding overriding entry Enqueue (New_Item : Queue_Interfaces.Element_Type);
entry Enqueue (New_Item : Queue_Interfaces.Element_Type);
overriding overriding entry Dequeue (Element : out Queue_Interfaces.Element_Type);
entry Dequeue (Element : out Queue_Interfaces.Element_Type);
overriding overriding function Current_Use return Count_Type;
function Current_Use return Count_Type;
overriding overriding function Peak_Use return Count_Type;
function Peak_Use return Count_Type;
private private
List : Implementation.List_Type (Capacity); List : Implementation.List_Type (Capacity);
end Queue; end Queue;
end Ada.Containers.Bounded_Synchronized_Queues; end Ada.Containers.Bounded_Synchronized_Queues;
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2011, Free Software Foundation, Inc. -- -- Copyright (C) 2011-2013, Free Software Foundation, Inc. --
-- -- -- --
-- This specification is derived from the Ada Reference Manual for use with -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. The copyright notice above, and the license provisions that follow --
...@@ -94,19 +94,18 @@ package Ada.Containers.Unbounded_Priority_Queues is ...@@ -94,19 +94,18 @@ package Ada.Containers.Unbounded_Priority_Queues is
Max_Length : Count_Type := 0; Max_Length : Count_Type := 0;
end record; end record;
overriding overriding procedure Finalize (List : in out List_Type);
procedure Finalize (List : in out List_Type);
end Implementation; end Implementation;
protected type Queue (Ceiling : System.Any_Priority := Default_Ceiling) protected type Queue (Ceiling : System.Any_Priority := Default_Ceiling)
with Priority => Ceiling is new Queue_Interfaces.Queue with with
Priority => Ceiling
is new Queue_Interfaces.Queue with
overriding overriding entry Enqueue (New_Item : Queue_Interfaces.Element_Type);
entry Enqueue (New_Item : Queue_Interfaces.Element_Type);
overriding overriding entry Dequeue (Element : out Queue_Interfaces.Element_Type);
entry Dequeue (Element : out Queue_Interfaces.Element_Type);
-- The priority queue operation Dequeue_Only_High_Priority had been a -- The priority queue operation Dequeue_Only_High_Priority had been a
-- protected entry in early drafts of AI05-0159, but it was discovered -- protected entry in early drafts of AI05-0159, but it was discovered
...@@ -115,22 +114,17 @@ package Ada.Containers.Unbounded_Priority_Queues is ...@@ -115,22 +114,17 @@ package Ada.Containers.Unbounded_Priority_Queues is
-- ARG meeting in Edinburgh (June 2011), with a different signature and -- ARG meeting in Edinburgh (June 2011), with a different signature and
-- semantics. -- semantics.
not overriding
procedure Dequeue_Only_High_Priority procedure Dequeue_Only_High_Priority
(At_Least : Queue_Priority; (At_Least : Queue_Priority;
Element : in out Queue_Interfaces.Element_Type; Element : in out Queue_Interfaces.Element_Type;
Success : out Boolean); Success : out Boolean);
overriding overriding function Current_Use return Count_Type;
function Current_Use return Count_Type;
overriding overriding function Peak_Use return Count_Type;
function Peak_Use return Count_Type;
private private
List : Implementation.List_Type; List : Implementation.List_Type;
end Queue; end Queue;
end Ada.Containers.Unbounded_Priority_Queues; end Ada.Containers.Unbounded_Priority_Queues;
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2011, Free Software Foundation, Inc. -- -- Copyright (C) 2011-2013, Free Software Foundation, Inc. --
-- -- -- --
-- This specification is derived from the Ada Reference Manual for use with -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. The copyright notice above, and the license provisions that follow --
...@@ -80,30 +80,26 @@ package Ada.Containers.Unbounded_Synchronized_Queues is ...@@ -80,30 +80,26 @@ package Ada.Containers.Unbounded_Synchronized_Queues is
Max_Length : Count_Type := 0; Max_Length : Count_Type := 0;
end record; end record;
overriding overriding procedure Finalize (List : in out List_Type);
procedure Finalize (List : in out List_Type);
end Implementation; end Implementation;
protected type Queue (Ceiling : System.Any_Priority := Default_Ceiling) protected type Queue
with Priority => Ceiling is new Queue_Interfaces.Queue with (Ceiling : System.Any_Priority := Default_Ceiling)
with
Priority => Ceiling
is new Queue_Interfaces.Queue with
overriding overriding entry Enqueue (New_Item : Queue_Interfaces.Element_Type);
entry Enqueue (New_Item : Queue_Interfaces.Element_Type);
overriding overriding entry Dequeue (Element : out Queue_Interfaces.Element_Type);
entry Dequeue (Element : out Queue_Interfaces.Element_Type);
overriding overriding function Current_Use return Count_Type;
function Current_Use return Count_Type;
overriding overriding function Peak_Use return Count_Type;
function Peak_Use return Count_Type;
private private
List : Implementation.List_Type; List : Implementation.List_Type;
end Queue; end Queue;
end Ada.Containers.Unbounded_Synchronized_Queues; end Ada.Containers.Unbounded_Synchronized_Queues;
...@@ -8040,11 +8040,11 @@ package body Exp_Util is ...@@ -8040,11 +8040,11 @@ package body Exp_Util is
Par : Node_Id; Par : Node_Id;
begin begin
-- Locate an enclosing case or if expression. Note: these constructs can -- Locate an enclosing case or if expression. Note that these constructs
-- get expanded into Expression_With_Actions, hence the need to test -- can be expanded into Expression_With_Actions, hence the test of the
-- using the original node. -- original node.
Par := N; Par := Parent (N);
while Present (Par) loop while Present (Par) loop
if Nkind_In (Original_Node (Par), N_Case_Expression, if Nkind_In (Original_Node (Par), N_Case_Expression,
N_If_Expression) N_If_Expression)
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -256,8 +256,7 @@ package System.Interrupts is ...@@ -256,8 +256,7 @@ package System.Interrupts is
(Object : access Static_Interrupt_Protection) return Boolean; (Object : access Static_Interrupt_Protection) return Boolean;
-- Returns True -- Returns True
overriding overriding procedure Finalize (Object : in out Static_Interrupt_Protection);
procedure Finalize (Object : in out Static_Interrupt_Protection);
-- Restore previous handlers as required by C.3.1(12) then call -- Restore previous handlers as required by C.3.1(12) then call
-- Finalize (Protection). -- Finalize (Protection).
......
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