diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/js-optimizer.js | 11 | ||||
-rw-r--r-- | tools/shared.py | 4 |
2 files changed, 13 insertions, 2 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 5a6a5360..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.8' +EMSCRIPTEN_VERSION = '1.8.0' def generate_sanity(): return EMSCRIPTEN_VERSION + '|' + get_llvm_target() + '|' + LLVM_ROOT @@ -1094,7 +1094,7 @@ class Building: # 8k is a bit of an arbitrary limit, but a reasonable one # for max command line size before we use a respose file response_file = None - if WINDOWS and len(' '.join(link_cmd)) > 8192: + if len(' '.join(link_cmd)) > 8192: logging.debug('using response file for llvm-link') [response_fd, response_file] = mkstemp(suffix='.response', dir=TEMP_DIR) |