diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/js-optimizer.js | 11 | ||||
-rw-r--r-- | tools/shared.py | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js index c63cb36a..161ed59c 100644 --- a/tools/js-optimizer.js +++ b/tools/js-optimizer.js @@ -3125,6 +3125,17 @@ function outline(ast) { parts = []; var curr = node; while (1) { + if (!curr[3]) { + // we normally expect ..if (cond) { .. } else [if (nextCond) {] (in [] is what we hope to see) + // but are now seeing ..if (cond) { .. } with no else. This might be + // ..if (cond) if (nextCond) { + // which vacuum can generate from if (cond) {} else if (nextCond), making it + // if (!cond) if (nextCond) + // so we undo that, in hopes of making it more flattenable + curr[3] = curr[2]; + curr[2] = ['block', []]; + curr[1] = simplifyNotCompsDirect(['unary-prefix', '!', curr[1]]); + } parts.push({ condition: curr[1], body: curr[2] }); curr = curr[3]; if (!curr) break; diff --git a/tools/shared.py b/tools/shared.py index 20951a12..eb1c63be 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -322,7 +322,7 @@ def find_temp_directory(): # we re-check sanity when the settings are changed) # We also re-check sanity and clear the cache when the version changes -EMSCRIPTEN_VERSION = '1.7.9' +EMSCRIPTEN_VERSION = '1.8.0' def generate_sanity(): return EMSCRIPTEN_VERSION + '|' + get_llvm_target() + '|' + LLVM_ROOT |