Debian Codegraph @

js/src/jit-test/tests/class/superElemMegamorphic.js

raw
1 class C { };
2 C.prototype.a = "a";
3 C.prototype.b = "b";
4 C.prototype.c = "c";
5 C.prototype.d = "d";
6 C.prototype.e = "e";
7 C.prototype.f = "f";
8 C.prototype.g = "g";
9 C.prototype.h = "h";
10 C.prototype.i = "i";
11 C.prototype.j = "j";
12 C.prototype.k = "k";
13 C.prototype.l = "l";
14 C.prototype.m = "m";
15 C.prototype.n = "n";
16 C.prototype.o = "o";
17 C.prototype.p = "p";
18 C.prototype.q = "q";
19 C.prototype.r = "r";
20
21 class D extends C {
22 foo(p) {
23 return super[p];
24 }
25 }
26
27 var d = new D();
28
29 for (let i = 0; i < 20; ++i) {
30 for (let p in C.prototype) {
31 assertEq(p, d.foo(p));
32 }
33 }