diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-07-21 10:33:44 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-07-21 10:33:44 -0700 |
commit | b11c3d7d5326bdbad7624e75a8bedfd8ade55a27 (patch) | |
tree | be1be99fd039eef443374eeb9cdfa651b5150e97 /tools/test-js-optimizer-asm-outline1-output.js | |
parent | 0902d6c3707d3350f40a35ed04a9eb125f36fad5 (diff) |
fix semantics of control variable handling in outlining: zero out when calling outlined funcitons, and right after using the value, so that we can handle nested outlined calls
Diffstat (limited to 'tools/test-js-optimizer-asm-outline1-output.js')
-rw-r--r-- | tools/test-js-optimizer-asm-outline1-output.js | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/tools/test-js-optimizer-asm-outline1-output.js b/tools/test-js-optimizer-asm-outline1-output.js index 9f4790de..6ef32f54 100644 --- a/tools/test-js-optimizer-asm-outline1-output.js +++ b/tools/test-js-optimizer-asm-outline1-output.js @@ -48,9 +48,14 @@ function lin3() { HEAP32[sp + 0 >> 2] = 0; HEAP32[sp + 8 >> 2] = 0; sp = lin3$0(sp) | 0; - if ((HEAP32[sp + 0 >> 2] | 0) == 6) { + tempValue = HEAP32[sp + 0 >> 2] | 0; + tempInt = HEAP32[sp + 8 >> 2] | 0; + tempDouble = +HEAPF32[sp + 8 >> 2]; + HEAP32[sp + 0 >> 2] = 0; + HEAP32[sp + 8 >> 2] = 0; + if ((tempValue | 0) == 6) { STACKTOP = sp; - return HEAP32[sp + 8 >> 2] | 0; + return tempInt | 0; } } STACKTOP = sp; @@ -71,7 +76,12 @@ function lin4() { HEAP32[sp + 0 >> 2] = 0; HEAP32[sp + 8 >> 2] = 0; sp = lin4$0(sp) | 0; - if ((HEAP32[sp + 0 >> 2] | 0) == 1) { + tempValue = HEAP32[sp + 0 >> 2] | 0; + tempInt = HEAP32[sp + 8 >> 2] | 0; + tempDouble = +HEAPF32[sp + 8 >> 2]; + HEAP32[sp + 0 >> 2] = 0; + HEAP32[sp + 8 >> 2] = 0; + if ((tempValue | 0) == 1) { break; } } @@ -93,7 +103,12 @@ function lin5() { HEAP32[sp + 0 >> 2] = 0; HEAP32[sp + 8 >> 2] = 0; sp = lin5$0(sp) | 0; - if ((HEAP32[sp + 0 >> 2] | 0) == 3) { + tempValue = HEAP32[sp + 0 >> 2] | 0; + tempInt = HEAP32[sp + 8 >> 2] | 0; + tempDouble = +HEAPF32[sp + 8 >> 2]; + HEAP32[sp + 0 >> 2] = 0; + HEAP32[sp + 8 >> 2] = 0; + if ((tempValue | 0) == 3) { continue; } } @@ -118,22 +133,27 @@ function mix() { HEAP32[sp + 0 >> 2] = 0; HEAP32[sp + 8 >> 2] = 0; sp = mix$0(sp) | 0; - if ((HEAP32[sp + 0 >> 2] | 0) == 1) { + tempValue = HEAP32[sp + 0 >> 2] | 0; + tempInt = HEAP32[sp + 8 >> 2] | 0; + tempDouble = +HEAPF32[sp + 8 >> 2]; + HEAP32[sp + 0 >> 2] = 0; + HEAP32[sp + 8 >> 2] = 0; + if ((tempValue | 0) == 1) { break; } - if ((HEAP32[sp + 0 >> 2] | 0) == 2) { - switch (HEAP32[sp + 8 >> 2] | 0) { + if ((tempValue | 0) == 2) { + switch (tempInt | 0) { case 2: { break main; } } } - if ((HEAP32[sp + 0 >> 2] | 0) == 3) { + if ((tempValue | 0) == 3) { continue; } - if ((HEAP32[sp + 0 >> 2] | 0) == 4) { - switch (HEAP32[sp + 8 >> 2] | 0) { + if ((tempValue | 0) == 4) { + switch (tempInt | 0) { case 3: { continue main; |