2013-04-11 Pascal Obry <obry@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Apr 2013 13:33:53 +0000 (13:33 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Apr 2013 13:33:53 +0000 (13:33 +0000)
* gnat_ugn.texi: Remove obsolete comment about DLL calling
convention.

2013-04-11  Javier Miranda  <miranda@adacore.com>

* exp_ch6.adb (Expand_Call): For the call to the target primitive
of an interface thunks do not compute the extra actuals; just
propagate the extra actuals received by the thunk.
* exp_disp.adb (Expand_Interface_Thunk): Decorate new attribute
Thunk_Entity.
* sem_ch6.adb (Create_Extra_Formals): Do not generate extra
formals in interface thunks whose target primitive has no extra
formals.

2013-04-11  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_prag.adb (Analyze_Pragma): Detect
a renaming by looking at the Renamed_Object attribute.
(Is_Renaming): Removed.

2013-04-11  Vincent Celier  <celier@adacore.com>

* prj-env.adb (Initialize_Default_Project_Path): Take
into account a project path file, specified by environment
variable GPR_PROJECT_PATH_FILE, before taking into account
GPR_PROJECT_PATH.
* projects.texi: Add documentation for GPR_PROJECT_PATH_FILE

2013-04-11  Ed Schonberg  <schonberg@adacore.com>

* a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
a-cfdlli.adb, a-cfdlli.ads, a-cborma.adb, a-cborma.ads, a-cidlli.adb,
a-cidlli.ads, a-ciormu.adb, a-ciormu.ads, a-cihase.adb, a-cihase.ads,
a-cohama.adb, a-cohama.ads, a-coorse.adb, a-coorse.ads, a-cbhama.adb,
a-cbhama.ads, a-cborse.adb, a-cborse.ads, a-ciorma.adb, a-cobove.adb,
a-ciorma.ads, a-cobove.ads, a-coormu.adb, a-coormu.ads, a-cohase.adb,
a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbhase.adb, a-cbhase.ads:
Move Iterator operations from body to private part of spec.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197797 138bc75d-0d04-0410-961f-82ee72b054a4

48 files changed:
gcc/ada/ChangeLog
gcc/ada/a-cbdlli.adb
gcc/ada/a-cbdlli.ads
gcc/ada/a-cbhama.adb
gcc/ada/a-cbhama.ads
gcc/ada/a-cbhase.adb
gcc/ada/a-cbhase.ads
gcc/ada/a-cborma.adb
gcc/ada/a-cborma.ads
gcc/ada/a-cborse.adb
gcc/ada/a-cborse.ads
gcc/ada/a-cdlili.adb
gcc/ada/a-cdlili.ads
gcc/ada/a-cfdlli.adb
gcc/ada/a-cfdlli.ads
gcc/ada/a-cidlli.adb
gcc/ada/a-cidlli.ads
gcc/ada/a-cihama.adb
gcc/ada/a-cihama.ads
gcc/ada/a-cihase.adb
gcc/ada/a-cihase.ads
gcc/ada/a-ciorma.adb
gcc/ada/a-ciorma.ads
gcc/ada/a-ciormu.adb
gcc/ada/a-ciormu.ads
gcc/ada/a-ciorse.adb
gcc/ada/a-ciorse.ads
gcc/ada/a-cobove.adb
gcc/ada/a-cobove.ads
gcc/ada/a-cohama.adb
gcc/ada/a-cohama.ads
gcc/ada/a-cohase.adb
gcc/ada/a-cohase.ads
gcc/ada/a-coinve.adb
gcc/ada/a-coinve.ads
gcc/ada/a-coorma.adb
gcc/ada/a-coorma.ads
gcc/ada/a-coormu.adb
gcc/ada/a-coormu.ads
gcc/ada/a-coorse.adb
gcc/ada/a-coorse.ads
gcc/ada/exp_ch6.adb
gcc/ada/exp_disp.adb
gcc/ada/gnat_ugn.texi
gcc/ada/prj-env.adb
gcc/ada/projects.texi
gcc/ada/sem_ch6.adb
gcc/ada/sem_prag.adb

index 86ad8e4..9628a88 100644 (file)
@@ -1,3 +1,45 @@
+2013-04-11  Pascal Obry  <obry@adacore.com>
+
+       * gnat_ugn.texi: Remove obsolete comment about DLL calling
+       convention.
+
+2013-04-11  Javier Miranda  <miranda@adacore.com>
+
+       * exp_ch6.adb (Expand_Call): For the call to the target primitive
+       of an interface thunks do not compute the extra actuals; just
+       propagate the extra actuals received by the thunk.
+       * exp_disp.adb (Expand_Interface_Thunk): Decorate new attribute
+       Thunk_Entity.
+       * sem_ch6.adb (Create_Extra_Formals): Do not generate extra
+       formals in interface thunks whose target primitive has no extra
+       formals.
+
+2013-04-11  Hristian Kirtchev  <kirtchev@adacore.com>
+
+       * sem_prag.adb (Analyze_Pragma): Detect
+       a renaming by looking at the Renamed_Object attribute.
+       (Is_Renaming): Removed.
+
+2013-04-11  Vincent Celier  <celier@adacore.com>
+
+       * prj-env.adb (Initialize_Default_Project_Path): Take
+       into account a project path file, specified by environment
+       variable GPR_PROJECT_PATH_FILE, before taking into account
+       GPR_PROJECT_PATH.
+       * projects.texi: Add documentation for GPR_PROJECT_PATH_FILE
+
+2013-04-11  Ed Schonberg  <schonberg@adacore.com>
+
+       * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
+       a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
+       a-cfdlli.adb, a-cfdlli.ads, a-cborma.adb, a-cborma.ads, a-cidlli.adb,
+       a-cidlli.ads, a-ciormu.adb, a-ciormu.ads, a-cihase.adb, a-cihase.ads,
+       a-cohama.adb, a-cohama.ads, a-coorse.adb, a-coorse.ads, a-cbhama.adb,
+       a-cbhama.ads, a-cborse.adb, a-cborse.ads, a-ciorma.adb, a-cobove.adb,
+       a-ciorma.ads, a-cobove.ads, a-coormu.adb, a-coormu.ads, a-cohase.adb,
+       a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbhase.adb, a-cbhase.ads:
+       Move Iterator operations from body to private part of spec.
+
 2013-04-11  Eric Botcazou  <ebotcazou@adacore.com>
 
        * ttypes.ads, get_targ.ads: More minor rewording of comments.
index f3e8c8b..36b9b81 100644 (file)
 -- This unit was originally developed by Matthew J Heaney.                  --
 ------------------------------------------------------------------------------
 
-with Ada.Finalization; use Ada.Finalization;
-
 with System; use type System.Address;
 
 package body Ada.Containers.Bounded_Doubly_Linked_Lists is
 
-   type Iterator is new Limited_Controlled and
-     List_Iterator_Interfaces.Reversible_Iterator with
-   record
-      Container : List_Access;
-      Node      : Count_Type;
-   end record;
-
-   overriding procedure Finalize (Object : in out Iterator);
-
-   overriding function First (Object : Iterator) return Cursor;
-   overriding function Last  (Object : Iterator) return Cursor;
-
-   overriding function Next
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
-   overriding function Previous
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
    -----------------------
    -- Local Subprograms --
    -----------------------
index a8a6ee2..291c1e0 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-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 --
@@ -34,6 +34,7 @@
 with Ada.Iterator_Interfaces;
 
 private with Ada.Streams;
+private with Ada.Finalization;
 
 generic
    type Element_Type is private;
@@ -248,6 +249,7 @@ private
    pragma Inline (Previous);
 
    use Ada.Streams;
+   use Ada.Finalization;
 
    type Node_Type is record
       Prev    : Count_Type'Base;
@@ -334,4 +336,24 @@ private
 
    No_Element : constant Cursor := Cursor'(null, 0);
 
+   type Iterator is new Limited_Controlled and
+     List_Iterator_Interfaces.Reversible_Iterator with
+   record
+      Container : List_Access;
+      Node      : Count_Type;
+   end record;
+
+   overriding procedure Finalize (Object : in out Iterator);
+
+   overriding function First (Object : Iterator) return Cursor;
+   overriding function Last  (Object : Iterator) return Cursor;
+
+   overriding function Next
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
+   overriding function Previous
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
 end Ada.Containers.Bounded_Doubly_Linked_Lists;
index 314bed6..f4a953c 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2013, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT 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- --
@@ -34,26 +34,11 @@ with Ada.Containers.Hash_Tables.Generic_Bounded_Keys;
 pragma Elaborate_All (Ada.Containers.Hash_Tables.Generic_Bounded_Keys);
 
 with Ada.Containers.Prime_Numbers;  use Ada.Containers.Prime_Numbers;
-with Ada.Finalization;              use Ada.Finalization;
 
 with System;  use type System.Address;
 
 package body Ada.Containers.Bounded_Hashed_Maps is
 
-   type Iterator is new Limited_Controlled and
-     Map_Iterator_Interfaces.Forward_Iterator with
-   record
-      Container : Map_Access;
-   end record;
-
-   overriding procedure Finalize (Object : in out Iterator);
-
-   overriding function First (Object : Iterator) return Cursor;
-
-   overriding function Next
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
    -----------------------
    -- Local Subprograms --
    -----------------------
index 71ec0e3..076fac2 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-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 --
@@ -35,6 +35,7 @@ with Ada.Iterator_Interfaces;
 
 private with Ada.Containers.Hash_Tables;
 private with Ada.Streams;
+private with Ada.Finalization;
 
 generic
    type Key_Type is private;
@@ -339,6 +340,7 @@ private
 
    use HT_Types;
    use Ada.Streams;
+   use Ada.Finalization;
 
    procedure Write
      (Stream    : not null access Root_Stream_Type'Class;
@@ -412,5 +414,18 @@ private
      (Hash_Table_Type with Capacity => 0, Modulus => 0);
 
    No_Element : constant Cursor := (Container => null, Node => 0);
+   type Iterator is new Limited_Controlled and
+     Map_Iterator_Interfaces.Forward_Iterator with
+   record
+      Container : Map_Access;
+   end record;
+
+   overriding procedure Finalize (Object : in out Iterator);
+
+   overriding function First (Object : Iterator) return Cursor;
+
+   overriding function Next
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
 
 end Ada.Containers.Bounded_Hashed_Maps;
index cc60762..99efc1d 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2013, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT 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- --
@@ -34,26 +34,11 @@ with Ada.Containers.Hash_Tables.Generic_Bounded_Keys;
 pragma Elaborate_All (Ada.Containers.Hash_Tables.Generic_Bounded_Keys);
 
 with Ada.Containers.Prime_Numbers; use Ada.Containers.Prime_Numbers;
-with Ada.Finalization;             use Ada.Finalization;
 
 with System; use type System.Address;
 
 package body Ada.Containers.Bounded_Hashed_Sets is
 
-   type Iterator is new Limited_Controlled and
-     Set_Iterator_Interfaces.Forward_Iterator with
-   record
-      Container : Set_Access;
-   end record;
-
-   overriding procedure Finalize (Object : in out Iterator);
-
-   overriding function First (Object : Iterator) return Cursor;
-
-   overriding function Next
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
    -----------------------
    -- Local Subprograms --
    -----------------------
index ed47b79..5de5d28 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-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 --
@@ -35,6 +35,7 @@ with Ada.Iterator_Interfaces;
 
 private with Ada.Containers.Hash_Tables;
 private with Ada.Streams;
+private with Ada.Finalization; use Ada.Finalization;
 
 generic
    type Element_Type is private;
@@ -537,4 +538,18 @@ private
 
    No_Element : constant Cursor := (Container => null, Node => 0);
 
+   type Iterator is new Limited_Controlled and
+     Set_Iterator_Interfaces.Forward_Iterator with
+   record
+      Container : Set_Access;
+   end record;
+
+   overriding procedure Finalize (Object : in out Iterator);
+
+   overriding function First (Object : Iterator) return Cursor;
+
+   overriding function Next
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
 end Ada.Containers.Bounded_Hashed_Sets;
index 8fca649..f508fc5 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2013, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT 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- --
@@ -35,32 +35,10 @@ with Ada.Containers.Red_Black_Trees.Generic_Bounded_Keys;
 pragma Elaborate_All
   (Ada.Containers.Red_Black_Trees.Generic_Bounded_Keys);
 
-with Ada.Finalization; use Ada.Finalization;
-
 with System; use type System.Address;
 
 package body Ada.Containers.Bounded_Ordered_Maps is
 
-   type Iterator is new Limited_Controlled and
-     Map_Iterator_Interfaces.Reversible_Iterator with
-   record
-      Container : Map_Access;
-      Node      : Count_Type;
-   end record;
-
-   overriding procedure Finalize (Object : in out Iterator);
-
-   overriding function First (Object : Iterator) return Cursor;
-   overriding function Last  (Object : Iterator) return Cursor;
-
-   overriding function Next
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
-   overriding function Previous
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
    -----------------------------
    -- Node Access Subprograms --
    -----------------------------
index 6ade3e6..2c2a8a5 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-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 --
@@ -35,6 +35,7 @@ with Ada.Iterator_Interfaces;
 
 private with Ada.Containers.Red_Black_Trees;
 private with Ada.Streams;
+private with Ada.Finalization;
 
 generic
    type Key_Type is private;
@@ -315,4 +316,26 @@ private
 
    No_Element : constant Cursor := Cursor'(null, 0);
 
+   use Ada.Finalization;
+
+   type Iterator is new Limited_Controlled and
+     Map_Iterator_Interfaces.Reversible_Iterator with
+   record
+      Container : Map_Access;
+      Node      : Count_Type;
+   end record;
+
+   overriding procedure Finalize (Object : in out Iterator);
+
+   overriding function First (Object : Iterator) return Cursor;
+   overriding function Last  (Object : Iterator) return Cursor;
+
+   overriding function Next
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
+   overriding function Previous
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
 end Ada.Containers.Bounded_Ordered_Maps;
index 64220f9..eacd3eb 100644 (file)
@@ -38,32 +38,10 @@ with Ada.Containers.Red_Black_Trees.Generic_Bounded_Set_Operations;
 pragma Elaborate_All
   (Ada.Containers.Red_Black_Trees.Generic_Bounded_Set_Operations);
 
-with Ada.Finalization; use Ada.Finalization;
-
 with System; use type System.Address;
 
 package body Ada.Containers.Bounded_Ordered_Sets is
 
-   type Iterator is new Limited_Controlled and
-     Set_Iterator_Interfaces.Reversible_Iterator with
-   record
-      Container : Set_Access;
-      Node      : Count_Type;
-   end record;
-
-   overriding procedure Finalize (Object : in out Iterator);
-
-   overriding function First (Object : Iterator) return Cursor;
-   overriding function Last  (Object : Iterator) return Cursor;
-
-   overriding function Next
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
-   overriding function Previous
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
    ------------------------------
    -- Access to Fields of Node --
    ------------------------------
index 1626357..d22ef54 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-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 --
@@ -35,6 +35,7 @@ with Ada.Iterator_Interfaces;
 
 private with Ada.Containers.Red_Black_Trees;
 private with Ada.Streams;
+private with Ada.Finalization;
 
 generic
    type Element_Type is private;
@@ -374,4 +375,26 @@ private
 
    No_Element : constant Cursor := Cursor'(null, 0);
 
+   use Ada.Finalization;
+
+   type Iterator is new Limited_Controlled and
+     Set_Iterator_Interfaces.Reversible_Iterator with
+   record
+      Container : Set_Access;
+      Node      : Count_Type;
+   end record;
+
+   overriding procedure Finalize (Object : in out Iterator);
+
+   overriding function First (Object : Iterator) return Cursor;
+   overriding function Last  (Object : Iterator) return Cursor;
+
+   overriding function Next
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
+   overriding function Previous
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
 end Ada.Containers.Bounded_Ordered_Sets;
index b097ef8..9bd8899 100644 (file)
@@ -33,26 +33,6 @@ with System; use type System.Address;
 
 package body Ada.Containers.Doubly_Linked_Lists is
 
-   type Iterator is new Limited_Controlled and
-     List_Iterator_Interfaces.Reversible_Iterator with
-   record
-      Container : List_Access;
-      Node      : Node_Access;
-   end record;
-
-   overriding procedure Finalize (Object : in out Iterator);
-
-   overriding function First (Object : Iterator) return Cursor;
-   overriding function Last  (Object : Iterator) return Cursor;
-
-   overriding function Next
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
-   overriding function Previous
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
    -----------------------
    -- Local Subprograms --
    -----------------------
index d1707c7..c99e735 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-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 --
@@ -358,4 +358,24 @@ private
 
    No_Element : constant Cursor := Cursor'(null, null);
 
+   type Iterator is new Limited_Controlled and
+     List_Iterator_Interfaces.Reversible_Iterator with
+   record
+      Container : List_Access;
+      Node      : Node_Access;
+   end record;
+
+   overriding procedure Finalize (Object : in out Iterator);
+
+   overriding function First (Object : Iterator) return Cursor;
+   overriding function Last  (Object : Iterator) return Cursor;
+
+   overriding function Next
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
+   overriding function Previous
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
 end Ada.Containers.Doubly_Linked_Lists;
index ee94840..f0ed998 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 2010-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2010-2013, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT 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- --
 ------------------------------------------------------------------------------
 
 with System;  use type System.Address;
-with Ada.Finalization;
 
 package body Ada.Containers.Formal_Doubly_Linked_Lists is
 
-   type Iterator is new Ada.Finalization.Limited_Controlled and
-     List_Iterator_Interfaces.Reversible_Iterator with
-   record
-      Container : List_Access;
-      Node      : Count_Type;
-   end record;
-
-   overriding procedure Finalize (Object : in out Iterator);
-
-   overriding function First (Object : Iterator) return Cursor;
-   overriding function Last  (Object : Iterator) return Cursor;
-
-   overriding function Next
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
-   overriding function Previous
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
    -----------------------
    -- Local Subprograms --
    -----------------------
index 67ff3af..58a67fa 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-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 --
@@ -52,7 +52,7 @@
 --    See detailed specifications for these subprograms
 
 private with Ada.Streams;
-with Ada.Containers;
+private with Ada.Finalization;
 with Ada.Iterator_Interfaces;
 
 generic
@@ -326,4 +326,26 @@ private
 
    No_Element : constant Cursor := (Node => 0);
 
+   use Ada.Finalization;
+
+   type Iterator is new Limited_Controlled and
+     List_Iterator_Interfaces.Reversible_Iterator with
+   record
+      Container : List_Access;
+      Node      : Count_Type;
+   end record;
+
+   overriding procedure Finalize (Object : in out Iterator);
+
+   overriding function First (Object : Iterator) return Cursor;
+   overriding function Last  (Object : Iterator) return Cursor;
+
+   overriding function Next
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
+   overriding function Previous
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
 end Ada.Containers.Formal_Doubly_Linked_Lists;
index 9907406..04d0597 100644 (file)
@@ -36,26 +36,6 @@ package body Ada.Containers.Indefinite_Doubly_Linked_Lists is
    procedure Free is
      new Ada.Unchecked_Deallocation (Element_Type, Element_Access);
 
-   type Iterator is new Limited_Controlled and
-     List_Iterator_Interfaces.Reversible_Iterator with
-   record
-      Container : List_Access;
-      Node      : Node_Access;
-   end record;
-
-   overriding procedure Finalize (Object : in out Iterator);
-
-   overriding function First (Object : Iterator) return Cursor;
-   overriding function Last  (Object : Iterator) return Cursor;
-
-   overriding function Next
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
-   overriding function Previous
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
    -----------------------
    -- Local Subprograms --
    -----------------------
index af57af1..a7e133c 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-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 --
@@ -352,4 +352,24 @@ private
 
    No_Element : constant Cursor := Cursor'(null, null);
 
+   type Iterator is new Limited_Controlled and
+     List_Iterator_Interfaces.Reversible_Iterator with
+   record
+      Container : List_Access;
+      Node      : Node_Access;
+   end record;
+
+   overriding procedure Finalize (Object : in out Iterator);
+
+   overriding function First (Object : Iterator) return Cursor;
+   overriding function Last  (Object : Iterator) return Cursor;
+
+   overriding function Next
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
+   overriding function Previous
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
 end Ada.Containers.Indefinite_Doubly_Linked_Lists;
index 2d889cd..e3e3d5e 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2013, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT 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- --
@@ -45,20 +45,6 @@ package body Ada.Containers.Indefinite_Hashed_Maps is
    procedure Free_Element is
       new Ada.Unchecked_Deallocation (Element_Type, Element_Access);
 
-   type Iterator is new Limited_Controlled and
-     Map_Iterator_Interfaces.Forward_Iterator with
-   record
-      Container : Map_Access;
-   end record;
-
-   overriding procedure Finalize (Object : in out Iterator);
-
-   overriding function First (Object : Iterator) return Cursor;
-
-   overriding function Next
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
    -----------------------
    -- Local Subprograms --
    -----------------------
index feef181..6e2df21 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-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 --
@@ -418,4 +418,18 @@ private
 
    No_Element : constant Cursor := (Container => null, Node => null);
 
+   type Iterator is new Limited_Controlled and
+     Map_Iterator_Interfaces.Forward_Iterator with
+   record
+      Container : Map_Access;
+   end record;
+
+   overriding procedure Finalize (Object : in out Iterator);
+
+   overriding function First (Object : Iterator) return Cursor;
+
+   overriding function Next
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
 end Ada.Containers.Indefinite_Hashed_Maps;
index bae3ecc..7a70bf6 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2013, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT 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- --
@@ -41,20 +41,6 @@ with System; use type System.Address;
 
 package body Ada.Containers.Indefinite_Hashed_Sets is
 
-   type Iterator is new Limited_Controlled and
-     Set_Iterator_Interfaces.Forward_Iterator with
-   record
-      Container : Set_Access;
-   end record;
-
-   overriding procedure Finalize (Object : in out Iterator);
-
-   overriding function First (Object : Iterator) return Cursor;
-
-   overriding function Next
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
    -----------------------
    -- Local Subprograms --
    -----------------------
index b300186..2c4dec5 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-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 --
@@ -541,4 +541,18 @@ private
 
    No_Element : constant Cursor := (Container => null, Node => null);
 
+   type Iterator is new Limited_Controlled and
+     Set_Iterator_Interfaces.Forward_Iterator with
+   record
+      Container : Set_Access;
+   end record;
+
+   overriding procedure Finalize (Object : in out Iterator);
+
+   overriding function First (Object : Iterator) return Cursor;
+
+   overriding function Next
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
 end Ada.Containers.Indefinite_Hashed_Sets;
index 7f2b249..b836dc6 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2013, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT 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- --
@@ -40,26 +40,6 @@ with System; use type System.Address;
 package body Ada.Containers.Indefinite_Ordered_Maps is
    pragma Suppress (All_Checks);
 
-   type Iterator is new Limited_Controlled and
-     Map_Iterator_Interfaces.Reversible_Iterator with
-   record
-      Container : Map_Access;
-      Node      : Node_Access;
-   end record;
-
-   overriding procedure Finalize (Object : in out Iterator);
-
-   overriding function First (Object : Iterator) return Cursor;
-   overriding function Last  (Object : Iterator) return Cursor;
-
-   overriding function Next
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
-   overriding function Previous
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
    -----------------------------
    -- Node Access Subprograms --
    -----------------------------
index 5c3a776..e414d39 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-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 --
@@ -353,4 +353,24 @@ private
 
    No_Element : constant Cursor := Cursor'(null, null);
 
+   type Iterator is new Limited_Controlled and
+     Map_Iterator_Interfaces.Reversible_Iterator with
+   record
+      Container : Map_Access;
+      Node      : Node_Access;
+   end record;
+
+   overriding procedure Finalize (Object : in out Iterator);
+
+   overriding function First (Object : Iterator) return Cursor;
+   overriding function Last  (Object : Iterator) return Cursor;
+
+   overriding function Next
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
+   overriding function Previous
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
 end Ada.Containers.Indefinite_Ordered_Maps;
index 4fce475..2bc1200 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2013, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT 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- --
@@ -42,26 +42,6 @@ with System; use type System.Address;
 
 package body Ada.Containers.Indefinite_Ordered_Multisets is
 
-   type Iterator is new Limited_Controlled and
-     Set_Iterator_Interfaces.Reversible_Iterator with
-   record
-      Container : Set_Access;
-      Node      : Node_Access;
-   end record;
-
-   overriding procedure Finalize (Object : in out Iterator);
-
-   overriding function First (Object : Iterator) return Cursor;
-   overriding function Last  (Object : Iterator) return Cursor;
-
-   overriding function Next
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
-   overriding function Previous
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
    -----------------------------
    -- Node Access Subprograms --
    -----------------------------
index cfd1676..575d5d8 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2013, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT 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- --
@@ -508,4 +508,24 @@ private
                                            Busy   => 0,
                                            Lock   => 0));
 
+   type Iterator is new Limited_Controlled and
+     Set_Iterator_Interfaces.Reversible_Iterator with
+   record
+      Container : Set_Access;
+      Node      : Node_Access;
+   end record;
+
+   overriding procedure Finalize (Object : in out Iterator);
+
+   overriding function First (Object : Iterator) return Cursor;
+   overriding function Last  (Object : Iterator) return Cursor;
+
+   overriding function Next
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
+   overriding function Previous
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
 end Ada.Containers.Indefinite_Ordered_Multisets;
index 3b1ffb4..2f8820c 100644 (file)
@@ -42,26 +42,6 @@ with System; use type System.Address;
 
 package body Ada.Containers.Indefinite_Ordered_Sets is
 
-   type Iterator is new Limited_Controlled and
-     Set_Iterator_Interfaces.Reversible_Iterator with
-   record
-      Container : Set_Access;
-      Node      : Node_Access;
-   end record;
-
-   overriding procedure Finalize (Object : in out Iterator);
-
-   overriding function First (Object : Iterator) return Cursor;
-   overriding function Last  (Object : Iterator) return Cursor;
-
-   overriding function Next
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
-   overriding function Previous
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
    -----------------------
    -- Local Subprograms --
    -----------------------
index 87ba353..0dba13e 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-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 --
@@ -416,4 +416,24 @@ private
 
    No_Element : constant Cursor := Cursor'(null, null);
 
+   type Iterator is new Limited_Controlled and
+     Set_Iterator_Interfaces.Reversible_Iterator with
+   record
+      Container : Set_Access;
+      Node      : Node_Access;
+   end record;
+
+   overriding procedure Finalize (Object : in out Iterator);
+
+   overriding function First (Object : Iterator) return Cursor;
+   overriding function Last  (Object : Iterator) return Cursor;
+
+   overriding function Next
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
+   overriding function Previous
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
 end Ada.Containers.Indefinite_Ordered_Sets;
index 01755cf..c279051 100644 (file)
 ------------------------------------------------------------------------------
 
 with Ada.Containers.Generic_Array_Sort;
-with Ada.Finalization; use Ada.Finalization;
 
 with System; use type System.Address;
 
 package body Ada.Containers.Bounded_Vectors is
 
-   type Iterator is new Limited_Controlled and
-     Vector_Iterator_Interfaces.Reversible_Iterator with
-   record
-      Container : Vector_Access;
-      Index     : Index_Type'Base;
-   end record;
-
-   overriding procedure Finalize (Object : in out Iterator);
-
-   overriding function First (Object : Iterator) return Cursor;
-   overriding function Last  (Object : Iterator) return Cursor;
-
-   overriding function Next
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
-   overriding function Previous
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
    -----------------------
    -- Local Subprograms --
    -----------------------
index 932aafb..267c64d 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-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 --
@@ -34,6 +34,7 @@
 with Ada.Iterator_Interfaces;
 
 private with Ada.Streams;
+private with Ada.Finalization;
 
 generic
    type Index_Type is range <>;
@@ -364,6 +365,7 @@ private
    pragma Inline (Previous);
 
    use Ada.Streams;
+   use Ada.Finalization;
 
    type Elements_Array is array (Count_Type range <>) of aliased Element_Type;
    function "=" (L, R : Elements_Array) return Boolean is abstract;
@@ -441,4 +443,24 @@ private
 
    No_Element : constant Cursor := Cursor'(null, Index_Type'First);
 
+   type Iterator is new Limited_Controlled and
+     Vector_Iterator_Interfaces.Reversible_Iterator with
+   record
+      Container : Vector_Access;
+      Index     : Index_Type'Base;
+   end record;
+
+   overriding procedure Finalize (Object : in out Iterator);
+
+   overriding function First (Object : Iterator) return Cursor;
+   overriding function Last  (Object : Iterator) return Cursor;
+
+   overriding function Next
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
+   overriding function Previous
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
 end Ada.Containers.Bounded_Vectors;
index 5eee4b3..6af16ee 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2013, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT 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- --
@@ -39,20 +39,6 @@ with System; use type System.Address;
 
 package body Ada.Containers.Hashed_Maps is
 
-   type Iterator is new Limited_Controlled and
-     Map_Iterator_Interfaces.Forward_Iterator with
-   record
-      Container : Map_Access;
-   end record;
-
-   overriding procedure Finalize (Object : in out Iterator);
-
-   overriding function First (Object : Iterator) return Cursor;
-
-   overriding function Next
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
    -----------------------
    -- Local Subprograms --
    -----------------------
index 98b2cb3..540e24a 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-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 --
@@ -424,4 +424,18 @@ private
 
    No_Element : constant Cursor := (Container => null, Node => null);
 
+   type Iterator is new Limited_Controlled and
+     Map_Iterator_Interfaces.Forward_Iterator with
+   record
+      Container : Map_Access;
+   end record;
+
+   overriding procedure Finalize (Object : in out Iterator);
+
+   overriding function First (Object : Iterator) return Cursor;
+
+   overriding function Next
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
 end Ada.Containers.Hashed_Maps;
index 6180168..f9e1b2a 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2013, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT 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- --
@@ -41,17 +41,6 @@ with System; use type System.Address;
 
 package body Ada.Containers.Hashed_Sets is
 
-   type Iterator is limited new
-     Set_Iterator_Interfaces.Forward_Iterator with record
-        Container : Set_Access;
-     end record;
-
-   overriding function First (Object : Iterator) return Cursor;
-
-   overriding function Next
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
    -----------------------
    -- Local Subprograms --
    -----------------------
index de62cd9..2931800 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-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 --
@@ -543,4 +543,15 @@ private
 
    No_Element : constant Cursor := (Container => null, Node => null);
 
+   type Iterator is limited new
+     Set_Iterator_Interfaces.Forward_Iterator with record
+        Container : Set_Access;
+     end record;
+
+   overriding function First (Object : Iterator) return Cursor;
+
+   overriding function Next
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
 end Ada.Containers.Hashed_Sets;
index d63ebc0..cff3a28 100644 (file)
@@ -40,26 +40,6 @@ package body Ada.Containers.Indefinite_Vectors is
    procedure Free is
      new Ada.Unchecked_Deallocation (Element_Type, Element_Access);
 
-   type Iterator is new Limited_Controlled and
-     Vector_Iterator_Interfaces.Reversible_Iterator with
-   record
-      Container : Vector_Access;
-      Index     : Index_Type'Base;
-   end record;
-
-   overriding procedure Finalize (Object : in out Iterator);
-
-   overriding function First (Object : Iterator) return Cursor;
-   overriding function Last  (Object : Iterator) return Cursor;
-
-   overriding function Next
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
-   overriding function Previous
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
    ---------
    -- "&" --
    ---------
index c9a6498..2c84167 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-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 --
@@ -463,4 +463,24 @@ private
 
    No_Element : constant Cursor := Cursor'(null, Index_Type'First);
 
+   type Iterator is new Limited_Controlled and
+     Vector_Iterator_Interfaces.Reversible_Iterator with
+   record
+      Container : Vector_Access;
+      Index     : Index_Type'Base;
+   end record;
+
+   overriding procedure Finalize (Object : in out Iterator);
+
+   overriding function First (Object : Iterator) return Cursor;
+   overriding function Last  (Object : Iterator) return Cursor;
+
+   overriding function Next
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
+   overriding function Previous
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
 end Ada.Containers.Indefinite_Vectors;
index aa8fa91..52025bb 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2013, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT 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- --
@@ -39,26 +39,6 @@ with System; use type System.Address;
 
 package body Ada.Containers.Ordered_Maps is
 
-   type Iterator is new Limited_Controlled and
-     Map_Iterator_Interfaces.Reversible_Iterator with
-   record
-      Container : Map_Access;
-      Node      : Node_Access;
-   end record;
-
-   overriding procedure Finalize (Object : in out Iterator);
-
-   overriding function First (Object : Iterator) return Cursor;
-   overriding function Last  (Object : Iterator) return Cursor;
-
-   overriding function Next
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
-   overriding function Previous
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
    -----------------------------
    -- Node Access Subprograms --
    -----------------------------
index d9281fa..2a642ac 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-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 --
@@ -354,4 +354,24 @@ private
 
    No_Element : constant Cursor := Cursor'(null, null);
 
+   type Iterator is new Limited_Controlled and
+     Map_Iterator_Interfaces.Reversible_Iterator with
+   record
+      Container : Map_Access;
+      Node      : Node_Access;
+   end record;
+
+   overriding procedure Finalize (Object : in out Iterator);
+
+   overriding function First (Object : Iterator) return Cursor;
+   overriding function Last  (Object : Iterator) return Cursor;
+
+   overriding function Next
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
+   overriding function Previous
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
 end Ada.Containers.Ordered_Maps;
index 2cc7631..a3c5ab5 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2013, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT 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- --
@@ -42,26 +42,6 @@ with System; use type System.Address;
 
 package body Ada.Containers.Ordered_Multisets is
 
-   type Iterator is new Limited_Controlled and
-     Set_Iterator_Interfaces.Reversible_Iterator with
-   record
-      Container : Set_Access;
-      Node      : Node_Access;
-   end record;
-
-   overriding procedure Finalize (Object : in out Iterator);
-
-   overriding function First (Object : Iterator) return Cursor;
-   overriding function Last  (Object : Iterator) return Cursor;
-
-   overriding function Next
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
-   overriding function Previous
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
    -----------------------------
    -- Node Access Subprograms --
    -----------------------------
index a832cac..8d68474 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2013, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT 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- --
@@ -512,4 +512,24 @@ private
                                            Busy   => 0,
                                            Lock   => 0));
 
+   type Iterator is new Limited_Controlled and
+     Set_Iterator_Interfaces.Reversible_Iterator with
+   record
+      Container : Set_Access;
+      Node      : Node_Access;
+   end record;
+
+   overriding procedure Finalize (Object : in out Iterator);
+
+   overriding function First (Object : Iterator) return Cursor;
+   overriding function Last  (Object : Iterator) return Cursor;
+
+   overriding function Next
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
+   overriding function Previous
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
 end Ada.Containers.Ordered_Multisets;
index 43d4ec9..e7ac52b 100644 (file)
@@ -42,26 +42,6 @@ with System; use type System.Address;
 
 package body Ada.Containers.Ordered_Sets is
 
-   type Iterator is new Limited_Controlled and
-     Set_Iterator_Interfaces.Reversible_Iterator with
-   record
-      Container : Set_Access;
-      Node      : Node_Access;
-   end record;
-
-   overriding procedure Finalize (Object : in out Iterator);
-
-   overriding function First (Object : Iterator) return Cursor;
-   overriding function Last  (Object : Iterator) return Cursor;
-
-   overriding function Next
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
-   overriding function Previous
-     (Object   : Iterator;
-      Position : Cursor) return Cursor;
-
    ------------------------------
    -- Access to Fields of Node --
    ------------------------------
index e28a71b..cf0110c 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-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 --
@@ -399,4 +399,24 @@ private
 
    No_Element : constant Cursor := Cursor'(null, null);
 
+   type Iterator is new Limited_Controlled and
+     Set_Iterator_Interfaces.Reversible_Iterator with
+   record
+      Container : Set_Access;
+      Node      : Node_Access;
+   end record;
+
+   overriding procedure Finalize (Object : in out Iterator);
+
+   overriding function First (Object : Iterator) return Cursor;
+   overriding function Last  (Object : Iterator) return Cursor;
+
+   overriding function Next
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
+   overriding function Previous
+     (Object   : Iterator;
+      Position : Cursor) return Cursor;
+
 end Ada.Containers.Ordered_Sets;
index d28510c..85dc076 100644 (file)
@@ -2559,6 +2559,39 @@ package body Exp_Ch6 is
       --  as we go through the loop, since this is a convenient place to do it.
       --  (Though it seems that this would be better done in Expand_Actuals???)
 
+      --  Special case: Thunks must not compute the extra actuals; they must
+      --  just propagate to the target primitive their extra actuals.
+
+      if Is_Thunk (Current_Scope)
+        and then Thunk_Entity (Current_Scope) = Subp
+        and then Present (Extra_Formals (Subp))
+      then
+         pragma Assert (Present (Extra_Formals (Current_Scope)));
+
+         declare
+            Target_Formal : Entity_Id;
+            Thunk_Formal  : Entity_Id;
+
+         begin
+            Target_Formal := Extra_Formals (Subp);
+            Thunk_Formal  := Extra_Formals (Current_Scope);
+            while Present (Target_Formal) loop
+               Add_Extra_Actual
+                 (New_Occurrence_Of (Thunk_Formal, Loc), Thunk_Formal);
+
+               Target_Formal := Extra_Formal (Target_Formal);
+               Thunk_Formal  := Extra_Formal (Thunk_Formal);
+            end loop;
+
+            while Is_Non_Empty_List (Extra_Actuals) loop
+               Add_Actual_Parameter (Remove_Head (Extra_Actuals));
+            end loop;
+
+            Expand_Actuals (Call_Node, Subp);
+            return;
+         end;
+      end if;
+
       Formal := First_Formal (Subp);
       Actual := First_Actual (Call_Node);
       Param_Count := 1;
index 52047d7..b003d85 100644 (file)
@@ -1886,6 +1886,7 @@ package body Exp_Disp is
       Set_Ekind (Thunk_Id, Ekind (Prim));
       Set_Is_Thunk (Thunk_Id);
       Set_Convention (Thunk_Id, Convention (Prim));
+      Set_Thunk_Entity (Thunk_Id, Target);
 
       --  Procedure case
 
index 5a456cc..d84bc04 100644 (file)
@@ -29729,12 +29729,6 @@ end API;
 @end group
 @end smallexample
 
-@noindent
-Note that a variable is
-@strong{always imported with a DLL convention}. A function
-can have @code{C} or @code{Stdcall} convention.
-(@pxref{Windows Calling Conventions}).
-
 @node Creating an Import Library
 @subsection Creating an Import Library
 @cindex Import library
index 4788fbe..ee4d039 100644 (file)
@@ -23,6 +23,8 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
+with Ada.Text_IO; use Ada.Text_IO;
+
 with Fmap;
 with Hostparm;
 with Makeutl;  use Makeutl;
@@ -1895,14 +1897,17 @@ package body Prj.Env is
       New_Len         : Positive;
       New_Last        : Positive;
 
-      Ada_Project_Path : constant String := "ADA_PROJECT_PATH";
-      Gpr_Project_Path : constant String := "GPR_PROJECT_PATH";
-      --  Name of alternate env. variable that contain path name(s) of
-      --  directories where project files may reside. GPR_PROJECT_PATH has
-      --  precedence over ADA_PROJECT_PATH.
-
-      Gpr_Prj_Path : String_Access;
-      Ada_Prj_Path : String_Access;
+      Ada_Project_Path      : constant String := "ADA_PROJECT_PATH";
+      Gpr_Project_Path      : constant String := "GPR_PROJECT_PATH";
+      Gpr_Project_Path_File : constant String := "GPR_PROJECT_PATH_FILE";
+      --  Names of alternate env. variable that contain path name(s) of
+      --  directories where project files may reside. They are taken into
+      --  account in this order: GPR_PROJECT_PATH_FILE, GPR_PROJECT_PATH,
+      --  ADA_PROJECT_PATH.
+
+      Gpr_Prj_Path_File : String_Access;
+      Gpr_Prj_Path      : String_Access;
+      Ada_Prj_Path      : String_Access;
       --  The path name(s) of directories where project files may reside.
       --  May be empty.
 
@@ -1926,8 +1931,50 @@ package body Prj.Env is
 
       --  If environment variables are defined and not empty, add their content
 
-      Gpr_Prj_Path := Getenv (Gpr_Project_Path);
-      Ada_Prj_Path := Getenv (Ada_Project_Path);
+      Gpr_Prj_Path_File := Getenv (Gpr_Project_Path_File);
+      Gpr_Prj_Path      := Getenv (Gpr_Project_Path);
+      Ada_Prj_Path      := Getenv (Ada_Project_Path);
+
+      if Gpr_Prj_Path_File.all /= "" then
+         declare
+            File : Ada.Text_IO.File_Type;
+            Line : String (1 .. 10_000);
+            Last : Natural;
+
+            Tmp : String_Access;
+
+         begin
+            Open (File, In_File, Gpr_Prj_Path_File.all);
+
+            while not End_Of_File (File) loop
+               Get_Line (File, Line, Last);
+
+               if Last /= 0
+                 and then (Last = 1 or else Line (1 .. 2) /= "--")
+               then
+                  Tmp := Self.Path;
+                  Self.Path :=
+                    new String'
+                      (Tmp.all & Path_Separator & Line (1 .. Last));
+                  Free (Tmp);
+               end if;
+
+               if Current_Verbosity = High then
+                  Debug_Output ("Adding directory to Project_Path: """
+                                & Line (1 .. Last) & '"');
+               end if;
+            end loop;
+
+            Close (File);
+
+         exception
+            when others =>
+               Write_Str ("warning: could not read project path file """);
+               Write_Str (Gpr_Prj_Path_File.all);
+               Write_Line ("""");
+         end;
+
+      end if;
 
       if Gpr_Prj_Path.all /= "" then
          Add_Directories (Self, Gpr_Prj_Path.all);
index dee9b90..ca47736 100644 (file)
@@ -1209,12 +1209,18 @@ the search stops:
   current project file.
 
 @item
-@cindex @code{ADA_PROJECT_PATH}
+@cindex @code{GPR_PROJECT_PATH_FILE}
 @cindex @code{GPR_PROJECT_PATH}
+@cindex @code{ADA_PROJECT_PATH}
   Then it is searched relative to all the directories specified in the
-  ^environment variables^logical names^ @b{GPR_PROJECT_PATH} and
-  @b{ADA_PROJECT_PATH} (in that order) if they exist. The former is
-  recommended, the latter is kept for backward compatibility.
+  ^environment variables^logical names^ @b{GPR_PROJECT_PATH_FILE},
+  @b{GPR_PROJECT_PATH} and @b{ADA_PROJECT_PATH} (in that order) if they exist.
+  The value of @b{GPR_PROJECT_PATH_FILE}, when defined, is the path name of
+  a text file that contains project directory path names, one per line.
+  @b{GPR_PROJECT_PATH} and @b{ADA_PROJECT_PATH}, when defined, contain
+  project directory path names separated by directory separators.
+  @b{ADA_PROJECT_PATH} is used for compatibility, it is recommended to
+  use @b{GPR_PROJECT_PATH_FILE} or @b{GPR_PROJECT_PATH}.
 
 @item Finally, it is searched relative to the default project directories.
   Such directories depends on the tool used. The different locations searched
index e34154c..2257f47 100644 (file)
@@ -7901,6 +7901,13 @@ package body Sem_Ch6 is
          return;
       end if;
 
+      --  No need to generate extra formals in interface thunks whose target
+      --  primitive has no extra formals.
+
+      if Is_Thunk (E) and then No (Extra_Formals (Thunk_Entity (E))) then
+         return;
+      end if;
+
       --  If this is a derived subprogram then the subtypes of the parent
       --  subprogram's formal parameters will be used to determine the need
       --  for extra formals.
index 8285780..7c27f0f 100644 (file)
@@ -806,9 +806,6 @@ package body Sem_Prag is
       --  Returns True if pragma appears within the context clause of a unit,
       --  and False for any other placement (does not generate any messages).
 
-      function Is_Renaming (N : Node_Id) return Boolean;
-      --  Determine whether arbitrary node N is a renaming
-
       function Is_Static_String_Expression (Arg : Node_Id) return Boolean;
       --  Analyzes the argument, and determines if it is a static string
       --  expression, returns True if so, False if non-static or not String.
@@ -3016,17 +3013,6 @@ package body Sem_Prag is
          return True;
       end Is_In_Context_Clause;
 
-      -----------------
-      -- Is_Renaming --
-      -----------------
-
-      function Is_Renaming (N : Node_Id) return Boolean is
-      begin
-         return
-           Is_Entity_Name (N)
-             and then Present (Renamed_Object (Entity (N)));
-      end Is_Renaming;
-
       ---------------------------------
       -- Is_Static_String_Expression --
       ---------------------------------
@@ -9169,7 +9155,7 @@ package body Sem_Prag is
                            --  When the item renames an entire object, replace
                            --  the item with a reference to the object.
 
-                           if Is_Renaming (Item) then
+                           if Present (Renamed_Object (Entity (Item))) then
                               Rewrite (Item,
                                 New_Reference_To (Item_Id, Sloc (Item)));
                               Analyze (Item);
@@ -10884,7 +10870,7 @@ package body Sem_Prag is
                      --  When the item renames an entire object, replace the
                      --  item with a reference to the object.
 
-                     if Is_Renaming (Item) then
+                     if Present (Renamed_Object (Entity (Item))) then
                         Rewrite (Item,
                           New_Reference_To (Item_Id, Sloc (Item)));
                         Analyze (Item);