[Webkit-unassigned] [Bug 151494] [JSC] support Computed Property Names in destructuring Patterns

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 20 09:23:30 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=151494

Saam Barati <sbarati at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #265956|review?                     |review+
              Flags|                            |

--- Comment #5 from Saam Barati <sbarati at apple.com> ---
Comment on attachment 265956
  --> https://bugs.webkit.org/attachment.cgi?id=265956
Patch

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

r=me with some comments

> Source/JavaScriptCore/ChangeLog:8
> +        Add support for computed property names in destructuring BindingPatterns

It's worth adding a link to the spec here.

> Source/JavaScriptCore/parser/Parser.cpp:891
> +                    consumeOrFail(COLON, "Expected ':' after property name");

So this kind of expression is only allowed using the new feature you added recently that assigns to the rhs of the colon?

> Source/JavaScriptCore/parser/Parser.cpp:894
> +                    TreeExpression defaultValue = parseDefaultValueForDestructuringPattern(context);

Can we add a test for this case?

> Source/JavaScriptCore/tests/es6/destructuring_assignment_computed_properties.js:1
> +function test() {

I think this test is great. But, it's a bit tricky to follow. Can you also add just a couple really straight forward tests?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151120/5fa5c2ed/attachment.html>


More information about the webkit-unassigned mailing list