• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2015 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5var if0 = (function Module() {
6  "use asm";
7  function if0(i, j) {
8    i = i|0;
9    j = j|0;
10    if (i == 0 ? j == 0 : 0) return 1;
11    return 0;
12  }
13  return {if0: if0};
14})().if0;
15assertEquals(1, if0(0, 0));
16assertEquals(0, if0(11, 0));
17assertEquals(0, if0(0, -1));
18assertEquals(0, if0(-1024, 1));
19
20
21var if1 = (function Module() {
22  "use asm";
23  function if1(i, j) {
24    i = i|0;
25    j = j|0;
26    if (i == 0 ? j == 0 : 1) return 0;
27    return 1;
28  }
29  return {if1: if1};
30})().if1;
31assertEquals(0, if1(0, 0));
32assertEquals(0, if1(11, 0));
33assertEquals(1, if1(0, -1));
34assertEquals(0, if1(-1024, 9));
35