tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

bug1852893-2.js (607B)


      1 // |jit-test| --fast-warmup; --no-threads; --blinterp-eager
      2 
      3 function foo(o) {
      4  return foo_inner(o);
      5 }
      6 
      7 function foo_inner(o) {
      8  return o.x;
      9 }
     10 
     11 function bar(n) {
     12  with ({}) {}
     13  class C {}
     14  for (var i = 0; i < n; i++) {
     15    var c = new C();
     16    c.x = 0;
     17    foo(c);
     18  }
     19 }
     20 
     21 with ({}) {}
     22 
     23 function triggerIonCompile() {
     24  for (var i = 0; i < 10; i++) {
     25    bar(3);
     26  }
     27 }
     28 
     29 triggerIonCompile();
     30 
     31 // Fill up shape list
     32 for (var i = 0; i < 6; i++) {
     33  bar(10);
     34 }
     35 
     36 // Overflow shape list, adding a new baseline IC.
     37 bar(10);
     38 
     39 // Purge a stub inside a monomorphically-inlined script.
     40 gc();
     41 
     42 triggerIonCompile();