RESOLVED FIXED 89112
Fix bit packing of StyleRareInheritedData on Windows
https://bugs.webkit.org/show_bug.cgi?id=89112
Summary Fix bit packing of StyleRareInheritedData on Windows
Tony Chang
Reported 2012-06-14 10:43:16 PDT
Fix bit packing of StyleRareInheritedData on Windows
Attachments
Patch (2.94 KB, patch)
2012-06-14 10:44 PDT, Tony Chang
no flags
Patch for landing (2.98 KB, patch)
2012-06-14 11:56 PDT, Tony Chang
no flags
Tony Chang
Comment 1 2012-06-14 10:44:27 PDT
Ryosuke Niwa
Comment 2 2012-06-14 10:56:10 PDT
Comment on attachment 147614 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=147614&action=review > Source/WebCore/rendering/style/StyleRareInheritedData.cpp:44 > + unsigned m_bitfields[2]; > + > + Color colors[6]; > + float floats[2]; > + void* ownPtrs[1]; > + AtomicString atomicStrings[5]; > + void* refPtrs[2]; > + Length lengths[1]; > + short pagedMediaShorts[2]; > + unsigned unsigneds[1]; > + short hyphenationShorts[3]; I would be very careful with the order in which these things appear. e.g. unsigned a; void* b; unsigned c; and unsigned a; unsigned b; void* c will consume a different size on a 64-bit architecture.
Tony Chang
Comment 3 2012-06-14 11:51:23 PDT
(In reply to comment #2) > (From update of attachment 147614 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=147614&action=review > > > Source/WebCore/rendering/style/StyleRareInheritedData.cpp:44 > > + unsigned m_bitfields[2]; > > + > > + Color colors[6]; > > + float floats[2]; > > + void* ownPtrs[1]; > > + AtomicString atomicStrings[5]; > > + void* refPtrs[2]; > > + Length lengths[1]; > > + short pagedMediaShorts[2]; > > + unsigned unsigneds[1]; > > + short hyphenationShorts[3]; > > I would be very careful with the order in which these things appear. > e.g. > unsigned a; > void* b; > unsigned c; > and > unsigned a; > unsigned b; > void* c > will consume a different size on a 64-bit architecture. Hmm, you're right. I think it's an accident that these match. I'm going to reorder the test values. I bet we can save some memory by reordering some values, but I'll do that in a follow up patch.
Tony Chang
Comment 4 2012-06-14 11:56:40 PDT
Created attachment 147625 [details] Patch for landing
WebKit Review Bot
Comment 5 2012-06-14 15:33:38 PDT
Comment on attachment 147625 [details] Patch for landing Clearing flags on attachment: 147625 Committed r120366: <http://trac.webkit.org/changeset/120366>
WebKit Review Bot
Comment 6 2012-06-14 15:33:42 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.