Bug 146206 - [ES6] Support rest element in destructuring assignments
Summary: [ES6] Support rest element in destructuring assignments
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-22 07:40 PDT by Yusuke Suzuki
Modified: 2015-06-25 20:14 PDT (History)
10 users (show)

See Also:


Attachments
Patch (23.34 KB, patch)
2015-06-22 23:04 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (23.34 KB, patch)
2015-06-22 23:54 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2015-06-22 07:40:12 PDT
[ES6] Support rest element in destructuring assignments
Comment 1 Yusuke Suzuki 2015-06-22 23:04:32 PDT
Created attachment 255394 [details]
Patch
Comment 2 WebKit Commit Bot 2015-06-22 23:06:24 PDT
Attachment 255394 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/parser/Nodes.h:1794:  Missing space before {  [whitespace/braces] [5]
Total errors found: 1 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Yusuke Suzuki 2015-06-22 23:49:18 PDT
Comment on attachment 255394 [details]
Patch

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

> Source/JavaScriptCore/parser/Nodes.h:1794
> +            m_targetPatterns.append(Entry{ bindingType, node, defaultValue });

Styling warns it, but I think it's ok. What do you think about it?
Comment 4 Darin Adler 2015-06-22 23:51:40 PDT
Comment on attachment 255394 [details]
Patch

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

>> Source/JavaScriptCore/parser/Nodes.h:1794
>> +            m_targetPatterns.append(Entry{ bindingType, node, defaultValue });
> 
> Styling warns it, but I think it's ok. What do you think about it?

I think the style script doesn’t understand the code, but I agree it’s OK. However, we can write this an even better way now that we have improved Vector; the type can be omitted:

    m_targetPatterns.append({ bindingType, node, defaultValue });
Comment 5 Yusuke Suzuki 2015-06-22 23:52:56 PDT
Comment on attachment 255394 [details]
Patch

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

>>> Source/JavaScriptCore/parser/Nodes.h:1794
>>> +            m_targetPatterns.append(Entry{ bindingType, node, defaultValue });
>> 
>> Styling warns it, but I think it's ok. What do you think about it?
> 
> I think the style script doesn’t understand the code, but I agree it’s OK. However, we can write this an even better way now that we have improved Vector; the type can be omitted:
> 
>     m_targetPatterns.append({ bindingType, node, defaultValue });

Looks nice. I'll update it ;)
Comment 6 Yusuke Suzuki 2015-06-22 23:54:42 PDT
Created attachment 255397 [details]
Patch
Comment 7 Yusuke Suzuki 2015-06-23 16:55:14 PDT
The patch is ready.
Could anyone take a look?
Comment 8 Yusuke Suzuki 2015-06-25 19:07:46 PDT
Could you take a look?
Comment 9 Oliver Hunt 2015-06-25 19:12:37 PDT
Comment on attachment 255397 [details]
Patch

R=me
Comment 10 Yusuke Suzuki 2015-06-25 19:23:45 PDT
Comment on attachment 255397 [details]
Patch

Thank you for your review, oliver@!
Comment 11 WebKit Commit Bot 2015-06-25 20:14:16 PDT
Comment on attachment 255397 [details]
Patch

Clearing flags on attachment: 255397

Committed r185981: <http://trac.webkit.org/changeset/185981>
Comment 12 WebKit Commit Bot 2015-06-25 20:14:21 PDT
All reviewed patches have been landed.  Closing bug.