| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 static const bool needsDestruction = false; | 720 static const bool needsDestruction = false; |
| 721 // FIXME: The distinction between PeekInType and PassInType is there for | 721 // FIXME: The distinction between PeekInType and PassInType is there for |
| 722 // the sake of the reference counting handles. When they are gone the two | 722 // the sake of the reference counting handles. When they are gone the two |
| 723 // types can be merged into PassInType. | 723 // types can be merged into PassInType. |
| 724 // FIXME: Implement proper const'ness for iterator types. Requires support | 724 // FIXME: Implement proper const'ness for iterator types. Requires support |
| 725 // in the marking Visitor. | 725 // in the marking Visitor. |
| 726 typedef RawPtr<T> PeekInType; | 726 typedef RawPtr<T> PeekInType; |
| 727 typedef RawPtr<T> PassInType; | 727 typedef RawPtr<T> PassInType; |
| 728 typedef WebCore::Member<T>* IteratorGetType; | 728 typedef WebCore::Member<T>* IteratorGetType; |
| 729 typedef const WebCore::Member<T>* IteratorConstGetType; | 729 typedef const WebCore::Member<T>* IteratorConstGetType; |
| 730 typedef T* IteratorReferenceType; | 730 typedef WebCore::Member<T>& IteratorReferenceType; |
| 731 typedef T* IteratorConstReferenceType; | 731 typedef T* const IteratorConstReferenceType; |
| 732 static IteratorConstGetType getToConstGetConversion(const WebCore::Member<T>
* x) { return x->get(); } | 732 static IteratorReferenceType getToReferenceConversion(IteratorGetType x) { r
eturn *x; } |
| 733 static IteratorReferenceType getToReferenceConversion(IteratorGetType x) { r
eturn x->get(); } | |
| 734 static IteratorConstReferenceType getToReferenceConstConversion(IteratorCons
tGetType x) { return x->get(); } | 733 static IteratorConstReferenceType getToReferenceConstConversion(IteratorCons
tGetType x) { return x->get(); } |
| 735 // FIXME: Similarly, there is no need for a distinction between PeekOutType | 734 // FIXME: Similarly, there is no need for a distinction between PeekOutType |
| 736 // and PassOutType without reference counting. | 735 // and PassOutType without reference counting. |
| 737 typedef T* PeekOutType; | 736 typedef T* PeekOutType; |
| 738 typedef T* PassOutType; | 737 typedef T* PassOutType; |
| 739 | 738 |
| 740 template<typename U> | 739 template<typename U> |
| 741 static void store(const U& value, WebCore::Member<T>& storage) { storage = v
alue; } | 740 static void store(const U& value, WebCore::Member<T>& storage) { storage = v
alue; } |
| 742 | 741 |
| 743 static PeekOutType peek(const WebCore::Member<T>& value) { return value; } | 742 static PeekOutType peek(const WebCore::Member<T>& value) { return value; } |
| 744 static PassOutType passOut(const WebCore::Member<T>& value) { return value;
} | 743 static PassOutType passOut(const WebCore::Member<T>& value) { return value;
} |
| 745 }; | 744 }; |
| 746 | 745 |
| 747 template<typename T> struct HashTraits<WebCore::WeakMember<T> > : SimpleClassHas
hTraits<WebCore::WeakMember<T> > { | 746 template<typename T> struct HashTraits<WebCore::WeakMember<T> > : SimpleClassHas
hTraits<WebCore::WeakMember<T> > { |
| 748 static const bool needsDestruction = false; | 747 static const bool needsDestruction = false; |
| 749 // FIXME: The distinction between PeekInType and PassInType is there for | 748 // FIXME: The distinction between PeekInType and PassInType is there for |
| 750 // the sake of the reference counting handles. When they are gone the two | 749 // the sake of the reference counting handles. When they are gone the two |
| 751 // types can be merged into PassInType. | 750 // types can be merged into PassInType. |
| 752 // FIXME: Implement proper const'ness for iterator types. Requires support | 751 // FIXME: Implement proper const'ness for iterator types. Requires support |
| 753 // in the marking Visitor. | 752 // in the marking Visitor. |
| 754 typedef RawPtr<T> PeekInType; | 753 typedef RawPtr<T> PeekInType; |
| 755 typedef RawPtr<T> PassInType; | 754 typedef RawPtr<T> PassInType; |
| 756 typedef WebCore::WeakMember<T>* IteratorGetType; | 755 typedef WebCore::WeakMember<T>* IteratorGetType; |
| 757 typedef const WebCore::WeakMember<T>* IteratorConstGetType; | 756 typedef const WebCore::WeakMember<T>* IteratorConstGetType; |
| 758 typedef T* IteratorReferenceType; | 757 typedef WebCore::WeakMember<T>& IteratorReferenceType; |
| 759 typedef T* IteratorConstReferenceType; | 758 typedef T* const IteratorConstReferenceType; |
| 760 static IteratorConstGetType getToConstGetConversion(const WebCore::WeakMembe
r<T>* x) { return x->get(); } | 759 static IteratorReferenceType getToReferenceConversion(IteratorGetType x) { r
eturn *x; } |
| 761 static IteratorReferenceType getToReferenceConversion(IteratorGetType x) { r
eturn x->get(); } | |
| 762 static IteratorConstReferenceType getToReferenceConstConversion(IteratorCons
tGetType x) { return x->get(); } | 760 static IteratorConstReferenceType getToReferenceConstConversion(IteratorCons
tGetType x) { return x->get(); } |
| 763 // FIXME: Similarly, there is no need for a distinction between PeekOutType | 761 // FIXME: Similarly, there is no need for a distinction between PeekOutType |
| 764 // and PassOutType without reference counting. | 762 // and PassOutType without reference counting. |
| 765 typedef T* PeekOutType; | 763 typedef T* PeekOutType; |
| 766 typedef T* PassOutType; | 764 typedef T* PassOutType; |
| 767 | 765 |
| 768 template<typename U> | 766 template<typename U> |
| 769 static void store(const U& value, WebCore::WeakMember<T>& storage) { storage
= value; } | 767 static void store(const U& value, WebCore::WeakMember<T>& storage) { storage
= value; } |
| 770 | 768 |
| 771 static PeekOutType peek(const WebCore::WeakMember<T>& value) { return value;
} | 769 static PeekOutType peek(const WebCore::WeakMember<T>& value) { return value;
} |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 }; | 839 }; |
| 842 | 840 |
| 843 template<typename T, typename U> | 841 template<typename T, typename U> |
| 844 struct NeedsTracing<HashMap<T, U> > { | 842 struct NeedsTracing<HashMap<T, U> > { |
| 845 static const bool value = false; | 843 static const bool value = false; |
| 846 }; | 844 }; |
| 847 | 845 |
| 848 } // namespace WTF | 846 } // namespace WTF |
| 849 | 847 |
| 850 #endif | 848 #endif |
| OLD | NEW |