Merge branch 'master' into harmony-2.8.0

This commit is contained in:
alexlamsl
2017-02-27 04:37:48 +08:00
63 changed files with 4471 additions and 480 deletions

View File

@@ -692,3 +692,51 @@ unsafe_prototype_function: {
var h = "" + ({toString: 0});
}
}
call_args: {
options = {
evaluate: true,
reduce_vars: true,
}
input: {
const a = 1;
console.log(a);
+function(a) {
return a;
}(a);
}
expect: {
const a = 1;
console.log(1);
+function(a) {
return 1;
}(1);
}
}
in_boolean_context: {
options = {
booleans: true,
evaluate: true,
}
input: {
!42;
!"foo";
![1, 2];
!/foo/;
!b(42);
!b("foo");
!b([1, 2]);
!b(/foo/);
}
expect: {
!1;
!1;
!1;
!1;
!b(42);
!b("foo");
!b([1, 2]);
!b(/foo/);
}
}