@@ -2769,6 +2769,7 @@ merge(Compressor.prototype, {
|
||||
AST_Scope.DEFMETHOD("hoist_properties", function(compressor){
|
||||
var self = this;
|
||||
if (!compressor.option("hoist_props") || compressor.has_directive("use asm")) return self;
|
||||
var top_retain = self instanceof AST_Toplevel && compressor.top_retain || return_false;
|
||||
var defs_by_id = Object.create(null);
|
||||
var var_names = Object.create(null);
|
||||
self.enclosed.forEach(function(def) {
|
||||
@@ -2784,6 +2785,7 @@ merge(Compressor.prototype, {
|
||||
&& !(def = sym.definition()).escaped
|
||||
&& !def.single_use
|
||||
&& !def.direct_access
|
||||
&& !top_retain(def)
|
||||
&& (value = sym.fixed_value()) === node.value
|
||||
&& value instanceof AST_Object) {
|
||||
var defs = new Dictionary();
|
||||
|
||||
Reference in New Issue
Block a user