aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc-changelog/git_commit.py
diff options
context:
space:
mode:
authorRonan Desplanques <desplanques@adacore.com>2025-09-29 10:26:34 +0200
committerMarc Poulhiès <dkm@gcc.gnu.org>2025-10-28 11:24:05 +0100
commit9d052b444f4cfb3bcd27a5d37851398241f80380 (patch)
treee19741141987fa12d3874f207a52eb6865ee0944 /contrib/gcc-changelog/git_commit.py
parentf714e1baf8804dfcff5bf9f23cd548c2c2e32a40 (diff)
downloadgcc-9d052b444f4cfb3bcd27a5d37851398241f80380.zip
gcc-9d052b444f4cfb3bcd27a5d37851398241f80380.tar.gz
gcc-9d052b444f4cfb3bcd27a5d37851398241f80380.tar.bz2
ada: Add new abstractions to Table.Table
This patch adds two new subprograms to Table.Table: Clear and Is_Empty. Their selling point is that they don't require being aware of the bounds of the instance of Table.Table, avoiding the off-by-one errors that can happen when using Set_Last or Last directly. This patch also replaces existing code by calls to these new subprograms in a few places where it makes sense. It also adds a call to Table.Table.First in the same spirit on the side. gcc/ada/ChangeLog: * table.ads (Clear, Is_Empty): New subprograms. * table.adb (Clear, Is_Empty): Likewise. (Init): Use new subprogram. * atree.adb (Traverse_Func_With_Parent): Use new subprograms. * fmap.adb (Empty_Tables): Use new subprogram. * par_sco.adb (Process_Pending_Decisions): Likewise. * sem_elab.adb (Check_Elab_Call): Likewise. * sem_ch12.adb (Build_Local_Package, Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation): Likewise. (Save_And_Reset): Use Table.Table.First.
Diffstat (limited to 'contrib/gcc-changelog/git_commit.py')
0 files changed, 0 insertions, 0 deletions