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

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-02 13:11:51 UTC
  • Revision ID: package-import@ubuntu.com-20130502131151-q8dvteqr1ef2x7xz
Tags: upstream-1.4.1~20130504~adb56cb
ImportĀ upstreamĀ versionĀ 1.4.1~20130504~adb56cb

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function a() {
 
2
  f((HEAPU8[10202] | 0) + 5 | 0);
 
3
  f((HEAPU8[10202] | 0) | 0);
 
4
  f(347 | 0);
 
5
  f(347 | 12);
 
6
  f(347 & 12);
 
7
  HEAP[4096 >> 2] = 5;
 
8
  HEAP[(4096 & 8191) >> 2] = 5;
 
9
  whee(12, 13) | 0;
 
10
  +whee(12, 13);
 
11
}
 
12
function b($this, $__n) {
 
13
  $this = $this | 0;
 
14
  $__n = $__n | 0;
 
15
  var $4 = 0, $5 = 0, $10 = 0, $13 = 0, $14 = 0, $15 = 0, $23 = 0, $30 = 0, $38 = 0, $40 = 0;
 
16
  if (($__n | 0) == 0) {
 
17
    return;
 
18
  }
 
19
  $4 = $this;
 
20
  $5 = HEAP8[$4 & 16777215] | 0;
 
21
  if (($5 & 1) << 24 >> 24 == 0) {
 
22
    $14 = 10;
 
23
    $13 = $5;
 
24
  } else {
 
25
    $10 = HEAP32[(($this | 0) & 16777215) >> 2] | 0;
 
26
    $14 = ($10 & -2) - 1 | 0;
 
27
    $13 = $10 & 255;
 
28
  }
 
29
  $15 = $13 & 255;
 
30
  if (($15 & 1 | 0) == 0) {
 
31
    $23 = $15 >>> 1;
 
32
  } else {
 
33
    $23 = HEAP32[(($this + 4 | 0) & 16777215) >> 2] | 0;
 
34
  }
 
35
  if (($14 - $23 | 0) >>> 0 < $__n >>> 0) {
 
36
    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEjjjjjj($this, $14, ($__n - $14 | 0) + $23 | 0, $23, $23);
 
37
    $30 = HEAP8[$4 & 16777215] | 0;
 
38
  } else {
 
39
    $30 = $13;
 
40
  }
 
41
  if (($30 & 1) << 24 >> 24 == 0) {
 
42
    $38 = $this + 1 | 0;
 
43
  } else {
 
44
    $38 = HEAP32[(($this + 8 | 0) & 16777215) >> 2] | 0;
 
45
  }
 
46
  _memset($38 + $23 | 0 | 0 | 0, 0 | 0 | 0, $__n | 0 | 0, 1 | 0 | 0, 1213141516);
 
47
  $40 = $23 + $__n | 0;
 
48
  if (((HEAP8[$4 & 16777215] | 0) & 1) << 24 >> 24 == 0) {
 
49
    HEAP8[$4 & 16777215] = $40 << 1 & 255;
 
50
  } else {
 
51
    HEAP32[(($this + 4 | 0) & 16777215) >> 2] = $40;
 
52
  }
 
53
  HEAP8[($38 + $40 | 0) & 16777215] = 0;
 
54
  return;
 
55
}
 
56
function rett() {
 
57
  if (f()) {
 
58
    g();
 
59
    return 5;
 
60
  }
 
61
  // missing final return, need to add it
 
62
}
 
63
function ret2t() {
 
64
  if (f()) {
 
65
    g();
 
66
    return;
 
67
  }
 
68
  // missing final return, but no need
 
69
}
 
70
function retf() {
 
71
  if (f()) {
 
72
    g();
 
73
    return +h();
 
74
  }
 
75
  // missing final return, need it as a float
 
76
}
 
77
function i32_8() {
 
78
  if (((HEAP8[$4 & 16777215] | 0) << 24 >> 24) == 0) {
 
79
    print(5);
 
80
  }
 
81
  if ((HEAP8[$5 & 16777215] << 24 >> 24) == 0) {
 
82
    print(5);
 
83
  }
 
84
  if (((HEAPU8[$6 & 16777215] | 0) << 24 >> 24) == 0) {
 
85
    print(5);
 
86
  }
 
87
  if ((HEAPU8[$7 & 16777215] << 24 >> 24) == 0) {
 
88
    print(5);
 
89
  }
 
90
  // non-valid
 
91
  if ((HEAPU8[$8 & 16777215] << 24 >> 16) == 0) {
 
92
    print(5);
 
93
  }
 
94
  if ((HEAPU8[$9 & 16777215] << 16 >> 16) == 0) {
 
95
    print(5);
 
96
  }
 
97
}
 
98
// EMSCRIPTEN_GENERATED_FUNCTIONS: ["a", "b", "rett", "ret2t", "retf", "i32_8"]