WebKit Bugzilla
Attachment 347469 Details for
Bug 188734
: Shrink size of WebCore::Event further by reordering members
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188734-20180820073057.patch (text/plain), 3.09 KB, created by
Yusuke Suzuki
on 2018-08-19 15:30:58 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yusuke Suzuki
Created:
2018-08-19 15:30:58 PDT
Size:
3.09 KB
patch
obsolete
>Subversion Revision: 235015 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 2195422db9aba4b42b2a1f68c13807b5f8c21d2c..0088b6c1fe791c7fce4fcb5e189901b130dc51a5 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2018-08-19 Yusuke Suzuki <yusukesuzuki@slowstart.org> >+ >+ Shrink size of WebCore::Event further by reordering members >+ https://bugs.webkit.org/show_bug.cgi?id=188734 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Since WebCore::Event is ref-counted class, it has 4bytes m_refCount at the head of the class. >+ So placing 4bytes just after that before placing 8bytes aligned member (like pointers in 64bit >+ platforms) can save the size of WebCore::Event further. >+ This patch reorders members of WebCore::Event to shrink the size from 80bytes to 72bytes. >+ >+ No behavior change. >+ >+ * dom/Event.cpp: >+ (WebCore::Event::Event): >+ * dom/Event.h: >+ > 2018-08-18 David Kilzer <ddkilzer@apple.com> > > Let Xcode have its way with the WebCore project >diff --git a/Source/WebCore/dom/Event.cpp b/Source/WebCore/dom/Event.cpp >index 66e0662ad6551f2cc514029234a3761c9998a799..008417c8d9637f7f864329775c2d3d76301e3ba1 100644 >--- a/Source/WebCore/dom/Event.cpp >+++ b/Source/WebCore/dom/Event.cpp >@@ -35,8 +35,7 @@ > namespace WebCore { > > ALWAYS_INLINE Event::Event(MonotonicTime createTime, const AtomicString& type, IsTrusted isTrusted, CanBubble canBubble, IsCancelable cancelable, IsComposed composed) >- : m_type { type } >- , m_isInitialized { !type.isNull() } >+ : m_isInitialized { !type.isNull() } > , m_canBubble { canBubble == CanBubble::Yes } > , m_cancelable { cancelable == IsCancelable::Yes } > , m_composed { composed == IsComposed::Yes } >@@ -48,6 +47,7 @@ ALWAYS_INLINE Event::Event(MonotonicTime createTime, const AtomicString& type, I > , m_isTrusted { isTrusted == IsTrusted::Yes } > , m_isExecutingPassiveEventListener { false } > , m_eventPhase { NONE } >+ , m_type { type } > , m_createTime { createTime } > { > } >diff --git a/Source/WebCore/dom/Event.h b/Source/WebCore/dom/Event.h >index b747143c522d5ee51c954b9334556bafa5861ce5..f4b7afe2402f13ed165f34c7ef1a351a8d4c3f82 100644 >--- a/Source/WebCore/dom/Event.h >+++ b/Source/WebCore/dom/Event.h >@@ -45,7 +45,7 @@ class Event : public ScriptWrappable, public RefCounted<Event> { > enum class IsCancelable : uint8_t { No, Yes }; > enum class IsComposed : uint8_t { No, Yes }; > >- enum PhaseType { >+ enum PhaseType : uint8_t { > NONE = 0, > CAPTURING_PHASE = 1, > AT_TARGET = 2, >@@ -153,8 +153,6 @@ class Event : public ScriptWrappable, public RefCounted<Event> { > > void setCanceledFlagIfPossible(); > >- AtomicString m_type; >- > unsigned m_isInitialized : 1; > unsigned m_canBubble : 1; > unsigned m_cancelable : 1; >@@ -170,6 +168,8 @@ class Event : public ScriptWrappable, public RefCounted<Event> { > > unsigned m_eventPhase : 2; > >+ AtomicString m_type; >+ > RefPtr<EventTarget> m_currentTarget; > const EventPath* m_eventPath { nullptr }; > RefPtr<EventTarget> m_target;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188734
: 347469