[webkit-reviews] review granted: [Bug 108206] Structure::m_outOfLineCapacity is unnecessary : [Attachment 185273] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 29 11:23:37 PST 2013


Geoffrey Garen <ggaren at apple.com> has granted Mark Hahnenberg
<mhahnenberg at apple.com>'s request for review:
Bug 108206: Structure::m_outOfLineCapacity is unnecessary
https://bugs.webkit.org/show_bug.cgi?id=108206

Attachment 185273: Patch
https://bugs.webkit.org/attachment.cgi?id=185273&action=review

------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=185273&action=review


r=me

> Source/JavaScriptCore/runtime/Structure.h:187
> +	       unsigned sizeOutOfLine = outOfLineSize();

It's a pet peeve of mine when we invent two words for the same thing just to
avoid compiler problems.

I like to work around that issue by using "this->" instead of inventing a new
name:

     unsigned outOfLineSize = this->outOfLineSize();

I'd suggest that technique here.

> Source/JavaScriptCore/runtime/Structure.h:196
> +	       return round(pow(outOfLineGrowthFactor, ceil(log(sizeOutOfLine)
/ log(outOfLineGrowthFactor))));

This math looks expensive. Are we sure it's not hot? Since we're working with
powers of two, there are probably good bit shifty ways to save here.


More information about the webkit-reviews mailing list