implement function inlining (#2053)

- empty body
- single `AST_Return`
- single `AST_SimpleStatement`
- avoid `/*#__PURE__*/`

Miscellaneous
- enhance single-use function substitution

fixes #281
This commit is contained in:
Alex Lam S.L
2017-06-06 05:49:53 +08:00
committed by GitHub
parent 27c5284d3d
commit 3493a182b2
11 changed files with 528 additions and 29 deletions

View File

@@ -1146,7 +1146,7 @@ collapse_vars_constants: {
function f3(x) {
var b = x.prop;
sideeffect1();
return b + -9;
return b + (function() { return -9; })();
}
}
}