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
* Update member-expression-to-functions
1. Babel using British spellings, so `memoise`
2. Provide a helper `AssignmentMemoiser` class, which will assign the memo'd value with the `n`th access.
* Private properties!
* Fixes
* Tests
* Update helper name
* Fix privates that reference other privates
* Don't extend a builtin
* Rebase
* 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
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.
* Improve asyncIterator error
When an object is has neither asyncIterator or iterator defined, throw the "not an async iterable" error
* Correct logic
* reduce access
* Update helpers.js
* Improve get/set helper
* fixtures
* Edge cases
* Add loose edge cases
* Spec compliant
* Add issue case
* Even more edge cases!
* Final updates
* Fix name
* Use Reflect.{get, set} when available
* Avoid block scoping in loose
* Remove semicolon
* Do not redefine a non-enumerable
* Get strictness from call site, not helpers
* Add called assertions
* Classes are always strict
* Update test fixture
The boolean expressions returns false in environments where Map is missing.
This change explicitly sets _cache to undefined in such cases, to ensure the cache methods will be ignored.
Keeping the shape of an object constant is a performance improvement for modern javascript engines. At the point of the code change it is certain that the `children` property will be set later, so the property can already be set to `undefined`.
* First implementation sketch and testcase
* Use helper instead of inline IIFE's
* minNodeVersion 6.0.0
* Hoisted visitor for subtraversal and fixed edgest case
* Resolve merge conflicts in helpers
* Remove duplicated helper from messing up Git
* for-of: IteratorClose spec compatibility.
See #3:
https://tc39.github.io/ecma262/#sec-iteratorclose
* Update spec fixtures for for-of.
* Fix IteratorClose case for remap-async-to-generator.
* Fix IteratorClose case for async-generator-function test output.
* Modify few tests according to iteratorClose fix.
* Fix iteratorClose for helpers.slicedToArray also.
* Update iteratorClose fixture for commonjs.
The for-in loop in helpers.defineEnumerableProperties doesn't iterate over Symbols.
If Object.getOwnPropertySymbols exists, include the discovered values when defining properties.
* Create "babel-helper-wrap-function"
It contains the logic to wrap a function inside a call expression.
It was part of the "babel-helper-remap-async-to-generator" package, but
it is needed to transpile "function.sent"
* Create "babel-transform-function-sent"
It transforms the "function.sent" meta property by replacing it with
"yield" and making the generator ignore the first ".next()" call.
* "function.sent" is the last value passed to .next(), not the first one
* Disable exec tests on old node
* Fix flow error
* Add "transform-function-sent" to "stage-2" preset
* Do every trasformation in one traversal
* Test for "yield function.sent"
* [skip ci]
* Fix some typos [skip ci]