@nubjs/nub-darwin-x64 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/nub +0 -0
- package/bin/nubx +0 -0
- package/package.json +2 -3
- package/runtime/addons/nub-native.node +0 -0
- package/runtime/cache-evict.mjs +0 -69
- package/runtime/compile-cache-restore.mjs +0 -21
- package/runtime/floor-builtin.mjs +0 -57
- package/runtime/navigator-locks.mjs +0 -242
- package/runtime/navigator-shim.mjs +0 -144
- package/runtime/node_modules/@js-temporal/polyfill/CHANGELOG.md +0 -453
- package/runtime/node_modules/@js-temporal/polyfill/LICENSE +0 -13
- package/runtime/node_modules/@js-temporal/polyfill/README.md +0 -90
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.cjs +0 -2
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.cjs.map +0 -1
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.esm.js +0 -2
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.esm.js.map +0 -1
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.umd.js +0 -2
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.umd.js.map +0 -1
- package/runtime/node_modules/@js-temporal/polyfill/index.d.cts +0 -1215
- package/runtime/node_modules/@js-temporal/polyfill/index.d.ts +0 -1215
- package/runtime/node_modules/@js-temporal/polyfill/lib/assert.ts +0 -8
- package/runtime/node_modules/@js-temporal/polyfill/lib/bigintmath.ts +0 -39
- package/runtime/node_modules/@js-temporal/polyfill/lib/calendar.ts +0 -2424
- package/runtime/node_modules/@js-temporal/polyfill/lib/debug.ts +0 -7
- package/runtime/node_modules/@js-temporal/polyfill/lib/duration.ts +0 -438
- package/runtime/node_modules/@js-temporal/polyfill/lib/durationformat.d.ts +0 -93
- package/runtime/node_modules/@js-temporal/polyfill/lib/ecmascript.ts +0 -4973
- package/runtime/node_modules/@js-temporal/polyfill/lib/index.ts +0 -34
- package/runtime/node_modules/@js-temporal/polyfill/lib/init.ts +0 -43
- package/runtime/node_modules/@js-temporal/polyfill/lib/instant.ts +0 -138
- package/runtime/node_modules/@js-temporal/polyfill/lib/internaltypes.d.ts +0 -242
- package/runtime/node_modules/@js-temporal/polyfill/lib/intl.ts +0 -758
- package/runtime/node_modules/@js-temporal/polyfill/lib/intrinsicclass.ts +0 -162
- package/runtime/node_modules/@js-temporal/polyfill/lib/legacydate.ts +0 -17
- package/runtime/node_modules/@js-temporal/polyfill/lib/math.ts +0 -96
- package/runtime/node_modules/@js-temporal/polyfill/lib/now.ts +0 -48
- package/runtime/node_modules/@js-temporal/polyfill/lib/plaindate.ts +0 -212
- package/runtime/node_modules/@js-temporal/polyfill/lib/plaindatetime.ts +0 -274
- package/runtime/node_modules/@js-temporal/polyfill/lib/plainmonthday.ts +0 -110
- package/runtime/node_modules/@js-temporal/polyfill/lib/plaintime.ts +0 -154
- package/runtime/node_modules/@js-temporal/polyfill/lib/plainyearmonth.ts +0 -157
- package/runtime/node_modules/@js-temporal/polyfill/lib/regex.ts +0 -59
- package/runtime/node_modules/@js-temporal/polyfill/lib/slots.ts +0 -341
- package/runtime/node_modules/@js-temporal/polyfill/lib/temporal.ts +0 -10
- package/runtime/node_modules/@js-temporal/polyfill/lib/timeduration.ts +0 -149
- package/runtime/node_modules/@js-temporal/polyfill/lib/zoneddatetime.ts +0 -492
- package/runtime/node_modules/@js-temporal/polyfill/package.json +0 -143
- package/runtime/node_modules/@oxc-project/runtime/CHANGELOG.md +0 -88
- package/runtime/node_modules/@oxc-project/runtime/LICENSE +0 -22
- package/runtime/node_modules/@oxc-project/runtime/README.md +0 -5
- package/runtime/node_modules/@oxc-project/runtime/package.json +0 -1066
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/AwaitValue.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecoratedDescriptor.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs.js +0 -236
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2203.js +0 -184
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2203R.js +0 -191
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2301.js +0 -222
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2305.js +0 -133
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2311.js +0 -124
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayLikeToArray.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayWithHoles.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayWithoutHoles.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/assertClassBrand.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/assertThisInitialized.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncGeneratorDelegate.js +0 -24
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js +0 -45
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncToGenerator.js +0 -26
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/callSuper.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/checkInRHS.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/checkPrivateRedeclaration.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorDestructureSet.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorGet.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCallCheck.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCheckPrivateStaticAccess.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCheckPrivateStaticFieldDescriptor.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classExtractFieldDescriptor.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classNameTDZError.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldDestructureSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldGet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldGet2.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldInitSpec.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldLooseBase.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldLooseKey.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldSet2.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateGetter.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodGet.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodInitSpec.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodSet.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateSetter.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldDestructureSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldSpecGet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldSpecSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateMethodGet.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateMethodSet.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/construct.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createClass.js +0 -13
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createForOfIteratorHelper.js +0 -50
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createForOfIteratorHelperLoose.js +0 -19
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createSuper.js +0 -16
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorate.js +0 -23
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorateMetadata.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorateParam.js +0 -11
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defaults.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineAccessor.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineEnumerableProperties.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/dispose.js +0 -28
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/AwaitValue.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/OverloadYield.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecoratedDescriptor.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs.js +0 -236
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2203.js +0 -184
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2203R.js +0 -191
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2301.js +0 -222
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2305.js +0 -133
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2311.js +0 -124
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayLikeToArray.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayWithHoles.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayWithoutHoles.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/assertClassBrand.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/assertThisInitialized.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncGeneratorDelegate.js +0 -24
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncIterator.js +0 -45
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncToGenerator.js +0 -26
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/awaitAsyncGenerator.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/callSuper.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/checkInRHS.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/checkPrivateRedeclaration.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorDestructureSet.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorGet.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCallCheck.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCheckPrivateStaticAccess.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classExtractFieldDescriptor.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classNameTDZError.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldDestructureSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldGet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldGet2.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldInitSpec.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldLooseBase.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldLooseKey.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldSet2.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateGetter.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodGet.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodInitSpec.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodSet.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateSetter.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldDestructureSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldSpecGet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldSpecSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateMethodGet.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateMethodSet.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/construct.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createClass.js +0 -13
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createForOfIteratorHelper.js +0 -50
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createForOfIteratorHelperLoose.js +0 -19
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createSuper.js +0 -16
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorate.js +0 -21
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorateMetadata.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorateParam.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defaults.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineAccessor.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineEnumerableProperties.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineProperty.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/dispose.js +0 -28
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/extends.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/get.js +0 -11
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/getPrototypeOf.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/identity.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/importDeferProxy.js +0 -27
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/inherits.js +0 -14
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/inheritsLoose.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/initializerDefineProperty.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/initializerWarningHelper.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/instanceof.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/interopRequireDefault.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/interopRequireWildcard.js +0 -27
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/isNativeFunction.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/isNativeReflectConstruct.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/iterableToArray.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/iterableToArrayLimit.js +0 -28
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/jsx.js +0 -22
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/maybeArrayLike.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/newArrowCheck.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nonIterableRest.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nonIterableSpread.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nullishReceiverError.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectDestructuringEmpty.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectSpread.js +0 -14
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectSpread2.js +0 -23
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectWithoutProperties.js +0 -13
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectWithoutPropertiesLoose.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/package.json +0 -3
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/possibleConstructorReturn.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/readOnlyError.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/regeneratorRuntime.js +0 -304
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/set.js +0 -22
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/setFunctionName.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/setPrototypeOf.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/skipFirstGeneratorNext.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/slicedToArray.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropBase.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropGet.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropSet.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/taggedTemplateLiteral.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/taggedTemplateLiteralLoose.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/tdz.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/temporalRef.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/temporalUndefined.js +0 -2
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toArray.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toConsumableArray.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toPrimitive.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toPropertyKey.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toSetter.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/typeof.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/unsupportedIterableToArray.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/using.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/usingCtx.js +0 -59
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapAsyncGenerator.js +0 -69
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapNativeSuper.js +0 -27
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapRegExp.js +0 -51
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/writeOnlyError.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/extends.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/get.js +0 -11
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/getPrototypeOf.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/identity.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/importDeferProxy.js +0 -27
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/inherits.js +0 -14
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/inheritsLoose.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/initializerDefineProperty.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/initializerWarningHelper.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/instanceof.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/interopRequireDefault.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/interopRequireWildcard.js +0 -27
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/isNativeFunction.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/isNativeReflectConstruct.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/iterableToArray.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/iterableToArrayLimit.js +0 -28
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/jsx.js +0 -22
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/maybeArrayLike.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/newArrowCheck.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/nonIterableRest.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/nonIterableSpread.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/nullishReceiverError.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectDestructuringEmpty.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectSpread.js +0 -14
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js +0 -23
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js +0 -13
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/possibleConstructorReturn.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/readOnlyError.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/regeneratorRuntime.js +0 -304
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/set.js +0 -22
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/setFunctionName.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/setPrototypeOf.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/skipFirstGeneratorNext.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/slicedToArray.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropBase.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropGet.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropSet.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/taggedTemplateLiteral.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/taggedTemplateLiteralLoose.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/tdz.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/temporalRef.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/temporalUndefined.js +0 -2
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toArray.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toConsumableArray.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toSetter.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/typeof.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/unsupportedIterableToArray.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/using.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js +0 -59
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js +0 -69
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapNativeSuper.js +0 -27
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapRegExp.js +0 -51
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/writeOnlyError.js +0 -4
- package/runtime/node_modules/@petamoriken/float16/LICENSE +0 -21
- package/runtime/node_modules/@petamoriken/float16/README.md +0 -413
- package/runtime/node_modules/@petamoriken/float16/browser/float16.js +0 -1340
- package/runtime/node_modules/@petamoriken/float16/browser/float16.mjs +0 -1325
- package/runtime/node_modules/@petamoriken/float16/index.d.ts +0 -546
- package/runtime/node_modules/@petamoriken/float16/index.v5.6.d.ts +0 -546
- package/runtime/node_modules/@petamoriken/float16/index.v5.7.d.ts +0 -555
- package/runtime/node_modules/@petamoriken/float16/inspect/node.cjs +0 -25
- package/runtime/node_modules/@petamoriken/float16/inspect/node.mjs +0 -23
- package/runtime/node_modules/@petamoriken/float16/lib/DataView.cjs +0 -16
- package/runtime/node_modules/@petamoriken/float16/lib/Float16Array.cjs +0 -690
- package/runtime/node_modules/@petamoriken/float16/lib/_util/arrayIterator.cjs +0 -52
- package/runtime/node_modules/@petamoriken/float16/lib/_util/brand.cjs +0 -27
- package/runtime/node_modules/@petamoriken/float16/lib/_util/converter.cjs +0 -111
- package/runtime/node_modules/@petamoriken/float16/lib/_util/is.cjs +0 -78
- package/runtime/node_modules/@petamoriken/float16/lib/_util/messages.cjs +0 -18
- package/runtime/node_modules/@petamoriken/float16/lib/_util/primordials.cjs +0 -150
- package/runtime/node_modules/@petamoriken/float16/lib/_util/spec.cjs +0 -84
- package/runtime/node_modules/@petamoriken/float16/lib/f16round.cjs +0 -10
- package/runtime/node_modules/@petamoriken/float16/lib/index.cjs +0 -16
- package/runtime/node_modules/@petamoriken/float16/lib/isTypedArray.cjs +0 -11
- package/runtime/node_modules/@petamoriken/float16/package.json +0 -115
- package/runtime/node_modules/@petamoriken/float16/src/DataView.mjs +0 -35
- package/runtime/node_modules/@petamoriken/float16/src/Float16Array.mjs +0 -1194
- package/runtime/node_modules/@petamoriken/float16/src/_util/arrayIterator.mjs +0 -86
- package/runtime/node_modules/@petamoriken/float16/src/_util/brand.mjs +0 -31
- package/runtime/node_modules/@petamoriken/float16/src/_util/converter.mjs +0 -173
- package/runtime/node_modules/@petamoriken/float16/src/_util/is.mjs +0 -151
- package/runtime/node_modules/@petamoriken/float16/src/_util/messages.mjs +0 -22
- package/runtime/node_modules/@petamoriken/float16/src/_util/primordials.mjs +0 -254
- package/runtime/node_modules/@petamoriken/float16/src/_util/spec.mjs +0 -137
- package/runtime/node_modules/@petamoriken/float16/src/f16round.mjs +0 -10
- package/runtime/node_modules/@petamoriken/float16/src/index.mjs +0 -7
- package/runtime/node_modules/@petamoriken/float16/src/isTypedArray.mjs +0 -10
- package/runtime/node_modules/jsbi/LICENSE +0 -176
- package/runtime/node_modules/jsbi/README.md +0 -173
- package/runtime/node_modules/jsbi/dist/jsbi-cjs.js +0 -2
- package/runtime/node_modules/jsbi/dist/jsbi-cjs.js.map +0 -1
- package/runtime/node_modules/jsbi/dist/jsbi-umd.js +0 -2
- package/runtime/node_modules/jsbi/dist/jsbi-umd.js.map +0 -1
- package/runtime/node_modules/jsbi/dist/jsbi.mjs +0 -2
- package/runtime/node_modules/jsbi/dist/jsbi.mjs.map +0 -1
- package/runtime/node_modules/jsbi/jsbi.d.ts +0 -43
- package/runtime/node_modules/jsbi/package.json +0 -35
- package/runtime/node_modules/urlpattern-polyfill/LICENSE +0 -19
- package/runtime/node_modules/urlpattern-polyfill/README.md +0 -242
- package/runtime/node_modules/urlpattern-polyfill/dist/index.d.ts +0 -9
- package/runtime/node_modules/urlpattern-polyfill/dist/types.d.ts +0 -49
- package/runtime/node_modules/urlpattern-polyfill/dist/urlpattern.cjs +0 -1
- package/runtime/node_modules/urlpattern-polyfill/dist/urlpattern.js +0 -1
- package/runtime/node_modules/urlpattern-polyfill/index.cjs +0 -7
- package/runtime/node_modules/urlpattern-polyfill/index.js +0 -7
- package/runtime/node_modules/urlpattern-polyfill/package.json +0 -149
- package/runtime/pnp-bin-run.cjs +0 -91
- package/runtime/pnp-util.cjs +0 -62
- package/runtime/polyfills.cjs +0 -816
- package/runtime/preload-async-hooks.mjs +0 -110
- package/runtime/preload-common.cjs +0 -1096
- package/runtime/preload.cjs +0 -313
- package/runtime/preload.mjs +0 -149
- package/runtime/transform-core.mjs +0 -756
- package/runtime/version.mjs +0 -12
- package/runtime/worker-blob-url.cjs +0 -116
- package/runtime/worker-polyfill.mjs +0 -541
|
@@ -1,690 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.isFloat16Array = isFloat16Array;
|
|
7
|
-
var _arrayIterator = require("./_util/arrayIterator.cjs");
|
|
8
|
-
var _brand = require("./_util/brand.cjs");
|
|
9
|
-
var _converter = require("./_util/converter.cjs");
|
|
10
|
-
var _is = require("./_util/is.cjs");
|
|
11
|
-
var _messages = require("./_util/messages.cjs");
|
|
12
|
-
var _primordials = require("./_util/primordials.cjs");
|
|
13
|
-
var _spec = require("./_util/spec.cjs");
|
|
14
|
-
const BYTES_PER_ELEMENT = 2;
|
|
15
|
-
const float16bitsArrays = new _primordials.NativeWeakMap();
|
|
16
|
-
function isFloat16Array(target) {
|
|
17
|
-
return (0, _primordials.WeakMapPrototypeHas)(float16bitsArrays, target) || !(0, _primordials.ArrayBufferIsView)(target) && (0, _brand.hasFloat16ArrayBrand)(target);
|
|
18
|
-
}
|
|
19
|
-
function assertFloat16Array(target) {
|
|
20
|
-
if (!isFloat16Array(target)) {
|
|
21
|
-
throw (0, _primordials.NativeTypeError)(_messages.THIS_IS_NOT_A_FLOAT16ARRAY_OBJECT);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function assertSpeciesTypedArray(target, count) {
|
|
25
|
-
const isTargetFloat16Array = isFloat16Array(target);
|
|
26
|
-
const isTargetTypedArray = (0, _is.isNativeTypedArray)(target);
|
|
27
|
-
if (!isTargetFloat16Array && !isTargetTypedArray) {
|
|
28
|
-
throw (0, _primordials.NativeTypeError)(_messages.SPECIES_CONSTRUCTOR_DIDNT_RETURN_TYPEDARRAY_OBJECT);
|
|
29
|
-
}
|
|
30
|
-
if (typeof count === "number") {
|
|
31
|
-
let length;
|
|
32
|
-
if (isTargetFloat16Array) {
|
|
33
|
-
const float16bitsArray = getFloat16BitsArray(target);
|
|
34
|
-
length = (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray);
|
|
35
|
-
} else {
|
|
36
|
-
length = (0, _primordials.TypedArrayPrototypeGetLength)(target);
|
|
37
|
-
}
|
|
38
|
-
if (length < count) {
|
|
39
|
-
throw (0, _primordials.NativeTypeError)(_messages.DERIVED_CONSTRUCTOR_CREATED_TYPEDARRAY_OBJECT_WHICH_WAS_TOO_SMALL_LENGTH);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
if ((0, _is.isNativeBigIntTypedArray)(target)) {
|
|
43
|
-
throw (0, _primordials.NativeTypeError)(_messages.CANNOT_MIX_BIGINT_AND_OTHER_TYPES);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
function getFloat16BitsArray(float16) {
|
|
47
|
-
const float16bitsArray = (0, _primordials.WeakMapPrototypeGet)(float16bitsArrays, float16);
|
|
48
|
-
if (float16bitsArray !== undefined) {
|
|
49
|
-
const buffer = (0, _primordials.TypedArrayPrototypeGetBuffer)(float16bitsArray);
|
|
50
|
-
if ((0, _spec.IsDetachedBuffer)(buffer)) {
|
|
51
|
-
throw (0, _primordials.NativeTypeError)(_messages.ATTEMPTING_TO_ACCESS_DETACHED_ARRAYBUFFER);
|
|
52
|
-
}
|
|
53
|
-
return float16bitsArray;
|
|
54
|
-
}
|
|
55
|
-
const buffer = float16.buffer;
|
|
56
|
-
if ((0, _spec.IsDetachedBuffer)(buffer)) {
|
|
57
|
-
throw (0, _primordials.NativeTypeError)(_messages.ATTEMPTING_TO_ACCESS_DETACHED_ARRAYBUFFER);
|
|
58
|
-
}
|
|
59
|
-
const cloned = (0, _primordials.ReflectConstruct)(Float16Array, [buffer, float16.byteOffset, float16.length], float16.constructor);
|
|
60
|
-
return (0, _primordials.WeakMapPrototypeGet)(float16bitsArrays, cloned);
|
|
61
|
-
}
|
|
62
|
-
function copyToArray(float16bitsArray) {
|
|
63
|
-
const length = (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray);
|
|
64
|
-
const array = [];
|
|
65
|
-
for (let i = 0; i < length; ++i) {
|
|
66
|
-
array[i] = (0, _converter.convertToNumber)(float16bitsArray[i]);
|
|
67
|
-
}
|
|
68
|
-
return array;
|
|
69
|
-
}
|
|
70
|
-
const TypedArrayPrototypeGetters = new _primordials.NativeWeakSet();
|
|
71
|
-
for (const key of (0, _primordials.ReflectOwnKeys)(_primordials.TypedArrayPrototype)) {
|
|
72
|
-
if (key === _primordials.SymbolToStringTag) {
|
|
73
|
-
continue;
|
|
74
|
-
}
|
|
75
|
-
const descriptor = (0, _primordials.ReflectGetOwnPropertyDescriptor)(_primordials.TypedArrayPrototype, key);
|
|
76
|
-
if ((0, _primordials.ObjectHasOwn)(descriptor, "get") && typeof descriptor.get === "function") {
|
|
77
|
-
(0, _primordials.WeakSetPrototypeAdd)(TypedArrayPrototypeGetters, descriptor.get);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
const handler = (0, _primordials.ObjectFreeze)({
|
|
81
|
-
get(target, key, receiver) {
|
|
82
|
-
if ((0, _is.isCanonicalIntegerIndexString)(key) && (0, _primordials.ObjectHasOwn)(target, key)) {
|
|
83
|
-
return (0, _converter.convertToNumber)((0, _primordials.ReflectGet)(target, key));
|
|
84
|
-
}
|
|
85
|
-
if ((0, _primordials.WeakSetPrototypeHas)(TypedArrayPrototypeGetters, (0, _primordials.ObjectPrototype__lookupGetter__)(target, key))) {
|
|
86
|
-
return (0, _primordials.ReflectGet)(target, key);
|
|
87
|
-
}
|
|
88
|
-
return (0, _primordials.ReflectGet)(target, key, receiver);
|
|
89
|
-
},
|
|
90
|
-
set(target, key, value, receiver) {
|
|
91
|
-
if ((0, _is.isCanonicalIntegerIndexString)(key) && (0, _primordials.ObjectHasOwn)(target, key)) {
|
|
92
|
-
return (0, _primordials.ReflectSet)(target, key, (0, _converter.roundToFloat16Bits)(value));
|
|
93
|
-
}
|
|
94
|
-
return (0, _primordials.ReflectSet)(target, key, value, receiver);
|
|
95
|
-
},
|
|
96
|
-
getOwnPropertyDescriptor(target, key) {
|
|
97
|
-
if ((0, _is.isCanonicalIntegerIndexString)(key) && (0, _primordials.ObjectHasOwn)(target, key)) {
|
|
98
|
-
const descriptor = (0, _primordials.ReflectGetOwnPropertyDescriptor)(target, key);
|
|
99
|
-
descriptor.value = (0, _converter.convertToNumber)(descriptor.value);
|
|
100
|
-
return descriptor;
|
|
101
|
-
}
|
|
102
|
-
return (0, _primordials.ReflectGetOwnPropertyDescriptor)(target, key);
|
|
103
|
-
},
|
|
104
|
-
defineProperty(target, key, descriptor) {
|
|
105
|
-
if ((0, _is.isCanonicalIntegerIndexString)(key) && (0, _primordials.ObjectHasOwn)(target, key) && (0, _primordials.ObjectHasOwn)(descriptor, "value")) {
|
|
106
|
-
descriptor.value = (0, _converter.roundToFloat16Bits)(descriptor.value);
|
|
107
|
-
return (0, _primordials.ReflectDefineProperty)(target, key, descriptor);
|
|
108
|
-
}
|
|
109
|
-
return (0, _primordials.ReflectDefineProperty)(target, key, descriptor);
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
class Float16Array {
|
|
113
|
-
constructor(input, _byteOffset, _length) {
|
|
114
|
-
let float16bitsArray;
|
|
115
|
-
if (isFloat16Array(input)) {
|
|
116
|
-
float16bitsArray = (0, _primordials.ReflectConstruct)(_primordials.NativeUint16Array, [getFloat16BitsArray(input)], new.target);
|
|
117
|
-
} else if ((0, _is.isObject)(input) && !(0, _is.isAnyArrayBuffer)(input)) {
|
|
118
|
-
let list;
|
|
119
|
-
let length;
|
|
120
|
-
if ((0, _is.isNativeTypedArray)(input)) {
|
|
121
|
-
list = input;
|
|
122
|
-
length = (0, _primordials.TypedArrayPrototypeGetLength)(input);
|
|
123
|
-
const buffer = (0, _primordials.TypedArrayPrototypeGetBuffer)(input);
|
|
124
|
-
if ((0, _spec.IsDetachedBuffer)(buffer)) {
|
|
125
|
-
throw (0, _primordials.NativeTypeError)(_messages.ATTEMPTING_TO_ACCESS_DETACHED_ARRAYBUFFER);
|
|
126
|
-
}
|
|
127
|
-
if ((0, _is.isNativeBigIntTypedArray)(input)) {
|
|
128
|
-
throw (0, _primordials.NativeTypeError)(_messages.CANNOT_MIX_BIGINT_AND_OTHER_TYPES);
|
|
129
|
-
}
|
|
130
|
-
const data = new _primordials.NativeArrayBuffer(length * BYTES_PER_ELEMENT);
|
|
131
|
-
float16bitsArray = (0, _primordials.ReflectConstruct)(_primordials.NativeUint16Array, [data], new.target);
|
|
132
|
-
} else {
|
|
133
|
-
const iterator = input[_primordials.SymbolIterator];
|
|
134
|
-
if (iterator != null && typeof iterator !== "function") {
|
|
135
|
-
throw (0, _primordials.NativeTypeError)(_messages.ITERATOR_PROPERTY_IS_NOT_CALLABLE);
|
|
136
|
-
}
|
|
137
|
-
if (iterator != null) {
|
|
138
|
-
if ((0, _is.isOrdinaryArray)(input)) {
|
|
139
|
-
list = input;
|
|
140
|
-
length = input.length;
|
|
141
|
-
} else {
|
|
142
|
-
list = [...(input)];
|
|
143
|
-
length = list.length;
|
|
144
|
-
}
|
|
145
|
-
} else {
|
|
146
|
-
list = input;
|
|
147
|
-
length = (0, _spec.ToLength)(list.length);
|
|
148
|
-
}
|
|
149
|
-
float16bitsArray = (0, _primordials.ReflectConstruct)(_primordials.NativeUint16Array, [length], new.target);
|
|
150
|
-
}
|
|
151
|
-
for (let i = 0; i < length; ++i) {
|
|
152
|
-
float16bitsArray[i] = (0, _converter.roundToFloat16Bits)(list[i]);
|
|
153
|
-
}
|
|
154
|
-
} else {
|
|
155
|
-
float16bitsArray = (0, _primordials.ReflectConstruct)(_primordials.NativeUint16Array, arguments, new.target);
|
|
156
|
-
}
|
|
157
|
-
const proxy = new _primordials.NativeProxy(float16bitsArray, handler);
|
|
158
|
-
(0, _primordials.WeakMapPrototypeSet)(float16bitsArrays, proxy, float16bitsArray);
|
|
159
|
-
return proxy;
|
|
160
|
-
}
|
|
161
|
-
static from(src, ...opts) {
|
|
162
|
-
const Constructor = this;
|
|
163
|
-
if (!(0, _primordials.ReflectHas)(Constructor, _brand.brand)) {
|
|
164
|
-
throw (0, _primordials.NativeTypeError)(_messages.THIS_CONSTRUCTOR_IS_NOT_A_SUBCLASS_OF_FLOAT16ARRAY);
|
|
165
|
-
}
|
|
166
|
-
if (Constructor === Float16Array) {
|
|
167
|
-
if (isFloat16Array(src) && opts.length === 0) {
|
|
168
|
-
const float16bitsArray = getFloat16BitsArray(src);
|
|
169
|
-
const uint16 = new _primordials.NativeUint16Array((0, _primordials.TypedArrayPrototypeGetBuffer)(float16bitsArray), (0, _primordials.TypedArrayPrototypeGetByteOffset)(float16bitsArray), (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray));
|
|
170
|
-
return new Float16Array((0, _primordials.TypedArrayPrototypeGetBuffer)((0, _primordials.TypedArrayPrototypeSlice)(uint16)));
|
|
171
|
-
}
|
|
172
|
-
if (opts.length === 0) {
|
|
173
|
-
return new Float16Array((0, _primordials.TypedArrayPrototypeGetBuffer)((0, _primordials.Uint16ArrayFrom)(src, _converter.roundToFloat16Bits)));
|
|
174
|
-
}
|
|
175
|
-
const mapFunc = opts[0];
|
|
176
|
-
const thisArg = opts[1];
|
|
177
|
-
return new Float16Array((0, _primordials.TypedArrayPrototypeGetBuffer)((0, _primordials.Uint16ArrayFrom)(src, function (val, ...args) {
|
|
178
|
-
return (0, _converter.roundToFloat16Bits)((0, _primordials.ReflectApply)(mapFunc, this, [val, ...(0, _arrayIterator.safeIfNeeded)(args)]));
|
|
179
|
-
}, thisArg)));
|
|
180
|
-
}
|
|
181
|
-
let list;
|
|
182
|
-
let length;
|
|
183
|
-
const iterator = src[_primordials.SymbolIterator];
|
|
184
|
-
if (iterator != null && typeof iterator !== "function") {
|
|
185
|
-
throw (0, _primordials.NativeTypeError)(_messages.ITERATOR_PROPERTY_IS_NOT_CALLABLE);
|
|
186
|
-
}
|
|
187
|
-
if (iterator != null) {
|
|
188
|
-
if ((0, _is.isOrdinaryArray)(src)) {
|
|
189
|
-
list = src;
|
|
190
|
-
length = src.length;
|
|
191
|
-
} else if ((0, _is.isOrdinaryNativeTypedArray)(src)) {
|
|
192
|
-
list = src;
|
|
193
|
-
length = (0, _primordials.TypedArrayPrototypeGetLength)(src);
|
|
194
|
-
} else {
|
|
195
|
-
list = [...src];
|
|
196
|
-
length = list.length;
|
|
197
|
-
}
|
|
198
|
-
} else {
|
|
199
|
-
if (src == null) {
|
|
200
|
-
throw (0, _primordials.NativeTypeError)(_messages.CANNOT_CONVERT_UNDEFINED_OR_NULL_TO_OBJECT);
|
|
201
|
-
}
|
|
202
|
-
list = (0, _primordials.NativeObject)(src);
|
|
203
|
-
length = (0, _spec.ToLength)(list.length);
|
|
204
|
-
}
|
|
205
|
-
const array = new Constructor(length);
|
|
206
|
-
if (opts.length === 0) {
|
|
207
|
-
for (let i = 0; i < length; ++i) {
|
|
208
|
-
array[i] = list[i];
|
|
209
|
-
}
|
|
210
|
-
} else {
|
|
211
|
-
const mapFunc = opts[0];
|
|
212
|
-
const thisArg = opts[1];
|
|
213
|
-
for (let i = 0; i < length; ++i) {
|
|
214
|
-
array[i] = (0, _primordials.ReflectApply)(mapFunc, thisArg, [list[i], i]);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
return array;
|
|
218
|
-
}
|
|
219
|
-
static of(...items) {
|
|
220
|
-
const Constructor = this;
|
|
221
|
-
if (!(0, _primordials.ReflectHas)(Constructor, _brand.brand)) {
|
|
222
|
-
throw (0, _primordials.NativeTypeError)(_messages.THIS_CONSTRUCTOR_IS_NOT_A_SUBCLASS_OF_FLOAT16ARRAY);
|
|
223
|
-
}
|
|
224
|
-
const length = items.length;
|
|
225
|
-
if (Constructor === Float16Array) {
|
|
226
|
-
const proxy = new Float16Array(length);
|
|
227
|
-
const float16bitsArray = getFloat16BitsArray(proxy);
|
|
228
|
-
for (let i = 0; i < length; ++i) {
|
|
229
|
-
float16bitsArray[i] = (0, _converter.roundToFloat16Bits)(items[i]);
|
|
230
|
-
}
|
|
231
|
-
return proxy;
|
|
232
|
-
}
|
|
233
|
-
const array = new Constructor(length);
|
|
234
|
-
for (let i = 0; i < length; ++i) {
|
|
235
|
-
array[i] = items[i];
|
|
236
|
-
}
|
|
237
|
-
return array;
|
|
238
|
-
}
|
|
239
|
-
keys() {
|
|
240
|
-
assertFloat16Array(this);
|
|
241
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
242
|
-
return (0, _primordials.TypedArrayPrototypeKeys)(float16bitsArray);
|
|
243
|
-
}
|
|
244
|
-
values() {
|
|
245
|
-
assertFloat16Array(this);
|
|
246
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
247
|
-
return (0, _arrayIterator.wrap)(function* () {
|
|
248
|
-
for (const val of (0, _primordials.TypedArrayPrototypeValues)(float16bitsArray)) {
|
|
249
|
-
yield (0, _converter.convertToNumber)(val);
|
|
250
|
-
}
|
|
251
|
-
}());
|
|
252
|
-
}
|
|
253
|
-
entries() {
|
|
254
|
-
assertFloat16Array(this);
|
|
255
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
256
|
-
return (0, _arrayIterator.wrap)(function* () {
|
|
257
|
-
for (const [i, val] of (0, _primordials.TypedArrayPrototypeEntries)(float16bitsArray)) {
|
|
258
|
-
yield ([i, (0, _converter.convertToNumber)(val)]);
|
|
259
|
-
}
|
|
260
|
-
}());
|
|
261
|
-
}
|
|
262
|
-
at(index) {
|
|
263
|
-
assertFloat16Array(this);
|
|
264
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
265
|
-
const length = (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray);
|
|
266
|
-
const relativeIndex = (0, _spec.ToIntegerOrInfinity)(index);
|
|
267
|
-
const k = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;
|
|
268
|
-
if (k < 0 || k >= length) {
|
|
269
|
-
return;
|
|
270
|
-
}
|
|
271
|
-
return (0, _converter.convertToNumber)(float16bitsArray[k]);
|
|
272
|
-
}
|
|
273
|
-
with(index, value) {
|
|
274
|
-
assertFloat16Array(this);
|
|
275
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
276
|
-
const length = (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray);
|
|
277
|
-
const relativeIndex = (0, _spec.ToIntegerOrInfinity)(index);
|
|
278
|
-
const k = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;
|
|
279
|
-
const number = +value;
|
|
280
|
-
if (k < 0 || k >= length) {
|
|
281
|
-
throw (0, _primordials.NativeRangeError)(_messages.OFFSET_IS_OUT_OF_BOUNDS);
|
|
282
|
-
}
|
|
283
|
-
const uint16 = new _primordials.NativeUint16Array((0, _primordials.TypedArrayPrototypeGetBuffer)(float16bitsArray), (0, _primordials.TypedArrayPrototypeGetByteOffset)(float16bitsArray), (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray));
|
|
284
|
-
const cloned = new Float16Array((0, _primordials.TypedArrayPrototypeGetBuffer)((0, _primordials.TypedArrayPrototypeSlice)(uint16)));
|
|
285
|
-
const array = getFloat16BitsArray(cloned);
|
|
286
|
-
array[k] = (0, _converter.roundToFloat16Bits)(number);
|
|
287
|
-
return cloned;
|
|
288
|
-
}
|
|
289
|
-
map(callback, ...opts) {
|
|
290
|
-
assertFloat16Array(this);
|
|
291
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
292
|
-
const length = (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray);
|
|
293
|
-
const thisArg = opts[0];
|
|
294
|
-
const Constructor = (0, _spec.SpeciesConstructor)(float16bitsArray, Float16Array);
|
|
295
|
-
if (Constructor === Float16Array) {
|
|
296
|
-
const proxy = new Float16Array(length);
|
|
297
|
-
const array = getFloat16BitsArray(proxy);
|
|
298
|
-
for (let i = 0; i < length; ++i) {
|
|
299
|
-
const val = (0, _converter.convertToNumber)(float16bitsArray[i]);
|
|
300
|
-
array[i] = (0, _converter.roundToFloat16Bits)((0, _primordials.ReflectApply)(callback, thisArg, [val, i, this]));
|
|
301
|
-
}
|
|
302
|
-
return proxy;
|
|
303
|
-
}
|
|
304
|
-
const array = new Constructor(length);
|
|
305
|
-
assertSpeciesTypedArray(array, length);
|
|
306
|
-
for (let i = 0; i < length; ++i) {
|
|
307
|
-
const val = (0, _converter.convertToNumber)(float16bitsArray[i]);
|
|
308
|
-
array[i] = (0, _primordials.ReflectApply)(callback, thisArg, [val, i, this]);
|
|
309
|
-
}
|
|
310
|
-
return array;
|
|
311
|
-
}
|
|
312
|
-
filter(callback, ...opts) {
|
|
313
|
-
assertFloat16Array(this);
|
|
314
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
315
|
-
const length = (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray);
|
|
316
|
-
const thisArg = opts[0];
|
|
317
|
-
const kept = [];
|
|
318
|
-
for (let i = 0; i < length; ++i) {
|
|
319
|
-
const val = (0, _converter.convertToNumber)(float16bitsArray[i]);
|
|
320
|
-
if ((0, _primordials.ReflectApply)(callback, thisArg, [val, i, this])) {
|
|
321
|
-
(0, _primordials.ArrayPrototypePush)(kept, val);
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
const Constructor = (0, _spec.SpeciesConstructor)(float16bitsArray, Float16Array);
|
|
325
|
-
const array = new Constructor(kept);
|
|
326
|
-
assertSpeciesTypedArray(array);
|
|
327
|
-
return array;
|
|
328
|
-
}
|
|
329
|
-
reduce(callback, ...opts) {
|
|
330
|
-
assertFloat16Array(this);
|
|
331
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
332
|
-
const length = (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray);
|
|
333
|
-
if (length === 0 && opts.length === 0) {
|
|
334
|
-
throw (0, _primordials.NativeTypeError)(_messages.REDUCE_OF_EMPTY_ARRAY_WITH_NO_INITIAL_VALUE);
|
|
335
|
-
}
|
|
336
|
-
let accumulator, start;
|
|
337
|
-
if (opts.length === 0) {
|
|
338
|
-
accumulator = (0, _converter.convertToNumber)(float16bitsArray[0]);
|
|
339
|
-
start = 1;
|
|
340
|
-
} else {
|
|
341
|
-
accumulator = opts[0];
|
|
342
|
-
start = 0;
|
|
343
|
-
}
|
|
344
|
-
for (let i = start; i < length; ++i) {
|
|
345
|
-
accumulator = callback(accumulator, (0, _converter.convertToNumber)(float16bitsArray[i]), i, this);
|
|
346
|
-
}
|
|
347
|
-
return accumulator;
|
|
348
|
-
}
|
|
349
|
-
reduceRight(callback, ...opts) {
|
|
350
|
-
assertFloat16Array(this);
|
|
351
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
352
|
-
const length = (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray);
|
|
353
|
-
if (length === 0 && opts.length === 0) {
|
|
354
|
-
throw (0, _primordials.NativeTypeError)(_messages.REDUCE_OF_EMPTY_ARRAY_WITH_NO_INITIAL_VALUE);
|
|
355
|
-
}
|
|
356
|
-
let accumulator, start;
|
|
357
|
-
if (opts.length === 0) {
|
|
358
|
-
accumulator = (0, _converter.convertToNumber)(float16bitsArray[length - 1]);
|
|
359
|
-
start = length - 2;
|
|
360
|
-
} else {
|
|
361
|
-
accumulator = opts[0];
|
|
362
|
-
start = length - 1;
|
|
363
|
-
}
|
|
364
|
-
for (let i = start; i >= 0; --i) {
|
|
365
|
-
accumulator = callback(accumulator, (0, _converter.convertToNumber)(float16bitsArray[i]), i, this);
|
|
366
|
-
}
|
|
367
|
-
return accumulator;
|
|
368
|
-
}
|
|
369
|
-
forEach(callback, ...opts) {
|
|
370
|
-
assertFloat16Array(this);
|
|
371
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
372
|
-
const length = (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray);
|
|
373
|
-
const thisArg = opts[0];
|
|
374
|
-
for (let i = 0; i < length; ++i) {
|
|
375
|
-
(0, _primordials.ReflectApply)(callback, thisArg, [(0, _converter.convertToNumber)(float16bitsArray[i]), i, this]);
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
find(callback, ...opts) {
|
|
379
|
-
assertFloat16Array(this);
|
|
380
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
381
|
-
const length = (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray);
|
|
382
|
-
const thisArg = opts[0];
|
|
383
|
-
for (let i = 0; i < length; ++i) {
|
|
384
|
-
const value = (0, _converter.convertToNumber)(float16bitsArray[i]);
|
|
385
|
-
if ((0, _primordials.ReflectApply)(callback, thisArg, [value, i, this])) {
|
|
386
|
-
return value;
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
findIndex(callback, ...opts) {
|
|
391
|
-
assertFloat16Array(this);
|
|
392
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
393
|
-
const length = (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray);
|
|
394
|
-
const thisArg = opts[0];
|
|
395
|
-
for (let i = 0; i < length; ++i) {
|
|
396
|
-
const value = (0, _converter.convertToNumber)(float16bitsArray[i]);
|
|
397
|
-
if ((0, _primordials.ReflectApply)(callback, thisArg, [value, i, this])) {
|
|
398
|
-
return i;
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
return -1;
|
|
402
|
-
}
|
|
403
|
-
findLast(callback, ...opts) {
|
|
404
|
-
assertFloat16Array(this);
|
|
405
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
406
|
-
const length = (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray);
|
|
407
|
-
const thisArg = opts[0];
|
|
408
|
-
for (let i = length - 1; i >= 0; --i) {
|
|
409
|
-
const value = (0, _converter.convertToNumber)(float16bitsArray[i]);
|
|
410
|
-
if ((0, _primordials.ReflectApply)(callback, thisArg, [value, i, this])) {
|
|
411
|
-
return value;
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
findLastIndex(callback, ...opts) {
|
|
416
|
-
assertFloat16Array(this);
|
|
417
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
418
|
-
const length = (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray);
|
|
419
|
-
const thisArg = opts[0];
|
|
420
|
-
for (let i = length - 1; i >= 0; --i) {
|
|
421
|
-
const value = (0, _converter.convertToNumber)(float16bitsArray[i]);
|
|
422
|
-
if ((0, _primordials.ReflectApply)(callback, thisArg, [value, i, this])) {
|
|
423
|
-
return i;
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
return -1;
|
|
427
|
-
}
|
|
428
|
-
every(callback, ...opts) {
|
|
429
|
-
assertFloat16Array(this);
|
|
430
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
431
|
-
const length = (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray);
|
|
432
|
-
const thisArg = opts[0];
|
|
433
|
-
for (let i = 0; i < length; ++i) {
|
|
434
|
-
if (!(0, _primordials.ReflectApply)(callback, thisArg, [(0, _converter.convertToNumber)(float16bitsArray[i]), i, this])) {
|
|
435
|
-
return false;
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
return true;
|
|
439
|
-
}
|
|
440
|
-
some(callback, ...opts) {
|
|
441
|
-
assertFloat16Array(this);
|
|
442
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
443
|
-
const length = (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray);
|
|
444
|
-
const thisArg = opts[0];
|
|
445
|
-
for (let i = 0; i < length; ++i) {
|
|
446
|
-
if ((0, _primordials.ReflectApply)(callback, thisArg, [(0, _converter.convertToNumber)(float16bitsArray[i]), i, this])) {
|
|
447
|
-
return true;
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
return false;
|
|
451
|
-
}
|
|
452
|
-
set(input, ...opts) {
|
|
453
|
-
assertFloat16Array(this);
|
|
454
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
455
|
-
const targetOffset = (0, _spec.ToIntegerOrInfinity)(opts[0]);
|
|
456
|
-
if (targetOffset < 0) {
|
|
457
|
-
throw (0, _primordials.NativeRangeError)(_messages.OFFSET_IS_OUT_OF_BOUNDS);
|
|
458
|
-
}
|
|
459
|
-
if (input == null) {
|
|
460
|
-
throw (0, _primordials.NativeTypeError)(_messages.CANNOT_CONVERT_UNDEFINED_OR_NULL_TO_OBJECT);
|
|
461
|
-
}
|
|
462
|
-
if ((0, _is.isNativeBigIntTypedArray)(input)) {
|
|
463
|
-
throw (0, _primordials.NativeTypeError)(_messages.CANNOT_MIX_BIGINT_AND_OTHER_TYPES);
|
|
464
|
-
}
|
|
465
|
-
if (isFloat16Array(input)) {
|
|
466
|
-
return (0, _primordials.TypedArrayPrototypeSet)(getFloat16BitsArray(this), getFloat16BitsArray(input), targetOffset);
|
|
467
|
-
}
|
|
468
|
-
if ((0, _is.isNativeTypedArray)(input)) {
|
|
469
|
-
const buffer = (0, _primordials.TypedArrayPrototypeGetBuffer)(input);
|
|
470
|
-
if ((0, _spec.IsDetachedBuffer)(buffer)) {
|
|
471
|
-
throw (0, _primordials.NativeTypeError)(_messages.ATTEMPTING_TO_ACCESS_DETACHED_ARRAYBUFFER);
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
const targetLength = (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray);
|
|
475
|
-
const src = (0, _primordials.NativeObject)(input);
|
|
476
|
-
const srcLength = (0, _spec.ToLength)(src.length);
|
|
477
|
-
if (targetOffset === Infinity || srcLength + targetOffset > targetLength) {
|
|
478
|
-
throw (0, _primordials.NativeRangeError)(_messages.OFFSET_IS_OUT_OF_BOUNDS);
|
|
479
|
-
}
|
|
480
|
-
for (let i = 0; i < srcLength; ++i) {
|
|
481
|
-
float16bitsArray[i + targetOffset] = (0, _converter.roundToFloat16Bits)(src[i]);
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
reverse() {
|
|
485
|
-
assertFloat16Array(this);
|
|
486
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
487
|
-
(0, _primordials.TypedArrayPrototypeReverse)(float16bitsArray);
|
|
488
|
-
return this;
|
|
489
|
-
}
|
|
490
|
-
toReversed() {
|
|
491
|
-
assertFloat16Array(this);
|
|
492
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
493
|
-
const uint16 = new _primordials.NativeUint16Array((0, _primordials.TypedArrayPrototypeGetBuffer)(float16bitsArray), (0, _primordials.TypedArrayPrototypeGetByteOffset)(float16bitsArray), (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray));
|
|
494
|
-
const cloned = new Float16Array((0, _primordials.TypedArrayPrototypeGetBuffer)((0, _primordials.TypedArrayPrototypeSlice)(uint16)));
|
|
495
|
-
const clonedFloat16bitsArray = getFloat16BitsArray(cloned);
|
|
496
|
-
(0, _primordials.TypedArrayPrototypeReverse)(clonedFloat16bitsArray);
|
|
497
|
-
return cloned;
|
|
498
|
-
}
|
|
499
|
-
fill(value, ...opts) {
|
|
500
|
-
assertFloat16Array(this);
|
|
501
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
502
|
-
(0, _primordials.TypedArrayPrototypeFill)(float16bitsArray, (0, _converter.roundToFloat16Bits)(value), ...(0, _arrayIterator.safeIfNeeded)(opts));
|
|
503
|
-
return this;
|
|
504
|
-
}
|
|
505
|
-
copyWithin(target, start, ...opts) {
|
|
506
|
-
assertFloat16Array(this);
|
|
507
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
508
|
-
(0, _primordials.TypedArrayPrototypeCopyWithin)(float16bitsArray, target, start, ...(0, _arrayIterator.safeIfNeeded)(opts));
|
|
509
|
-
return this;
|
|
510
|
-
}
|
|
511
|
-
sort(compareFn) {
|
|
512
|
-
assertFloat16Array(this);
|
|
513
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
514
|
-
const sortCompare = compareFn !== undefined ? compareFn : _spec.defaultCompare;
|
|
515
|
-
(0, _primordials.TypedArrayPrototypeSort)(float16bitsArray, (x, y) => {
|
|
516
|
-
return sortCompare((0, _converter.convertToNumber)(x), (0, _converter.convertToNumber)(y));
|
|
517
|
-
});
|
|
518
|
-
return this;
|
|
519
|
-
}
|
|
520
|
-
toSorted(compareFn) {
|
|
521
|
-
assertFloat16Array(this);
|
|
522
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
523
|
-
if (compareFn !== undefined && typeof compareFn !== "function") {
|
|
524
|
-
throw new _primordials.NativeTypeError(_messages.THE_COMPARISON_FUNCTION_MUST_BE_EITHER_A_FUNCTION_OR_UNDEFINED);
|
|
525
|
-
}
|
|
526
|
-
const sortCompare = compareFn !== undefined ? compareFn : _spec.defaultCompare;
|
|
527
|
-
const uint16 = new _primordials.NativeUint16Array((0, _primordials.TypedArrayPrototypeGetBuffer)(float16bitsArray), (0, _primordials.TypedArrayPrototypeGetByteOffset)(float16bitsArray), (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray));
|
|
528
|
-
const cloned = new Float16Array((0, _primordials.TypedArrayPrototypeGetBuffer)((0, _primordials.TypedArrayPrototypeSlice)(uint16)));
|
|
529
|
-
const clonedFloat16bitsArray = getFloat16BitsArray(cloned);
|
|
530
|
-
(0, _primordials.TypedArrayPrototypeSort)(clonedFloat16bitsArray, (x, y) => {
|
|
531
|
-
return sortCompare((0, _converter.convertToNumber)(x), (0, _converter.convertToNumber)(y));
|
|
532
|
-
});
|
|
533
|
-
return cloned;
|
|
534
|
-
}
|
|
535
|
-
slice(start, end) {
|
|
536
|
-
assertFloat16Array(this);
|
|
537
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
538
|
-
const Constructor = (0, _spec.SpeciesConstructor)(float16bitsArray, Float16Array);
|
|
539
|
-
if (Constructor === Float16Array) {
|
|
540
|
-
const uint16 = new _primordials.NativeUint16Array((0, _primordials.TypedArrayPrototypeGetBuffer)(float16bitsArray), (0, _primordials.TypedArrayPrototypeGetByteOffset)(float16bitsArray), (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray));
|
|
541
|
-
return new Float16Array((0, _primordials.TypedArrayPrototypeGetBuffer)((0, _primordials.TypedArrayPrototypeSlice)(uint16, start, end)));
|
|
542
|
-
}
|
|
543
|
-
const length = (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray);
|
|
544
|
-
const relativeStart = (0, _spec.ToIntegerOrInfinity)(start);
|
|
545
|
-
const relativeEnd = end === undefined ? length : (0, _spec.ToIntegerOrInfinity)(end);
|
|
546
|
-
let k;
|
|
547
|
-
if (relativeStart === -Infinity) {
|
|
548
|
-
k = 0;
|
|
549
|
-
} else if (relativeStart < 0) {
|
|
550
|
-
k = length + relativeStart > 0 ? length + relativeStart : 0;
|
|
551
|
-
} else {
|
|
552
|
-
k = length < relativeStart ? length : relativeStart;
|
|
553
|
-
}
|
|
554
|
-
let final;
|
|
555
|
-
if (relativeEnd === -Infinity) {
|
|
556
|
-
final = 0;
|
|
557
|
-
} else if (relativeEnd < 0) {
|
|
558
|
-
final = length + relativeEnd > 0 ? length + relativeEnd : 0;
|
|
559
|
-
} else {
|
|
560
|
-
final = length < relativeEnd ? length : relativeEnd;
|
|
561
|
-
}
|
|
562
|
-
const count = final - k > 0 ? final - k : 0;
|
|
563
|
-
const array = new Constructor(count);
|
|
564
|
-
assertSpeciesTypedArray(array, count);
|
|
565
|
-
if (count === 0) {
|
|
566
|
-
return array;
|
|
567
|
-
}
|
|
568
|
-
const buffer = (0, _primordials.TypedArrayPrototypeGetBuffer)(float16bitsArray);
|
|
569
|
-
if ((0, _spec.IsDetachedBuffer)(buffer)) {
|
|
570
|
-
throw (0, _primordials.NativeTypeError)(_messages.ATTEMPTING_TO_ACCESS_DETACHED_ARRAYBUFFER);
|
|
571
|
-
}
|
|
572
|
-
let n = 0;
|
|
573
|
-
while (k < final) {
|
|
574
|
-
array[n] = (0, _converter.convertToNumber)(float16bitsArray[k]);
|
|
575
|
-
++k;
|
|
576
|
-
++n;
|
|
577
|
-
}
|
|
578
|
-
return array;
|
|
579
|
-
}
|
|
580
|
-
subarray(begin, end) {
|
|
581
|
-
assertFloat16Array(this);
|
|
582
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
583
|
-
const Constructor = (0, _spec.SpeciesConstructor)(float16bitsArray, Float16Array);
|
|
584
|
-
const uint16 = new _primordials.NativeUint16Array((0, _primordials.TypedArrayPrototypeGetBuffer)(float16bitsArray), (0, _primordials.TypedArrayPrototypeGetByteOffset)(float16bitsArray), (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray));
|
|
585
|
-
const uint16Subarray = (0, _primordials.TypedArrayPrototypeSubarray)(uint16, begin, end);
|
|
586
|
-
const array = new Constructor((0, _primordials.TypedArrayPrototypeGetBuffer)(uint16Subarray), (0, _primordials.TypedArrayPrototypeGetByteOffset)(uint16Subarray), (0, _primordials.TypedArrayPrototypeGetLength)(uint16Subarray));
|
|
587
|
-
assertSpeciesTypedArray(array);
|
|
588
|
-
return array;
|
|
589
|
-
}
|
|
590
|
-
indexOf(element, ...opts) {
|
|
591
|
-
assertFloat16Array(this);
|
|
592
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
593
|
-
const length = (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray);
|
|
594
|
-
let from = (0, _spec.ToIntegerOrInfinity)(opts[0]);
|
|
595
|
-
if (from === Infinity) {
|
|
596
|
-
return -1;
|
|
597
|
-
}
|
|
598
|
-
if (from < 0) {
|
|
599
|
-
from += length;
|
|
600
|
-
if (from < 0) {
|
|
601
|
-
from = 0;
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
for (let i = from; i < length; ++i) {
|
|
605
|
-
if ((0, _primordials.ObjectHasOwn)(float16bitsArray, i) && (0, _converter.convertToNumber)(float16bitsArray[i]) === element) {
|
|
606
|
-
return i;
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
return -1;
|
|
610
|
-
}
|
|
611
|
-
lastIndexOf(element, ...opts) {
|
|
612
|
-
assertFloat16Array(this);
|
|
613
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
614
|
-
const length = (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray);
|
|
615
|
-
let from = opts.length >= 1 ? (0, _spec.ToIntegerOrInfinity)(opts[0]) : length - 1;
|
|
616
|
-
if (from === -Infinity) {
|
|
617
|
-
return -1;
|
|
618
|
-
}
|
|
619
|
-
if (from >= 0) {
|
|
620
|
-
from = from < length - 1 ? from : length - 1;
|
|
621
|
-
} else {
|
|
622
|
-
from += length;
|
|
623
|
-
}
|
|
624
|
-
for (let i = from; i >= 0; --i) {
|
|
625
|
-
if ((0, _primordials.ObjectHasOwn)(float16bitsArray, i) && (0, _converter.convertToNumber)(float16bitsArray[i]) === element) {
|
|
626
|
-
return i;
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
return -1;
|
|
630
|
-
}
|
|
631
|
-
includes(element, ...opts) {
|
|
632
|
-
assertFloat16Array(this);
|
|
633
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
634
|
-
const length = (0, _primordials.TypedArrayPrototypeGetLength)(float16bitsArray);
|
|
635
|
-
let from = (0, _spec.ToIntegerOrInfinity)(opts[0]);
|
|
636
|
-
if (from === Infinity) {
|
|
637
|
-
return false;
|
|
638
|
-
}
|
|
639
|
-
if (from < 0) {
|
|
640
|
-
from += length;
|
|
641
|
-
if (from < 0) {
|
|
642
|
-
from = 0;
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
const isNaN = (0, _primordials.NumberIsNaN)(element);
|
|
646
|
-
for (let i = from; i < length; ++i) {
|
|
647
|
-
const value = (0, _converter.convertToNumber)(float16bitsArray[i]);
|
|
648
|
-
if (isNaN && (0, _primordials.NumberIsNaN)(value)) {
|
|
649
|
-
return true;
|
|
650
|
-
}
|
|
651
|
-
if (value === element) {
|
|
652
|
-
return true;
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
return false;
|
|
656
|
-
}
|
|
657
|
-
join(separator) {
|
|
658
|
-
assertFloat16Array(this);
|
|
659
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
660
|
-
const array = copyToArray(float16bitsArray);
|
|
661
|
-
return (0, _primordials.ArrayPrototypeJoin)(array, separator);
|
|
662
|
-
}
|
|
663
|
-
toLocaleString(...opts) {
|
|
664
|
-
assertFloat16Array(this);
|
|
665
|
-
const float16bitsArray = getFloat16BitsArray(this);
|
|
666
|
-
const array = copyToArray(float16bitsArray);
|
|
667
|
-
return (0, _primordials.ArrayPrototypeToLocaleString)(array, ...(0, _arrayIterator.safeIfNeeded)(opts));
|
|
668
|
-
}
|
|
669
|
-
get [_primordials.SymbolToStringTag]() {
|
|
670
|
-
if (isFloat16Array(this)) {
|
|
671
|
-
return "Float16Array";
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
exports.Float16Array = Float16Array;
|
|
676
|
-
(0, _primordials.ObjectDefineProperty)(Float16Array, "BYTES_PER_ELEMENT", {
|
|
677
|
-
value: BYTES_PER_ELEMENT
|
|
678
|
-
});
|
|
679
|
-
(0, _primordials.ObjectDefineProperty)(Float16Array, _brand.brand, {});
|
|
680
|
-
(0, _primordials.ReflectSetPrototypeOf)(Float16Array, _primordials.TypedArray);
|
|
681
|
-
const Float16ArrayPrototype = Float16Array.prototype;
|
|
682
|
-
(0, _primordials.ObjectDefineProperty)(Float16ArrayPrototype, "BYTES_PER_ELEMENT", {
|
|
683
|
-
value: BYTES_PER_ELEMENT
|
|
684
|
-
});
|
|
685
|
-
(0, _primordials.ObjectDefineProperty)(Float16ArrayPrototype, _primordials.SymbolIterator, {
|
|
686
|
-
value: Float16ArrayPrototype.values,
|
|
687
|
-
writable: true,
|
|
688
|
-
configurable: true
|
|
689
|
-
});
|
|
690
|
-
(0, _primordials.ReflectSetPrototypeOf)(Float16ArrayPrototype, _primordials.TypedArrayPrototype);
|