fix bugs with getter/setter (#1926)
authorAlex Lam S.L <alexlamsl@gmail.com>
Sat, 13 May 2017 18:10:34 +0000 (02:10 +0800)
committerGitHub <noreply@github.com>
Sat, 13 May 2017 18:10:34 +0000 (02:10 +0800)
commit3ca902258c24209699f0b5bd5b9654252e492272
treeda7dbf1bc1e3bd70e463da43d0f7ebc06a36b2db
parentfd0951231cce6aa2710bdb4f0ff8a963596f842c
fix bugs with getter/setter (#1926)

- `reduce_vars`
- `side_effects`
- property access for object
- `AST_SymbolAccessor` as key names

enhance `test/ufuzz.js`
- add object getter & setter
  - property assignment to setter
  - avoid infinite recursion in setter
- fix & adjust assignment operators
  - 50% `=`
  - 25% `+=`
  - 2.5% each for the rest
- avoid "Invalid array length"
- fix `console.log()`
  - bypass getter
  - curb recursive reference
- deprecate `-E`, always report runtime errors
lib/ast.js
lib/compress.js
lib/parse.js
lib/scope.js
test/compress/dead-code.js
test/compress/pure_getters.js
test/compress/reduce_vars.js
test/mocha/accessorTokens-1492.js
test/mocha/getter-setter.js
test/sandbox.js
test/ufuzz.js