Bug 6752 - Make pointer hash the default for all pointers (plus other Hash improvements)
Summary: Make pointer hash the default for all pointers (plus other Hash improvements)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Maciej Stachowiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-23 22:27 PST by Maciej Stachowiak
Modified: 2006-01-23 23:42 PST (History)
0 users

See Also:


Attachments
cleanup patch (66.46 KB, patch)
2006-01-23 22:33 PST, Maciej Stachowiak
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Stachowiak 2006-01-23 22:27:30 PST
- renamed PointerHash to PtrHash
- made PtrHash the default hash function for int and pointer types that aren't further specialized
- added an AtomicStringImpl class to make it easier and more typesafe to identity hash atomic strings
- did appropriate consequent cleanup (very few places now need to declare a hash function)
Comment 1 Maciej Stachowiak 2006-01-23 22:33:35 PST
Created attachment 5902 [details]
cleanup patch
Comment 2 Darin Adler 2006-01-23 23:27:29 PST
Comment on attachment 5902 [details]
cleanup patch

Funny, I have the same patch for htmlfactory.cpp -- I can discard that now.

+    AtomicString n = getAttribute(nameAttr);

Why not make that const AtomicString&? Also, HTMLGenericFormElementImpl::name() can also return const AtomicString& if we have a way to get a reference to a global empty atomic string. In general it's great to have functions that return const AtomicString& when they are attributes to avoid any reference count churn.

Looks good. I didn't spot any problems.

r=me