Title: [97137] trunk/Source/WebCore
- Revision
- 97137
- Author
- [email protected]
- Date
- 2011-10-11 02:31:38 -0700 (Tue, 11 Oct 2011)
Log Message
Shrink WebCore::Node on 64-bit.
https://bugs.webkit.org/show_bug.cgi?id=69768
Reviewed by Antti Koivisto.
Rearrange TreeShared and Node members so that the node flags fall
into the padding at the end of TreeShared on 64-bit, reducing the
size of Node (and all subclasses) by 8 bytes.
* dom/Document.h:
(WebCore::Node::Node):
* dom/Node.h:
* platform/TreeShared.h:
(WebCore::TreeShared::TreeShared):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (97136 => 97137)
--- trunk/Source/WebCore/ChangeLog 2011-10-11 09:30:55 UTC (rev 97136)
+++ trunk/Source/WebCore/ChangeLog 2011-10-11 09:31:38 UTC (rev 97137)
@@ -1,3 +1,20 @@
+2011-10-10 Andreas Kling <[email protected]>
+
+ Shrink WebCore::Node on 64-bit.
+ https://bugs.webkit.org/show_bug.cgi?id=69768
+
+ Reviewed by Antti Koivisto.
+
+ Rearrange TreeShared and Node members so that the node flags fall
+ into the padding at the end of TreeShared on 64-bit, reducing the
+ size of Node (and all subclasses) by 8 bytes.
+
+ * dom/Document.h:
+ (WebCore::Node::Node):
+ * dom/Node.h:
+ * platform/TreeShared.h:
+ (WebCore::TreeShared::TreeShared):
+
2011-10-11 Kent Tamura <[email protected]>
Move m_listItems and m_recalcListItems from SelectElementData to HTMLSelectElement
Modified: trunk/Source/WebCore/dom/Document.h (97136 => 97137)
--- trunk/Source/WebCore/dom/Document.h 2011-10-11 09:30:55 UTC (rev 97136)
+++ trunk/Source/WebCore/dom/Document.h 2011-10-11 09:31:38 UTC (rev 97137)
@@ -1417,11 +1417,11 @@
}
inline Node::Node(Document* document, ConstructionType type)
- : m_document(document)
+ : m_nodeFlags(type)
+ , m_document(document)
, m_previous(0)
, m_next(0)
, m_renderer(0)
- , m_nodeFlags(type)
{
if (m_document)
m_document->guardRef();
Modified: trunk/Source/WebCore/dom/Node.h (97136 => 97137)
--- trunk/Source/WebCore/dom/Node.h 2011-10-11 09:30:55 UTC (rev 97136)
+++ trunk/Source/WebCore/dom/Node.h 2011-10-11 09:31:38 UTC (rev 97137)
@@ -94,7 +94,7 @@
SyntheticStyleChange = 3 << nodeStyleChangeShift
};
-class Node : public EventTarget, public TreeShared<ContainerNode>, public ScriptWrappable {
+class Node : public EventTarget, public ScriptWrappable, public TreeShared<ContainerNode> {
friend class Document;
friend class TreeScope;
@@ -703,11 +703,11 @@
void trackForDebugging();
+ mutable uint32_t m_nodeFlags;
Document* m_document;
Node* m_previous;
Node* m_next;
RenderObject* m_renderer;
- mutable uint32_t m_nodeFlags;
protected:
bool isParsingChildrenFinished() const { return getFlag(IsParsingChildrenFinishedFlag); }
Modified: trunk/Source/WebCore/platform/TreeShared.h (97136 => 97137)
--- trunk/Source/WebCore/platform/TreeShared.h 2011-10-11 09:30:55 UTC (rev 97136)
+++ trunk/Source/WebCore/platform/TreeShared.h 2011-10-11 09:31:38 UTC (rev 97137)
@@ -36,8 +36,8 @@
WTF_MAKE_NONCOPYABLE(TreeShared);
public:
TreeShared()
- : m_refCount(1)
- , m_parent(0)
+ : m_parent(0)
+ , m_refCount(1)
#ifndef NDEBUG
, m_adoptionIsRequired(true)
#endif
@@ -123,8 +123,9 @@
friend void adopted<>(TreeShared<T>*);
#endif
+ T* m_parent;
int m_refCount;
- T* m_parent;
+
#ifndef NDEBUG
bool m_adoptionIsRequired;
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes