optimize top-level variables as well

This commit is contained in:
alexlamsl 2016-09-21 01:44:27 +08:00
parent 75f3ed202c
commit 8c3697c504

View File

@ -1108,7 +1108,7 @@ merge(Compressor.prototype, {
this._evaluating = true; this._evaluating = true;
try { try {
var d = this.definition(); var d = this.definition();
if (d && (d.constant || compressor.option("reduce_vars") && !d.global && !d.modified) && d.init) { if (d && (d.constant || compressor.option("reduce_vars") && !d.modified) && d.init) {
return ev(d.init, compressor); return ev(d.init, compressor);
} }
} finally { } finally {