diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-10-22 20:10:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-22 20:10:13 +0800 |
commit | 24aa07855bc608f29cca2a58a40af1988256b116 (patch) | |
tree | 52428c6db4496e196b2837dbe7b73324e32558b5 /test/compress/functions.js | |
parent | 5fd723f14394b74f899e7b33bc9084317bf01d7d (diff) | |
download | tracifyjs-24aa07855bc608f29cca2a58a40af1988256b116.tar.gz tracifyjs-24aa07855bc608f29cca2a58a40af1988256b116.zip |
safer `properties` transform (#2391)
`{ a: x, b: y }.a` => `[ x, y ][0]`
- `x` cannot be function containing `this`
`[ x, y, z ][1]` => `(x, z, y)`
- only if `z` is side-effect-free
Diffstat (limited to 'test/compress/functions.js')
-rw-r--r-- | test/compress/functions.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js index 6c82557d..febf81c1 100644 --- a/test/compress/functions.js +++ b/test/compress/functions.js @@ -153,10 +153,10 @@ function_returning_constant_literal: { options = { inline: true, passes: 2, + properties: true, reduce_vars: true, side_effects: true, toplevel: true, - unsafe: true, unused: true, } input: { |