[webkit-reviews] review granted: [Bug 190933] Consider removing double load for accessing the MetadataTable from LLInt : [Attachment 354080] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 7 05:25:48 PST 2018


Keith Miller <keith_miller at apple.com> has granted Yusuke Suzuki
<yusukesuzuki at slowstart.org>'s request for review:
Bug 190933: Consider removing double load for accessing the MetadataTable from
LLInt
https://bugs.webkit.org/show_bug.cgi?id=190933

Attachment 354080: Patch

https://bugs.webkit.org/attachment.cgi?id=354080&action=review




--- Comment #2 from Keith Miller <keith_miller at apple.com> ---
Comment on attachment 354080
  --> https://bugs.webkit.org/attachment.cgi?id=354080
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=354080&action=review

r=me with some nits.

> Source/JavaScriptCore/bytecode/UnlinkedMetadataTableInlines.h:112
> +    void* buffer;

Nit: Can't this just be a char*? Then you wouldn't need the reinterpret_casts
below.

> Source/JavaScriptCore/bytecode/UnlinkedMetadataTableInlines.h:121
> +    memset(reinterpret_cast<uint8_t*>(buffer) + sizeof(LinkingData) +
s_offsetTableSize, 0, totalSize - s_offsetTableSize);
> +    return adoptRef(*new (reinterpret_cast<uint8_t*>(buffer) +
sizeof(LinkingData)) MetadataTable(*this));

It seems like we are going to fill a lot of the buffer twice between here and
the MetadataTable constructor? Should we file a bug to move the zeroing into
the constructor?


More information about the webkit-reviews mailing list