Title: [100418] trunk/Source/_javascript_Core
Revision
100418
Author
da...@apple.com
Date
2011-11-16 00:06:09 -0800 (Wed, 16 Nov 2011)

Log Message

Add a "pass type" and "peek type" concept to HashTraits
https://bugs.webkit.org/show_bug.cgi?id=72473

Reviewed by Filip Pizlo.

* wtf/HashTraits.h: Added the pass type and peek type.
For OwnPtr, the pass type will be PassOwnPtr and the peek
type will be a raw pointer.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (100417 => 100418)


--- trunk/Source/_javascript_Core/ChangeLog	2011-11-16 08:05:40 UTC (rev 100417)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-11-16 08:06:09 UTC (rev 100418)
@@ -1,5 +1,16 @@
 2011-11-16  Darin Adler  <da...@apple.com>
 
+        Add a "pass type" and "peek type" concept to HashTraits
+        https://bugs.webkit.org/show_bug.cgi?id=72473
+
+        Reviewed by Filip Pizlo.
+
+        * wtf/HashTraits.h: Added the pass type and peek type.
+        For OwnPtr, the pass type will be PassOwnPtr and the peek
+        type will be a raw pointer.
+
+2011-11-16  Darin Adler  <da...@apple.com>
+
         Fix some hash traits that don't derive from the base hash traits
         https://bugs.webkit.org/show_bug.cgi?id=72470
 

Modified: trunk/Source/_javascript_Core/wtf/HashTraits.h (100417 => 100418)


--- trunk/Source/_javascript_Core/wtf/HashTraits.h	2011-11-16 08:05:40 UTC (rev 100417)
+++ trunk/Source/_javascript_Core/wtf/HashTraits.h	2011-11-16 08:06:09 UTC (rev 100418)
@@ -54,6 +54,10 @@
     template<typename T> struct GenericHashTraits : GenericHashTraitsBase<IsInteger<T>::value, T> {
         typedef T TraitType;
         static T emptyValue() { return T(); }
+        typedef const T& PassType;
+        static const T& pass(const T& value) { return value; }
+        typedef const T& PeekType;
+        static const T& peek(const T& value) { return value; }
     };
 
     template<typename T> struct HashTraits : GenericHashTraits<T> { };
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to