File: ecba8fb326c2c985.js

package info (click to toggle)
js-of-ocaml 5.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 32,020 kB
  • sloc: ml: 91,250; javascript: 57,289; ansic: 315; makefile: 271; lisp: 23; sh: 6; perl: 4
file content (41 lines) | stat: -rw-r--r-- 475 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
var a, b, c, d, e;
// compress these
if (b) {
    a = 1+2;
} else {
    a = 3;
}

if (b) {
    a = 4+5;
} else if (c) {
    a = 6;
} else {
    a = 7-8;
}

a = b ? 'f' : 'g'+'h';

a = b ? 'f' : b ? 'f' : 'g'+'h';

// Compress conditions that have side effects
if (i()) {
    a = 9+10;
} else {
    a = 11;
}

if (c) {
    a = 'j';
} else if (i()) {
    a = 'k'+'l';
} else {
    a = 'j';
}

a = i() ? 'm' : 'f'+'n';

// don't compress these
a = b ? d : e;

a = b ? 'f' : 'g';