Bug 1357330 - Add test case. r=shu
authorAndré Bargull <andre.bargull@gmail.com>
Wed, 19 Apr 2017 05:42:25 -0700
changeset 412746 da5a14ae4ce3084aa63a502e96af1a4c6ef76853
parent 412745 76bff2cde94c44b7bd1c3d2ce847db095175577f
child 412747 275588f4d852d7dc183a9dcc70a311413dc7a063
child 412774 b393ec48b4d01e83c5eae7234542d51fc169d7db
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersshu
bugs1357330
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1357330 - Add test case. r=shu
js/src/jit-test/tests/auto-regress/bug1357330.js
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/auto-regress/bug1357330.js
@@ -0,0 +1,17 @@
+function byteValue(value) {
+  var isLittleEndian = new Uint8Array(new Uint16Array([1]).buffer)[0] !== 0;
+  var ui8 = new Uint8Array(new Float64Array([value]).buffer);
+
+  var hex = "0123456789ABCDEF";
+  var s = "";
+  for (var i = 0; i < 8; ++i) {
+    var v = ui8[isLittleEndian ? 7 - i : i];
+    s += hex[(v >> 4) & 0xf] + hex[v & 0xf];
+  }
+  return s;
+}
+
+var obj = {};
+Object.defineProperty(obj, "prop", {value: NaN});
+Object.defineProperty(obj, "prop", {value: -NaN});
+assertEq(byteValue(obj.prop), byteValue(NaN));