~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to tools/test-js-optimizer-asm-outline1.js

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-09-20 22:44:35 UTC
  • mfrom: (4.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20130920224435-apuwj4fsl3fqv1a6
Tags: 1.5.6~20130920~6010666-1
* New snapshot release
* Update the list of supported architectures to the same as libv8
  (Closes: #723129)
* emlibtool has been removed from upstream.
* Fix warning syntax-error-in-dep5-copyright
* Refresh of the patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function lin() {
 
2
  c(1);
 
3
  c(2);
 
4
  c(3);
 
5
  c(4);
 
6
  c(5);
 
7
  c(6);
 
8
  c(7);
 
9
  c(8);
 
10
  c(9);
 
11
  c(10);
 
12
  c(11);
 
13
  c(12);
 
14
  c(13);
 
15
  c(14);
 
16
  c(15);
 
17
  c(16);
 
18
  c(17);
 
19
  c(18);
 
20
  c(19);
 
21
  c(20);
 
22
}
 
23
function lin2() {
 
24
  while (1) {
 
25
    c(1);
 
26
    c(2);
 
27
    c(3);
 
28
    c(4);
 
29
    c(5);
 
30
    c(6);
 
31
    c(7);
 
32
    c(8);
 
33
    c(9);
 
34
    c(10);
 
35
    c(11);
 
36
    c(12);
 
37
    c(13);
 
38
    c(14);
 
39
    c(15);
 
40
    c(16);
 
41
    c(17);
 
42
    c(18);
 
43
    c(19);
 
44
    c(20);
 
45
  }
 
46
}
 
47
function lin3() {
 
48
  while (1) {
 
49
    c(1);
 
50
    c(2);
 
51
    c(3);
 
52
    c(4);
 
53
    c(5);
 
54
    c(6);
 
55
    c(7);
 
56
    c(8);
 
57
    c(9);
 
58
    c(10);
 
59
    c(11);
 
60
    c(12);
 
61
    c(13);
 
62
    c(14);
 
63
    c(15);
 
64
    c(16);
 
65
    c(17);
 
66
    c(18);
 
67
    c(19);
 
68
    c(20);
 
69
    return 10;
 
70
  }
 
71
  return 20;
 
72
}
 
73
function lin4() {
 
74
  while (1) {
 
75
    c(1);
 
76
    c(2);
 
77
    c(3);
 
78
    c(4);
 
79
    c(5);
 
80
    c(6);
 
81
    c(7);
 
82
    c(8);
 
83
    c(9);
 
84
    c(10);
 
85
    c(11);
 
86
    c(12);
 
87
    c(13);
 
88
    c(14);
 
89
    c(15);
 
90
    c(16);
 
91
    c(17);
 
92
    c(18);
 
93
    c(19);
 
94
    c(20);
 
95
    break;
 
96
  }
 
97
  return 20;
 
98
}
 
99
function lin5() {
 
100
  while (1) {
 
101
    c(1);
 
102
    c(2);
 
103
    c(3);
 
104
    c(4);
 
105
    c(5);
 
106
    c(6);
 
107
    c(7);
 
108
    c(8);
 
109
    c(9);
 
110
    c(10);
 
111
    c(11);
 
112
    c(12);
 
113
    c(13);
 
114
    c(14);
 
115
    c(15);
 
116
    c(16);
 
117
    c(17);
 
118
    c(18);
 
119
    c(19);
 
120
    c(20);
 
121
    continue;
 
122
  }
 
123
  return 20;
 
124
}
 
125
function mix() {
 
126
  main: while (1) {
 
127
    c(1);
 
128
    c(2);
 
129
    c(3);
 
130
    c(4);
 
131
    c(5);
 
132
    c(6);
 
133
    c(7);
 
134
    c(8);
 
135
    c(9);
 
136
    c(10);
 
137
    c(11);
 
138
    c(12);
 
139
    c(13);
 
140
    c(14);
 
141
    c(15);
 
142
    c(16);
 
143
    c(17);
 
144
    break main;
 
145
    c(18);
 
146
    break;
 
147
    while (1) {
 
148
      break; // no need to forward
 
149
    }
 
150
    inner: while (1) {
 
151
      break inner; // no need to forward
 
152
    }
 
153
    c(19);
 
154
    continue;
 
155
    c(20);
 
156
    continue main;
 
157
  }
 
158
  return 20;
 
159
}
 
160
function vars(x, y) {
 
161
  x = x | 0;
 
162
  y = +y;
 
163
  var a = 0, b = +0;
 
164
  a = x+y;
 
165
  b = y*x;
 
166
  c(1+a);
 
167
  c(2+b);
 
168
  c(3+a);
 
169
  c(4+b);
 
170
  c(5+a);
 
171
  c(6+b);
 
172
  c(7+a);
 
173
  c(8+b);
 
174
}
 
175
function vars2(x, y) {
 
176
  x = x | 0;
 
177
  y = +y;
 
178
  var a = 0, b = +0;
 
179
  a = x+y;
 
180
  b = y*x;
 
181
  a = c(1+a);
 
182
  b = c(2+b);
 
183
  a = c(3+a);
 
184
  b = c(4+b);
 
185
  a = c(5+a);
 
186
  b = c(6+b);
 
187
}
 
188
function vars3(x, y) {
 
189
  x = x | 0;
 
190
  y = +y;
 
191
  var a = 0, b = +0;
 
192
  a = x+y;
 
193
  b = y*x;
 
194
  a = c(1+a);
 
195
  a = c(2+b);
 
196
  a = c(3+a);
 
197
  a = c(4+b);
 
198
  a = c(5+a);
 
199
  a = c(6+b);
 
200
  a = c(7+a);
 
201
}
 
202
function vars4(x, y) {
 
203
  x = x | 0;
 
204
  y = +y;
 
205
  var a = 0, b = +0;
 
206
  a = x+y;
 
207
  b = y*x;
 
208
  a = c(1+a);
 
209
  a = c(2+a);
 
210
  a = c(3+a);
 
211
  a = c(4+a);
 
212
  a = c(5+a);
 
213
  a = c(6+a);
 
214
  b = c(7+a+x);
 
215
}
 
216
function vars_w_stack(x, y) {
 
217
  x = x | 0;
 
218
  y = +y;
 
219
  var a = 0, b = +0, sp = 0;
 
220
  sp = STACKTOP;
 
221
  STACKTOP = STACKTOP + 16 | 0;
 
222
  a = x+y;
 
223
  b = y*x;
 
224
  a = c(1+a);
 
225
  a = c(2+a);
 
226
  a = c(3+a);
 
227
  a = c(4+a);
 
228
  a = c(5+a);
 
229
  a = c(6+a);
 
230
  b = c(7+a);
 
231
  STACKTOP = sp;
 
232
}
 
233
function chain() {
 
234
  if (x == 1) {
 
235
    print(1);
 
236
  } else if (x == 2) {
 
237
    print(2);
 
238
  } else if (x == 3) {
 
239
    print(3);
 
240
  } else if (x == 4) {
 
241
    print(4);
 
242
  } else if (x == 5) {
 
243
    print(5);
 
244
  } else if (x == 6) {
 
245
    print(6);
 
246
  } else if (x == 7) {
 
247
    print(7);
 
248
  } else if (x == 8) {
 
249
    print(8);
 
250
  } else if (x == 9) {
 
251
    print(9);
 
252
  } else if (x == 10) {
 
253
    print(10);
 
254
  } else if (x == 11) {
 
255
    print(11);
 
256
  } else if (x == 12) {
 
257
    print(12);
 
258
  } else {
 
259
    print(99);
 
260
  }
 
261
}
 
262
function switchh() {
 
263
  switch (x) {
 
264
    case 0: {
 
265
      f(0);
 
266
      g();
 
267
      break;
 
268
    }
 
269
    case 1: {
 
270
      f(1);
 
271
      g();
 
272
      return;
 
273
    }
 
274
    case 2: {
 
275
      f(2);
 
276
      g();
 
277
      break;
 
278
    }
 
279
    case 21: // gotta keem em unseparated
 
280
    case 22:
 
281
    case 23:
 
282
    case 24:
 
283
    case 25:
 
284
    case 26:
 
285
    case 27:
 
286
    case 28:
 
287
    case 29:
 
288
    case 3: { // these too
 
289
      f(3);
 
290
      g();
 
291
      break;
 
292
    }
 
293
    case 4: {
 
294
      f(4);
 
295
      g();
 
296
    }
 
297
    case 5: {
 
298
      f(5);
 
299
      g();
 
300
    }
 
301
    case 6: {
 
302
      f(6);
 
303
      g();
 
304
    }
 
305
    default: {
 
306
      print(9);
 
307
    }
 
308
  }
 
309
}
 
310
function switchh2() {
 
311
  while (1) switch (x) {
 
312
    case 0:
 
313
      f(0);
 
314
      g();
 
315
      break;
 
316
    case 1:
 
317
      f(1);
 
318
      g();
 
319
      return;
 
320
    case 2:
 
321
      f(2);
 
322
      g();
 
323
      break;
 
324
    case 21: // gotta keem em unseparated
 
325
    case 22:
 
326
    case 23:
 
327
    case 24:
 
328
    case 25:
 
329
    case 26:
 
330
    case 27:
 
331
    case 28:
 
332
    case 29:
 
333
    case 3: // these too
 
334
      f(3);
 
335
      g();
 
336
      break;
 
337
    case 4:
 
338
      f(4);
 
339
      g();
 
340
    case 5:
 
341
      f(5);
 
342
      g();
 
343
    case 6:
 
344
      f(6);
 
345
      g();
 
346
    default:
 
347
      print(9);
 
348
  }
 
349
}
 
350
// EMSCRIPTEN_GENERATED_FUNCTIONS
 
351
// EXTRA_INFO: { "sizeToOutline": 30, "allowCostlyOutlines": 1 }