diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-08 20:23:06 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-08 20:23:06 +0000 |
commit | 69642df267469dbe186cff7d3caf5f0df8a4d4fa (patch) | |
tree | dc8f4bbb708356e7d8cc6e1931e9f1b46e3866b1 /gcc/stringpool.c | |
parent | dcfaf1e3413edfc7500232ee8c71d01506a5178e (diff) | |
download | gcc-69642df267469dbe186cff7d3caf5f0df8a4d4fa.tar.gz |
* tree.h (get_identifier) Define a macro form of get_identifier
that calls get_identifier_with_length when the string is constant.
(get_identifier_with_length): Change type of second argument to
size_t in prototype.
* stringpool.c (get_identifier): Undefine the macro before giving
the function definition.
(get_identifier_with_length): Change type of second argument to
size_t in function definition.
* hashtable.c (calc_hash): Change type of second argument to size_t.
(ht_lookup): Change type of third argument to size_t. Reorganize
to speed-up the cases where the hash table slot is empty, or the
first probe matches (i.e. there isn't a collision).
* hashtable.h (ht_lookup): Adjust function prototype.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70256 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stringpool.c')
-rw-r--r-- | gcc/stringpool.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/stringpool.c b/gcc/stringpool.c index 01e54ac8270..0cf3be14f88 100644 --- a/gcc/stringpool.c +++ b/gcc/stringpool.c @@ -95,6 +95,8 @@ ggc_alloc_string (const char *contents, int length) If an identifier with that name has previously been referred to, the same node is returned this time. */ +#undef get_identifier + tree get_identifier (const char *text) { @@ -110,7 +112,7 @@ get_identifier (const char *text) known. */ tree -get_identifier_with_length (const char *text, unsigned int length) +get_identifier_with_length (const char *text, size_t length) { hashnode ht_node = ht_lookup (ident_hash, (const unsigned char *) text, |