aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/uintp.adb
diff options
context:
space:
mode:
authorThomas Quinot <quinot@adacore.com>2008-05-20 14:51:40 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2008-05-20 14:51:40 +0200
commit5eace9bc1954837d315fda86bb22c44a7443a27a (patch)
tree521dc8c092e8a5f6d483da84733d2a0c2f6aeef7 /gcc/ada/uintp.adb
parentfe38726a457105dbf0b9aab49c46b35f99bd6f48 (diff)
downloadgcc-5eace9bc1954837d315fda86bb22c44a7443a27a.zip
gcc-5eace9bc1954837d315fda86bb22c44a7443a27a.tar.gz
gcc-5eace9bc1954837d315fda86bb22c44a7443a27a.tar.bz2
uintp.adb, urealp.adb: Replace calls to Increment_Last + Set with Append.
2008-05-20 Thomas Quinot <quinot@adacore.com> * uintp.adb, urealp.adb: Replace calls to Increment_Last + Set with Append. From-SVN: r135646
Diffstat (limited to 'gcc/ada/uintp.adb')
-rw-r--r--gcc/ada/uintp.adb36
1 files changed, 12 insertions, 24 deletions
diff --git a/gcc/ada/uintp.adb b/gcc/ada/uintp.adb
index ffc6367..416d5d8 100644
--- a/gcc/ada/uintp.adb
+++ b/gcc/ada/uintp.adb
@@ -683,14 +683,11 @@ package body Uintp is
begin
Release (M);
- Uints.Increment_Last;
+ Uints.Append ((Length => UE_Len, Loc => Udigits.Last + 1));
UI := Uints.Last;
- Uints.Table (UI) := (UE_Len, Udigits.Last + 1);
-
for J in 1 .. UE_Len loop
- Udigits.Increment_Last;
- Udigits.Table (Udigits.Last) := UD (J);
+ Udigits.Append (UD (J));
end loop;
end;
end if;
@@ -721,24 +718,18 @@ package body Uintp is
begin
Release (M);
- Uints.Increment_Last;
+ Uints.Append ((Length => UE1_Len, Loc => Udigits.Last + 1));
UI1 := Uints.Last;
- Uints.Table (UI1) := (UE1_Len, Udigits.Last + 1);
-
for J in 1 .. UE1_Len loop
- Udigits.Increment_Last;
- Udigits.Table (Udigits.Last) := UD1 (J);
+ Udigits.Append (UD1 (J));
end loop;
- Uints.Increment_Last;
+ Uints.Append ((Length => UE2_Len, Loc => Udigits.Last + 1));
UI2 := Uints.Last;
- Uints.Table (UI2) := (UE2_Len, Udigits.Last + 1);
-
for J in 1 .. UE2_Len loop
- Udigits.Increment_Last;
- Udigits.Table (Udigits.Last) := UD2 (J);
+ Udigits.Append (UD2 (J));
end loop;
end;
end if;
@@ -2745,21 +2736,18 @@ package body Uintp is
-- the count and digits. The index of the new table entry will be
-- returned as the result.
- Uints.Increment_Last;
- Uints.Table (Uints.Last).Length := Size;
- Uints.Table (Uints.Last).Loc := Udigits.Last + 1;
-
- Udigits.Increment_Last;
+ Uints.Append ((Length => Size, Loc => Udigits.Last + 1));
if Negative then
- Udigits.Table (Udigits.Last) := -In_Vec (J);
+ Val := -In_Vec (J);
else
- Udigits.Table (Udigits.Last) := +In_Vec (J);
+ Val := +In_Vec (J);
end if;
+ Udigits.Append (Val);
+
for K in 2 .. Size loop
- Udigits.Increment_Last;
- Udigits.Table (Udigits.Last) := In_Vec (J + K - 1);
+ Udigits.Append (In_Vec (J + K - 1));
end loop;
return Uints.Last;