forked from emscripten-core/emscripten
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAJSDCE.js
More file actions
61 lines (53 loc) · 856 Bytes
/
AJSDCE.js
File metadata and controls
61 lines (53 loc) · 856 Bytes
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
// all unused
var x;
var y = 1;
var z = fleefl();
var xx, yy = 1, zz = fleefl(); // but zz must remain due to the side effects in the value
function f(x, y, z) {
// shadow the x,y,z
x = y;
y = z;
}
// exported
function g(a) {
return a+1;
}
Module['g'] = g;
// used
function h(a) {
var t; // unused
return a+1;
}
print(h(123));
// inner workings
(function() {
var x;
var y = 1;
var z = fleefl();
var xx, yy = 1, zz = fleefl();
function f(x, y, z) {
// shadow the x,y,z
x = y;
y = z;
}
// exported
function g(a) {
return a+1;
}
Module['g'] = g;
// used
function hh(a) {
var t; // unused
return a+1;
}
print(hh(123));
})();
function glue() {
function lookup() { // 2 passes needed for this one
throw 1;
}
function removable() { // first remove this
lookup();
}
}
glue();