summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/pic/self2.js
blob: 146771c672c0da1ec5e53e89200461ff79137b6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// getprop, self, 2 shapes

var expected = "22,303,22,303,22,303,22,303,";
var actual = '';

function f() {
  var o1 = { a: 11, b: 22, c: 33 };
  var o2 = { x: 101, y: 202, b: 303 };
  var oa = [ o1, o2 ];

  for (var i = 0; i < 8; ++i) {
    actual += oa[i%2].b + ',';
  }
}

f();

assertEq(actual, expected);