[webkit-reviews] review granted: [Bug 68937] De-virtualize JSCell::toObject : [Attachment 109044] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Sep 29 12:00:03 PDT 2011
Geoffrey Garen <ggaren at apple.com> has granted Mark Hahnenberg
<mhahnenberg at apple.com>'s request for review:
Bug 68937: De-virtualize JSCell::toObject
https://bugs.webkit.org/show_bug.cgi?id=68937
Attachment 109044: Patch
https://bugs.webkit.org/attachment.cgi?id=109044&action=review
------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=109044&action=review
r=me with the change below:
> Source/JavaScriptCore/runtime/JSCell.cpp:158
> + if (isString())
> + return static_cast<const JSString*>(this)->toObject(exec,
globalObject);
> + return static_cast<const JSObject*>(this)->toObject(exec, globalObject);
I think it would be better, in the object case, to ASSERT(isObject()) and then
static_cast to JSObject*, and remove JSObject::toObject entirely. No need to
have that identity function anymore, now that we're not using virtual
functions.
More information about the webkit-reviews
mailing list