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>
* sem_ch8.adb (Attribute_Renaming): Treat 'Img as an attribute
......
......@@ -6,7 +6,7 @@
-- --
-- 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 --
-- GNAT. The copyright notice above, and the license provisions that follow --
......@@ -101,13 +101,13 @@ package Ada.Containers.Bounded_Priority_Queues is
protected type Queue
(Capacity : Count_Type := Default_Capacity;
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
entry Enqueue (New_Item : Queue_Interfaces.Element_Type);
overriding entry Enqueue (New_Item : Queue_Interfaces.Element_Type);
overriding
entry Dequeue (Element : out Queue_Interfaces.Element_Type);
overriding entry Dequeue (Element : out Queue_Interfaces.Element_Type);
-- The priority queue operation Dequeue_Only_High_Priority had been a
-- protected entry in early drafts of AI05-0159, but it was discovered
......@@ -116,22 +116,17 @@ package Ada.Containers.Bounded_Priority_Queues is
-- ARG meeting in Edinburgh (June 2011), with a different signature and
-- semantics.
not overriding
procedure Dequeue_Only_High_Priority
(At_Least : Queue_Priority;
Element : in out Queue_Interfaces.Element_Type;
Success : out Boolean);
overriding
function Current_Use return Count_Type;
overriding function Current_Use return Count_Type;
overriding
function Peak_Use return Count_Type;
overriding function Peak_Use return Count_Type;
private
List : Implementation.List_Type (Capacity);
end Queue;
end Ada.Containers.Bounded_Priority_Queues;
......@@ -6,7 +6,7 @@
-- --
-- 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 --
-- GNAT. The copyright notice above, and the license provisions that follow --
......@@ -83,24 +83,20 @@ package Ada.Containers.Bounded_Synchronized_Queues is
protected type Queue
(Capacity : Count_Type := Default_Capacity;
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
entry Enqueue (New_Item : Queue_Interfaces.Element_Type);
overriding entry Enqueue (New_Item : Queue_Interfaces.Element_Type);
overriding
entry Dequeue (Element : out Queue_Interfaces.Element_Type);
overriding entry Dequeue (Element : out Queue_Interfaces.Element_Type);
overriding
function Current_Use return Count_Type;
overriding function Current_Use return Count_Type;
overriding
function Peak_Use return Count_Type;
overriding function Peak_Use return Count_Type;
private
List : Implementation.List_Type (Capacity);
end Queue;
end Ada.Containers.Bounded_Synchronized_Queues;
......@@ -6,7 +6,7 @@
-- --
-- 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 --
-- GNAT. The copyright notice above, and the license provisions that follow --
......@@ -94,19 +94,18 @@ package Ada.Containers.Unbounded_Priority_Queues is
Max_Length : Count_Type := 0;
end record;
overriding
procedure Finalize (List : in out List_Type);
overriding procedure Finalize (List : in out List_Type);
end Implementation;
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
entry Enqueue (New_Item : Queue_Interfaces.Element_Type);
overriding entry Enqueue (New_Item : Queue_Interfaces.Element_Type);
overriding
entry Dequeue (Element : out Queue_Interfaces.Element_Type);
overriding entry Dequeue (Element : out Queue_Interfaces.Element_Type);
-- The priority queue operation Dequeue_Only_High_Priority had been a
-- protected entry in early drafts of AI05-0159, but it was discovered
......@@ -115,22 +114,17 @@ package Ada.Containers.Unbounded_Priority_Queues is
-- ARG meeting in Edinburgh (June 2011), with a different signature and
-- semantics.
not overriding
procedure Dequeue_Only_High_Priority
(At_Least : Queue_Priority;
Element : in out Queue_Interfaces.Element_Type;
Success : out Boolean);
overriding
function Current_Use return Count_Type;
overriding function Current_Use return Count_Type;
overriding
function Peak_Use return Count_Type;
overriding function Peak_Use return Count_Type;
private
List : Implementation.List_Type;
end Queue;
end Ada.Containers.Unbounded_Priority_Queues;
......@@ -6,7 +6,7 @@
-- --
-- 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 --
-- GNAT. The copyright notice above, and the license provisions that follow --
......@@ -80,30 +80,26 @@ package Ada.Containers.Unbounded_Synchronized_Queues is
Max_Length : Count_Type := 0;
end record;
overriding
procedure Finalize (List : in out List_Type);
overriding procedure Finalize (List : in out List_Type);
end Implementation;
protected type Queue (Ceiling : System.Any_Priority := Default_Ceiling)
with Priority => Ceiling is new Queue_Interfaces.Queue with
protected type Queue
(Ceiling : System.Any_Priority := Default_Ceiling)
with
Priority => Ceiling
is new Queue_Interfaces.Queue with
overriding
entry Enqueue (New_Item : Queue_Interfaces.Element_Type);
overriding entry Enqueue (New_Item : Queue_Interfaces.Element_Type);
overriding
entry Dequeue (Element : out Queue_Interfaces.Element_Type);
overriding entry Dequeue (Element : out Queue_Interfaces.Element_Type);
overriding
function Current_Use return Count_Type;
overriding function Current_Use return Count_Type;
overriding
function Peak_Use return Count_Type;
overriding function Peak_Use return Count_Type;
private
List : Implementation.List_Type;
end Queue;
end Ada.Containers.Unbounded_Synchronized_Queues;
......@@ -8040,11 +8040,11 @@ package body Exp_Util is
Par : Node_Id;
begin
-- Locate an enclosing case or if expression. Note: these constructs can
-- get expanded into Expression_With_Actions, hence the need to test
-- using the original node.
-- Locate an enclosing case or if expression. Note that these constructs
-- can be expanded into Expression_With_Actions, hence the test of the
-- original node.
Par := N;
Par := Parent (N);
while Present (Par) loop
if Nkind_In (Original_Node (Par), N_Case_Expression,
N_If_Expression)
......
......@@ -6,7 +6,7 @@
-- --
-- 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 --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -256,8 +256,7 @@ package System.Interrupts is
(Object : access Static_Interrupt_Protection) return Boolean;
-- Returns True
overriding
procedure Finalize (Object : in out Static_Interrupt_Protection);
overriding procedure Finalize (Object : in out Static_Interrupt_Protection);
-- Restore previous handlers as required by C.3.1(12) then call
-- 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