diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-12-23 18:42:28 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-12-23 18:42:28 -0800 |
commit | 508d4f02413a6f3d1924c17e410882081ba67615 (patch) | |
tree | 006f024f28455c7b54873e8862ed933af5562497 /tools/js-optimizer.js | |
parent | 5f00b61350b9236c36e81dafd5e8e3a9c93b347e (diff) |
make eliminator not get confused by calls without a return but with a coercion
Diffstat (limited to 'tools/js-optimizer.js')
-rw-r--r-- | tools/js-optimizer.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js index 587221a6..296a5cae 100644 --- a/tools/js-optimizer.js +++ b/tools/js-optimizer.js @@ -2144,7 +2144,7 @@ function registerize(ast) { // In memSafe mode, we are more careful and assume functions can replace HEAP and FUNCTION_TABLE, which // can happen in ALLOW_MEMORY_GROWTH mode -var ELIMINATION_SAFE_NODES = set('var', 'assign', 'call', 'if', 'toplevel', 'do', 'return', 'label', 'switch'); // do is checked carefully, however +var ELIMINATION_SAFE_NODES = set('var', 'assign', 'call', 'if', 'toplevel', 'do', 'return', 'label', 'switch', 'binary', 'unary-prefix'); // do is checked carefully, however var IGNORABLE_ELIMINATOR_SCAN_NODES = set('num', 'toplevel', 'string', 'break', 'continue', 'dot'); // dot can only be STRING_TABLE.* var ABORTING_ELIMINATOR_SCAN_NODES = set('new', 'object', 'function', 'defun', 'for', 'while', 'array', 'throw'); // we could handle some of these, TODO, but nontrivial (e.g. for while, the condition is hit multiple times after the body) |