[webkit-reviews] review denied: [Bug 20645] Duplicated constants : [Attachment 23166] proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 4 08:47:48 PDT 2008


Geoffrey Garen <ggaren at apple.com> has denied Judit Jász
<jasy at inf.u-szeged.hu>'s request for review:
Bug 20645: Duplicated constants
https://bugs.webkit.org/show_bug.cgi?id=20645

Attachment 23166: proposed patch
https://bugs.webkit.org/attachment.cgi?id=23166&action=edit

------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
Is the point of this patch just to unique numbers and strings within a
codeblock? I think it is. For everything else, comparing JSValue* would be
enough.

Rather than making a JSValue*, then later extracting and comparing the
underlying data, I think we should just to add a version of emitLoad() for
Identifier, and one for double, which did the unique-ing based on hashes of
Identifier and double. 

That would eliminate a lot of complexity, and substantially improve the double
hash function, which in this patch just truncates the double to unsigned. It
would also reduce memory and GC pressure, in the case where you actually found
a duplicate constant (since you would avoid allocating the duplicate just to
discover that it was a duplicate).


More information about the webkit-reviews mailing list