summaryrefslogtreecommitdiffstats
path: root/gcc/ada/a-stzhas.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-22 12:24:57 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-22 12:24:57 +0000
commit7b7ad9c5488c4d997aa7a40467e79a7befddd1d2 (patch)
tree2c2f2f3cdeb10d78e9d0a86792f53fb95d5c97cd /gcc/ada/a-stzhas.adb
parent110eae0386ebafdc88a763a03d1c320317eca961 (diff)
downloadppe42-gcc-7b7ad9c5488c4d997aa7a40467e79a7befddd1d2.tar.gz
ppe42-gcc-7b7ad9c5488c4d997aa7a40467e79a7befddd1d2.zip
2009-06-22 Thomas Quinot <quinot@adacore.com>
* exp_ch3.adb: Minor code reorganization (avoid an unnecessary tree copy). 2009-06-22 Ed Falis <falis@adacore.com> * sysdep.c: remove include for nfsLib.h and an NFS specific error message for VxWorks 653 vThreads: not supported by the OS. * gsocket.h: disable sockets for VxWorks 653 vThreads. 2009-06-22 Robert Dewar <dewar@adacore.com> * sem_ch6.adb: Add ??? comment for bad use of Style_Check 2009-06-22 Matthew Gingell <gingell@adacore.com> Arnaud Charlet <charlet@adacore.com> * a-stzhas.adb, a-stwiha.adb, impunit.adb, a-swbwha.adb, a-shcain.adb, s-htable.adb, a-szuzha.adb, a-stunha.adb, a-stboha.adb, a-strhas.adb, g-spitbo.adb, s-strhas.adb, a-szbzha.adb, s-strhas.ads, Makefile.rtl, a-swuwha.adb: New unit System.String_Hash. Refactor redundant cut and pasted hash functions with instances of a new generic hash function. Implement a new string hashing algorithm which appears in testing to be move effective than to previous approach. * gcc-interface/Make-lang.in: Update dependencies. * gcc-interface/Makefile.in: Reindent correctly vms targets. Fix setting of TOOLS_TARGET_PAIRS for bare board platforms. Disable socket support for Vxworks 653 vThreads. Improve handling of signals on darwin. (GNATMAKE_OBJS): Update dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148789 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-stzhas.adb')
-rw-r--r--gcc/ada/a-stzhas.adb51
1 files changed, 0 insertions, 51 deletions
diff --git a/gcc/ada/a-stzhas.adb b/gcc/ada/a-stzhas.adb
deleted file mode 100644
index 1a72e0a554c..00000000000
--- a/gcc/ada/a-stzhas.adb
+++ /dev/null
@@ -1,51 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT LIBRARY COMPONENTS --
--- --
--- A D A . S T R I N G S . W I D E _ W I D E _ H A S H --
--- --
--- B o d y --
--- --
--- Copyright (C) 2004-2009, 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- --
--- ware Foundation; either version 3, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. --
--- --
--- As a special exception under Section 7 of GPL version 3, you are granted --
--- additional permissions described in the GCC Runtime Library Exception, --
--- version 3.1, as published by the Free Software Foundation. --
--- --
--- You should have received a copy of the GNU General Public License and --
--- a copy of the GCC Runtime Library Exception along with this program; --
--- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
--- <http://www.gnu.org/licenses/>. --
--- --
--- This unit was originally developed by Matthew J Heaney. --
-------------------------------------------------------------------------------
-
--- Note: source of this algorithm: GNAT.HTable.Hash (g-htable.adb)
-
-function Ada.Strings.Wide_Wide_Hash
- (Key : Wide_Wide_String) return Containers.Hash_Type
-is
- use Ada.Containers;
-
- function Rotate_Left
- (Value : Hash_Type;
- Amount : Natural) return Hash_Type;
- pragma Import (Intrinsic, Rotate_Left);
-
- Tmp : Hash_Type;
-
-begin
- Tmp := 0;
- for J in Key'Range loop
- Tmp := Rotate_Left (Tmp, 3) + Wide_Wide_Character'Pos (Key (J));
- end loop;
-
- return Tmp;
-end Ada.Strings.Wide_Wide_Hash;
OpenPOWER on IntegriCloud