Merge branch 'master' into harmony-v2.8.8

This commit is contained in:
alexlamsl
2017-03-07 20:25:52 +08:00
12 changed files with 900 additions and 145 deletions

View File

@@ -889,7 +889,9 @@ function OutputStream(options) {
output.with_parens(function(){
self.condition.print(output);
});
output.semicolon();
if (output.option("beautify") && output.option("screw_ie8")) {
output.semicolon();
}
});
DEFPRINT(AST_While, function(self, output){
output.print("while");
@@ -1096,15 +1098,6 @@ function OutputStream(options) {
// adds the block brackets if needed.
if (!self.body)
return output.force_semicolon();
if (self.body instanceof AST_Do) {
// Unconditionally use the if/do-while workaround for all browsers.
// https://github.com/mishoo/UglifyJS/issues/#issue/57 IE
// croaks with "syntax error" on code like this: if (foo)
// do ... while(cond); else ... we need block brackets
// around do/while
make_block(self.body, output);
return;
}
var b = self.body;
while (true) {
if (b instanceof AST_If) {