[webkit-reviews] review granted: [Bug 187477] [JSC] Embed RegExp into constant buffer in UnlinkedCodeBlock and CodeBlock : [Attachment 344598] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 9 14:07:51 PDT 2018


Mark Lam <mark.lam at apple.com> has granted Yusuke Suzuki
<utatane.tea at gmail.com>'s request for review:
Bug 187477: [JSC] Embed RegExp into constant buffer in UnlinkedCodeBlock and
CodeBlock
https://bugs.webkit.org/show_bug.cgi?id=187477

Attachment 344598: Patch

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




--- Comment #4 from Mark Lam <mark.lam at apple.com> ---
Comment on attachment 344598
  --> https://bugs.webkit.org/attachment.cgi?id=344598
Patch

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

r=me with suggested change.

> Source/JavaScriptCore/runtime/JSCJSValue.cpp:277
> +	       out.print("RegExp: ");
> +	       RegExp::dumpToStream(asCell(), out);

If you implement WTF::printInternal (see below), then this reduces to:
    out.print("RegExp: ", jsCast<RegExp*>(asCell()));

> Source/JavaScriptCore/runtime/RegExp.cpp:528
> +void RegExp::dumpToStream(const JSCell* cell, PrintStream& out)

I recommend making this a WTF::printInternal instead so that we can use it with
dataLog print streams directly.  Grep for "printInternal(PrintStream&" for
examples.


More information about the webkit-reviews mailing list