44 lines
1.2 KiB
JavaScript
44 lines
1.2 KiB
JavaScript
// Module ID: 4431
|
|
// Function ID: 4432
|
|
// Name: ArraySpeciesCreate
|
|
// Dependencies: [540, 4432, 541, 4433, 4435, 4441, 4395, 4443]
|
|
|
|
// Module 4431 (ArraySpeciesCreate)
|
|
import getEvalledConstructor from "getEvalledConstructor" /* 540 */;
|
|
import _mod541 from "module_541" /* 541 */;
|
|
import isInteger from "isInteger" /* 4432 */;
|
|
|
|
let closure_2 = getEvalledConstructor("%Symbol.species%", true);
|
|
|
|
export default function ArraySpeciesCreate(arg0, arg1) {
|
|
if (isInteger(arg1)) {
|
|
if (arg1 >= 0) {
|
|
if (tmp(4433)(arg0)) {
|
|
const tmp3 = tmp(4441)(arg0, "constructor");
|
|
let tmp5 = closure_2;
|
|
if (closure_2) {
|
|
tmp5 = tmp(4395)(tmp3);
|
|
}
|
|
let tmp6 = tmp3;
|
|
if (tmp5) {
|
|
const tmp7 = tmp(4441)(tmp3, tmp4);
|
|
tmp5 = null === tmp7;
|
|
tmp6 = tmp7;
|
|
}
|
|
if (undefined === tmp6) {
|
|
return tmp(4435)(arg1);
|
|
} else if (tmp(4443)(tmp6)) {
|
|
tmp6 = new tmp6(arg1);
|
|
return tmp6;
|
|
} else {
|
|
const tmp11 = new tmp(541)("C must be a constructor");
|
|
throw tmp11;
|
|
}
|
|
tmp4 = closure_2;
|
|
} else {
|
|
return tmp(4435)(arg1);
|
|
}
|
|
}
|
|
}
|
|
throw new _mod541("Assertion failed: length must be an integer >= 0");
|
|
};
|