decord/source/4447_ArraySpeciesCreate.js

45 lines
1.4 KiB
JavaScript
Raw Normal View History

2026-07-28 08:39:19 +00:00
// Module ID: 4447
// Function ID: 39007
2026-07-23 10:11:24 +00:00
// Name: ArraySpeciesCreate
2026-07-28 08:39:19 +00:00
// Dependencies: [517, 4448, 518, 4449, 4451, 4457, 4411, 4459]
2026-07-23 10:11:24 +00:00
2026-07-28 08:39:19 +00:00
// Module 4447 (ArraySpeciesCreate)
2026-07-23 10:11:24 +00:00
let closure_2 = require("getEvalledConstructor")("%Symbol.species%", true);
export default function ArraySpeciesCreate(arg0, arg1) {
2026-07-28 08:39:19 +00:00
if (require(4448) /* isInteger */(arg1)) {
2026-07-23 10:11:24 +00:00
if (arg1 >= 0) {
2026-07-28 08:39:19 +00:00
if (require(4449) /* getEvalledConstructor */(arg0)) {
const tmp = tmp31(4457)(arg0, "constructor");
2026-07-23 10:11:24 +00:00
let tmp2 = closure_2;
if (closure_2) {
2026-07-28 08:39:19 +00:00
tmp2 = require(4411) /* isObject */(tmp);
2026-07-23 10:11:24 +00:00
}
let tmp5 = tmp;
if (tmp2) {
2026-07-28 08:39:19 +00:00
const tmp9 = require(4457) /* Get */(tmp, closure_2);
2026-07-23 10:11:24 +00:00
tmp2 = null === tmp9;
tmp5 = tmp9;
}
if (undefined === tmp5) {
2026-07-28 08:39:19 +00:00
return require(4451) /* ArrayCreate */(arg1);
} else if (require(4459) /* getEvalledConstructor */(tmp5)) {
2026-07-23 10:11:24 +00:00
const prototype2 = tmp5.prototype;
tmp5 = new tmp5(arg1);
return tmp5;
} else {
let tmp15 = require(518);
const prototype = tmp15.prototype;
tmp15 = new tmp15("C must be a constructor");
throw tmp15;
}
} else {
2026-07-28 08:39:19 +00:00
return tmp31(4451)(arg1);
2026-07-23 10:11:24 +00:00
}
}
}
let tmp27 = require(518);
tmp27 = new tmp27("Assertion failed: length must be an integer >= 0");
throw tmp27;
};