diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-24 15:19:11 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-24 15:19:11 +0000 |
commit | 5b941af607517aa973fb6528345e20a51394ced7 (patch) | |
tree | 3771082957c81623666f68cc0fc153c68f93f964 /gcc/ada/s-htable.adb | |
parent | babfbd63bce1aae7352f47da3becac684cdf995a (diff) | |
download | gcc-5b941af607517aa973fb6528345e20a51394ced7.tar.gz |
2004-05-24 Geert Bosch <bosch@gnat.com>
* a-numaux-x86.adb (Reduce): Reimplement using an approximation of Pi
with 192 bits of precision, sufficient to reduce a double-extended
arguments X with a maximum relative error of T'Machine_Epsilon, for X
in -2.0**32 .. 2.0**32.
(Cos, Sin): Always reduce arguments of 1/4 Pi or larger, to prevent
reduction by the processor, which only uses a 68-bit approximation of
Pi.
(Tan): Always reduce arguments and compute function either using
the processor's fptan instruction, or by dividing sin and cos as needed.
2004-05-24 Doug Rupp <rupp@gnat.com>
* adaint.c (__gnat_readdir): Cast CRTL function retun value to avoid
gcc error on 32/64 bit VMS.
2004-05-24 Olivier Hainque <hainque@act-europe.fr>
* init.c (__gnat_error_handler): Handle EEXIST as EACCES for SIGSEGVs,
since this is what we get for stack overflows although not documented
as such.
Document the issues which may require adjustments to our signal
handlers.
2004-05-24 Ed Schonberg <schonberg@gnat.com>
* inline.adb (Add_Scope_To_Clean): Do not add cleanup actions to the
enclosing dynamic scope if the instantiation is within a generic unit.
2004-05-24 Arnaud Charlet <charlet@act-europe.fr>
* exp_dbug.ads: Fix typo.
* Makefile.in: s-osinte-linux-ia64.ads was misnamed.
Rename it to its proper name: system-linux-ia64.ads
(stamp-gnatlib1): Remove extra target specific run time files when
setting up the rts directory.
2004-05-24 Javier Miranda <miranda@gnat.com>
* einfo.ads, einfo.adb (Limited_Views): Removed.
(Limited_View): New attribute that replaces the previous one. It is
now a bona fide package with the limited-view list through the
first_entity and first_private attributes.
* sem_ch10.adb (Install_Private_With_Clauses): Give support to
limited-private-with clause.
(Install_Limited_Withed_Unit): Install the private declarations of a
limited-private-withed package. Update the installation of the shadow
entities according to the new structure (see Build_Limited_Views)
(Build_Limited_Views): Replace the previous implementation of the
limited view by a package entity that references the first shadow
entity plus the first shadow private entity (required for limited-
private-with clause)
(New_Internal_Shadow_Entity): Code cleanup.
(Remove_Limited_With_Clause): Update the implementation to undo the
new work carried out by Build_Limited_Views.
(Build_Chain): Complete documentation.
Replace Ada0Y by Ada 0Y in comments
Minor reformating
* sem_ch3.adb (Array_Type_Declaration): In case of anonymous access
types the level of accessibility depends on the enclosing type
declaration.
* sem_ch8.adb (Find_Expanded_Name): Fix condition to detect shadow
entities. Complete documentation of previous change.
2004-05-24 Robert Dewar <dewar@gnat.com>
* namet.adb: Minor reformatting
Avoid use of name I (replace by J)
Minor code restructuring
* sem_ch6.adb: Minor reformatting
* lib-writ.adb: Do not set restriction as active if this is a
Restriction_Warning case.
* sem_prag.adb: Reset restriction warning flag if real pragma
restriction encountered.
* s-htable.adb: Minor reformatting
Change rotate count to 3 in Hash (improves hash for small strings)
* 5qsystem.ads: Add comments for type Address (no literals allowed).
* gnat_ugn.texi: Add new section of documentation "Code Generation
Control", which describes the use of -m switches.
2004-05-24 Eric Botcazou <ebotcazou@act-europe.fr>
(tree_transform) <N_Identifier>: Do the dereference directly through
the DECL_INITIAL for renamed variables.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82205 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-htable.adb')
-rw-r--r-- | gcc/ada/s-htable.adb | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/gcc/ada/s-htable.adb b/gcc/ada/s-htable.adb index 2d2b422a0c1..5e3675a1e8c 100644 --- a/gcc/ada/s-htable.adb +++ b/gcc/ada/s-htable.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2002 Ada Core Technologies, Inc. -- +-- Copyright (C) 1995-2004 Ada Core Technologies, 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- -- @@ -182,9 +182,9 @@ package body System.HTable is end Static_HTable; - -------------------- - -- Simple_HTable -- - -------------------- + ------------------- + -- Simple_HTable -- + ------------------- package body Simple_HTable is @@ -221,7 +221,6 @@ package body System.HTable is function Get (K : Key) return Element is Tmp : constant Elmt_Ptr := Tab.Get (K); - begin if Tmp = null then return No_Element; @@ -236,7 +235,6 @@ package body System.HTable is function Get_First return Element is Tmp : constant Elmt_Ptr := Tab.Get_First; - begin if Tmp = null then return No_Element; @@ -260,7 +258,6 @@ package body System.HTable is function Get_Next return Element is Tmp : constant Elmt_Ptr := Tab.Get_Next; - begin if Tmp = null then return No_Element; @@ -318,7 +315,6 @@ package body System.HTable is procedure Set (K : Key; E : Element) is Tmp : constant Elmt_Ptr := Tab.Get (K); - begin if Tmp = null then Tab.Set (new Element_Wrapper'(K, E, null)); @@ -348,15 +344,16 @@ package body System.HTable is function Rotate_Left (Value : Uns; Amount : Natural) return Uns; pragma Import (Intrinsic, Rotate_Left); - Tmp : Uns := 0; + Hash_Value : Uns; begin + Hash_Value := 0; for J in Key'Range loop - Tmp := Rotate_Left (Tmp, 1) + Character'Pos (Key (J)); + Hash_Value := Rotate_Left (Hash_Value, 3) + Character'Pos (Key (J)); end loop; return Header_Num'First + - Header_Num'Base (Tmp mod Header_Num'Range_Length); + Header_Num'Base (Hash_Value mod Header_Num'Range_Length); end Hash; end System.HTable; |