From e2441021a85d77f8915ee4b5fb8046bb82c7f91b Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Thu, 11 Apr 2013 15:33:53 +0200 Subject: [PATCH] [multiple changes] 2013-04-11 Pascal Obry * gnat_ugn.texi: Remove obsolete comment about DLL calling convention. 2013-04-11 Javier Miranda * 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 * sem_prag.adb (Analyze_Pragma): Detect a renaming by looking at the Renamed_Object attribute. (Is_Renaming): Removed. 2013-04-11 Vincent Celier * 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 * 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 --- gcc/ada/ChangeLog | 42 +++++++++++++++++++++++++++ gcc/ada/a-cbdlli.adb | 22 -------------- gcc/ada/a-cbdlli.ads | 24 +++++++++++++++- gcc/ada/a-cbhama.adb | 17 +---------- gcc/ada/a-cbhama.ads | 17 ++++++++++- gcc/ada/a-cbhase.adb | 17 +---------- gcc/ada/a-cbhase.ads | 17 ++++++++++- gcc/ada/a-cborma.adb | 24 +--------------- gcc/ada/a-cborma.ads | 25 +++++++++++++++- gcc/ada/a-cborse.adb | 22 -------------- gcc/ada/a-cborse.ads | 25 +++++++++++++++- gcc/ada/a-cdlili.adb | 20 ------------- gcc/ada/a-cdlili.ads | 22 +++++++++++++- gcc/ada/a-cfdlli.adb | 23 +-------------- gcc/ada/a-cfdlli.ads | 26 +++++++++++++++-- gcc/ada/a-cidlli.adb | 20 ------------- gcc/ada/a-cidlli.ads | 22 +++++++++++++- gcc/ada/a-cihama.adb | 16 +---------- gcc/ada/a-cihama.ads | 16 ++++++++++- gcc/ada/a-cihase.adb | 16 +---------- gcc/ada/a-cihase.ads | 16 ++++++++++- gcc/ada/a-ciorma.adb | 22 +------------- gcc/ada/a-ciorma.ads | 22 +++++++++++++- gcc/ada/a-ciormu.adb | 22 +------------- gcc/ada/a-ciormu.ads | 22 +++++++++++++- gcc/ada/a-ciorse.adb | 20 ------------- gcc/ada/a-ciorse.ads | 22 +++++++++++++- gcc/ada/a-cobove.adb | 21 -------------- gcc/ada/a-cobove.ads | 24 +++++++++++++++- gcc/ada/a-cohama.adb | 16 +---------- gcc/ada/a-cohama.ads | 16 ++++++++++- gcc/ada/a-cohase.adb | 13 +-------- gcc/ada/a-cohase.ads | 13 ++++++++- gcc/ada/a-coinve.adb | 20 ------------- gcc/ada/a-coinve.ads | 22 +++++++++++++- gcc/ada/a-coorma.adb | 22 +------------- gcc/ada/a-coorma.ads | 22 +++++++++++++- gcc/ada/a-coormu.adb | 22 +------------- gcc/ada/a-coormu.ads | 22 +++++++++++++- gcc/ada/a-coorse.adb | 20 ------------- gcc/ada/a-coorse.ads | 22 +++++++++++++- gcc/ada/exp_ch6.adb | 33 +++++++++++++++++++++ gcc/ada/exp_disp.adb | 1 + gcc/ada/gnat_ugn.texi | 6 ---- gcc/ada/prj-env.adb | 67 ++++++++++++++++++++++++++++++++++++------- gcc/ada/projects.texi | 14 ++++++--- gcc/ada/sem_ch6.adb | 7 +++++ gcc/ada/sem_prag.adb | 18 ++---------- 48 files changed, 560 insertions(+), 440 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 86ad8e43319..9628a886ba1 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,45 @@ +2013-04-11 Pascal Obry + + * gnat_ugn.texi: Remove obsolete comment about DLL calling + convention. + +2013-04-11 Javier Miranda + + * 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 + + * sem_prag.adb (Analyze_Pragma): Detect + a renaming by looking at the Renamed_Object attribute. + (Is_Renaming): Removed. + +2013-04-11 Vincent Celier + + * 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 + + * 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 * ttypes.ads, get_targ.ads: More minor rewording of comments. diff --git a/gcc/ada/a-cbdlli.adb b/gcc/ada/a-cbdlli.adb index f3e8c8bee30..36b9b81e83b 100644 --- a/gcc/ada/a-cbdlli.adb +++ b/gcc/ada/a-cbdlli.adb @@ -27,32 +27,10 @@ -- 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 -- ----------------------- diff --git a/gcc/ada/a-cbdlli.ads b/gcc/ada/a-cbdlli.ads index a8a6ee228f1..291c1e0eb72 100644 --- a/gcc/ada/a-cbdlli.ads +++ b/gcc/ada/a-cbdlli.ads @@ -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; diff --git a/gcc/ada/a-cbhama.adb b/gcc/ada/a-cbhama.adb index 314bed6142d..f4a953c1401 100644 --- a/gcc/ada/a-cbhama.adb +++ b/gcc/ada/a-cbhama.adb @@ -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 -- ----------------------- diff --git a/gcc/ada/a-cbhama.ads b/gcc/ada/a-cbhama.ads index 71ec0e3d956..076fac240e1 100644 --- a/gcc/ada/a-cbhama.ads +++ b/gcc/ada/a-cbhama.ads @@ -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; diff --git a/gcc/ada/a-cbhase.adb b/gcc/ada/a-cbhase.adb index cc60762ed15..99efc1dcf79 100644 --- a/gcc/ada/a-cbhase.adb +++ b/gcc/ada/a-cbhase.adb @@ -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 -- ----------------------- diff --git a/gcc/ada/a-cbhase.ads b/gcc/ada/a-cbhase.ads index ed47b798683..5de5d2832ec 100644 --- a/gcc/ada/a-cbhase.ads +++ b/gcc/ada/a-cbhase.ads @@ -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; diff --git a/gcc/ada/a-cborma.adb b/gcc/ada/a-cborma.adb index 8fca6495dc5..f508fc5642c 100644 --- a/gcc/ada/a-cborma.adb +++ b/gcc/ada/a-cborma.adb @@ -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 -- ----------------------------- diff --git a/gcc/ada/a-cborma.ads b/gcc/ada/a-cborma.ads index 6ade3e6c474..2c2a8a50e1b 100644 --- a/gcc/ada/a-cborma.ads +++ b/gcc/ada/a-cborma.ads @@ -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; diff --git a/gcc/ada/a-cborse.adb b/gcc/ada/a-cborse.adb index 64220f91ef2..eacd3eb7442 100644 --- a/gcc/ada/a-cborse.adb +++ b/gcc/ada/a-cborse.adb @@ -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 -- ------------------------------ diff --git a/gcc/ada/a-cborse.ads b/gcc/ada/a-cborse.ads index 16263577389..d22ef54b21b 100644 --- a/gcc/ada/a-cborse.ads +++ b/gcc/ada/a-cborse.ads @@ -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; diff --git a/gcc/ada/a-cdlili.adb b/gcc/ada/a-cdlili.adb index b097ef86ca4..9bd8899e2dd 100644 --- a/gcc/ada/a-cdlili.adb +++ b/gcc/ada/a-cdlili.adb @@ -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 -- ----------------------- diff --git a/gcc/ada/a-cdlili.ads b/gcc/ada/a-cdlili.ads index d1707c757a2..c99e7350afc 100644 --- a/gcc/ada/a-cdlili.ads +++ b/gcc/ada/a-cdlili.ads @@ -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; diff --git a/gcc/ada/a-cfdlli.adb b/gcc/ada/a-cfdlli.adb index ee9484077de..f0ed9987118 100644 --- a/gcc/ada/a-cfdlli.adb +++ b/gcc/ada/a-cfdlli.adb @@ -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- -- @@ -26,30 +26,9 @@ ------------------------------------------------------------------------------ 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 -- ----------------------- diff --git a/gcc/ada/a-cfdlli.ads b/gcc/ada/a-cfdlli.ads index 67ff3af8f48..58a67fae177 100644 --- a/gcc/ada/a-cfdlli.ads +++ b/gcc/ada/a-cfdlli.ads @@ -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; diff --git a/gcc/ada/a-cidlli.adb b/gcc/ada/a-cidlli.adb index 9907406ebdf..04d0597a22c 100644 --- a/gcc/ada/a-cidlli.adb +++ b/gcc/ada/a-cidlli.adb @@ -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 -- ----------------------- diff --git a/gcc/ada/a-cidlli.ads b/gcc/ada/a-cidlli.ads index af57af11ae9..a7e133c303d 100644 --- a/gcc/ada/a-cidlli.ads +++ b/gcc/ada/a-cidlli.ads @@ -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; diff --git a/gcc/ada/a-cihama.adb b/gcc/ada/a-cihama.adb index 2d889cdfb1b..e3e3d5ee43d 100644 --- a/gcc/ada/a-cihama.adb +++ b/gcc/ada/a-cihama.adb @@ -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 -- ----------------------- diff --git a/gcc/ada/a-cihama.ads b/gcc/ada/a-cihama.ads index feef181b65b..6e2df212a22 100644 --- a/gcc/ada/a-cihama.ads +++ b/gcc/ada/a-cihama.ads @@ -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; diff --git a/gcc/ada/a-cihase.adb b/gcc/ada/a-cihase.adb index bae3ecc3897..7a70bf65a87 100644 --- a/gcc/ada/a-cihase.adb +++ b/gcc/ada/a-cihase.adb @@ -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 -- ----------------------- diff --git a/gcc/ada/a-cihase.ads b/gcc/ada/a-cihase.ads index b300186f6db..2c4dec59996 100644 --- a/gcc/ada/a-cihase.ads +++ b/gcc/ada/a-cihase.ads @@ -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; diff --git a/gcc/ada/a-ciorma.adb b/gcc/ada/a-ciorma.adb index 7f2b2491eeb..b836dc69fd0 100644 --- a/gcc/ada/a-ciorma.adb +++ b/gcc/ada/a-ciorma.adb @@ -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 -- ----------------------------- diff --git a/gcc/ada/a-ciorma.ads b/gcc/ada/a-ciorma.ads index 5c3a776c4aa..e414d39cf71 100644 --- a/gcc/ada/a-ciorma.ads +++ b/gcc/ada/a-ciorma.ads @@ -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; diff --git a/gcc/ada/a-ciormu.adb b/gcc/ada/a-ciormu.adb index 4fce4754c78..2bc1200014b 100644 --- a/gcc/ada/a-ciormu.adb +++ b/gcc/ada/a-ciormu.adb @@ -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 -- ----------------------------- diff --git a/gcc/ada/a-ciormu.ads b/gcc/ada/a-ciormu.ads index cfd1676aa5f..575d5d8321e 100644 --- a/gcc/ada/a-ciormu.ads +++ b/gcc/ada/a-ciormu.ads @@ -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; diff --git a/gcc/ada/a-ciorse.adb b/gcc/ada/a-ciorse.adb index 3b1ffb43022..2f8820cb952 100644 --- a/gcc/ada/a-ciorse.adb +++ b/gcc/ada/a-ciorse.adb @@ -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 -- ----------------------- diff --git a/gcc/ada/a-ciorse.ads b/gcc/ada/a-ciorse.ads index 87ba353e9e8..0dba13e42ed 100644 --- a/gcc/ada/a-ciorse.ads +++ b/gcc/ada/a-ciorse.ads @@ -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; diff --git a/gcc/ada/a-cobove.adb b/gcc/ada/a-cobove.adb index 01755cfd80f..c2790517e01 100644 --- a/gcc/ada/a-cobove.adb +++ b/gcc/ada/a-cobove.adb @@ -28,32 +28,11 @@ ------------------------------------------------------------------------------ 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 -- ----------------------- diff --git a/gcc/ada/a-cobove.ads b/gcc/ada/a-cobove.ads index 932aafb886b..267c64de425 100644 --- a/gcc/ada/a-cobove.ads +++ b/gcc/ada/a-cobove.ads @@ -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; diff --git a/gcc/ada/a-cohama.adb b/gcc/ada/a-cohama.adb index 5eee4b302c1..6af16eec227 100644 --- a/gcc/ada/a-cohama.adb +++ b/gcc/ada/a-cohama.adb @@ -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 -- ----------------------- diff --git a/gcc/ada/a-cohama.ads b/gcc/ada/a-cohama.ads index 98b2cb3c5a8..540e24af19d 100644 --- a/gcc/ada/a-cohama.ads +++ b/gcc/ada/a-cohama.ads @@ -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; diff --git a/gcc/ada/a-cohase.adb b/gcc/ada/a-cohase.adb index 6180168a1da..f9e1b2aa8c0 100644 --- a/gcc/ada/a-cohase.adb +++ b/gcc/ada/a-cohase.adb @@ -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 -- ----------------------- diff --git a/gcc/ada/a-cohase.ads b/gcc/ada/a-cohase.ads index de62cd96a5f..2931800aaf8 100644 --- a/gcc/ada/a-cohase.ads +++ b/gcc/ada/a-cohase.ads @@ -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; diff --git a/gcc/ada/a-coinve.adb b/gcc/ada/a-coinve.adb index d63ebc07500..cff3a286edb 100644 --- a/gcc/ada/a-coinve.adb +++ b/gcc/ada/a-coinve.adb @@ -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; - --------- -- "&" -- --------- diff --git a/gcc/ada/a-coinve.ads b/gcc/ada/a-coinve.ads index c9a64989be5..2c841671af4 100644 --- a/gcc/ada/a-coinve.ads +++ b/gcc/ada/a-coinve.ads @@ -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; diff --git a/gcc/ada/a-coorma.adb b/gcc/ada/a-coorma.adb index aa8fa91a8c5..52025bb5c2c 100644 --- a/gcc/ada/a-coorma.adb +++ b/gcc/ada/a-coorma.adb @@ -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 -- ----------------------------- diff --git a/gcc/ada/a-coorma.ads b/gcc/ada/a-coorma.ads index d9281faccc3..2a642ac47cb 100644 --- a/gcc/ada/a-coorma.ads +++ b/gcc/ada/a-coorma.ads @@ -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; diff --git a/gcc/ada/a-coormu.adb b/gcc/ada/a-coormu.adb index 2cc76319747..a3c5ab5c97e 100644 --- a/gcc/ada/a-coormu.adb +++ b/gcc/ada/a-coormu.adb @@ -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 -- ----------------------------- diff --git a/gcc/ada/a-coormu.ads b/gcc/ada/a-coormu.ads index a832cac77f0..8d684741e94 100644 --- a/gcc/ada/a-coormu.ads +++ b/gcc/ada/a-coormu.ads @@ -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; diff --git a/gcc/ada/a-coorse.adb b/gcc/ada/a-coorse.adb index 43d4ec9a3e8..e7ac52b2325 100644 --- a/gcc/ada/a-coorse.adb +++ b/gcc/ada/a-coorse.adb @@ -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 -- ------------------------------ diff --git a/gcc/ada/a-coorse.ads b/gcc/ada/a-coorse.ads index e28a71bc299..cf0110c74c2 100644 --- a/gcc/ada/a-coorse.ads +++ b/gcc/ada/a-coorse.ads @@ -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; diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index d28510cb038..85dc076bacd 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -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; diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb index 52047d7f876..b003d854dbd 100644 --- a/gcc/ada/exp_disp.adb +++ b/gcc/ada/exp_disp.adb @@ -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 diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 5a456cc0976..d84bc04d99b 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -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 diff --git a/gcc/ada/prj-env.adb b/gcc/ada/prj-env.adb index 4788fbedf95..ee4d0396fb2 100644 --- a/gcc/ada/prj-env.adb +++ b/gcc/ada/prj-env.adb @@ -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); diff --git a/gcc/ada/projects.texi b/gcc/ada/projects.texi index dee9b901962..ca477369b13 100644 --- a/gcc/ada/projects.texi +++ b/gcc/ada/projects.texi @@ -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 diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index e34154c38c7..2257f4756b0 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -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. diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 828578048f3..7c27f0f927b 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -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); -- 2.30.2