tor-browser

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

scalar-replace-array-apply-array-02.js (299B)


      1 function foo(...args) {
      2  args[0] = 3;
      3  return bar.apply({}, args);
      4 }
      5 
      6 // |foo| must be small enough to be inlinable.
      7 assertEq(isSmallFunction(foo), true);
      8 
      9 function bar(x, y) {
     10  return x + y;
     11 }
     12 
     13 with ({}) {}
     14 
     15 var sum = 0;
     16 for (var i = 0; i < 100; i++) {
     17  sum += foo(1, 2);
     18 }
     19 assertEq(sum, 500);