diff --git a/common.gypi b/common.gypi index a83523286a91..a982da03f78b 100644 --- a/common.gypi +++ b/common.gypi @@ -42,7 +42,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.28', + 'v8_embedder_string': '-node.29', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/api/api.cc b/deps/v8/src/api/api.cc index fbd628370c0b..48da5b35b872 100644 --- a/deps/v8/src/api/api.cc +++ b/deps/v8/src/api/api.cc @@ -3741,14 +3741,6 @@ bool Value::IsTypedArray() const { TYPED_ARRAYS_BASE(VALUE_IS_TYPED_ARRAY) #undef VALUE_IS_TYPED_ARRAY -bool Value::IsFloat16Array() const { - auto obj = *Utils::OpenDirectHandle(this); - return i::IsJSTypedArray(obj) && - i::Cast(obj)->type() == i::kExternalFloat16Array && - Utils::ApiCheck(i::v8_flags.js_float16array, "Value::IsFloat16Array", - "Float16Array is not supported"); -} - bool Value::IsDataView() const { auto obj = *Utils::OpenDirectHandle(this); return IsJSDataView(obj) || IsJSRabGsabDataView(obj); @@ -4292,16 +4284,6 @@ void v8::TypedArray::CheckCast(Value* that) { TYPED_ARRAYS_BASE(CHECK_TYPED_ARRAY_CAST) #undef CHECK_TYPED_ARRAY_CAST -void v8::Float16Array::CheckCast(Value* that) { - Utils::ApiCheck(i::v8_flags.js_float16array, "v8::Float16Array::Cast", - "Float16Array is not supported"); - auto obj = *Utils::OpenDirectHandle(that); - Utils::ApiCheck( - i::IsJSTypedArray(obj) && - i::Cast(obj)->type() == i::kExternalFloat16Array, - "v8::Float16Array::Cast()", "Value is not a Float16Array"); -} - void v8::DataView::CheckCast(Value* that) { auto obj = *Utils::OpenDirectHandle(that); Utils::ApiCheck(i::IsJSDataView(obj) || IsJSRabGsabDataView(obj), @@ -9347,44 +9329,6 @@ static_assert(v8::TypedArray::kMaxByteLength == i::JSTypedArray::kMaxByteLength, TYPED_ARRAYS_BASE(TYPED_ARRAY_NEW) #undef TYPED_ARRAY_NEW -Local Float16Array::New(Local array_buffer, - size_t byte_offset, size_t length) { - Utils::ApiCheck(i::v8_flags.js_float16array, "v8::Float16Array::New", - "Float16Array is not supported"); - i::Isolate* i_isolate = i::Isolate::Current(); - ApiRuntimeCallStatsScope rcs_scope(i_isolate, RCCId::kAPI_Float16Array_New); - EnterV8NoScriptNoExceptionScope api_scope(i_isolate); - if (!Utils::ApiCheck( - length <= kMaxLength, - "v8::Float16Array::New(Local, size_t, size_t)", - "length exceeds max allowed value")) { - return {}; - } - auto buffer = Utils::OpenDirectHandle(*array_buffer); - i::DirectHandle obj = i_isolate->factory()->NewJSTypedArray( - i::kExternalFloat16Array, buffer, byte_offset, length); - return Utils::ToLocalFloat16Array(obj); -} -Local Float16Array::New( - Local shared_array_buffer, size_t byte_offset, - size_t length) { - Utils::ApiCheck(i::v8_flags.js_float16array, "v8::Float16Array::New", - "Float16Array is not supported"); - i::Isolate* i_isolate = i::Isolate::Current(); - ApiRuntimeCallStatsScope rcs_scope(i_isolate, RCCId::kAPI_Float16Array_New); - EnterV8NoScriptNoExceptionScope api_scope(i_isolate); - if (!Utils::ApiCheck( - length <= kMaxLength, - "v8::Float16Array::New(Local, size_t, size_t)", - "length exceeds max allowed value")) { - return {}; - } - auto buffer = Utils::OpenDirectHandle(*shared_array_buffer); - i::DirectHandle obj = i_isolate->factory()->NewJSTypedArray( - i::kExternalFloat16Array, buffer, byte_offset, length); - return Utils::ToLocalFloat16Array(obj); -} - // TODO(v8:11111): Support creating length tracking DataViews via the API. Local DataView::New(Local array_buffer, size_t byte_offset, size_t byte_length) { diff --git a/deps/v8/src/builtins/builtins.cc b/deps/v8/src/builtins/builtins.cc index 34424db08dc0..0b6e43dde6ea 100644 --- a/deps/v8/src/builtins/builtins.cc +++ b/deps/v8/src/builtins/builtins.cc @@ -863,12 +863,6 @@ Builtins::JSBuiltinStateFlags Builtins::GetJSBuiltinState(Builtin builtin) { RETURN_FLAG_DEPENDENT_BUILTIN_STATE( v8_flags.js_explicit_resource_management); - // --js-float16array - case Builtin::kMathF16round: - case Builtin::kDataViewPrototypeGetFloat16: - case Builtin::kDataViewPrototypeSetFloat16: - RETURN_FLAG_DEPENDENT_BUILTIN_STATE(v8_flags.js_float16array); - // --js-base-64 case Builtin::kUint8ArrayFromBase64: case Builtin::kUint8ArrayFromHex: diff --git a/deps/v8/src/flags/flag-definitions.h b/deps/v8/src/flags/flag-definitions.h index aab9435dbb53..15d4341ff84b 100644 --- a/deps/v8/src/flags/flag-definitions.h +++ b/deps/v8/src/flags/flag-definitions.h @@ -344,8 +344,6 @@ DEFINE_BOOL(js_shipping, true, "enable all shipped JavaScript features") V(js_error_iserror, "Error.isError") \ V(js_regexp_escape, "RegExp.escape") \ V(js_explicit_resource_management, "explicit resource management") \ - V(js_float16array, \ - "Float16Array, Math.f16round, DataView.getFloat16, DataView.setFloat16") \ V(js_base_64, "Uint8Array to/from base64 and hex") \ V(js_esm_ns_reexport, \ "Support diamond-importing re-expored namespaces " \ diff --git a/deps/v8/src/init/bootstrapper.cc b/deps/v8/src/init/bootstrapper.cc index ba75a3a17df2..dca2648b3a93 100644 --- a/deps/v8/src/init/bootstrapper.cc +++ b/deps/v8/src/init/bootstrapper.cc @@ -3483,6 +3483,8 @@ void Genesis::InitializeGlobal(DirectHandle global_object, SimpleInstallFunction(isolate_, math, "exp", Builtin::kMathExp, 1, kAdapt); SimpleInstallFunction(isolate_, math, "floor", Builtin::kMathFloor, 1, kAdapt); + SimpleInstallFunction(isolate_, math, "f16round", Builtin::kMathF16round, 1, + kAdapt); SimpleInstallFunction(isolate_, math, "fround", Builtin::kMathFround, 1, kAdapt); SimpleInstallFunction(isolate_, math, "hypot", Builtin::kMathHypot, 2, @@ -4330,6 +4332,10 @@ void Genesis::InitializeGlobal(DirectHandle global_object, Builtin::kDataViewPrototypeGetUint32, 1, kDontAdapt); SimpleInstallFunction(isolate_, prototype, "setUint32", Builtin::kDataViewPrototypeSetUint32, 2, kDontAdapt); + SimpleInstallFunction(isolate_, prototype, "getFloat16", + Builtin::kDataViewPrototypeGetFloat16, 1, kDontAdapt); + SimpleInstallFunction(isolate_, prototype, "setFloat16", + Builtin::kDataViewPrototypeSetFloat16, 2, kDontAdapt); SimpleInstallFunction(isolate_, prototype, "getFloat32", Builtin::kDataViewPrototypeGetFloat32, 1, kDontAdapt); SimpleInstallFunction(isolate_, prototype, "setFloat32", @@ -5084,11 +5090,6 @@ DirectHandle Genesis::InstallTypedArray( GetCorrespondingRabGsabElementsKind(elements_kind), 0); rab_gsab_initial_map->SetConstructor(*result); - if (rab_gsab_initial_map_index == Context::RAB_GSAB_FLOAT16_ARRAY_MAP_INDEX && - v8_flags.js_float16array) { - LOG(isolate(), MapDetails(*rab_gsab_initial_map)); - } - native_context()->set(rab_gsab_initial_map_index, *rab_gsab_initial_map, UPDATE_WRITE_BARRIER, kReleaseStore); Map::SetPrototype(isolate(), rab_gsab_initial_map, prototype); @@ -5869,34 +5870,6 @@ void Genesis::InitializeGlobal_js_explicit_resource_management() { kAdapt); } -void Genesis::InitializeGlobal_js_float16array() { - if (!v8_flags.js_float16array) return; - - DirectHandle global(native_context()->global_object(), - isolate()); - DirectHandle math = Cast( - JSReceiver::GetProperty(isolate(), global, "Math").ToHandleChecked()); - - SimpleInstallFunction(isolate_, math, "f16round", Builtin::kMathF16round, 1, - kAdapt); - - DirectHandle dataview_prototype( - Cast(native_context()->data_view_fun()->instance_prototype()), - isolate()); - - SimpleInstallFunction(isolate_, dataview_prototype, "getFloat16", - Builtin::kDataViewPrototypeGetFloat16, 1, kDontAdapt); - SimpleInstallFunction(isolate_, dataview_prototype, "setFloat16", - Builtin::kDataViewPrototypeSetFloat16, 2, kDontAdapt); - - DirectHandle fun = InstallTypedArray( - "Float16Array", FLOAT16_ELEMENTS, FLOAT16_TYPED_ARRAY_CONSTRUCTOR_TYPE, - Context::RAB_GSAB_FLOAT16_ARRAY_MAP_INDEX); - - InstallWithIntrinsicDefaultProto(isolate_, fun, - Context::FLOAT16_ARRAY_FUN_INDEX); -} - void Genesis::InitializeGlobal_js_regexp_escape() { if (!v8_flags.js_regexp_escape) return; diff --git a/deps/v8/src/objects/elements-kind.h b/deps/v8/src/objects/elements-kind.h index 7be923774f2c..2383a6a3a401 100644 --- a/deps/v8/src/objects/elements-kind.h +++ b/deps/v8/src/objects/elements-kind.h @@ -26,13 +26,10 @@ namespace internal { V(BigInt64, bigint64, BIGINT64, int64_t) \ V(Uint8Clamped, uint8_clamped, UINT8_CLAMPED, uint8_t) \ V(Float32, float32, FLOAT32, float) \ - V(Float64, float64, FLOAT64, double) + V(Float64, float64, FLOAT64, double) \ + V(Float16, float16, FLOAT16, uint16_t) -#define TYPED_ARRAYS_FLOAT16(V) V(Float16, float16, FLOAT16, uint16_t) - -#define TYPED_ARRAYS(V) \ - TYPED_ARRAYS_BASE(V) \ - TYPED_ARRAYS_FLOAT16(V) +#define TYPED_ARRAYS(V) TYPED_ARRAYS_BASE(V) #define RAB_GSAB_TYPED_ARRAYS_BASE(V) \ V(RabGsabUint8, rab_gsab_uint8, RAB_GSAB_UINT8, uint8_t) \ @@ -46,14 +43,10 @@ namespace internal { V(RabGsabUint8Clamped, rab_gsab_uint8_clamped, RAB_GSAB_UINT8_CLAMPED, \ uint8_t) \ V(RabGsabFloat32, rab_gsab_float32, RAB_GSAB_FLOAT32, float) \ - V(RabGsabFloat64, rab_gsab_float64, RAB_GSAB_FLOAT64, double) - -#define RAB_GSAB_TYPED_ARRAYS_FLOAT16(V) \ + V(RabGsabFloat64, rab_gsab_float64, RAB_GSAB_FLOAT64, double) \ V(RabGsabFloat16, rab_gsab_float16, RAB_GSAB_FLOAT16, uint16_t) -#define RAB_GSAB_TYPED_ARRAYS(V) \ - RAB_GSAB_TYPED_ARRAYS_BASE(V) \ - RAB_GSAB_TYPED_ARRAYS_FLOAT16(V) +#define RAB_GSAB_TYPED_ARRAYS(V) RAB_GSAB_TYPED_ARRAYS_BASE(V) // The TypedArrays backed by RAB / GSAB are called Uint8Array, Uint16Array etc, // and not RabGsabUint8Array, RabGsabUint16Array etc. This macro is used for @@ -69,14 +62,11 @@ namespace internal { V(BigInt64, rab_gsab_bigint64, RAB_GSAB_BIGINT64, int64_t) \ V(Uint8Clamped, rab_gsab_uint8_clamped, RAB_GSAB_UINT8_CLAMPED, uint8_t) \ V(Float32, rab_gsab_float32, RAB_GSAB_FLOAT32, float) \ - V(Float64, rab_gsab_float64, RAB_GSAB_FLOAT64, double) - -#define RAB_GSAB_TYPED_ARRAYS_WITH_TYPED_ARRAY_TYPE_FLOAT16(V) \ + V(Float64, rab_gsab_float64, RAB_GSAB_FLOAT64, double) \ V(Float16, rab_gsab_float16, RAB_GSAB_FLOAT16, uint16_t) #define RAB_GSAB_TYPED_ARRAYS_WITH_TYPED_ARRAY_TYPE(V) \ - RAB_GSAB_TYPED_ARRAYS_WITH_TYPED_ARRAY_TYPE_BASE(V) \ - RAB_GSAB_TYPED_ARRAYS_WITH_TYPED_ARRAY_TYPE_FLOAT16(V) + RAB_GSAB_TYPED_ARRAYS_WITH_TYPED_ARRAY_TYPE_BASE(V) // Like RAB_GSAB_TYPED_ARRAYS but has an additional parameter for // for the corresponding non-RAB/GSAB ElementsKind. @@ -93,14 +83,11 @@ namespace internal { V(RabGsabUint8Clamped, rab_gsab_uint8_clamped, RAB_GSAB_UINT8_CLAMPED, \ uint8_t, UINT8_CLAMPED) \ V(RabGsabFloat32, rab_gsab_float32, RAB_GSAB_FLOAT32, float, FLOAT32) \ - V(RabGsabFloat64, rab_gsab_float64, RAB_GSAB_FLOAT64, double, FLOAT64) - -#define RAB_GSAB_TYPED_ARRAYS_WITH_NON_RAB_GSAB_ELEMENTS_KIND_FLOAT16(V) \ + V(RabGsabFloat64, rab_gsab_float64, RAB_GSAB_FLOAT64, double, FLOAT64) \ V(RabGsabFloat16, rab_gsab_float16, RAB_GSAB_FLOAT16, uint16_t, FLOAT16) #define RAB_GSAB_TYPED_ARRAYS_WITH_NON_RAB_GSAB_ELEMENTS_KIND(V) \ - RAB_GSAB_TYPED_ARRAYS_WITH_NON_RAB_GSAB_ELEMENTS_KIND_BASE(V) \ - RAB_GSAB_TYPED_ARRAYS_WITH_NON_RAB_GSAB_ELEMENTS_KIND_FLOAT16(V) + RAB_GSAB_TYPED_ARRAYS_WITH_NON_RAB_GSAB_ELEMENTS_KIND_BASE(V) enum ElementsKind : uint8_t { // The "fast" kind for elements that only contain SMI values. Must be first diff --git a/deps/v8/src/objects/value-serializer.cc b/deps/v8/src/objects/value-serializer.cc index def468a73920..1cbe14d654bd 100644 --- a/deps/v8/src/objects/value-serializer.cc +++ b/deps/v8/src/objects/value-serializer.cc @@ -2301,13 +2301,6 @@ MaybeDirectHandle ValueDeserializer::ReadJSArrayBufferView( break; TYPED_ARRAYS_BASE(TYPED_ARRAY_CASE) #undef TYPED_ARRAY_CASE - case ArrayBufferViewTag::kFloat16Array: { - if (i::v8_flags.js_float16array) { - external_array_type = kExternalFloat16Array; - element_size = sizeof(uint16_t); - } - break; - } } if (element_size == 0 || byte_offset % element_size != 0 || byte_length % element_size != 0) { diff --git a/deps/v8/test/cctest/test-inobject-slack-tracking.cc b/deps/v8/test/cctest/test-inobject-slack-tracking.cc index ace7c1370ad0..a74b20fa8eb1 100644 --- a/deps/v8/test/cctest/test-inobject-slack-tracking.cc +++ b/deps/v8/test/cctest/test-inobject-slack-tracking.cc @@ -1100,7 +1100,6 @@ TEST(SubclassArrayBuiltinNoInlineNew) { TEST(SubclassTypedArrayBuiltin) { - v8_flags.js_float16array = true; CcTest::InitializeVM(); v8::HandleScope scope(CcTest::isolate()); diff --git a/deps/v8/test/cctest/test-typedarrays.cc b/deps/v8/test/cctest/test-typedarrays.cc index ce256fec8f0b..40d3cdde0fc4 100644 --- a/deps/v8/test/cctest/test-typedarrays.cc +++ b/deps/v8/test/cctest/test-typedarrays.cc @@ -115,20 +115,17 @@ void TestSpeciesProtector(char* code, } UNINITIALIZED_TEST(SpeciesConstructor) { - v8_flags.js_float16array = true; char code[] = "x.constructor = MyTypedArray"; TestSpeciesProtector(code); } UNINITIALIZED_TEST(SpeciesConstructorAccessor) { - v8_flags.js_float16array = true; char code[] = "Object.defineProperty(x, 'constructor',{get() {return MyTypedArray;}})"; TestSpeciesProtector(code); } UNINITIALIZED_TEST(SpeciesModified) { - v8_flags.js_float16array = true; char code[] = "Object.defineProperty(constructor, Symbol.species, " "{value:MyTypedArray})"; @@ -136,7 +133,6 @@ UNINITIALIZED_TEST(SpeciesModified) { } UNINITIALIZED_TEST(SpeciesParentConstructor) { - v8_flags.js_float16array = true; char code[] = "constructor.prototype.constructor = MyTypedArray"; TestSpeciesProtector(code); } diff --git a/deps/v8/test/test262/testcfg.py b/deps/v8/test/test262/testcfg.py index aa93daaef0cd..07e03b07aaa9 100644 --- a/deps/v8/test/test262/testcfg.py +++ b/deps/v8/test/test262/testcfg.py @@ -59,7 +59,6 @@ 'import-attributes': '--harmony-import-attributes', 'regexp-duplicate-named-groups': '--js-regexp-duplicate-named-groups', 'regexp-modifiers': '--js-regexp-modifiers', - 'Float16Array': '--js-float16array', 'explicit-resource-management': '--js-explicit-resource-management', 'decorators': '--js-decorators', 'promise-try': '--js-promise-try', diff --git a/deps/v8/test/unittests/objects/object-unittest.cc b/deps/v8/test/unittests/objects/object-unittest.cc index 18032ea39fd9..d4421cd807d6 100644 --- a/deps/v8/test/unittests/objects/object-unittest.cc +++ b/deps/v8/test/unittests/objects/object-unittest.cc @@ -683,8 +683,6 @@ TEST_FUNCTION_KIND(IsStrictFunctionWithoutPrototype) #undef TEST_FUNCTION_KIND TEST_F(ObjectTest, ConstructorInstanceTypes) { - bool flag_was_enabled = i::v8_flags.js_float16array; - i::v8_flags.js_float16array = true; v8::HandleScope scope(isolate()); DirectHandle context = i_isolate()->native_context(); @@ -720,7 +718,6 @@ TEST_F(ObjectTest, ConstructorInstanceTypes) { break; } } - i::v8_flags.js_float16array = flag_was_enabled; } TEST_F(ObjectTest, AddDataPropertyNameCollision) { diff --git a/deps/v8/test/unittests/objects/value-serializer-unittest.cc b/deps/v8/test/unittests/objects/value-serializer-unittest.cc index ee7e8acf26db..a6ce6cee63cc 100644 --- a/deps/v8/test/unittests/objects/value-serializer-unittest.cc +++ b/deps/v8/test/unittests/objects/value-serializer-unittest.cc @@ -48,7 +48,6 @@ class ValueSerializerTest : public TestWithIsolate { protected: ValueSerializerTest() { - FLAG_SCOPE(js_float16array); Local serialization_context = Context::New(isolate()); Local deserialization_context = Context::New(isolate()); serialization_context_.Reset(isolate(), serialization_context); @@ -2083,7 +2082,6 @@ TEST_F(ValueSerializerTestWithArrayBufferTransfer, } TEST_F(ValueSerializerTest, RoundTripTypedArray) { - FLAG_SCOPE(js_float16array); // Check that the right type comes out the other side for every kind of typed // array. // TODO(v8:11111): Use API functions for testing is_length_tracking and @@ -2133,7 +2131,6 @@ TEST_F(ValueSerializerTest, RoundTripTypedArray) { } TEST_F(ValueSerializerTest, RoundTripRabBackedLengthTrackingTypedArray) { - FLAG_SCOPE(js_float16array); // Check that the right type comes out the other side for every kind of typed // array. // TODO(v8:11111): Use API functions for testing is_length_tracking and @@ -2158,7 +2155,6 @@ TEST_F(ValueSerializerTest, RoundTripRabBackedLengthTrackingTypedArray) { } TEST_F(ValueSerializerTest, RoundTripRabBackedNonLengthTrackingTypedArray) { - FLAG_SCOPE(js_float16array); // Check that the right type comes out the other side for every kind of typed // array. // TODO(v8:11111): Use API functions for testing is_length_tracking and diff --git a/lib/eslint.config_partial.mjs b/lib/eslint.config_partial.mjs index 638e60c923b7..9240b00ac709 100644 --- a/lib/eslint.config_partial.mjs +++ b/lib/eslint.config_partial.mjs @@ -412,12 +412,6 @@ export default [ name: 'SubtleCrypto', message: "Use `const { SubtleCrypto } = require('internal/crypto/webcrypto');` instead of the global.", }, - // Float16Array is not available in primordials because it can be - // disabled with --no-js-float16array CLI flag. - { - name: 'Float16Array', - message: 'Use `const { Float16Array } = globalThis;` instead of the global.', - }, // DisposableStack and AsyncDisposableStack are not available in primordials because they can be // disabled with --no-js-explicit-resource-management CLI flag. { @@ -478,6 +472,7 @@ export default [ name: 'FinalizationRegistry', into: 'Safe', }, + { name: 'Float16Array' }, { name: 'Float32Array' }, { name: 'Float64Array' }, { name: 'Function' }, diff --git a/lib/internal/freeze_intrinsics.js b/lib/internal/freeze_intrinsics.js index 05437199726c..5dd425cb0934 100644 --- a/lib/internal/freeze_intrinsics.js +++ b/lib/internal/freeze_intrinsics.js @@ -54,6 +54,8 @@ const { EvalErrorPrototype, FinalizationRegistry, FinalizationRegistryPrototype, + Float16Array, + Float16ArrayPrototype, Float32Array, Float32ArrayPrototype, Float64Array, @@ -196,6 +198,7 @@ module.exports = function() { Uint16ArrayPrototype, Int32ArrayPrototype, Uint32ArrayPrototype, + Float16ArrayPrototype, Float32ArrayPrototype, Float64ArrayPrototype, BigInt64ArrayPrototype, @@ -296,6 +299,7 @@ module.exports = function() { Uint16Array, Int32Array, Uint32Array, + Float16Array, Float32Array, Float64Array, BigInt64Array, diff --git a/lib/internal/per_context/primordials.js b/lib/internal/per_context/primordials.js index 49576c2d9497..2e610f4ab508 100644 --- a/lib/internal/per_context/primordials.js +++ b/lib/internal/per_context/primordials.js @@ -196,6 +196,7 @@ function copyPrototype(src, dest, prefix) { 'Error', 'EvalError', 'FinalizationRegistry', + 'Float16Array', 'Float32Array', 'Float64Array', 'Function', diff --git a/lib/internal/util/comparisons.js b/lib/internal/util/comparisons.js index 6b608a66733a..92594e8994fb 100644 --- a/lib/internal/util/comparisons.js +++ b/lib/internal/util/comparisons.js @@ -15,6 +15,7 @@ const { Date, DatePrototypeGetTime, Error, + Float16Array, Float32Array, Float64Array, Function, @@ -50,7 +51,6 @@ const { Uint8ClampedArray, WeakMap, WeakSet, - globalThis: { Float16Array }, } = primordials; const { compare } = internalBinding('buffer'); @@ -70,6 +70,7 @@ const wellKnownConstructors = new SafeSet() .add(DataView) .add(Date) .add(Error) + .add(Float16Array) .add(Float32Array) .add(Float64Array) .add(Function) @@ -91,10 +92,6 @@ const wellKnownConstructors = new SafeSet() .add(WeakMap) .add(WeakSet); -if (Float16Array) { // TODO(BridgeAR): Remove when Flag got removed from V8 - wellKnownConstructors.add(Float16Array); -} - const types = require('internal/util/types'); const { isAnyArrayBuffer, diff --git a/lib/v8.js b/lib/v8.js index bb174f8d5243..09a00d5321d7 100644 --- a/lib/v8.js +++ b/lib/v8.js @@ -20,6 +20,7 @@ const { BigUint64Array, DataView, Error, + Float16Array, Float32Array, Float64Array, Int16Array, @@ -32,9 +33,6 @@ const { Uint32Array, Uint8Array, Uint8ClampedArray, - globalThis: { - Float16Array, - }, } = primordials; const { Buffer } = require('buffer');