summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/lib/andTestHelper.js
blob: 8e89a399ae5de620477ac5e49cf7f89322135304 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

function andTestHelper(a, b, n)
{
  var k = 0;
  for (var i = 0; i < n; i++) {
    if (a && b)
      k += i;
  }
  return k;
}