@@ -669,12 +669,7 @@ merge(Compressor.prototype, {
|
|||||||
});
|
});
|
||||||
def(AST_SymbolRef, function(){
|
def(AST_SymbolRef, function(){
|
||||||
var d = this.definition();
|
var d = this.definition();
|
||||||
if (d && d.constant) {
|
if (d && d.constant && d.init) return ev(d.init);
|
||||||
var orig = d.orig[0];
|
|
||||||
if (orig) orig = orig.init[0];
|
|
||||||
orig = orig && orig.value;
|
|
||||||
if (orig) return ev(orig);
|
|
||||||
}
|
|
||||||
throw def;
|
throw def;
|
||||||
});
|
});
|
||||||
})(function(node, func){
|
})(function(node, func){
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(){
|
|||||||
|| node instanceof AST_SymbolConst) {
|
|| node instanceof AST_SymbolConst) {
|
||||||
var def = scope.def_variable(node);
|
var def = scope.def_variable(node);
|
||||||
def.constant = node instanceof AST_SymbolConst;
|
def.constant = node instanceof AST_SymbolConst;
|
||||||
def = tw.parent();
|
def.init = tw.parent().value;
|
||||||
}
|
}
|
||||||
else if (node instanceof AST_SymbolCatch) {
|
else if (node instanceof AST_SymbolCatch) {
|
||||||
// XXX: this is wrong according to ECMA-262 (12.4). the
|
// XXX: this is wrong according to ECMA-262 (12.4). the
|
||||||
|
|||||||
Reference in New Issue
Block a user