Fix a ReferenceError caused by a typo (`_construct` instead of
`construct`) in the external `wrapNativeSuper` helper. (The typo
doesn't usually cause an error in inline helpers because `_construct`
happens to be the default name given to the `construct` helper
function.)
* Revert "Move subclass inheritance to end (#7772)"
This reverts commit f8ab9466d331871a90f458af40b14e8d831e0c29.
* Only use getPrototypeOf if setPrototypeOf is implemented
* Update fixtures
* Helpers updates
* Update fixtures
* Fall back to getPrototypeOf
* Update fixtures
* Remove second wrapper from _wrapNativeSuper
* Fix tests on node 4
I DON'T KNOW WHY IT WORKS.
* Update fixtures
* Use Reflect.construct
* Parens
* Fix things
* Fix things
* Undo changes
* Fix with sham
* Typo
Yes, the output is uglier. But, this is necessary for me to refactor
`replaceSupers` for #7733, which is necessary for both #7555 and
https://github.com/babel/babel/pull/7553#issuecomment-381434519.
I'm still in the middle of cleaning up all this code. Don't expect
`transformClass` to survive much longer as it's written currently.
We were using `Object.create` to setup the prototype chain at the start of the class definition, which lead to #7771.
I was a bit worried about a speed hit, but it seems everyone optimizes the two patterns the same way.
https://jsbench.github.io/#f9fca52407643d96458a35763b201215Fixes#7771.
* Implement MemberExpressionToFunctions helper
Fixes#7733.
This will also be used to simplify the Private Fields transform, which had [almost the same code](ccd941057a/packages/babel-plugin-proposal-class-properties/src/index.js (L114-L217)) hand written.
* Cleanup
* Little more comment cleanup
* Use unary plus
This can't be redefined, unlike the `Number` identifier.
* Review comments
* Remove unused deps