summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/baseline/arraySubclassPropertyLookup.js
blob: 62b339f54f2d8819cd1a9db02d385f159fe7e393 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function f(v, expected) {
  assertEq(v.prop, expected);
};

class SubArrayA extends Array {
}
class SubArrayB extends Array {
}
SubArrayA.prototype.prop = "A";
SubArrayB.prototype.prop = "B";

var a = new SubArrayA();
var b = new SubArrayB();
for (let i = 0; i < 10; i++) {
  f(a, "A");
  f(b, "B");
}