diff options
author | Matt Heaney <heaney@adacore.com> | 2006-10-31 19:13:22 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2006-10-31 19:13:22 +0100 |
commit | 3837bc7f8694ca43b734a327e3e37030371eeeea (patch) | |
tree | 1a5cb845f084a8360d6f2bc2dd674427a1a51b02 /gcc/ada/a-cihama.adb | |
parent | 31a33125871e198b6a7e48310b919fb9c65c4fca (diff) | |
download | gcc-3837bc7f8694ca43b734a327e3e37030371eeeea.zip gcc-3837bc7f8694ca43b734a327e3e37030371eeeea.tar.gz gcc-3837bc7f8694ca43b734a327e3e37030371eeeea.tar.bz2 |
a-crbtgo.ads: Commented each subprogram
2006-10-31 Matt Heaney <heaney@adacore.com>
* a-crbtgo.ads: Commented each subprogram
* a-crbtgo.adb: Added reference to book from which algorithms were
adapted.
* a-crbtgk.ads, a-crbtgk.adb (Generic_Insert_Post): pass flag to
indicate which child.
(Generic_Conditional_Insert): changed parameter name from "Success" to
"Inserted".
(Generic_Unconditional_Insert_With_Hint): improved algorithm
* a-coorse.adb (Replace_Element): changed parameter name in call to
conditional insert operation.
* a-convec.adb, a-coinve.adb (Insert): removed obsolete comment
* a-cohama.adb (Iterate): manipulate busy-bit here, instead of in
Generic_Iteration
* a-ciorse.adb (Replace_Element): changed parameter name in call to
conditional insert operation.
* a-cihama.adb (Iterate): manipulate busy-bit here, instead of in
Generic_Iteration.
* a-cidlli.ads, a-cidlli.adb (Splice): Position param is now mode in
instead of mode inout.
* a-chtgop.adb (Adjust): modified comments to reflect current AI-302
draft
(Generic_Read): preserve existing buckets array if possible
(Generic_Write): don't send buckets array length anymore
* a-cdlili.ads, a-cdlili.adb (Splice): Position param is now mode in
instead of mode inout.
* a-cihase.adb (Difference): iterate over smaller of Tgt and Src sets
(Iterate): manipulate busy-bit here, instead of in Generic_Iteration
* a-cohase.adb (Difference): iterate over smaller of Tgt and Src sets
(Iterate): manipulate busy-bit here, instead of in Generic_Iteration
(Replace_Element): local operation is now an instantiation
* a-chtgke.ads, a-chtgke.adb (Generic_Conditional_Insert): manually
check current length.
(Generic_Replace_Element): new operation
From-SVN: r118324
Diffstat (limited to 'gcc/ada/a-cihama.adb')
-rw-r--r-- | gcc/ada/a-cihama.adb | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/gcc/ada/a-cihama.adb b/gcc/ada/a-cihama.adb index 04c9c6b..24ca33b 100644 --- a/gcc/ada/a-cihama.adb +++ b/gcc/ada/a-cihama.adb @@ -7,11 +7,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2005, 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 -- --- apply solely to the contents of the part following the private keyword. -- +-- Copyright (C) 2004-2006, 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- -- @@ -603,7 +599,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is procedure Process_Node (Node : Node_Access); pragma Inline (Process_Node); - procedure Iterate is + procedure Local_Iterate is new HT_Ops.Generic_Iteration (Process_Node); ------------------ @@ -615,10 +611,22 @@ package body Ada.Containers.Indefinite_Hashed_Maps is Process (Cursor'(Container'Unchecked_Access, Node)); end Process_Node; + B : Natural renames Container'Unrestricted_Access.HT.Busy; + -- Start of processing Iterate begin - Iterate (Container.HT); + B := B + 1; + + begin + Local_Iterate (Container.HT); + exception + when others => + B := B - 1; + raise; + end; + + B := B - 1; end Iterate; --------- |