Changeset 83637 in webkit
- Timestamp:
- Apr 12, 2011 2:12:33 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r83626 r83637 1 2011-04-12 Geoffrey Garen <ggaren@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Cleaned up some Vector traits, and added missing Vector traits for handles 6 https://bugs.webkit.org/show_bug.cgi?id=58372 7 8 * heap/Local.h: Inherit from SimpleClassVectorTraits to avoid duplication. 9 10 * heap/Strong.h: Ditto. 11 12 * heap/Weak.h: Ditto. 13 14 * parser/JSParser.cpp: Fixed a traits error. No test case because this 15 particular trait is not currently exercised by the parser. 16 17 * runtime/UString.h: No need to override canInitializeWithMemset, since 18 our base class sets it to true. 19 20 * wtf/VectorTraits.h: Inherit from VectorTraitsBase to avoid duplication. 21 22 * wtf/text/WTFString.h: No need to override canInitializeWithMemset, since 23 our base class sets it to true. 24 1 25 2011-04-12 Thouraya ANDOLSI <thouraya.andolsi@st.com> 2 26 -
trunk/Source/JavaScriptCore/heap/Local.h
r83385 r83637 142 142 namespace WTF { 143 143 144 template<typename T> struct VectorTraits<JSC::Local<T> > {144 template<typename T> struct VectorTraits<JSC::Local<T> > : SimpleClassVectorTraits { 145 145 static const bool needsDestruction = false; 146 static const bool needsInitialization = true;147 146 static const bool canInitializeWithMemset = false; 148 static const bool canMoveWithMemcpy = true; 149 static const bool canCopyWithMemcpy = false; 150 static const bool canFillWithMemset = false; 151 static const bool canCompareWithMemcmp = true; 147 static const bool canCompareWithMemcmp = false; 152 148 }; 153 149 -
trunk/Source/JavaScriptCore/heap/Strong.h
r83385 r83637 138 138 }; 139 139 140 } 140 } // namespace JSC 141 141 142 142 namespace WTF { 143 144 template<typename T> struct VectorTraits<JSC::Strong<T> > : SimpleClassVectorTraits { 145 static const bool canCompareWithMemcmp = false; 146 }; 143 147 144 148 template<typename P> struct HashTraits<JSC::Strong<P> > : GenericHashTraits<JSC::Strong<P> > { -
trunk/Source/JavaScriptCore/heap/Weak.h
r83385 r83637 109 109 } // namespace JSC 110 110 111 namespace WTF { 112 113 template<typename T> struct VectorTraits<JSC::Weak<T> > : SimpleClassVectorTraits { 114 static const bool canCompareWithMemcmp = false; 115 }; 116 117 } 118 111 119 #endif // Weak_h -
trunk/Source/JavaScriptCore/parser/JSParser.cpp
r79749 r83637 2169 2169 namespace WTF 2170 2170 { 2171 template <> struct VectorTraits<JSC::JSParser::Scope> : SimpleClassVectorTraits { }; 2172 } 2171 template <> struct VectorTraits<JSC::JSParser::Scope> : SimpleClassVectorTraits { 2172 static const bool canInitializeWithMemset = false; // Not all Scope data members initialize to 0. 2173 }; 2174 } -
trunk/Source/JavaScriptCore/runtime/UString.h
r72289 r83637 253 253 }; 254 254 255 template <> struct VectorTraits<JSC::UString> : SimpleClassVectorTraits 256 { 257 static const bool canInitializeWithMemset = true; 258 }; 255 template <> struct VectorTraits<JSC::UString> : SimpleClassVectorTraits { }; 259 256 260 257 } // namespace WTF -
trunk/Source/JavaScriptCore/wtf/VectorTraits.h
r55120 r83637 62 62 struct VectorTraits : VectorTraitsBase<IsPod<T>::value, T> { }; 63 63 64 struct SimpleClassVectorTraits 64 struct SimpleClassVectorTraits : VectorTraitsBase<false, void> 65 65 { 66 static const bool needsDestruction = true;67 static const bool needsInitialization = true;68 66 static const bool canInitializeWithMemset = true; 69 67 static const bool canMoveWithMemcpy = true; 70 static const bool canCopyWithMemcpy = false;71 static const bool canFillWithMemset = false;72 68 static const bool canCompareWithMemcmp = true; 73 69 }; -
trunk/Source/JavaScriptCore/wtf/text/WTFString.h
r80012 r83637 500 500 }; 501 501 502 template <> struct VectorTraits<String> : SimpleClassVectorTraits 503 { 504 static const bool canInitializeWithMemset = true; 505 }; 502 template <> struct VectorTraits<String> : SimpleClassVectorTraits { }; 506 503 507 504 } -
trunk/Source/WebCore/ChangeLog
r83636 r83637 1 2011-04-12 Geoffrey Garen <ggaren@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Cleaned up some Vector traits, and added missing Vector traits for handles 6 https://bugs.webkit.org/show_bug.cgi?id=58372 7 8 * platform/graphics/BitmapImage.h: Added a FIXME because the current 9 Vector traits for FrameData are logically incorrect, but I couldn't find 10 a place where this currently results in bad behavior, and it's not 11 immediately obvious what the right solution is. 12 1 13 2011-04-12 Dimitri Glazkov <dglazkov@chromium.org> 2 14 -
trunk/Source/WebCore/platform/graphics/BitmapImage.h
r83091 r83637 54 54 } 55 55 56 // This complicated-looking declaration tells the FrameData Vector that it should copy without57 // invoking our constructor or destructor. This allows us to have a vector even for a struct58 // that's not copyable.59 56 namespace WTF { 60 template<> struct VectorTraits<WebCore::FrameData> : public SimpleClassVectorTraits {}; 57 // FIXME: This declaration gives FrameData a default constructor that zeroes 58 // all its data members, even though FrameData's default constructor defined 59 // below does not zero all its data members. One of these must be wrong! 60 template<> struct VectorTraits<WebCore::FrameData> : public SimpleClassVectorTraits { }; 61 61 } 62 62
Note: See TracChangeset
for help on using the changeset viewer.