[webkit-reviews] review granted: [Bug 200072] [ESNext] Implement nullish coalescing : [Attachment 374817] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 24 18:46:17 PDT 2019

Darin Adler <darin at apple.com> has granted Ross Kirsling
<ross.kirsling at sony.com>'s request for review:
Bug 200072: [ESNext] Implement nullish coalescing

Attachment 374817: Patch


--- Comment #11 from Darin Adler <darin at apple.com> ---
Comment on attachment 374817
  --> https://bugs.webkit.org/attachment.cgi?id=374817

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

> Source/JavaScriptCore/parser/ASTBuilder.h:1397
> +	   return new (m_parserArena) CoalesceNode(location, lhs.first,

What’s the pro and con for extending LogicalOpNode instead adding a new class?

> Source/JavaScriptCore/parser/ResultType.h:184
> +	       if (op1.definitelyIsBoolean() || op1.definitelyIsNumber() ||
op1.definitelyIsString() || op1.definitelyIsBigInt())

Could this be "definitelyIsNotNull" instead? I think we could possibly
correctly cover more cases and have more maintainable code that way.

More information about the webkit-reviews mailing list