Debian Codegraph @

js/src/jit-test/tests/baseline/arraySubclassPropertyLookup.js

raw
1 function f(v, expected) {
2 assertEq(v.prop, expected);
3 };
4
5 class SubArrayA extends Array {
6 }
7 class SubArrayB extends Array {
8 }
9 SubArrayA.prototype.prop = "A";
10 SubArrayB.prototype.prop = "B";
11
12 var a = new SubArrayA();
13 var b = new SubArrayB();
14 for (let i = 0; i < 10; i++) {
15 f(a, "A");
16 f(b, "B");
17 }