diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-06-06 05:49:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-06 05:49:53 +0800 |
commit | 3493a182b2c94e4011b2b12d61376273b985d29a (patch) | |
tree | 449238f5af448b90551f66d92ce87a4a2a317103 /test/compress/functions.js | |
parent | 27c5284d3dc0ab131168a73035be7d87ebda30e9 (diff) | |
download | tracifyjs-3493a182b2c94e4011b2b12d61376273b985d29a.tar.gz tracifyjs-3493a182b2c94e4011b2b12d61376273b985d29a.zip |
implement function inlining (#2053)
- empty body
- single `AST_Return`
- single `AST_SimpleStatement`
- avoid `/*#__PURE__*/`
Miscellaneous
- enhance single-use function substitution
fixes #281
Diffstat (limited to 'test/compress/functions.js')
-rw-r--r-- | test/compress/functions.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js index a9ca23f8..180bb11a 100644 --- a/test/compress/functions.js +++ b/test/compress/functions.js @@ -21,6 +21,7 @@ iifes_returning_constants_keep_fargs_true: { join_vars : true, reduce_vars : true, cascade : true, + inline : true, } input: { (function(){ return -1.23; }()); @@ -56,6 +57,7 @@ iifes_returning_constants_keep_fargs_false: { join_vars : true, reduce_vars : true, cascade : true, + inline : true, } input: { (function(){ return -1.23; }()); @@ -82,6 +84,7 @@ issue_485_crashing_1530: { conditionals: true, dead_code: true, evaluate: true, + inline: true, } input: { (function(a) { @@ -154,6 +157,7 @@ function_returning_constant_literal: { evaluate: true, cascade: true, unused: true, + inline: true, } input: { function greeter() { |