Simplify helper-function-name logic#16652
Conversation
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/57377 |
|
@JLHwung I pushed a new commit, since I noticed that we have a custom wrapper for generators that we don't actually need (we can just return the generator object without |
7441178 to
343a024
Compare
liuxingbaoyu
left a comment
There was a problem hiding this comment.
We were assigning a newId[NOT_LOCAL_BINDING] = true, but that's not needed anymore
This is awesome, and this is the only plugin that sets it.
I pushed a new commit, since I noticed that we have a custom wrapper for generators that we don't actually need (we can just return the generator object without yield*ing it, similarly to how we don't await promises).
I suspect this is to keep FUNCTION_ID.prototype unchanged, but I think the new behavior is fine.
We can then remove from wherever it's used, I'm not sure whether it should be considered a breaking change (for old versions of this plugin) or not.
Yeah we already loose the prototype in many other wrapping cases |
Fixes #1, Fixes #2newId[NOT_LOCAL_BINDING] = true, but that's not needed anymore