properly drop mutually-referring declarations that are not otherwise
referenced and have no side effects
This commit is contained in:
@@ -68,14 +68,17 @@ TreeTransformer.prototype = {
|
||||
node.DEFMETHOD("transform", function(tw, in_list){
|
||||
var x, y;
|
||||
tw.push(this);
|
||||
x = tw.before(this, function(){
|
||||
descend(x, tw);
|
||||
}, in_list);
|
||||
x = tw.before(this, descend, in_list);
|
||||
if (x === undefined) {
|
||||
x = this.clone();
|
||||
descend(x, tw);
|
||||
y = tw.after(this, in_list);
|
||||
if (y !== undefined) x = y;
|
||||
if (!tw.after) {
|
||||
x = this;
|
||||
descend(x, tw);
|
||||
} else {
|
||||
x = this.clone();
|
||||
descend(x, tw);
|
||||
y = tw.after(this, in_list);
|
||||
if (y !== undefined) x = y;
|
||||
}
|
||||
}
|
||||
tw.pop();
|
||||
return x;
|
||||
|
||||
Reference in New Issue
Block a user