introduce eager evaluation (#3587)

This commit is contained in:
Alex Lam S.L
2019-11-16 06:10:47 +08:00
committed by GitHub
parent dcfc4aca5b
commit 552be61c4d
4 changed files with 192 additions and 45 deletions

View File

@@ -52,3 +52,30 @@ chained_evaluation_2: {
})();
}
}
chained_evaluation_3: {
options = {
collapse_vars: true,
evaluate: 10,
reduce_funcs: true,
reduce_vars: true,
unused: true,
}
input: {
(function() {
var a = "long piece of string";
(function() {
var b = a, c;
c = f(b);
c.bar = b;
})();
})();
}
expect: {
(function() {
(function() {
f("long piece of string").bar = "long piece of string";
})();
})();
}
}