Merge branch 'master' into harmony-v3.0.14

This commit is contained in:
alexlamsl
2017-05-31 11:42:54 +08:00
6 changed files with 90 additions and 62 deletions

View File

@@ -245,3 +245,25 @@ hoist_funs_strict: {
]
node_version: ">=4"
}
issue_203: {
options = {
keep_fargs: false,
side_effects: true,
unsafe_Func: true,
unused: true,
}
input: {
var m = {};
var fn = Function("require", "module", "exports", "module.exports = 42;");
fn(null, m, m.exports);
console.log(m.exports);
}
expect: {
var m = {};
var fn = Function("a", "b", "b.exports=42");
fn(null, m, m.exports);
console.log(m.exports);
}
expect_stdout: "42"
}

View File

@@ -1,7 +1,8 @@
compress_new_function: {
options = {
unsafe: true
unsafe: true,
unsafe_Func: true,
}
input: {
new Function("aa, bb", 'return aa;');
@@ -14,6 +15,7 @@ compress_new_function: {
compress_new_function_with_destruct: {
options = {
unsafe: true,
unsafe_Func: true,
ecma: 6
}
beautify = {