Skip to content

Commit ca9d63d

Browse files
authored
Add Float16Array
The Float16Array proposal for JavaScript adds a new TypedArray type holding IEEE binary16 floats. This change adds it to all of the lists of IDL TypedArray types. Tests: web-platform-tests/wpt#45483. Fixes #1310.
1 parent 402a886 commit ca9d63d

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

index.bs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,16 @@ urlPrefix: https://tc39.es/proposal-resizablearraybuffer/; spec: RESIZABLE-BUFFE
7474
text: IsResizableArrayBuffer; url: sec-isresizablearraybuffer
7575
</pre>
7676

77+
<pre class=biblio>
78+
{
79+
"PROPOSAL-FLOAT16ARRAY": {
80+
"publisher": "Ecma",
81+
"href": "https://tc39.es/proposal-float16array/",
82+
"title": "Proposal to add float16 TypedArrays to JavaScript"
83+
}
84+
}
85+
</pre>
86+
7787
<style>
7888
pre.set {
7989
font-size: 80%;
@@ -5597,6 +5607,7 @@ The <dfn id="dfn-typed-array-type" export>typed array types</dfn> are
55975607
{{Uint8ClampedArray}},
55985608
{{BigInt64Array}},
55995609
{{BigUint64Array}},
5610+
{{Float16Array}},
56005611
{{Float32Array}}, and
56015612
{{Float64Array}}.
56025613

@@ -6485,9 +6496,11 @@ data. The table below lists these types and the kind of buffer or view they repr
64856496
<tr>
64866497
<td><dfn id="idl-Uint8ClampedArray" interface>Uint8ClampedArray</dfn>
64876498
<td>A view on to a [=buffer type=] instance that exposes it as an array of unsigned 8-bit integers with clamped conversions
6499+
<tr>
6500+
<td><dfn id="idl-Float16Array" interface>Float16Array</dfn>
6501+
<td rowspan=3>A view on to a [=buffer type=] instance that exposes it as an array of IEEE 754 floating point numbers of the given size in bits; Float16Array corresponds to the ECMAScript proposal [[PROPOSAL-FLOAT16ARRAY]].
64886502
<tr>
64896503
<td><dfn id="idl-Float32Array" interface>Float32Array</dfn>
6490-
<td rowspan=2>A view on to a [=buffer type=] instance that exposes it as an array of IEEE 754 floating point numbers of the given size in bits
64916504
<tr>
64926505
<td><dfn id="idl-Float64Array" interface>Float64Array</dfn>
64936506
</table>
@@ -6514,6 +6527,7 @@ in [[#js-buffer-source-types]].
65146527
"Uint8ClampedArray"
65156528
"BigInt64Array"
65166529
"BigUint64Array"
6530+
"Float16Array"
65176531
"Float32Array"
65186532
"Float64Array"
65196533
</pre>
@@ -8807,7 +8821,8 @@ class, with the following additional restrictions on those objects.
88078821
{{Uint8ClampedArray}},
88088822
{{BigInt64Array}},
88098823
{{BigUint64Array}},
8810-
{{Float32Array}} or
8824+
{{Float16Array}},
8825+
{{Float32Array}}, or
88118826
{{Float64Array}} value
88128827
by running the following algorithm:
88138828

@@ -14666,7 +14681,7 @@ must support.
1466614681
typedef (Int8Array or Int16Array or Int32Array or
1466714682
Uint8Array or Uint16Array or Uint32Array or Uint8ClampedArray or
1466814683
BigInt64Array or BigUint64Array or
14669-
Float32Array or Float64Array or DataView) ArrayBufferView;
14684+
Float16Array or Float32Array or Float64Array or DataView) ArrayBufferView;
1467014685
</pre>
1467114686

1467214687
The {{ArrayBufferView}} typedef is used to represent

0 commit comments

Comments
 (0)