diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-02-02 15:29:48 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-02-02 15:29:48 -0800 |
commit | db152b921d818b1e2f1ad2c4a17dc936a2e92c6b (patch) | |
tree | dbde3df8f953fdc91dd086453a7a4a888efd63bd /tools/js-optimizer.js | |
parent | 73313a7ef6ab384a3130e50f4904b8ae232cf4a5 (diff) |
eliminate into labels
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 12754bb2..634d7dda 100644 --- a/tools/js-optimizer.js +++ b/tools/js-optimizer.js @@ -1653,7 +1653,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'); // do is checked carefully, however +var ELIMINATION_SAFE_NODES = set('var', 'assign', 'call', 'if', 'toplevel', 'do', 'return', 'label'); // do is checked carefully, however var NODES_WITHOUT_ELIMINATION_SIDE_EFFECTS = set('name', 'num', 'string', 'binary', 'sub', 'unary-prefix'); 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', 'switch', '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) |