Title: [95090] trunk/Source/_javascript_Core
- Revision
- 95090
- Author
- [email protected]
- Date
- 2011-09-14 07:20:45 -0700 (Wed, 14 Sep 2011)
Log Message
HashTraits.h should include template specialization for WTF::String
https://bugs.webkit.org/show_bug.cgi?id=67851
Ensure that the template specialization for HashTraits<String> is always
picked up. (Previously it was possible to include HashSet and String but
not the correct HashTraits, so you would get an inefficient template
instantiation.)
Patch by Iain Merrick <[email protected]> on 2011-09-14
Reviewed by Darin Adler.
* wtf/HashTraits.h:
* wtf/text/StringHash.h:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (95089 => 95090)
--- trunk/Source/_javascript_Core/ChangeLog 2011-09-14 14:14:37 UTC (rev 95089)
+++ trunk/Source/_javascript_Core/ChangeLog 2011-09-14 14:20:45 UTC (rev 95090)
@@ -1,3 +1,18 @@
+2011-09-14 Iain Merrick <[email protected]>
+
+ HashTraits.h should include template specialization for WTF::String
+ https://bugs.webkit.org/show_bug.cgi?id=67851
+
+ Ensure that the template specialization for HashTraits<String> is always
+ picked up. (Previously it was possible to include HashSet and String but
+ not the correct HashTraits, so you would get an inefficient template
+ instantiation.)
+
+ Reviewed by Darin Adler.
+
+ * wtf/HashTraits.h:
+ * wtf/text/StringHash.h:
+
2011-09-13 Filip Pizlo <[email protected]>
SpeculativeJIT::shouldSpeculateInteger(NodeIndex, NodeIndex) should
Modified: trunk/Source/_javascript_Core/wtf/HashTraits.h (95089 => 95090)
--- trunk/Source/_javascript_Core/wtf/HashTraits.h 2011-09-14 14:14:37 UTC (rev 95089)
+++ trunk/Source/_javascript_Core/wtf/HashTraits.h 2011-09-14 14:20:45 UTC (rev 95090)
@@ -28,6 +28,8 @@
namespace WTF {
+ class String;
+
using std::pair;
using std::make_pair;
@@ -89,6 +91,7 @@
};
template<typename P> struct HashTraits<RefPtr<P> > : SimpleClassHashTraits<RefPtr<P> > { };
+ template<> struct HashTraits<String> : SimpleClassHashTraits<String> { };
// special traits for pairs, helpful for their use in HashMap implementation
Modified: trunk/Source/_javascript_Core/wtf/text/StringHash.h (95089 => 95090)
--- trunk/Source/_javascript_Core/wtf/text/StringHash.h 2011-09-14 14:14:37 UTC (rev 95089)
+++ trunk/Source/_javascript_Core/wtf/text/StringHash.h 2011-09-14 14:20:45 UTC (rev 95090)
@@ -179,8 +179,6 @@
}
};
- template<> struct HashTraits<String> : SimpleClassHashTraits<String> { };
-
}
using WTF::StringHash;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes