diff options
author | Matthew Heaney <heaney@adacore.com> | 2012-01-23 09:35:53 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-01-23 10:35:53 +0100 |
commit | 3c24c853da7ea2106fe07213fdf1efd43b86bddf (patch) | |
tree | b1fee48f14a9a5cc25d00c2a2db9351c395f6a27 | |
parent | c61b6f0f3c7d3419603e9143a7065fefb3340247 (diff) | |
download | gcc-3c24c853da7ea2106fe07213fdf1efd43b86bddf.zip gcc-3c24c853da7ea2106fe07213fdf1efd43b86bddf.tar.gz gcc-3c24c853da7ea2106fe07213fdf1efd43b86bddf.tar.bz2 |
a-cohase.ads, [...] (Cursor'Read, [...]): Declare in private part.
2012-01-23 Matthew Heaney <heaney@adacore.com>
* a-cohase.ads, a-cihase.ads, a-cbhase.ads, a-coorse.ads,
a-ciorse.ads, a-cborse.ads, a-cohama.ads, a-cihama.ads, a-cbhama.ads,
a-coorma.ads, a-ciorma.ads, a-cborma.ads, a-cdlili.ads, a-cidlli.ads,
a-cbdlli.ads, a-convec.ads, a-coinve.ads, a-cobove.ads (Cursor'Read,
Cursor'Write): Declare in private part.
(Reference_Type'Read, Reference_Type'Write): Ditto.
(Constant_Reference_Type'Read, Constant_Reference_Type'Write): Ditto.
From-SVN: r183418
-rw-r--r-- | gcc/ada/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/ada/a-cbdlli.ads | 55 | ||||
-rw-r--r-- | gcc/ada/a-cbhama.ads | 59 | ||||
-rw-r--r-- | gcc/ada/a-cbhase.ads | 31 | ||||
-rw-r--r-- | gcc/ada/a-cborma.ads | 85 | ||||
-rw-r--r-- | gcc/ada/a-cborse.ads | 43 | ||||
-rw-r--r-- | gcc/ada/a-cdlili.ads | 58 | ||||
-rw-r--r-- | gcc/ada/a-cidlli.ads | 65 | ||||
-rw-r--r-- | gcc/ada/a-cihama.ads | 85 | ||||
-rw-r--r-- | gcc/ada/a-cihase.ads | 31 | ||||
-rw-r--r-- | gcc/ada/a-ciorma.ads | 31 | ||||
-rw-r--r-- | gcc/ada/a-ciorse.ads | 58 | ||||
-rw-r--r-- | gcc/ada/a-cobove.ads | 56 | ||||
-rw-r--r-- | gcc/ada/a-cohama.ads | 87 | ||||
-rw-r--r-- | gcc/ada/a-cohase.ads | 31 | ||||
-rw-r--r-- | gcc/ada/a-coinve.ads | 100 | ||||
-rw-r--r-- | gcc/ada/a-convec.ads | 99 | ||||
-rw-r--r-- | gcc/ada/a-coorma.ads | 58 | ||||
-rw-r--r-- | gcc/ada/a-coorse.ads | 55 |
19 files changed, 573 insertions, 524 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index edc4dc4..b1ef51c 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,13 @@ +2012-01-23 Matthew Heaney <heaney@adacore.com> + + * a-cohase.ads, a-cihase.ads, a-cbhase.ads, a-coorse.ads, + a-ciorse.ads, a-cborse.ads, a-cohama.ads, a-cihama.ads, a-cbhama.ads, + a-coorma.ads, a-ciorma.ads, a-cborma.ads, a-cdlili.ads, a-cidlli.ads, + a-cbdlli.ads, a-convec.ads, a-coinve.ads, a-cobove.ads (Cursor'Read, + Cursor'Write): Declare in private part. + (Reference_Type'Read, Reference_Type'Write): Ditto. + (Constant_Reference_Type'Read, Constant_Reference_Type'Write): Ditto. + 2012-01-23 Robert Dewar <dewar@adacore.com> * a-catizo.ads, a-calend.adb, a-calend.ads, par-ch13.adb: Minor diff --git a/gcc/ada/a-cbdlli.ads b/gcc/ada/a-cbdlli.ads index 6612ea1..a8a6ee2 100644 --- a/gcc/ada/a-cbdlli.ads +++ b/gcc/ada/a-cbdlli.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2012, 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 -- @@ -31,9 +31,10 @@ -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ -with Ada.Streams; use Ada.Streams; with Ada.Iterator_Interfaces; +private with Ada.Streams; + generic type Element_Type is private; @@ -93,35 +94,11 @@ package Ada.Containers.Bounded_Doubly_Linked_Lists is with Implicit_Dereference => Element; - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Constant_Reference_Type); - - for Constant_Reference_Type'Write use Write; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Constant_Reference_Type); - - for Constant_Reference_Type'Read use Read; - type Reference_Type (Element : not null access Element_Type) is private with Implicit_Dereference => Element; - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Reference_Type); - - for Reference_Type'Write use Write; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Reference_Type); - - for Reference_Type'Read use Read; - function Constant_Reference (Container : aliased List; Position : Cursor) return Constant_Reference_Type; @@ -270,6 +247,8 @@ private pragma Inline (Next); pragma Inline (Previous); + use Ada.Streams; + type Node_Type is record Prev : Count_Type'Base; Next : Count_Type; @@ -324,9 +303,33 @@ private type Constant_Reference_Type (Element : not null access constant Element_Type) is null record; + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Constant_Reference_Type); + + for Constant_Reference_Type'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Item : out Constant_Reference_Type); + + for Constant_Reference_Type'Read use Read; + type Reference_Type (Element : not null access Element_Type) is null record; + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Reference_Type); + + for Reference_Type'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Item : out Reference_Type); + + for Reference_Type'Read use Read; + Empty_List : constant List := (Capacity => 0, others => <>); No_Element : constant Cursor := Cursor'(null, 0); diff --git a/gcc/ada/a-cbhama.ads b/gcc/ada/a-cbhama.ads index 78347c5..e4bba33 100644 --- a/gcc/ada/a-cbhama.ads +++ b/gcc/ada/a-cbhama.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2012, 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 -- @@ -31,11 +31,11 @@ -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ -private with Ada.Containers.Hash_Tables; - -with Ada.Streams; use Ada.Streams; with Ada.Iterator_Interfaces; +private with Ada.Containers.Hash_Tables; +private with Ada.Streams; + generic type Key_Type is private; type Element_Type is private; @@ -140,34 +140,10 @@ package Ada.Containers.Bounded_Hashed_Maps is with Implicit_Dereference => Element; - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Constant_Reference_Type); - - for Constant_Reference_Type'Write use Write; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Constant_Reference_Type); - - for Constant_Reference_Type'Read use Read; - type Reference_Type (Element : not null access Element_Type) is private with Implicit_Dereference => Element; - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Reference_Type); - - for Reference_Type'Write use Write; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Reference_Type); - - for Reference_Type'Read use Read; - function Constant_Reference (Container : aliased Map; Position : Cursor) return Constant_Reference_Type; @@ -362,6 +338,7 @@ private new HT_Types.Hash_Table_Type (Capacity, Modulus) with null record; use HT_Types; + use Ada.Streams; procedure Write (Stream : not null access Root_Stream_Type'Class; @@ -404,12 +381,36 @@ private type Constant_Reference_Type (Element : not null access constant Element_Type) is null record; + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Constant_Reference_Type); + + for Constant_Reference_Type'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Item : out Constant_Reference_Type); + + for Constant_Reference_Type'Read use Read; + type Reference_Type (Element : not null access Element_Type) is null record; - No_Element : constant Cursor := (Container => null, Node => 0); + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Reference_Type); + + for Reference_Type'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Item : out Reference_Type); + + for Reference_Type'Read use Read; Empty_Map : constant Map := (Hash_Table_Type with Capacity => 0, Modulus => 0); + No_Element : constant Cursor := (Container => null, Node => 0); + end Ada.Containers.Bounded_Hashed_Maps; diff --git a/gcc/ada/a-cbhase.ads b/gcc/ada/a-cbhase.ads index ceb3582..0befce6 100644 --- a/gcc/ada/a-cbhase.ads +++ b/gcc/ada/a-cbhase.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2012, 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 -- @@ -32,6 +32,7 @@ ------------------------------------------------------------------------------ with Ada.Iterator_Interfaces; + private with Ada.Containers.Hash_Tables; private with Ada.Streams; @@ -478,6 +479,18 @@ private use HT_Types; use Ada.Streams; + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Container : Set); + + for Set'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Container : out Set); + + for Set'Read use Read; + type Set_Access is access all Set; for Set_Access'Storage_Size use 0; @@ -504,20 +517,6 @@ private for Cursor'Read use Read; - No_Element : constant Cursor := (Container => null, Node => 0); - - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Container : Set); - - for Set'Write use Write; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Container : out Set); - - for Set'Read use Read; - type Constant_Reference_Type (Element : not null access constant Element_Type) is null record; @@ -536,4 +535,6 @@ private Empty_Set : constant Set := (Hash_Table_Type with Capacity => 0, Modulus => 0); + No_Element : constant Cursor := (Container => null, Node => 0); + end Ada.Containers.Bounded_Hashed_Sets; diff --git a/gcc/ada/a-cborma.ads b/gcc/ada/a-cborma.ads index bfb6f01..6ade3e6 100644 --- a/gcc/ada/a-cborma.ads +++ b/gcc/ada/a-cborma.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2012, 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 -- @@ -31,11 +31,11 @@ -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ -private with Ada.Containers.Red_Black_Trees; - -with Ada.Streams; use Ada.Streams; with Ada.Iterator_Interfaces; +private with Ada.Containers.Red_Black_Trees; +private with Ada.Streams; + generic type Key_Type is private; type Element_Type is private; @@ -102,34 +102,10 @@ package Ada.Containers.Bounded_Ordered_Maps is with Implicit_Dereference => Element; - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Constant_Reference_Type); - - for Constant_Reference_Type'Read use Read; - - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Constant_Reference_Type); - - for Constant_Reference_Type'Write use Write; - type Reference_Type (Element : not null access Element_Type) is private with Implicit_Dereference => Element; - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Reference_Type); - - for Reference_Type'Read use Read; - - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Reference_Type); - - for Reference_Type'Write use Write; - function Constant_Reference (Container : aliased Map; Position : Cursor) return Constant_Reference_Type; @@ -269,11 +245,24 @@ private type Map (Capacity : Count_Type) is new Tree_Types.Tree_Type (Capacity) with null record; - type Map_Access is access all Map; - for Map_Access'Storage_Size use 0; - use Red_Black_Trees; use Tree_Types; + use Ada.Streams; + + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Container : Map); + + for Map'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Container : out Map); + + for Map'Read use Read; + + type Map_Access is access all Map; + for Map_Access'Storage_Size use 0; type Cursor is record Container : Map_Access; @@ -292,26 +281,38 @@ private for Cursor'Read use Read; - No_Element : constant Cursor := Cursor'(null, 0); + type Constant_Reference_Type + (Element : not null access constant Element_Type) is null record; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Item : out Constant_Reference_Type); + + for Constant_Reference_Type'Read use Read; procedure Write - (Stream : not null access Root_Stream_Type'Class; - Container : Map); + (Stream : not null access Root_Stream_Type'Class; + Item : Constant_Reference_Type); - for Map'Write use Write; + for Constant_Reference_Type'Write use Write; + + type Reference_Type + (Element : not null access Element_Type) is null record; procedure Read - (Stream : not null access Root_Stream_Type'Class; - Container : out Map); + (Stream : not null access Root_Stream_Type'Class; + Item : out Reference_Type); - for Map'Read use Read; + for Reference_Type'Read use Read; - type Constant_Reference_Type - (Element : not null access constant Element_Type) is null record; + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Reference_Type); - type Reference_Type - (Element : not null access Element_Type) is null record; + for Reference_Type'Write use Write; Empty_Map : constant Map := Map'(Tree_Type with Capacity => 0); + No_Element : constant Cursor := Cursor'(null, 0); + end Ada.Containers.Bounded_Ordered_Maps; diff --git a/gcc/ada/a-cborse.ads b/gcc/ada/a-cborse.ads index 6a8bff9..1626357 100644 --- a/gcc/ada/a-cborse.ads +++ b/gcc/ada/a-cborse.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2012, 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 -- @@ -31,10 +31,11 @@ -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ -private with Ada.Containers.Red_Black_Trees; -with Ada.Streams; use Ada.Streams; with Ada.Iterator_Interfaces; +private with Ada.Containers.Red_Black_Trees; +private with Ada.Streams; + generic type Element_Type is private; @@ -60,6 +61,7 @@ package Ada.Containers.Bounded_Ordered_Sets is Empty_Set : constant Set; No_Element : constant Cursor; + function Has_Element (Position : Cursor) return Boolean; package Set_Iterator_Interfaces is new @@ -277,6 +279,8 @@ package Ada.Containers.Bounded_Ordered_Sets is type Reference_Type (Element : not null access Element_Type) is null record; + use Ada.Streams; + procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Reference_Type); @@ -310,6 +314,21 @@ private type Set (Capacity : Count_Type) is new Tree_Types.Tree_Type (Capacity) with null record; + use Tree_Types; + use Ada.Streams; + + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Container : Set); + + for Set'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Container : out Set); + + for Set'Read use Read; + type Set_Access is access all Set; for Set_Access'Storage_Size use 0; @@ -324,8 +343,6 @@ private Node : Count_Type := 0; end record; - use Tree_Types; - procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Cursor); @@ -338,20 +355,6 @@ private for Cursor'Read use Read; - No_Element : constant Cursor := Cursor'(null, 0); - - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Container : Set); - - for Set'Write use Write; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Container : out Set); - - for Set'Read use Read; - type Constant_Reference_Type (Element : not null access constant Element_Type) is null record; @@ -369,4 +372,6 @@ private Empty_Set : constant Set := Set'(Tree_Type with Capacity => 0); + No_Element : constant Cursor := Cursor'(null, 0); + end Ada.Containers.Bounded_Ordered_Sets; diff --git a/gcc/ada/a-cdlili.ads b/gcc/ada/a-cdlili.ads index 4799198..ae9ae6b 100644 --- a/gcc/ada/a-cdlili.ads +++ b/gcc/ada/a-cdlili.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2012, 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 -- @@ -31,11 +31,11 @@ -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ -private with Ada.Finalization; - -with Ada.Streams; use Ada.Streams; with Ada.Iterator_Interfaces; +private with Ada.Finalization; +private with Ada.Streams; + generic type Element_Type is private; @@ -61,6 +61,7 @@ package Ada.Containers.Doubly_Linked_Lists is Empty_List : constant List; No_Element : constant Cursor; + function Has_Element (Position : Cursor) return Boolean; package List_Iterator_Interfaces is new @@ -95,35 +96,11 @@ package Ada.Containers.Doubly_Linked_Lists is with Implicit_Dereference => Element; - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Constant_Reference_Type); - - for Constant_Reference_Type'Write use Write; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Constant_Reference_Type); - - for Constant_Reference_Type'Read use Read; - type Reference_Type (Element : not null access Element_Type) is private with Implicit_Dereference => Element; - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Reference_Type); - - for Reference_Type'Write use Write; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Reference_Type); - - for Reference_Type'Read use Read; - function Constant_Reference (Container : aliased List; Position : Cursor) return Constant_Reference_Type; @@ -280,6 +257,7 @@ private end record; use Ada.Finalization; + use Ada.Streams; type List is new Controlled with record @@ -330,9 +308,33 @@ private type Constant_Reference_Type (Element : not null access constant Element_Type) is null record; + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Constant_Reference_Type); + + for Constant_Reference_Type'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Item : out Constant_Reference_Type); + + for Constant_Reference_Type'Read use Read; + type Reference_Type (Element : not null access Element_Type) is null record; + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Reference_Type); + + for Reference_Type'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Item : out Reference_Type); + + for Reference_Type'Read use Read; + Empty_List : constant List := (Controlled with null, null, 0, 0, 0); No_Element : constant Cursor := Cursor'(null, null); diff --git a/gcc/ada/a-cidlli.ads b/gcc/ada/a-cidlli.ads index 762693c..37886e15 100644 --- a/gcc/ada/a-cidlli.ads +++ b/gcc/ada/a-cidlli.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2012, 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 -- @@ -32,9 +32,9 @@ ------------------------------------------------------------------------------ with Ada.Iterator_Interfaces; -with Ada.Streams; use Ada.Streams; private with Ada.Finalization; +private with Ada.Streams; generic type Element_Type (<>) is private; @@ -95,35 +95,11 @@ package Ada.Containers.Indefinite_Doubly_Linked_Lists is with Implicit_Dereference => Element; - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Constant_Reference_Type); - - for Constant_Reference_Type'Write use Write; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Constant_Reference_Type); - - for Constant_Reference_Type'Read use Read; - type Reference_Type (Element : not null access Element_Type) is private with Implicit_Dereference => Element; - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Reference_Type); - - for Reference_Type'Write use Write; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Reference_Type); - - for Reference_Type'Read use Read; - function Constant_Reference (Container : aliased List; Position : Cursor) return Constant_Reference_Type; @@ -275,6 +251,7 @@ private end record; use Ada.Finalization; + use Ada.Streams; type List is new Controlled with record @@ -285,12 +262,6 @@ private Lock : Natural := 0; end record; - type Constant_Reference_Type - (Element : not null access constant Element_Type) is null record; - - type Reference_Type - (Element : not null access Element_Type) is null record; - overriding procedure Adjust (Container : in out List); overriding procedure Finalize (Container : in out List) renames Clear; @@ -328,6 +299,36 @@ private for Cursor'Write use Write; + type Constant_Reference_Type + (Element : not null access constant Element_Type) is null record; + + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Constant_Reference_Type); + + for Constant_Reference_Type'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Item : out Constant_Reference_Type); + + for Constant_Reference_Type'Read use Read; + + type Reference_Type + (Element : not null access Element_Type) is null record; + + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Reference_Type); + + for Reference_Type'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Item : out Reference_Type); + + for Reference_Type'Read use Read; + Empty_List : constant List := List'(Controlled with null, null, 0, 0, 0); No_Element : constant Cursor := Cursor'(null, null); diff --git a/gcc/ada/a-cihama.ads b/gcc/ada/a-cihama.ads index 2cd41eb..f2158fd 100644 --- a/gcc/ada/a-cihama.ads +++ b/gcc/ada/a-cihama.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2012, 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 -- @@ -31,10 +31,11 @@ -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ +with Ada.Iterator_Interfaces; + private with Ada.Containers.Hash_Tables; private with Ada.Finalization; -with Ada.Streams; use Ada.Streams; -with Ada.Iterator_Interfaces; +private with Ada.Streams; generic type Key_Type (<>) is private; @@ -139,34 +140,10 @@ package Ada.Containers.Indefinite_Hashed_Maps is with Implicit_Dereference => Element; - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Constant_Reference_Type); - - for Constant_Reference_Type'Write use Write; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Constant_Reference_Type); - - for Constant_Reference_Type'Read use Read; - type Reference_Type (Element : not null access Element_Type) is private with Implicit_Dereference => Element; - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Reference_Type); - - for Reference_Type'Write use Write; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Reference_Type); - - for Reference_Type'Read use Read; - function Constant_Reference (Container : aliased Map; Position : Cursor) return Constant_Reference_Type; @@ -346,11 +323,25 @@ private HT : HT_Types.Hash_Table_Type; end record; + overriding procedure Adjust (Container : in out Map); + + overriding procedure Finalize (Container : in out Map); + use HT_Types; use Ada.Finalization; + use Ada.Streams; - overriding procedure Adjust (Container : in out Map); - overriding procedure Finalize (Container : in out Map); + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Container : Map); + + for Map'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Container : out Map); + + for Map'Read use Read; type Map_Access is access all Map; for Map_Access'Storage_Size use 0; @@ -366,34 +357,44 @@ private for Cursor'Write use Write; + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Item : out Cursor); + + for Cursor'Read use Read; + type Constant_Reference_Type (Element : not null access constant Element_Type) is null record; - type Reference_Type - (Element : not null access Element_Type) is null record; + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Constant_Reference_Type); + + for Constant_Reference_Type'Write use Write; procedure Read (Stream : not null access Root_Stream_Type'Class; - Item : out Cursor); + Item : out Constant_Reference_Type); - for Cursor'Read use Read; + for Constant_Reference_Type'Read use Read; - No_Element : constant Cursor := - (Container => null, - Node => null); + type Reference_Type + (Element : not null access Element_Type) is null record; procedure Write - (Stream : not null access Root_Stream_Type'Class; - Container : Map); + (Stream : not null access Root_Stream_Type'Class; + Item : Reference_Type); - for Map'Write use Write; + for Reference_Type'Write use Write; procedure Read - (Stream : not null access Root_Stream_Type'Class; - Container : out Map); + (Stream : not null access Root_Stream_Type'Class; + Item : out Reference_Type); - for Map'Read use Read; + for Reference_Type'Read use Read; Empty_Map : constant Map := (Controlled with HT => (null, 0, 0, 0)); + No_Element : constant Cursor := (Container => null, Node => null); + end Ada.Containers.Indefinite_Hashed_Maps; diff --git a/gcc/ada/a-cihase.ads b/gcc/ada/a-cihase.ads index db59bdb..f361830b 100644 --- a/gcc/ada/a-cihase.ads +++ b/gcc/ada/a-cihase.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2012, 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 -- @@ -32,6 +32,7 @@ ------------------------------------------------------------------------------ with Ada.Iterator_Interfaces; + private with Ada.Containers.Hash_Tables; private with Ada.Streams; private with Ada.Finalization; @@ -474,6 +475,18 @@ private use Ada.Finalization; use Ada.Streams; + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Container : Set); + + for Set'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Container : out Set); + + for Set'Read use Read; + type Set_Access is access all Set; for Set_Access'Storage_Size use 0; @@ -494,20 +507,6 @@ private for Cursor'Read use Read; - No_Element : constant Cursor := (Container => null, Node => null); - - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Container : Set); - - for Set'Write use Write; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Container : out Set); - - for Set'Read use Read; - type Constant_Reference_Type (Element : not null access constant Element_Type) is null record; @@ -525,4 +524,6 @@ private Empty_Set : constant Set := (Controlled with HT => (null, 0, 0, 0)); + No_Element : constant Cursor := (Container => null, Node => null); + end Ada.Containers.Indefinite_Hashed_Sets; diff --git a/gcc/ada/a-ciorma.ads b/gcc/ada/a-ciorma.ads index 814f062..7599b3e 100644 --- a/gcc/ada/a-ciorma.ads +++ b/gcc/ada/a-ciorma.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2012, 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 -- @@ -32,6 +32,7 @@ ------------------------------------------------------------------------------ with Ada.Iterator_Interfaces; + private with Ada.Containers.Red_Black_Trees; private with Ada.Finalization; private with Ada.Streams; @@ -259,6 +260,18 @@ private use Ada.Finalization; use Ada.Streams; + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Container : Map); + + for Map'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Container : out Map); + + for Map'Read use Read; + type Map_Access is access all Map; for Map_Access'Storage_Size use 0; @@ -279,20 +292,6 @@ private for Cursor'Read use Read; - No_Element : constant Cursor := Cursor'(null, null); - - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Container : Map); - - for Map'Write use Write; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Container : out Map); - - for Map'Read use Read; - type Constant_Reference_Type (Element : not null access constant Element_Type) is null record; @@ -331,4 +330,6 @@ private Busy => 0, Lock => 0)); + No_Element : constant Cursor := Cursor'(null, null); + end Ada.Containers.Indefinite_Ordered_Maps; diff --git a/gcc/ada/a-ciorse.ads b/gcc/ada/a-ciorse.ads index 5e2f84d..aa16272 100644 --- a/gcc/ada/a-ciorse.ads +++ b/gcc/ada/a-ciorse.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2012, 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 -- @@ -31,10 +31,11 @@ -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ +with Ada.Iterator_Interfaces; + private with Ada.Containers.Red_Black_Trees; private with Ada.Finalization; -with Ada.Streams; use Ada.Streams; -with Ada.Iterator_Interfaces; +private with Ada.Streams; generic type Element_Type (<>) is private; @@ -99,18 +100,6 @@ package Ada.Containers.Indefinite_Ordered_Sets is (Container : aliased Set; Position : Cursor) return Constant_Reference_Type; - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Constant_Reference_Type); - - for Constant_Reference_Type'Read use Read; - - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Constant_Reference_Type); - - for Constant_Reference_Type'Write use Write; - procedure Assign (Target : in out Set; Source : Set); function Copy (Source : Set) return Set; @@ -306,6 +295,8 @@ package Ada.Containers.Indefinite_Ordered_Sets is type Reference_Type (Element : not null access Element_Type) is null record; + use Ada.Streams; + procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Reference_Type); @@ -351,6 +342,19 @@ private use Red_Black_Trees; use Tree_Types; use Ada.Finalization; + use Ada.Streams; + + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Container : Set); + + for Set'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Container : out Set); + + for Set'Read use Read; type Set_Access is access all Set; for Set_Access'Storage_Size use 0; @@ -372,22 +376,20 @@ private for Cursor'Read use Read; - No_Element : constant Cursor := Cursor'(null, null); - - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Container : Set); - - for Set'Write use Write; + type Constant_Reference_Type + (Element : not null access constant Element_Type) is null record; procedure Read - (Stream : not null access Root_Stream_Type'Class; - Container : out Set); + (Stream : not null access Root_Stream_Type'Class; + Item : out Constant_Reference_Type); - for Set'Read use Read; + for Constant_Reference_Type'Read use Read; - type Constant_Reference_Type - (Element : not null access constant Element_Type) is null record; + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Constant_Reference_Type); + + for Constant_Reference_Type'Write use Write; Empty_Set : constant Set := (Controlled with Tree => (First => null, @@ -397,4 +399,6 @@ private Busy => 0, Lock => 0)); + No_Element : constant Cursor := Cursor'(null, null); + end Ada.Containers.Indefinite_Ordered_Sets; diff --git a/gcc/ada/a-cobove.ads b/gcc/ada/a-cobove.ads index 6bcb0a4..932aafb 100644 --- a/gcc/ada/a-cobove.ads +++ b/gcc/ada/a-cobove.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2012, 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 -- @@ -31,9 +31,10 @@ -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ -with Ada.Streams; use Ada.Streams; with Ada.Iterator_Interfaces; +private with Ada.Streams; + generic type Index_Type is range <>; type Element_Type is private; @@ -64,6 +65,7 @@ package Ada.Containers.Bounded_Vectors is Empty_Vector : constant Vector; No_Element : constant Cursor; + function Has_Element (Position : Cursor) return Boolean; package Vector_Iterator_Interfaces is new @@ -148,34 +150,10 @@ package Ada.Containers.Bounded_Vectors is with Implicit_Dereference => Element; - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Constant_Reference_Type); - - for Constant_Reference_Type'Read use Read; - - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Constant_Reference_Type); - - for Constant_Reference_Type'Write use Write; - type Reference_Type (Element : not null access Element_Type) is private with Implicit_Dereference => Element; - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Reference_Type); - - for Reference_Type'Read use Read; - - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Reference_Type); - - for Reference_Type'Write use Write; - function Constant_Reference (Container : aliased Vector; Position : Cursor) return Constant_Reference_Type; @@ -385,6 +363,8 @@ private pragma Inline (Next); pragma Inline (Previous); + use Ada.Streams; + type Elements_Array is array (Count_Type range <>) of aliased Element_Type; function "=" (L, R : Elements_Array) return Boolean is abstract; @@ -430,9 +410,33 @@ private type Constant_Reference_Type (Element : not null access constant Element_Type) is null record; + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Item : out Constant_Reference_Type); + + for Constant_Reference_Type'Read use Read; + + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Constant_Reference_Type); + + for Constant_Reference_Type'Write use Write; + type Reference_Type (Element : not null access Element_Type) is null record; + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Item : out Reference_Type); + + for Reference_Type'Read use Read; + + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Reference_Type); + + for Reference_Type'Write use Write; + Empty_Vector : constant Vector := (Capacity => 0, others => <>); No_Element : constant Cursor := Cursor'(null, Index_Type'First); diff --git a/gcc/ada/a-cohama.ads b/gcc/ada/a-cohama.ads index a5b2ff3..6550b46 100644 --- a/gcc/ada/a-cohama.ads +++ b/gcc/ada/a-cohama.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2012, 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 -- @@ -31,11 +31,11 @@ -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ +with Ada.Iterator_Interfaces; + private with Ada.Containers.Hash_Tables; private with Ada.Finalization; - -with Ada.Streams; use Ada.Streams; -with Ada.Iterator_Interfaces; +private with Ada.Streams; generic type Key_Type is private; @@ -61,18 +61,6 @@ package Ada.Containers.Hashed_Maps is type Cursor is private; pragma Preelaborable_Initialization (Cursor); - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Cursor); - - for Cursor'Read use Read; - - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Cursor); - - for Cursor'Write use Write; - Empty_Map : constant Map; -- Map objects declared without an initialization expression are -- initialized to the value Empty_Map. @@ -153,34 +141,10 @@ package Ada.Containers.Hashed_Maps is with Implicit_Dereference => Element; - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Constant_Reference_Type); - - for Constant_Reference_Type'Write use Write; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Constant_Reference_Type); - - for Constant_Reference_Type'Read use Read; - type Reference_Type (Element : not null access Element_Type) is private with Implicit_Dereference => Element; - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Reference_Type); - - for Reference_Type'Write use Write; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Reference_Type); - - for Reference_Type'Read use Read; - function Constant_Reference (Container : aliased Map; Position : Cursor) return Constant_Reference_Type; @@ -365,13 +329,14 @@ private HT : HT_Types.Hash_Table_Type; end record; - use HT_Types; - use Ada.Finalization; - overriding procedure Adjust (Container : in out Map); overriding procedure Finalize (Container : in out Map); + use HT_Types; + use Ada.Finalization; + use Ada.Streams; + procedure Write (Stream : not null access Root_Stream_Type'Class; Container : Map); @@ -392,12 +357,48 @@ private Node : Node_Access; end record; + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Item : out Cursor); + + for Cursor'Read use Read; + + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Cursor); + + for Cursor'Write use Write; + type Constant_Reference_Type (Element : not null access constant Element_Type) is null record; + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Constant_Reference_Type); + + for Constant_Reference_Type'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Item : out Constant_Reference_Type); + + for Constant_Reference_Type'Read use Read; + type Reference_Type (Element : not null access Element_Type) is null record; + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Reference_Type); + + for Reference_Type'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Item : out Reference_Type); + + for Reference_Type'Read use Read; + Empty_Map : constant Map := (Controlled with HT => (null, 0, 0, 0)); No_Element : constant Cursor := (Container => null, Node => null); diff --git a/gcc/ada/a-cohase.ads b/gcc/ada/a-cohase.ads index 97b209d..88b5f4b 100644 --- a/gcc/ada/a-cohase.ads +++ b/gcc/ada/a-cohase.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2012, 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 -- @@ -32,6 +32,7 @@ ------------------------------------------------------------------------------ with Ada.Iterator_Interfaces; + private with Ada.Containers.Hash_Tables; private with Ada.Streams; private with Ada.Finalization; @@ -476,6 +477,18 @@ private use Ada.Finalization; use Ada.Streams; + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Container : Set); + + for Set'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Container : out Set); + + for Set'Read use Read; + type Set_Access is access all Set; for Set_Access'Storage_Size use 0; @@ -496,20 +509,6 @@ private for Cursor'Read use Read; - No_Element : constant Cursor := (Container => null, Node => null); - - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Container : Set); - - for Set'Write use Write; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Container : out Set); - - for Set'Read use Read; - type Constant_Reference_Type (Element : not null access constant Element_Type) is null record; @@ -527,4 +526,6 @@ private Empty_Set : constant Set := (Controlled with HT => (null, 0, 0, 0)); + No_Element : constant Cursor := (Container => null, Node => null); + end Ada.Containers.Hashed_Sets; diff --git a/gcc/ada/a-coinve.ads b/gcc/ada/a-coinve.ads index 8f55d81..e060c0c 100644 --- a/gcc/ada/a-coinve.ads +++ b/gcc/ada/a-coinve.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2012, 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 -- @@ -31,11 +31,11 @@ -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ -private with Ada.Finalization; - -with Ada.Streams; use Ada.Streams; with Ada.Iterator_Interfaces; +private with Ada.Finalization; +private with Ada.Streams; + generic type Index_Type is range <>; type Element_Type (<>) is private; @@ -67,19 +67,8 @@ package Ada.Containers.Indefinite_Vectors is Empty_Vector : constant Vector; No_Element : constant Cursor; - function Has_Element (Position : Cursor) return Boolean; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Position : out Cursor); - - for Cursor'Read use Read; - - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Position : Cursor); - for Cursor'Write use Write; + function Has_Element (Position : Cursor) return Boolean; package Vector_Iterator_Interfaces is new Ada.Iterator_Interfaces (Cursor, Has_Element); @@ -121,34 +110,10 @@ package Ada.Containers.Indefinite_Vectors is with Implicit_Dereference => Element; - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Constant_Reference_Type); - - for Constant_Reference_Type'Write use Write; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Constant_Reference_Type); - - for Constant_Reference_Type'Read use Read; - type Reference_Type (Element : not null access Element_Type) is private with Implicit_Dereference => Element; - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Reference_Type); - - for Reference_Type'Write use Write; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Reference_Type); - - for Reference_Type'Read use Read; - function Constant_Reference (Container : aliased Vector; Position : Cursor) return Constant_Reference_Type; @@ -397,25 +362,20 @@ private type Elements_Access is access Elements_Type; - use Ada.Finalization; - - type Vector is new Controlled with record + type Vector is new Ada.Finalization.Controlled with record Elements : Elements_Access; Last : Extended_Index := No_Index; Busy : Natural := 0; Lock : Natural := 0; end record; - type Constant_Reference_Type - (Element : not null access constant Element_Type) is null record; - - type Reference_Type - (Element : not null access Element_Type) is null record; - overriding procedure Adjust (Container : in out Vector); overriding procedure Finalize (Container : in out Vector); + use Ada.Finalization; + use Ada.Streams; + procedure Write (Stream : not null access Root_Stream_Type'Class; Container : Vector); @@ -436,6 +396,48 @@ private Index : Index_Type := Index_Type'First; end record; + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Position : out Cursor); + + for Cursor'Read use Read; + + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Position : Cursor); + + for Cursor'Write use Write; + + type Constant_Reference_Type + (Element : not null access constant Element_Type) is null record; + + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Constant_Reference_Type); + + for Constant_Reference_Type'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Item : out Constant_Reference_Type); + + for Constant_Reference_Type'Read use Read; + + type Reference_Type + (Element : not null access Element_Type) is null record; + + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Reference_Type); + + for Reference_Type'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Item : out Reference_Type); + + for Reference_Type'Read use Read; + Empty_Vector : constant Vector := (Controlled with null, No_Index, 0, 0); No_Element : constant Cursor := Cursor'(null, Index_Type'First); diff --git a/gcc/ada/a-convec.ads b/gcc/ada/a-convec.ads index babf94e..6ed39a4 100644 --- a/gcc/ada/a-convec.ads +++ b/gcc/ada/a-convec.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2012, 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 -- @@ -31,9 +31,11 @@ -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ -private with Ada.Finalization; -with Ada.Streams; with Ada.Iterator_Interfaces; + +private with Ada.Finalization; +private with Ada.Streams; + generic type Index_Type is range <>; type Element_Type is private; @@ -43,7 +45,6 @@ generic package Ada.Containers.Vectors is pragma Preelaborate; pragma Remote_Types; - use Ada.Streams; subtype Extended_Index is Index_Type'Base range Index_Type'First - 1 .. @@ -61,21 +62,11 @@ package Ada.Containers.Vectors is type Cursor is private; pragma Preelaborable_Initialization (Cursor); + No_Element : constant Cursor; function Has_Element (Position : Cursor) return Boolean; - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Position : out Cursor); - - for Cursor'Read use Read; - - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Position : Cursor); - for Cursor'Write use Write; - package Vector_Iterator_Interfaces is new Ada.Iterator_Interfaces (Cursor, Has_Element); @@ -160,34 +151,10 @@ package Ada.Containers.Vectors is with Implicit_Dereference => Element; - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Constant_Reference_Type); - - for Constant_Reference_Type'Write use Write; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Constant_Reference_Type); - - for Constant_Reference_Type'Read use Read; - type Reference_Type (Element : not null access Element_Type) is private with Implicit_Dereference => Element; - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Reference_Type); - - for Reference_Type'Write use Write; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Reference_Type); - - for Reference_Type'Read use Read; - function Constant_Reference (Container : aliased Vector; Position : Cursor) return Constant_Reference_Type; @@ -404,6 +371,7 @@ private type Elements_Access is access Elements_Type; use Ada.Finalization; + use Ada.Streams; type Vector is new Controlled with record Elements : Elements_Access; @@ -412,13 +380,9 @@ private Lock : Natural := 0; end record; - type Vector_Access is access all Vector; - for Vector_Access'Storage_Size use 0; + overriding procedure Adjust (Container : in out Vector); - type Cursor is record - Container : Vector_Access; - Index : Index_Type := Index_Type'First; - end record; + overriding procedure Finalize (Container : in out Vector); procedure Write (Stream : not null access Root_Stream_Type'Class; @@ -432,17 +396,58 @@ private for Vector'Read use Read; + type Vector_Access is access all Vector; + for Vector_Access'Storage_Size use 0; + + type Cursor is record + Container : Vector_Access; + Index : Index_Type := Index_Type'First; + end record; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Position : out Cursor); + + for Cursor'Read use Read; + + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Position : Cursor); + + for Cursor'Write use Write; + type Constant_Reference_Type (Element : not null access constant Element_Type) is null record; + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Constant_Reference_Type); + + for Constant_Reference_Type'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Item : out Constant_Reference_Type); + + for Constant_Reference_Type'Read use Read; + type Reference_Type (Element : not null access Element_Type) is null record; - overriding procedure Adjust (Container : in out Vector); + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Reference_Type); - overriding procedure Finalize (Container : in out Vector); + for Reference_Type'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Item : out Reference_Type); + + for Reference_Type'Read use Read; No_Element : constant Cursor := Cursor'(null, Index_Type'First); + Empty_Vector : constant Vector := (Controlled with null, No_Index, 0, 0); end Ada.Containers.Vectors; diff --git a/gcc/ada/a-coorma.ads b/gcc/ada/a-coorma.ads index a58a4f5..61a762e 100644 --- a/gcc/ada/a-coorma.ads +++ b/gcc/ada/a-coorma.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2012, 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 -- @@ -31,11 +31,11 @@ -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ +with Ada.Iterator_Interfaces; + private with Ada.Containers.Red_Black_Trees; private with Ada.Finalization; - -with Ada.Streams; use Ada.Streams; -with Ada.Iterator_Interfaces; +private with Ada.Streams; generic type Key_Type is private; @@ -259,6 +259,19 @@ private use Red_Black_Trees; use Tree_Types; use Ada.Finalization; + use Ada.Streams; + + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Container : Map); + + for Map'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Container : out Map); + + for Map'Read use Read; type Map_Access is access all Map; for Map_Access'Storage_Size use 0; @@ -280,22 +293,20 @@ private for Cursor'Read use Read; - No_Element : constant Cursor := Cursor'(null, null); - - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Container : Map); - - for Map'Write use Write; + type Constant_Reference_Type + (Element : not null access constant Element_Type) is null record; procedure Read - (Stream : not null access Root_Stream_Type'Class; - Container : out Map); + (Stream : not null access Root_Stream_Type'Class; + Item : out Constant_Reference_Type); - for Map'Read use Read; + for Constant_Reference_Type'Read use Read; - type Constant_Reference_Type - (Element : not null access constant Element_Type) is null record; + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Constant_Reference_Type); + + for Constant_Reference_Type'Write use Write; type Reference_Type (Element : not null access Element_Type) is null record; @@ -312,18 +323,6 @@ private for Reference_Type'Write use Write; - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Constant_Reference_Type); - - for Constant_Reference_Type'Read use Read; - - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Constant_Reference_Type); - - for Constant_Reference_Type'Write use Write; - Empty_Map : constant Map := (Controlled with Tree => (First => null, Last => null, @@ -331,4 +330,7 @@ private Length => 0, Busy => 0, Lock => 0)); + + No_Element : constant Cursor := Cursor'(null, null); + end Ada.Containers.Ordered_Maps; diff --git a/gcc/ada/a-coorse.ads b/gcc/ada/a-coorse.ads index cf28a7c..540da1a 100644 --- a/gcc/ada/a-coorse.ads +++ b/gcc/ada/a-coorse.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2012, 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 -- @@ -31,11 +31,11 @@ -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ +with Ada.Iterator_Interfaces; + private with Ada.Containers.Red_Black_Trees; private with Ada.Finalization; - -with Ada.Streams; use Ada.Streams; -with Ada.Iterator_Interfaces; +private with Ada.Streams; generic type Element_Type is private; @@ -97,22 +97,10 @@ package Ada.Containers.Ordered_Sets is with Implicit_Dereference => Element; - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Constant_Reference_Type); - - for Constant_Reference_Type'Write use Write; - function Constant_Reference (Container : aliased Set; Position : Cursor) return Constant_Reference_Type; - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Constant_Reference_Type); - - for Constant_Reference_Type'Read use Read; - procedure Assign (Target : in out Set; Source : Set); function Copy (Source : Set) return Set; @@ -292,6 +280,8 @@ package Ada.Containers.Ordered_Sets is type Reference_Type (Element : not null access Element_Type) is null record; + use Ada.Streams; + procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Reference_Type); @@ -335,6 +325,19 @@ private use Red_Black_Trees; use Tree_Types; use Ada.Finalization; + use Ada.Streams; + + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Container : Set); + + for Set'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Container : out Set); + + for Set'Read use Read; type Set_Access is access all Set; for Set_Access'Storage_Size use 0; @@ -356,22 +359,20 @@ private for Cursor'Read use Read; - No_Element : constant Cursor := Cursor'(null, null); + type Constant_Reference_Type + (Element : not null access constant Element_Type) is null record; procedure Write - (Stream : not null access Root_Stream_Type'Class; - Container : Set); + (Stream : not null access Root_Stream_Type'Class; + Item : Constant_Reference_Type); - for Set'Write use Write; + for Constant_Reference_Type'Write use Write; procedure Read - (Stream : not null access Root_Stream_Type'Class; - Container : out Set); - - for Set'Read use Read; + (Stream : not null access Root_Stream_Type'Class; + Item : out Constant_Reference_Type); - type Constant_Reference_Type - (Element : not null access constant Element_Type) is null record; + for Constant_Reference_Type'Read use Read; Empty_Set : constant Set := (Controlled with Tree => (First => null, @@ -381,4 +382,6 @@ private Busy => 0, Lock => 0)); + No_Element : constant Cursor := Cursor'(null, null); + end Ada.Containers.Ordered_Sets; |