[webkit-reviews] review granted: [Bug 20333] improve JavaScript speed by storing single-character strings as immediate values : [Attachment 22766] eliminate JSValue::type()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Aug 15 00:10:21 PDT 2008
Geoffrey Garen <ggaren at apple.com> has granted Darin Adler <darin at apple.com>'s
request for review:
Bug 20333: improve JavaScript speed by storing single-character strings as
immediate values
https://bugs.webkit.org/show_bug.cgi?id=20333
Attachment 22766: eliminate JSValue::type()
https://bugs.webkit.org/attachment.cgi?id=22766&action=edit
------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
r=me
Please try not to conflict with bug 20389.
It looks like you re-autogenerated a bunch of SVG tests, too. Was that
intentional?
+ if (v1 == JSImmediate::from(0))
+ return !JSImmediate::isImmediate(v2)
+ && static_cast<JSCell*>(v2)->isNumber()
+ && static_cast<JSNumberCell*>(v2)->value() == 0;
+ return v2 == JSImmediate::from(0)
+ && !JSImmediate::isImmediate(v1)
+ && static_cast<JSCell*>(v1)->isNumber()
+ && static_cast<JSNumberCell*>(v1)->value() == 0;
This surprised me a little bit. Is there a case where 0 gets stored on the heap
instead of as an immediate? How do we know this doesn't happen with other
numbers?
More information about the webkit-reviews
mailing list