aboutsummaryrefslogtreecommitdiff
path: root/tools/test-js-optimizer-asm-outline1-output.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-08-27 11:57:19 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-08-27 11:57:19 -0700
commit66b0df277f38990b5910ddaf733083bef3922d3d (patch)
treeac1e78fe35e947e40a03d8cc3b4fc3493a0a7561 /tools/test-js-optimizer-asm-outline1-output.js
parent0e962d46df610c19f874a719adaa42cf6f517057 (diff)
fix outliner bug with checking when switch cases need to be joined
Diffstat (limited to 'tools/test-js-optimizer-asm-outline1-output.js')
-rw-r--r--tools/test-js-optimizer-asm-outline1-output.js64
1 files changed, 38 insertions, 26 deletions
diff --git a/tools/test-js-optimizer-asm-outline1-output.js b/tools/test-js-optimizer-asm-outline1-output.js
index 895004d8..612da16a 100644
--- a/tools/test-js-optimizer-asm-outline1-output.js
+++ b/tools/test-js-optimizer-asm-outline1-output.js
@@ -348,6 +348,15 @@ function switchh() {
HEAP32[sp + 44 >> 2] = 0;
switchh$2(sp);
helper$0 = HEAP32[sp + 8 >> 2] | 0;
+ tempValue = HEAP32[sp + 40 >> 2] | 0;
+ tempInt = HEAP32[sp + 44 >> 2] | 0;
+ tempDouble = +HEAPF32[sp + 44 >> 2];
+ HEAP32[sp + 40 >> 2] = 0;
+ HEAP32[sp + 44 >> 2] = 0;
+ if ((tempValue | 0) == 5) {
+ STACKTOP = sp;
+ return;
+ }
HEAP32[sp + 8 >> 2] = helper$0;
HEAP32[sp + 16 >> 2] = helper$1;
HEAP32[sp + 32 >> 2] = 0;
@@ -749,36 +758,39 @@ function switchh$2(sp) {
var helper$0 = 0, helper$1 = 0;
helper$0 = HEAP32[sp + 8 >> 2] | 0;
helper$1 = HEAP32[sp + 16 >> 2] | 0;
- if (helper$0) {
- helper$0 = 0;
- switch (helper$1 | 0) {
- case 1:
- {
- f(1);
- g();
- break;
- }
- default:
- {
- helper$0 = 1;
+ OL : do {
+ if (helper$0) {
+ helper$0 = 0;
+ switch (helper$1 | 0) {
+ case 1:
+ {
+ f(1);
+ g();
+ HEAP32[sp + 40 >> 2] = 5;
+ break OL;
+ }
+ default:
+ {
+ helper$0 = 1;
+ }
}
}
- }
- if (helper$0) {
- helper$0 = 0;
- switch (helper$1 | 0) {
- case 2:
- {
- f(2);
- g();
- break;
- }
- default:
- {
- helper$0 = 1;
+ if (helper$0) {
+ helper$0 = 0;
+ switch (helper$1 | 0) {
+ case 2:
+ {
+ f(2);
+ g();
+ break;
+ }
+ default:
+ {
+ helper$0 = 1;
+ }
}
}
- }
+ } while (0);
HEAP32[sp + 8 >> 2] = helper$0;
}