[Webkit-unassigned] [Bug 167962] [ESnext] Implement Object Rest - Implementing Object Rest Destructuring

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 15 21:20:35 PDT 2017


Caio Lima <ticaiolima at gmail.com> changed:

           What    |Removed                     |Added
 Attachment #303896|0                           |1
        is obsolete|                            |
                 CC|                            |ticaiolima at gmail.com
 Attachment #310219|                            |review?
              Flags|                            |

--- Comment #49 from Caio Lima <ticaiolima at gmail.com> ---
Created attachment 310219

  --> https://bugs.webkit.org/attachment.cgi?id=310219&action=review

WIP - Patch RFC

The problem of last implementation is that it was considering that excludedList was always statically defined, but the example below shows that it's not true:

let a = "foo";
let {[a]: b, ...r} = {foo: 2, bar 3};
// b == 2;
// r.bar == 3;

This way, I decided change my approach and emit bytecode to fill excludedList, and then now we can carry the case above properly.
I added the test was in our suite but I would like to check EWS and get feedback as well here.

The previous implementations was faster and I'm thinking in a way to allow static usage that probably will the common case for this feature, but I think it's worth it bring it in another Patch. 

Also, I think it's a good idea put this feature behind a flag before commit.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170516/1ae05dc1/attachment.html>

More information about the webkit-unassigned mailing list