diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-01-14 20:53:53 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-14 20:54:14 -0800 |
commit | 60a86d0fcb15b8381f1fc97ad17571cb281f26c1 (patch) | |
tree | 1244fbd2f7ebbb404b503619fdf7477a89d737ba /tools/js-optimizer.js | |
parent | b5ca47aee27b1dd86ad2623c4591019ad0be97ea (diff) |
fix aggressiveVariableElimination bug and add testing
Diffstat (limited to 'tools/js-optimizer.js')
-rw-r--r-- | tools/js-optimizer.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js index 5324e15c..3a6d70bc 100644 --- a/tools/js-optimizer.js +++ b/tools/js-optimizer.js @@ -3117,8 +3117,8 @@ function aggressiveVariableEliminationInternal(func, asmData) { var name = node[1]; if (name in trivials) { var value = values[name]; - if (!value) throw 'missing value: ' + [func[1], name, values[name]] + ' - faulty reliance on asm zero-init?'; - return copy(value); // must copy, or else the same object can be used multiple times + if (value) return copy(value); // must copy, or else the same object can be used multiple times + else return emptyNode(); } } }); |