]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Thu, 11 Apr 2013 13:33:53 +0000 (15:33 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Thu, 11 Apr 2013 13:33:53 +0000 (15:33 +0200)
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.

From-SVN: r197797

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 86ad8e43319370461386b2c3eca324f200b48bea..9628a886ba1141bfe291e33138591b0e6507dc0b 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 f3e8c8bee30c586eff3b05e2d7da22d1f17f40ee..36b9b81e83b5d4bdd037bfedd15bcd2ef3115579 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 a8a6ee228f1d0f785cc8f981ae88363c61d47b57..291c1e0eb7206149ef9842f8cb53ab74360a0bf2 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 314bed6142d6127eecaa43cdde5481b5e3681db2..f4a953c1401a0be493686a2e1cac5f5b7b912090 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 71ec0e3d95618deb47bef9a09311e616ec26d408..076fac240e1c868cc567cc4f01f51ceb4b91a980 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 cc60762ed15a2c12676810ffaf490496e48589f8..99efc1dcf795978081e91a1e0c9ebe4ce49c77d6 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 ed47b798683262661b237bb7d86a61fd1498d577..5de5d2832ecf563bcac9d808a89624491b259c56 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 8fca6495dc563901a3b05d7579927b5fd3fcceb3..f508fc5642cd51bd0f6218950ed503c3a6a084b6 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 6ade3e6c4749ff0d82631265e5b118043a04fa2b..2c2a8a50e1b7a9d0415d6ad38b6bf787cc3b7f4c 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 64220f91ef2ed9d18ae7501848833fbae3bf0c96..eacd3eb7442dc8f58dc1db688ebc7f81d110c9c5 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 162635773891f8b1baa3eb888da41203d026caf2..d22ef54b21b9ff18bac66eadb185bace1b64a56b 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 b097ef86ca4a1a77a92caf6aba812e605e3855e5..9bd8899e2dd1c3a328c0befce44157ef9226f443 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 d1707c757a2dc3f490baca647812f0f32a1fd020..c99e7350afc2e4c9ce2d2655ad1d9a91e5251aca 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 ee9484077dee1564291958da71b7425cbfce7d94..f0ed99871186ffbe83643c9f9f90b869facd4796 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 67ff3af8f4826ef070e950d5fdb368540874a5cd..58a67fae177c87626cdaefd2f9799556b7fa7456 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 9907406ebdf75cb5ee2437f5c0d360d94e1284e0..04d0597a22c50b537b0d288f4447549204e2fb01 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 af57af11ae9046d05dfb8013199e145043434bf4..a7e133c303d474e5f532545cba1037ffa2f04557 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 2d889cdfb1bc42d0b025d1150d5c55c24b3a881d..e3e3d5ee43da480ccaed4ec4b1b5c3fb7d0d5621 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 feef181b65b805fc0fffed5727b8067dee0e8ecf..6e2df212a22bf602c3f18f4cb20cec05612acb05 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 bae3ecc38973184edfe84eceeae8e8cc70e4d7ab..7a70bf65a871213047f5c63cdc27fef4736e23f0 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 b300186f6db0b0f0a774ced6277a67668f58caeb..2c4dec59996941dc279e31d6802507477a55f9c9 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 7f2b2491eeb931d632ea46538cdc938263f1e7a1..b836dc69fd091a46f4c9a896b98831914fc6a1fc 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 5c3a776c4aa46ed5512bf2f8cd8176bc663fd702..e414d39cf71e81d64052f9fb603087edf96784c2 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 4fce4754c7853172a8c5cd1261a8ece9323982a3..2bc1200014bfbb3a8c786a07b4ce183fe5872963 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 cfd1676aa5f07e8be4a1484fb5306f74de913e13..575d5d8321ec7871799da1e8207745022956e415 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 3b1ffb43022c6c1a0b7351795d7238d871058ddc..2f8820cb952362bdb5794051b2179ef4baa817a8 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 87ba353e9e8d45ad99c1cc7a197cee0f50d4807c..0dba13e42ed75c88e67390af4a7568b3562ff79b 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 01755cfd80fa9c71f20fe13851c9312d51ac787f..c2790517e017994e869e74965a662db85cd2d428 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 932aafb886b9052f69af802584a25a2b56fc7de4..267c64de4255b94a6e40ababc4837de3e19a086b 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 5eee4b302c189522498cce5b04312f5032bc7a32..6af16eec227645e561b0fdf57a9c0c5a9560efb6 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 98b2cb3c5a865a64e782ac25c70b0fd8be10c441..540e24af19d67f9abfc3467dc1ad809a16d1d7c0 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 6180168a1da23570a24868c70f00bd06e010015d..f9e1b2aa8c09a9d88569b247223e92625a277329 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 de62cd96a5f37ec2fd8219d10b2afaaaca9ade13..2931800aaf883ef0512f4c49363cfcf3d428cfa2 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 d63ebc0750079f6d57080258d897ae87820c2a35..cff3a286edb47b62f909d48c1ba3949a276aa6dc 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 c9a64989be5525a3aaa21b9db657e53a12a4a277..2c841671af422c5a6aa2956db63a9ec6f4f821bc 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 aa8fa91a8c50ee426e4fa8f5b9976b50ecbba221..52025bb5c2c0eac8d4dda2643b8e1adbf8f57570 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 d9281faccc334f6a74abbee789e5f3c57c1e2d79..2a642ac47cb7aa6f97d90e46cb51d686c00fa159 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 2cc763197470d70e8e1f5c2bd0ea93d67ca08dba..a3c5ab5c97e9f03f68e8ec71197cc939b7cad4e3 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 a832cac77f076dc792a6eba75778de7fd1804e88..8d684741e9452b270751b6d07a5f2d3877c85a33 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 43d4ec9a3e81335dfbe8427353e57b009447baec..e7ac52b2325a806af94fdc870d267806604fd37e 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 e28a71bc29991875ad4393d58d0ce3e9524eafd0..cf0110c74c2fe68c2b9969e5fbd379c3fc8ad86d 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 d28510cb0382059223da1a1f525d9c56db97155a..85dc076bacd6392afc39050876970c728d851f79 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 52047d7f876075aaef6f277566f23c3a9ad7d60c..b003d854dbdecfba94dba5dde02701737a666d48 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 5a456cc0976f5300fb65b16785450e73db3cbf98..d84bc04d99bbcbb92ffd55588b4875565023fdf9 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 4788fbedf952a4a5237495b38f5cba3f0d93b9c1..ee4d0396fb23aee01919cf67fbb95541a368eb86 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 dee9b9019629c40ab71d09f67f11be24aa2d2037..ca477369b13bfb56ab05319adec1949e91192017 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 e34154c38c797ff83bb5b467ba04f9c3151ed6bc..2257f4756b05dac4dbc47a9fd7cf351e34cb2eba 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 828578048f3567c4ae603aefceeb4b81dce1d013..7c27f0f927b2e81ee1ff31ba3641fa8336b5e2d7 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);