2026-08-25 06:04:03 +00:00
// Module ID: 4690
// Function ID: 4691
2026-07-29 08:29:29 +00:00
// Name: ArrayCreate
2026-08-25 06:04:03 +00:00
// Dependencies: [540, 4687, 541, 4691, 560, 4692, 562]
2026-07-29 08:29:29 +00:00
2026-08-25 06:04:03 +00:00
// Module 4690 (ArrayCreate)
2026-08-24 06:08:38 +00:00
import getEvalledConstructor from "getEvalledConstructor" /* 540 */ ;
import _mod541 from "module_541" /* 541 */ ;
2026-08-25 06:04:03 +00:00
import isInteger from "isInteger" /* 4687 */ ;
2026-08-24 06:08:38 +00:00
let closure _2 = getEvalledConstructor ( "%Array.prototype%" ) ;
2026-07-29 08:29:29 +00:00
export default function ArrayCreate ( arg0 ) {
2026-08-24 06:08:38 +00:00
if ( isInteger ( arg0 ) ) {
2026-07-29 08:29:29 +00:00
if ( arg0 >= 0 ) {
2026-08-25 06:04:03 +00:00
if ( arg0 > tmp ( 4691 ) ) {
2026-07-29 08:29:29 +00:00
const tmp12 = new tmp ( 560 ) ( "length is greater than (2**32 - 1)" ) ;
throw tmp12 ;
} else {
const tmp3 = arguments . length > 1 ? arguments [ 1 ] : closure _2 ;
const items = [ ] ;
if ( tmp3 !== closure _2 ) {
2026-08-25 06:04:03 +00:00
if ( tmp ( 4692 ) ) {
tmp ( 4692 ) ( items , tmp3 ) ;
2026-07-29 08:29:29 +00:00
} else {
const tmp7 = new tmp ( 562 ) ( "ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]" ) ;
throw tmp7 ;
}
}
if ( 0 !== arg0 ) {
items . length = arg0 ;
}
return items ;
}
}
}
2026-08-24 06:08:38 +00:00
throw new _mod541 ( "Assertion failed: `length` must be an integer Number >= 0" ) ;
2026-07-29 08:29:29 +00:00
} ;