decord/source/160__construct.js

34 lines
884 B
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 160
// Function ID: 161
// Name: _construct
// Dependencies: [161, 99]
// Module 160 (_construct)
2026-08-24 06:08:38 +00:00
import _setPrototypeOf from "_setPrototypeOf" /* 99 */;
import _isNativeReflectConstruct from "_isNativeReflectConstruct" /* 161 */;
2026-07-29 08:29:29 +00:00
export default function _construct(bind) {
2026-08-24 06:08:38 +00:00
if (_isNativeReflectConstruct()) {
2026-07-29 08:29:29 +00:00
const _Reflect = Reflect;
const apply = construct.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(null);
} else {
applyArgumentsResult = apply(null, arguments);
}
return applyArgumentsResult;
} else {
const items = [null];
const push = items.push;
push.apply(items, arg1);
bind = bind.bind;
const tmp9 = new bind.apply(bind, items)();
if (arg2) {
2026-08-24 06:08:38 +00:00
_setPrototypeOf(tmp9, arg2.prototype);
2026-07-29 08:29:29 +00:00
}
return tmp9;
}
2026-08-24 06:08:38 +00:00
const tmp = require;
2026-07-29 08:29:29 +00:00
};