tor-browser

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

scalar-replace-array-apply-array-04.js (357B)


      1 var result;
      2 
      3 function g(a, b) {
      4  with ({}) {}
      5  result = a + b;
      6 }
      7 
      8 function escape() { with({}) {} }
      9 
     10 function f(...args) {
     11  escape(args);
     12  for (var i = 0; i < 50; ++i) {
     13    g.apply(this, args);
     14  }
     15 }
     16 
     17 // |f| must be small enough to be inlinable.
     18 assertEq(isSmallFunction(f), true);
     19 
     20 f(1, 2);
     21 assertEq(result, 3);
     22 
     23 f("");
     24 assertEq(result, "undefined");