Title: [113794] trunk/Source
- Revision
- 113794
- Author
- ad...@chromium.org
- Date
- 2012-04-10 17:15:36 -0700 (Tue, 10 Apr 2012)
Log Message
Remove unused NonNullPassRefPtr from WTF
https://bugs.webkit.org/show_bug.cgi?id=82389
Reviewed by Kentaro Hara.
Source/_javascript_Core:
* _javascript_Core.order: Remove nonexistent symbols referencing NonNullPassRefPtr.
Source/WTF:
NonNullPassRefPtr seems to be unused since JSC allocation was
restructured in r84052.
If someone decides they need this later, they can always revert this patch.
* wtf/PassRefPtr.h:
* wtf/RefPtr.h:
(RefPtr):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (113793 => 113794)
--- trunk/Source/_javascript_Core/ChangeLog 2012-04-11 00:09:45 UTC (rev 113793)
+++ trunk/Source/_javascript_Core/ChangeLog 2012-04-11 00:15:36 UTC (rev 113794)
@@ -1,3 +1,12 @@
+2012-04-10 Adam Klein <ad...@chromium.org>
+
+ Remove unused NonNullPassRefPtr from WTF
+ https://bugs.webkit.org/show_bug.cgi?id=82389
+
+ Reviewed by Kentaro Hara.
+
+ * _javascript_Core.order: Remove nonexistent symbols referencing NonNullPassRefPtr.
+
2012-04-10 Darin Adler <da...@apple.com>
Remove unused data member from Lexer class
Modified: trunk/Source/_javascript_Core/_javascript_Core.order (113793 => 113794)
--- trunk/Source/_javascript_Core/_javascript_Core.order 2012-04-11 00:09:45 UTC (rev 113793)
+++ trunk/Source/_javascript_Core/_javascript_Core.order 2012-04-11 00:15:36 UTC (rev 113794)
@@ -268,7 +268,6 @@
__ZN3JSC14MacroAssembler4jumpENS_22AbstractMacroAssemblerINS_12X86AssemblerEE5LabelE
__ZN3WTF15deleteAllValuesIPN3JSC4Yarr18PatternDisjunctionELm4EEEvRKNS_6VectorIT_XT0_EEE
__ZN3WTF15deleteAllValuesIPN3JSC4Yarr14CharacterClassELm0EEEvRKNS_6VectorIT_XT0_EEE
-__ZN3JSC12RegExpObjectC2EPNS_14JSGlobalObjectEPNS_9StructureEN3WTF17NonNullPassRefPtrINS_6RegExpEEE
__ZN3JSC14ErrorPrototypeC1EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureE
__ZN3JSC14ErrorPrototypeC2EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureE
__ZN3JSC13ErrorInstanceC2EPNS_12JSGlobalDataEPNS_9StructureE
@@ -1035,7 +1034,6 @@
__ZN3JSC3JIT18emit_op_new_regexpEPNS_11InstructionE
__ZN3JSC8JSString18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE
_cti_op_new_regexp
-__ZN3JSC12RegExpObjectC1EPNS_14JSGlobalObjectEPNS_9StructureEN3WTF17NonNullPassRefPtrINS_6RegExpEEE
__ZN3JSCL22stringProtoFuncReplaceEPNS_9ExecStateE
__ZNK3JSC7JSValue14toThisJSStringEPNS_9ExecStateE
__ZN3JSC9ExecState8argumentEi
Modified: trunk/Source/WTF/ChangeLog (113793 => 113794)
--- trunk/Source/WTF/ChangeLog 2012-04-11 00:09:45 UTC (rev 113793)
+++ trunk/Source/WTF/ChangeLog 2012-04-11 00:15:36 UTC (rev 113794)
@@ -1,3 +1,19 @@
+2012-04-10 Adam Klein <ad...@chromium.org>
+
+ Remove unused NonNullPassRefPtr from WTF
+ https://bugs.webkit.org/show_bug.cgi?id=82389
+
+ Reviewed by Kentaro Hara.
+
+ NonNullPassRefPtr seems to be unused since JSC allocation was
+ restructured in r84052.
+
+ If someone decides they need this later, they can always revert this patch.
+
+ * wtf/PassRefPtr.h:
+ * wtf/RefPtr.h:
+ (RefPtr):
+
2012-04-10 Patrick Gansterer <par...@webkit.org>
[CMake] Enable USE_FOLDERS property
Modified: trunk/Source/WTF/wtf/PassRefPtr.h (113793 => 113794)
--- trunk/Source/WTF/wtf/PassRefPtr.h 2012-04-11 00:09:45 UTC (rev 113793)
+++ trunk/Source/WTF/wtf/PassRefPtr.h 2012-04-11 00:15:36 UTC (rev 113794)
@@ -92,63 +92,6 @@
mutable T* m_ptr;
};
- // NonNullPassRefPtr: Optimized for passing non-null pointers. A NonNullPassRefPtr
- // begins life non-null, and can only become null through a call to leakRef()
- // or clear().
-
- // FIXME: NonNullPassRefPtr could just inherit from PassRefPtr. However,
- // if we use inheritance, GCC's optimizer fails to realize that destruction
- // of a released NonNullPassRefPtr is a no-op. So, for now, just copy the
- // most important code from PassRefPtr.
- template<typename T> class NonNullPassRefPtr {
- public:
- NonNullPassRefPtr(T* ptr)
- : m_ptr(ptr)
- {
- ASSERT(m_ptr);
- m_ptr->ref();
- }
-
- template<typename U> NonNullPassRefPtr(const RefPtr<U>& o)
- : m_ptr(o.get())
- {
- ASSERT(m_ptr);
- m_ptr->ref();
- }
-
- NonNullPassRefPtr(const NonNullPassRefPtr& o)
- : m_ptr(o.leakRef())
- {
- ASSERT(m_ptr);
- }
-
- template<typename U> NonNullPassRefPtr(const NonNullPassRefPtr<U>& o)
- : m_ptr(o.leakRef())
- {
- ASSERT(m_ptr);
- }
-
- template<typename U> NonNullPassRefPtr(const PassRefPtr<U>& o)
- : m_ptr(o.leakRef())
- {
- ASSERT(m_ptr);
- }
-
- ALWAYS_INLINE ~NonNullPassRefPtr() { derefIfNotNull(m_ptr); }
-
- T* get() const { return m_ptr; }
-
- T* leakRef() const WARN_UNUSED_RETURN { T* tmp = m_ptr; m_ptr = 0; return tmp; }
-
- T& operator*() const { return *m_ptr; }
- T* operator->() const { return m_ptr; }
-
- NonNullPassRefPtr& operator=(const NonNullPassRefPtr&) { COMPILE_ASSERT(!sizeof(T*), NonNullPassRefPtr_should_never_be_assigned_to); return *this; }
-
- private:
- mutable T* m_ptr;
- };
-
template<typename T> template<typename U> inline PassRefPtr<T>::PassRefPtr(const RefPtr<U>& o)
: m_ptr(o.get())
{
@@ -237,7 +180,6 @@
} // namespace WTF
using WTF::PassRefPtr;
-using WTF::NonNullPassRefPtr;
using WTF::adoptRef;
using WTF::static_pointer_cast;
using WTF::const_pointer_cast;
Modified: trunk/Source/WTF/wtf/RefPtr.h (113793 => 113794)
--- trunk/Source/WTF/wtf/RefPtr.h 2012-04-11 00:09:45 UTC (rev 113793)
+++ trunk/Source/WTF/wtf/RefPtr.h 2012-04-11 00:15:36 UTC (rev 113794)
@@ -32,7 +32,6 @@
enum PlacementNewAdoptType { PlacementNewAdopt };
template<typename T> class PassRefPtr;
- template<typename T> class NonNullPassRefPtr;
enum HashTableDeletedValueType { HashTableDeletedValue };
@@ -44,9 +43,8 @@
ALWAYS_INLINE RefPtr(const RefPtr& o) : m_ptr(o.m_ptr) { refIfNotNull(m_ptr); }
template<typename U> RefPtr(const RefPtr<U>& o) : m_ptr(o.get()) { refIfNotNull(m_ptr); }
- // See comments in PassRefPtr.h for an explanation of why these takes const references.
+ // See comments in PassRefPtr.h for an explanation of why this takes a const reference.
template<typename U> RefPtr(const PassRefPtr<U>&);
- template<typename U> RefPtr(const NonNullPassRefPtr<U>&);
// Special constructor for cases where we overwrite an object in place.
ALWAYS_INLINE RefPtr(PlacementNewAdoptType) { }
@@ -74,13 +72,11 @@
RefPtr& operator=(const RefPtr&);
RefPtr& operator=(T*);
RefPtr& operator=(const PassRefPtr<T>&);
- RefPtr& operator=(const NonNullPassRefPtr<T>&);
#if !COMPILER_SUPPORTS(CXX_NULLPTR)
RefPtr& operator=(std::nullptr_t) { clear(); return *this; }
#endif
template<typename U> RefPtr& operator=(const RefPtr<U>&);
template<typename U> RefPtr& operator=(const PassRefPtr<U>&);
- template<typename U> RefPtr& operator=(const NonNullPassRefPtr<U>&);
void swap(RefPtr&);
@@ -95,11 +91,6 @@
{
}
- template<typename T> template<typename U> inline RefPtr<T>::RefPtr(const NonNullPassRefPtr<U>& o)
- : m_ptr(o.leakRef())
- {
- }
-
template<typename T> inline void RefPtr<T>::clear()
{
T* ptr = m_ptr;
@@ -144,14 +135,6 @@
return *this;
}
- template<typename T> inline RefPtr<T>& RefPtr<T>::operator=(const NonNullPassRefPtr<T>& o)
- {
- T* ptr = m_ptr;
- m_ptr = o.leakRef();
- derefIfNotNull(ptr);
- return *this;
- }
-
template<typename T> template<typename U> inline RefPtr<T>& RefPtr<T>::operator=(const PassRefPtr<U>& o)
{
T* ptr = m_ptr;
@@ -160,14 +143,6 @@
return *this;
}
- template<typename T> template<typename U> inline RefPtr<T>& RefPtr<T>::operator=(const NonNullPassRefPtr<U>& o)
- {
- T* ptr = m_ptr;
- m_ptr = o.leakRef();
- derefIfNotNull(ptr);
- return *this;
- }
-
template<class T> inline void RefPtr<T>::swap(RefPtr<T>& o)
{
std::swap(m_ptr, o.m_ptr);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes