decord/source/4416_ArrayCreate.js

41 lines
1.3 KiB
JavaScript
Raw Normal View History

2026-07-23 10:11:24 +00:00
// Module ID: 4416
// Function ID: 38887
2026-07-20 16:05:17 +00:00
// Name: ArrayCreate
2026-07-23 10:11:24 +00:00
// Dependencies: [517, 4413, 518, 4417, 537, 4418, 539]
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
// Module 4416 (ArrayCreate)
let closure_2 = require("getEvalledConstructor")("%Array.prototype%");
2026-07-20 16:05:17 +00:00
export default function ArrayCreate(arg0) {
2026-07-23 10:11:24 +00:00
if (require(4413) /* isInteger */(arg0)) {
2026-07-20 16:05:17 +00:00
if (arg0 >= 0) {
2026-07-23 10:11:24 +00:00
if (arg0 > require(4417)) {
let tmp15 = require(537);
2026-07-20 16:05:17 +00:00
const prototype2 = tmp15.prototype;
tmp15 = new tmp15("length is greater than (2**32 - 1)");
throw tmp15;
} else {
const tmp = arguments.length > 1 ? arguments[1] : closure_2;
const items = [];
if (tmp !== closure_2) {
2026-07-23 10:11:24 +00:00
if (require(4418) /* setProto */) {
tmp5(4418)(items, tmp);
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
let tmp5Result = tmp5(539);
2026-07-20 16:05:17 +00:00
const prototype = tmp5Result.prototype;
tmp5Result = new tmp5Result("ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]");
throw tmp5Result;
}
}
if (0 !== arg0) {
items.length = arg0;
}
return items;
}
}
}
2026-07-23 10:11:24 +00:00
let tmp20 = require(518);
2026-07-20 16:05:17 +00:00
tmp20 = new tmp20("Assertion failed: `length` must be an integer Number >= 0");
throw tmp20;
};