summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug882323.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/ion/bug882323.js')
-rw-r--r--js/src/jit-test/tests/ion/bug882323.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/ion/bug882323.js b/js/src/jit-test/tests/ion/bug882323.js
new file mode 100644
index 000000000..010e8e733
--- /dev/null
+++ b/js/src/jit-test/tests/ion/bug882323.js
@@ -0,0 +1,23 @@
+var ints = new Int8Array(16);
+ints[0] = 42;
+function intElementAt(index) {
+ return ints[index];
+}
+assertEq(intElementAt(16), undefined);
+assertEq(intElementAt(0), 42);
+
+var floats = new Float64Array(16);
+floats[0] = 3.14;
+function floatElementAt(index) {
+ return floats[index];
+}
+assertEq(floatElementAt(16), undefined);
+assertEq(floatElementAt(0), 3.14);
+
+var uints = new Uint32Array(16);
+uints[0] = 123;
+function uintElementAt(index) {
+ return uints[index];
+}
+assertEq(uintElementAt(16), undefined);
+assertEq(uintElementAt(0), 123);