aboutsummaryrefslogtreecommitdiff
path: root/tools/test-js-optimizer-asm-last.js
blob: 05e1049ee77945a4282d5348e5bd4ffe21af9300 (plain)
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
84
85
86
87
88
89
90
function finall(x) {
 x = +x;
 var a = +5;
 a = +x;
 a = 17;
 a = +44;
 a = +44.0;
 a = +44.9;
 a = +12.78e5;
 a = +12e10;
 a = -x;
 a = -17;
 a = -44;
 a = -44.0;
 a = -44.9;
 a = -12.78e5;
 a = -12e10;
 a = +-x;
 a = +-17;
 a = +-44;
 a = +-44.0;
 a = +-44.9;
 a = +-12.78e5;
 a = +-12e10;
 a = +0x8000000000000000;
 a = +-0x8000000000000000;
 a = -+0x8000000000000000;
 a = -0x8000000000000000;
 a = +0xde0b6b000000000;
 a = +-0xde0b6b000000000;
 a = -+0xde0b6b000000000;
 a = -0xde0b6b000000000;
 return +12e10;
}
function looop() {
 while (1) {
  do_it();
  if (condition()) {
   break;
  }
 }
 while (1) {
  do_it();
  if (a > b) {
   break;
  }
 }
 while (1) {
  do_it();
  if (!x()) {
   break;
  }
 }
 while (1) {
  do_it();
  if (a()) continue; // we cannot move to do-while, continue will hit the while check
  if (!x()) {
   break;
  }
 }
 while (1) {
  do_it();
  do {
    if (a()) continue; // ok to optimize, continue is not for us
  } while (b());
  if (!x()) {
   break;
  }
 }
 while (1) {
  do_it();
  while (b()) {
    if (a()) continue; // also ok to optimize, continue is not for us
  }
  if (!x()) {
   break;
  }
 }
 X: while (1) {
  do_it();
  while (b()) {
    if (a()) continue X; // not ok to optimize
  }
  if (!x()) {
   break;
  }
 }
}
// EMSCRIPTEN_GENERATED_FUNCTIONS: ["finall", "looop"]