mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-21 00:38:56 +00:00
LibWeb: Add builtin Float16Array type and remove related FIXME
This commit is contained in:
parent
ea20545853
commit
9ee7d4d90a
Notes:
github-actions[bot]
2024-11-10 21:49:14 +00:00
Author: https://github.com/rmg-x
Commit: 9ee7d4d90a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2184
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/trflynn89
3 changed files with 3 additions and 2 deletions
|
@ -121,6 +121,7 @@ static bool is_javascript_builtin(Type const& type)
|
|||
// might simply need to add another type here.
|
||||
static constexpr Array types = {
|
||||
"ArrayBuffer"sv,
|
||||
"Float16Array"sv,
|
||||
"Float32Array"sv,
|
||||
"Float64Array"sv,
|
||||
"Uint8Array"sv,
|
||||
|
@ -1256,7 +1257,7 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter
|
|||
// 1. If types includes a typed array type whose name is the value of V’s [[TypedArrayName]] internal slot, then return the result of converting V to that type.
|
||||
// 2. If types includes object, then return the IDL value that is a reference to the object V.
|
||||
auto has_typed_array_name = any_of(types, [](auto const& type) {
|
||||
return type->name().is_one_of("Int8Array"sv, "Int16Array"sv, "Int32Array"sv, "Uint8Array"sv, "Uint16Array"sv, "Uint32Array"sv, "Uint8ClampedArray"sv, "BigInt64Array"sv, "BigUint64Array", "Float32Array"sv, "Float64Array"sv);
|
||||
return type->name().is_one_of("Int8Array"sv, "Int16Array"sv, "Int32Array"sv, "Uint8Array"sv, "Uint16Array"sv, "Uint32Array"sv, "Uint8ClampedArray"sv, "BigInt64Array"sv, "BigUint64Array", "Float16Array"sv, "Float32Array"sv, "Float64Array"sv);
|
||||
});
|
||||
|
||||
if (has_typed_array_name || includes_object) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue