Closed cscott closed 9 years ago
Thanks for doing this! I think the "default species" stuff, and the "Array.from" stuff, might work better as separate PRs first, to keep this one smaller.
Splitting the patch would require me to fixup the old implementation of Promises, just before I got rid of it. I'd prefer not to waste the effort, assuming you can manage reviewing this as is.
Hm, it seems like you could leave the Promise
implementation and ES.Construct
alone in the first PR, and get in the addDefaultSpecies
and new ES
methods separately? If you don't think it would add much then that's fine.
(also it looks like the tests are failing because we're not clobbering the native Promise
when some of the new tests fail)
Updated the patch to fix the wrapping-paren issue, and added a test on Promise.resolve() which should correct the test failures.
Thanks for bearing with me - this looks awesome, much appreciated
Includes the erratum for Promise.resolve discussed in #344.
Also fixes the Map/Set constructors, since the spec uses [[Construct]] now instead of a hidden create method, and the previous version misapplied
Symbol.species
in this role.Also added ES.IteratorClose and updated a number of places where that is used in the latest spec, including in the implementation of
Array.from
.Fixes issue #239 and #344.