2003-01-06 Mark Mitchell <mark@codesourcery.com>
+ * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
+ (hash_local_specialization): New function.
+ (register_local_specialization): Revert 2003-01-05 change.
+ (instantiate_decl): Use hash_local_specialization when creating
+ the local_specializations table.
+
* decl2.c (mark_used): Do not synthesize thunks.
* class.c (layout_class_type): Correct handling of unnamed
retrieve_local_specialization (tmpl)
tree tmpl;
{
- tree spec = (tree) htab_find (local_specializations, tmpl);
+ tree spec =
+ (tree) htab_find_with_hash (local_specializations, tmpl,
+ htab_hash_pointer (tmpl));
return spec ? TREE_PURPOSE (spec) : NULL_TREE;
}
return TREE_VALUE ((tree) p1) == (tree) p2;
}
+/* Hash P1, an entry in the local specializations table. */
+
+static hashval_t
+hash_local_specialization (const void* p1)
+{
+ return htab_hash_pointer (TREE_VALUE ((tree) p1));
+}
+
/* Like register_specialization, but for local declarations. We are
registering SPEC, an instantiation of TMPL. */
{
void **slot;
- slot = htab_find_slot (local_specializations, tmpl, INSERT);
+ slot = htab_find_slot_with_hash (local_specializations, tmpl,
+ htab_hash_pointer (tmpl), INSERT);
*slot = build_tree_list (spec, tmpl);
}
/* Set up the list of local specializations. */
local_specializations = htab_create (37,
- htab_hash_pointer,
+ hash_local_specialization,
eq_local_specializations,
NULL);