[optimisation] Fixing T6818 - #3165
Conversation
Current coverage is
|
There was a problem hiding this comment.
What is left referring to here? Also note that you already have access to parent no need for parentPath.parent
There was a problem hiding this comment.
Thanks a lot for the review, I really appreciate it!
Here, left was referring to the left-hand side of an assignment operation. It was way too complicated. Covering all cases in this condition is an impossible task.
I don't understand your second comment about parent and parentPath. I need parent to get to the properties and parentPath to replaceWith. Is there a workaround?
|
LGTM. A lot cleaner and less code. I'll let it sit for a bit more if @sebmck wants to take a look. |
|
Nice work |
15e7d73 to
6cc0538
Compare
|
Thanks for the reviews @amasad & @thejameskyle. Merging #3143 introduced conflicts, I rebased my patch on top of the current master. |
|
Looks like a test is failing now (added from the other PR) |
|
Oops, yep. Seems like #3143 changes are not compatible with mine, although it merged seamlessly. I'll see what I can do. |
|
Ok @hzoo, I pushed a fix. While I'm quite certain this fix is enough, I'm not sure if (and how) we could refactor this thing. Having both At the moment, this transform optimises several different cases (
I'm open to suggestions. |
|
I think that's fine |
#2833 : applying the same transform to multiple params ending with rest.
Without this PR:
After this PR:
Usual biased benchmark: https://gist.github.com/vhf/804cbddf89e4c8c8d8e2