transform function calls to IIFEs (#1560)

- expose function body to call sites for potential optimisations
- suppress substitution of variable used within `AST_Defun`
This commit is contained in:
Alex Lam S.L
2017-03-07 15:37:52 +08:00
committed by GitHub
parent d787d70127
commit 8153b7bd8a
5 changed files with 284 additions and 29 deletions

View File

@@ -82,7 +82,7 @@ describe("bin/uglifyjs", function () {
});
});
it("Should work with --keep-fnames (mangle & compress)", function (done) {
var command = uglifyjscmd + ' test/input/issue-1431/sample.js --keep-fnames -m -c';
var command = uglifyjscmd + ' test/input/issue-1431/sample.js --keep-fnames -m -c unused=false';
exec(command, function (err, stdout) {
if (err) throw err;