diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-10-15 13:55:27 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-10-15 13:55:27 +0000 |
commit | bfa5a9d90154acaa07e5f1c799ccd70b2b73f3f1 (patch) | |
tree | 4b05e6da4711a3ed03e4096c21cd8542543f6ae5 /gcc/ada/sem_case.adb | |
parent | 4406d28eecdde6c4e083198a465413aa2e28c7a1 (diff) | |
download | gcc-bfa5a9d90154acaa07e5f1c799ccd70b2b73f3f1.tar.gz |
2007-10-15 Bob Duff <duff@adacore.com>
* sem_case.adb, sem_ch13.adb, lib-sort.adb: Replace use of Heap_Sort_A
(passing'Unrestricted_Access of nested subprograms to Sort) with use of
the generic Heap_Sort_G, in order to avoid trampolines.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129327 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_case.adb')
-rw-r--r-- | gcc/ada/sem_case.adb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/ada/sem_case.adb b/gcc/ada/sem_case.adb index 5433bb1de9a..3a3e09f0199 100644 --- a/gcc/ada/sem_case.adb +++ b/gcc/ada/sem_case.adb @@ -41,7 +41,7 @@ with Sinfo; use Sinfo; with Tbuild; use Tbuild; with Uintp; use Uintp; -with GNAT.Heap_Sort_A; use GNAT.Heap_Sort_A; +with GNAT.Heap_Sort_G; package body Sem_Case is @@ -104,6 +104,8 @@ package body Sem_Case is procedure Move_Choice (From : Natural; To : Natural); -- Move routine for sorting the Choice_Table + package Sorting is new GNAT.Heap_Sort_G (Move_Choice, Lt_Choice); + procedure Issue_Msg (Value1 : Node_Id; Value2 : Node_Id); procedure Issue_Msg (Value1 : Node_Id; Value2 : Uint); procedure Issue_Msg (Value1 : Uint; Value2 : Node_Id); @@ -215,10 +217,7 @@ package body Sem_Case is return; end if; - Sort - (Positive (Choice_Table'Last), - Move_Choice'Unrestricted_Access, - Lt_Choice'Unrestricted_Access); + Sorting.Sort (Positive (Choice_Table'Last)); Lo := Expr_Value (Choice_Table (1).Lo); Hi := Expr_Value (Choice_Table (1).Hi); |