summaryrefslogtreecommitdiff
path: root/gcc/hashtable.h
diff options
context:
space:
mode:
authorgdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-18 13:40:54 +0000
committergdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-18 13:40:54 +0000
commitaf694375ba567d73fc988296db9b5387a9fbfb64 (patch)
tree48d321513a6f0b49445946dd5e60ead3215660ad /gcc/hashtable.h
parent23a7594e68d02525a266d8ac11fd85221f02d513 (diff)
downloadgcc-af694375ba567d73fc988296db9b5387a9fbfb64.tar.gz
* hashtable.h (struct ht_identifier): Add data member "hash_value".
* hashtable.c (ht_lookup): Use it when searching, remember. (ht_expand): Do not recompute. * tree.h (IDENTIFIER_HASH_VALUE): New macro. cp/ * cp-tree.h (struct lang_type_class): Replace data member tags with hash-table nested_udts. (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS. * class.c (unreverse_member_declarations): Don't touch CLASSTYPE_TAGS. (pushclass): Use cxx_remember_type_decls. * decl.c (struct cp_binding_level): Replace data member tags with hash-table type_decls. (pop_binding_level): Handle level->type_decls. (kept_level_p): Adjust. (poplevel): Remove unused local variable. (bt_print_entry): New function. (print_binding_level): Use it. (push_namespace): Build current_binding_level->type_decls. (maybe_process_template_type_declaration): Adjust. (pushtag): Likewise. (clear_anon_tags): Use binding_table_remove_anonymous_types. (gettags): Remove. (cxx_remember_type_decls): Rename from storetags. Adjust. (lookup_tag): Use binding_table_find_anon_type. Tidy. (lookup_tag_reverse): Use binding_table_reverse_maybe_remap. (cxx_init_decl_processing): Build global_binding_level->type_decls. (store_parm_decls): Remove pointless code. * name-lookup.c (free_binding_entry): New variable. (ENTRY_INDEX): New macro. (struct binding_table_s): New datatype. (binding_entry_make): New function. (binding_entry_free): Likewise. (binding_table_construct): Likewise. (binding_table_free): Likewise. (binding_table_new): Likewise. (binding_table_expand): Likewise. (binding_table_insert): Likewise. (binding_table_find): Likewise. (binding_table_find_anon_type): Likewise. (binding_table_reverse_maybe_remap): Likewise. (binding_table_remove_anonymous_types): Likewise. (binding_table_foreach): Likewise. * name-lookup.h (binding_table): New type. (binding_entry): Likewise. (bt_foreach_proc): Likewise. (struct binding_entry_s): New datatype. (SCOPE_DEFAULT_HT_SIZE): New macro. (CLASS_SCOPE_HT_SIZE): Likewise. (NAMESPACE_ORDINARY_HT_SIZE): Likewise. (NAMESPACE_STD_HT_SIZE): Likewise. (GLOBAL_SCOPE_HT_SIZE): Likewise. (binding_table_new): Declare. (binding_table_free): Likewise. (binding_table_insert): Likewise. (binding_table_find_anon_type): Likewise. (binding_table_reverse_maybe_remap): Likewise. (binding_table_remove_anonymous_types): Likewise. (binding_table_foreach): Likewise. (binding_table_find): Likewise. (cxx_remember_type_decls): Likewise. * pt.c (bt_instantiate_type_proc): New function. (do_type_instantiation): Use it. * search.c (lookup_field_r): Use binding_table_find. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66930 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/hashtable.h')
-rw-r--r--gcc/hashtable.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/hashtable.h b/gcc/hashtable.h
index 20445d7d321..11e9893287d 100644
--- a/gcc/hashtable.h
+++ b/gcc/hashtable.h
@@ -27,6 +27,7 @@ struct ht_identifier GTY(())
{
const unsigned char *str;
unsigned int len;
+ unsigned int hash_value;
};
#define HT_LEN(NODE) ((NODE)->len)