fix do{...}while(false)
This commit is contained in:
parent
068c141b2a
commit
b002aaed87
|
|
@ -2404,7 +2404,8 @@ merge(Compressor.prototype, {
|
||||||
if (node instanceof AST_LoopControl && tw.loopcontrol_target(node) === self)
|
if (node instanceof AST_LoopControl && tw.loopcontrol_target(node) === self)
|
||||||
return has_loop_control = true;
|
return has_loop_control = true;
|
||||||
});
|
});
|
||||||
self.walk(tw);
|
var parent = compressor.parent();
|
||||||
|
(parent instanceof AST_LabeledStatement ? parent : self).walk(tw);
|
||||||
if (!has_loop_control) return self.body;
|
if (!has_loop_control) return self.body;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -101,3 +101,20 @@ iife_while: {
|
||||||
}();
|
}();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
label_do: {
|
||||||
|
options = {
|
||||||
|
evaluate: true,
|
||||||
|
loops: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
L: do {
|
||||||
|
continue L;
|
||||||
|
} while (0);
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
L: do {
|
||||||
|
continue L;
|
||||||
|
} while (0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user