src: enable Float16Array on global object

This feature is enabled in stable Chrome 136 but not in V8 by
default.

PR-URL: https://github.com/nodejs/node/pull/58154
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
This commit is contained in:
Michaël Zasso 2025-05-05 01:00:56 +02:00 committed by Antoine du Hamel
parent 8ed450b6bb
commit f75a1265a8
No known key found for this signature in database
GPG key ID: 21D900FFDB233756
3 changed files with 2 additions and 6 deletions

View file

@ -848,6 +848,7 @@ static ExitCode InitializeNodeWithArgsInternal(
// These features are completed and enabled by default in Chrome, but not
// in V8.
V8::SetFlagsFromString("--js-explicit-resource-management");
V8::SetFlagsFromString("--js-float16array");
#if defined(NODE_V8_OPTIONS)
// Should come before the call to V8::SetFlagsFromCommandLine()

View file

@ -33,6 +33,7 @@ const intrinsics = new Set([
'Int8Array',
'Uint16Array',
'Int16Array',
'Float16Array',
'Uint32Array',
'Int32Array',
'Float32Array',

View file

@ -70,12 +70,6 @@
"requires": ["full-icu"]
},
"encodeInto.any.js": {
"fail": {
"expected": [
"Invalid encodeInto() destination: Float16Array, backed by: ArrayBuffer",
"Invalid encodeInto() destination: Float16Array, backed by: SharedArrayBuffer"
]
},
"requires": ["small-icu"]
},
"textdecoder-copy.any.js": {