[webkit-reviews] review requested: [Bug 167962] [ESnext] Implement Object Rest - Implementing Object Rest Destructuring : [Attachment 310219] WIP - Patch RFC

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


Caio Lima <ticaiolima at gmail.com> has asked  for review:
Bug 167962: [ESnext] Implement Object Rest - Implementing Object Rest
Destructuring
https://bugs.webkit.org/show_bug.cgi?id=167962

Attachment 310219: WIP - Patch RFC

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




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


More information about the webkit-reviews mailing list