RESOLVED FIXED 73168
CSSStyleRule: Pack m_sourceLine with CSSRule bits.
https://bugs.webkit.org/show_bug.cgi?id=73168
Summary CSSStyleRule: Pack m_sourceLine with CSSRule bits.
Andreas Kling
Reported 2011-11-27 07:40:09 PST
We can save one CPU word per instance by packing CSSStyleRule::m_sourceLine with the other bits in CSSRule.
Attachments
Patch (2.69 KB, patch)
2011-11-27 07:48 PST, Andreas Kling
koivisto: review+
koivisto: commit-queue-
Andreas Kling
Comment 1 2011-11-27 07:48:17 PST
WebKit Review Bot
Comment 2 2011-11-27 07:57:05 PST
Attachment 116672 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/css/CSSRule.h:125: Please declare integral type bitfields with either signed or unsigned. [runtime/bitfields] [5] Total errors found: 1 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Antti Koivisto
Comment 3 2011-11-27 10:48:22 PST
Comment on attachment 116672 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=116672&action=review r=me, with the stylebot fix. >> Source/WebCore/css/CSSRule.h:125 >> + // Only used by CSSStyleRule but kept here to maximize struct packing. >> + int m_sourceLine : 27; > > Please declare integral type bitfields with either signed or unsigned. [runtime/bitfields] [5] I think it is nicer to keep the fields together even if it means multiple private/protected sections. Especially when the fields are being packed.
Andreas Kling
Comment 4 2011-11-27 19:52:00 PST
Note You need to log in before you can comment on or make changes to this bug.