summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
inline | side by side (from parent 1:
e075e23)
There was no reason to create a custom iterable here; just iterate the
splat array manually.
isSealed,
setPrototypeOf,
} = Object;
isSealed,
setPrototypeOf,
} = Object;
- const { [ITERATOR]: arrayIterator } = Array.prototype;
- const { next: arrayIteratorNext } = getPrototypeOf([][ITERATOR]());
const {
next: generatorIteratorNext,
} = getPrototypeOf(function* () {}.prototype);
const {
next: generatorIteratorNext,
} = getPrototypeOf(function* () {}.prototype);
- const splatIterablePrototype = {
- [ITERATOR]() {
- return {
- next: bind(
- arrayIteratorNext,
- call(arrayIterator, this.args, []),
- [],
- ),
- };
- },
- };
- const splatIterable = ($) =>
- create(splatIterablePrototype, { args: { value: $ } });
const propertyDescriptorEntryIterablePrototype = {
[ITERATOR]() {
return {
const propertyDescriptorEntryIterablePrototype = {
[ITERATOR]() {
return {
return {
defineOwnProperties: (O, ...sources) => {
return {
defineOwnProperties: (O, ...sources) => {
- for (const source of splatIterable(sources)) {
- defineProperties(O, source);
+ const { length } = sources;
+ for (let index = 0; index < length; ++index) {
+ defineProperties(O, sources[index]);