compress `apply()` & `call()` of `function` (#2613)
authorAlex Lam S.L <alexlamsl@gmail.com>
Mon, 18 Dec 2017 08:23:39 +0000 (16:23 +0800)
committerGitHub <noreply@github.com>
Mon, 18 Dec 2017 08:23:39 +0000 (16:23 +0800)
commit8ddcbc39e617a3ce53a340303fd9ef3226ee0065
treedfbd32b8dbd6f2471ff164256c9af084b0e60c9e
parent0b0eac1d5dc6e1cc1e9bf3682871cafdda59066d
compress `apply()` & `call()` of `function` (#2613)

- `fn.apply(a, [ ... ])` => `fn.call(a, ...)`
- `fn.call(a, ... )` => `a, fn(...)`

where `fn` can be `function` literal or symbol reference linked through `reduce_vars`
lib/compress.js
test/compress/functions.js