Title: [149053] trunk/Source/WTF
Revision
149053
Author
[email protected]
Date
2013-04-24 12:34:50 -0700 (Wed, 24 Apr 2013)

Log Message

Use post-branch store for RefCountedBase::derefBase
https://bugs.webkit.org/show_bug.cgi?id=115078

Reviewed by Andreas Kling.

* wtf/RefCounted.h:
(WTF::RefCountedBase::derefBase): This makes the assembly easier to follow.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (149052 => 149053)


--- trunk/Source/WTF/ChangeLog	2013-04-24 18:34:04 UTC (rev 149052)
+++ trunk/Source/WTF/ChangeLog	2013-04-24 19:34:50 UTC (rev 149053)
@@ -1,3 +1,13 @@
+2013-04-24  Benjamin Poulain  <[email protected]>
+
+        Use post-branch store for RefCountedBase::derefBase
+        https://bugs.webkit.org/show_bug.cgi?id=115078
+
+        Reviewed by Andreas Kling.
+
+        * wtf/RefCounted.h:
+        (WTF::RefCountedBase::derefBase): This makes the assembly easier to follow.
+
 2013-04-23  Geoffrey Garen  <[email protected]>
 
         Filled out more cases of branch folding in bytecode when emitting expressions into a branching context

Modified: trunk/Source/WTF/wtf/RefCounted.h (149052 => 149053)


--- trunk/Source/WTF/wtf/RefCounted.h	2013-04-24 18:34:04 UTC (rev 149052)
+++ trunk/Source/WTF/wtf/RefCounted.h	2013-04-24 19:34:50 UTC (rev 149053)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -139,14 +139,15 @@
 #endif
 
         ASSERT(m_refCount);
-        if (m_refCount == 1) {
+        unsigned tempRefCount = m_refCount - 1;
+        if (!tempRefCount) {
 #if CHECK_REF_COUNTED_LIFECYCLE
             m_deletionHasBegun = true;
 #endif
             return true;
         }
+        m_refCount = tempRefCount;
 
-        --m_refCount;
 #if CHECK_REF_COUNTED_LIFECYCLE
         // Stop thread verification when the ref goes to 1 because it
         // is safe to be passed to another thread at this point.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to