aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--gcc/ada/uintp.adb36
-rw-r--r--gcc/ada/urealp.adb5
2 files changed, 14 insertions, 27 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;
diff --git a/gcc/ada/urealp.adb b/gcc/ada/urealp.adb
index 737e4b4..17dd917 100644
--- a/gcc/ada/urealp.adb
+++ b/gcc/ada/urealp.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, 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- --
@@ -441,8 +441,7 @@ package body Urealp is
function Store_Ureal (Val : Ureal_Entry) return Ureal is
begin
- Ureals.Increment_Last;
- Ureals.Table (Ureals.Last) := Val;
+ Ureals.Append (Val);
-- Normalize representation of signed values