-
Notifications
You must be signed in to change notification settings - Fork 3.4k
/
Copy pathtest-js-optimizer.js
84 lines (83 loc) · 1.81 KB
/
test-js-optimizer.js
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
var c;
var b = 5, x = void 0, y = null, t = !0;
var s = !1, s2 = !1, s3 = !0;
var block = [x];
function abc() {
var cheez = [x];
var fleefl;
cheez = 10;
fleefl = x;
fleefl = cheez = x;
var waka = x, flake = x, marfoosh = x;
var waka2 = 5, flake2 = x, marfoosh2 = x;
var waka3 = x, flake3 = 5, marfoosh3 = x;
var waka4 = x, flake4 = x, marfoosh4 = 5;
var test1 = t, test2 = s, test3 = y, test4 = z, test5 = b, test6 = x;
s3 = 9;
}
function xyz() {
var x = 52;
var cheez = x;
var t = 22;
function inner1(c) {
var i = x, j = y, k = 5, l = t, m = s2;
var s2 = 8;
}
var inner2 = function(d) {
var i = x, j = y, k = 5, l = t, m = s2;
var s2 = 8;
};
var patama = s3;
}
function xyz2(x) {
var cheez = x;
}
zzz = function(nada) {
var cheez = x;
};
function expr() {
if (!($0 < $1)) print("hi");
}
function loopy() {
$while_body$2: while(1) {
$ok=1;
$for_cond$4: while(1) {
if ($ok) break $for_cond$4;
var $inc=$ok+1;
if ($inc == 9999) break $while_body$2; // this forces a label to remain on the outer loop
}
continue $while_body$2;
}
next();
b$while_body$2: while(1) {
$ok=1;
b$for_cond$4: while(1) {
if ($ok) break b$for_cond$4;
var $inc=$ok+1;
}
continue b$while_body$2;
}
next();
$once: do {
if (!$ok) break $once; // forces the entire one-time do to remain (but unlabelled)
something();
} while(0);
next();
b$once: do {
while (more()) {
if (!$ok) break b$once; // forces the entire one-time do to remain, with label
}
something();
} while(0);
next();
c$once: do {
something();
} while(0);
}
function ignoreLoopy() {
b$for_cond$4: while(1) {
if ($ok) break b$for_cond$4;
var $inc=$ok+1;
}
}
// EMSCRIPTEN_GENERATED_FUNCTIONS: ["abc", "xyz", "xyz2", "expr", "loopy"]