2007-08-14 Thomas Quinot <quinot@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Aug 2007 08:46:03 +0000 (08:46 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Aug 2007 08:46:03 +0000 (08:46 +0000)
commite4fed0767a1e3115257b38204231d02217d1408d
treee043ad5b7ca9b739ced688a5040d0ff234515f08
parent5039558ddbb9adb612de258b85c399836c7910ea
2007-08-14  Thomas Quinot  <quinot@adacore.com>

* table.adb, g-table.adb, g-dyntab.adb (Append): Reimplement in terms
of Set_Item.
(Set_Item): When the new item is an element of the currently allocated
table passed by reference, save a copy on the stack if we're going
to reallocate. Also, in Table.Set_Item, make sure we test the proper
variable to determine whether to call Set_Last.

* sinput-d.adb, sinput-l.adb, stringt.adb, switch-m.adb,
symbols-vms.adb, symbols-processing-vms-alpha.adb,
symbols-processing-vms-ia64.adb, sem_elab.adb, repinfo.adb: Replace
some occurrences of the pattern
   T.Increment_Last;
   T.Table (T.Last) := Value;
with a cleaner call to
   T.Append (Value);

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127442 138bc75d-0d04-0410-961f-82ee72b054a4
12 files changed:
gcc/ada/g-dyntab.adb
gcc/ada/g-table.adb
gcc/ada/repinfo.adb
gcc/ada/sem_elab.adb
gcc/ada/sinput-d.adb
gcc/ada/sinput-l.adb
gcc/ada/stringt.adb
gcc/ada/switch-m.adb
gcc/ada/symbols-processing-vms-alpha.adb
gcc/ada/symbols-processing-vms-ia64.adb
gcc/ada/symbols-vms.adb
gcc/ada/table.adb