summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/TypedArray/shell.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/non262/TypedArray/shell.js')
-rw-r--r--js/src/tests/non262/TypedArray/shell.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/src/tests/non262/TypedArray/shell.js b/js/src/tests/non262/TypedArray/shell.js
index 2fb0ab8f1d..b31fa70f59 100644
--- a/js/src/tests/non262/TypedArray/shell.js
+++ b/js/src/tests/non262/TypedArray/shell.js
@@ -2,7 +2,7 @@
"use strict";
const {
- Float32Array, Float64Array, Object, Reflect, SharedArrayBuffer, WeakMap,
+ Float16Array, Float32Array, Float64Array, Object, Reflect, SharedArrayBuffer, WeakMap,
assertEq
} = global;
const {
@@ -69,7 +69,7 @@
Uint32Array,
Float32Array,
Float64Array,
- ]);
+ ].concat(Float16Array ?? []));
/**
* All TypedArray constructors for shared memory.
@@ -97,13 +97,13 @@
/**
* Returns `true` if `constructor` is a TypedArray constructor for shared
- * or unshared memory, with an underlying element type of either Float32 or
- * Float64.
+ * or unshared memory, with an underlying element type of one of Float16, Float32
+ * or Float64.
*/
function isFloatConstructor(constructor) {
if (isSharedConstructor(constructor))
constructor = Reflect_apply(WeakMap_prototype_get, sharedConstructors, [constructor]);
- return constructor == Float32Array || constructor == Float64Array;
+ return constructor == Float32Array || constructor == Float64Array || (Float16Array && constructor == Float16Array);
}
global.typedArrayConstructors = typedArrayConstructors;