[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
https://bugs.webkit.org/show_bug.cgi?id=200072

Attachment 374817: Patch

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




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

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,
rhs.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