[webkit-reviews] review granted: [Bug 198063] Cleanup Yarr regexp code around paren contexts. : [Attachment 370294] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 20 21:43:19 PDT 2019

Yusuke Suzuki <ysuzuki at apple.com> has granted Keith Miller
<keith_miller at apple.com>'s request for review:
Bug 198063: Cleanup Yarr regexp code around paren contexts.

Attachment 370294: Patch


--- Comment #2 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 370294
  --> https://bugs.webkit.org/attachment.cgi?id=370294

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

Nice, r=me

> Source/JavaScriptCore/runtime/RegExpInlines.h:118
>      bool m_needBuffer;

Do we need this m_needBuffer field? I think if this is true, m_buffer needs to
be non nullptr. And if this is false, m_buffer is nullptr.

> Source/JavaScriptCore/runtime/RegExpInlines.h:119
>      void* m_buffer;

I think adding `{ nullptr }` here is better. Otherwise, when
`ENABLE(YARR_JIT_ALL_PARENS_EXPRESSIONS)` is false, this m_buffer is left as
It is OK so long as we don't use it actually. But touching `m_buffer` in
`size()` is a bit scary :)

More information about the webkit-reviews mailing list