Debian Codegraph @

js/src/jit-test/tests/ion/nursery-getter-setter.js

raw
1 var threshold = getJitCompilerOptions()["ion.warmup.trigger"] + 101;
2 function bar(i) {
3 if (!i)
4 with (this) {}; // Don't inline.
5 if (i === threshold)
6 minorgc();
7 }
8
9 function f() {
10 var o2 = Object.create({get foo() { return this.x; }, set foo(x) { this.x = x + 1; }});
11 for (var i=0; i<2000; i++) {
12 o2.foo = i;
13 assertEq(o2.foo, i + 1);
14 bar(i);
15 }
16 }
17 f();