summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/cacheir/store-typed-element-constant-double-rhs.js
blob: a084a733f9dc547462ab49d9205ec889e6be9cc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Different typed array types to ensure we emit a SetProp IC.
var xs = [
  new Float32Array(10),
  new Float64Array(10),
];

for (var i = 0; i < 100; ++i) {
  var ta = xs[i & 1];

  // Store with constant rhs.
  ta[0] = 0.1;
}

assertEq(xs[0][0], Math.fround(0.1));
assertEq(xs[1][0], 0.1);