Merge branch 'master' into harmony-v3.1.5

This commit is contained in:
alexlamsl
2017-10-22 00:35:00 +08:00
4 changed files with 533 additions and 65 deletions

View File

@@ -1190,10 +1190,10 @@ defun_label: {
!function() {
console.log(function(a) {
L: {
if (a) break L;
if (2) break L;
return 1;
}
}(2));
}());
}();
}
expect_stdout: true
@@ -3051,3 +3051,63 @@ array_forof_2: {
expect_stdout: "3"
node_version: ">=0.12"
}
const_expr_1: {
options = {
evaluate: true,
reduce_vars: true,
toplevel: true,
unsafe: true,
unused: true,
}
input: {
var o = {
a: 1,
b: 2
};
o.a++;
console.log(o.a, o.b);
}
expect: {
var o = {
a: 1,
b: 2
};
o.a++;
console.log(o.a, o.b);
}
expect_stdout: "2 2"
}
const_expr_2: {
options = {
evaluate: true,
reduce_vars: true,
toplevel: true,
unsafe: true,
unused: true,
}
input: {
Object.prototype.c = function() {
this.a++;
};
var o = {
a: 1,
b: 2
};
o.c();
console.log(o.a, o.b);
}
expect: {
Object.prototype.c = function() {
this.a++;
};
var o = {
a: 1,
b: 2
};
o.c();
console.log(o.a, o.b);
}
expect_stdout: "2 2"
}