Age | Commit message (Expand) | Author |
2017-04-12 | convert `AST_Seq` from binary tree to array (#1460)...- rename `AST_Seq` to `AST_Sequence`
- raise default sequences_limit from 200 to 800 | Alex Lam S.L |
2017-04-09 | fix LHS cases for NaN & friends (#1804)...`Infinity = beyond` should not become `1/0 = beyond` | Alex Lam S.L |
2017-04-09 | enhance `test/ufuzz.js` (#1803)...- `-E` to report test cases with runtime errors
- favor returning expressions rather than empty return
- emit a newline upon fuzzer completion to not erase the iteration count
closes #1800 | Alex Lam S.L |
2017-04-08 | fix a couple of bugs in `global_defs` (#1802)...- `optimize()` substituted expression
- compute nested property string correctly
fixes #1801
Miscellaneous
- reset optimisation flags on all node types | Alex Lam S.L |
2017-04-08 | fix `delete` corner cases (#1799)...- assignment
- boolean
- conditional
- sequence | Alex Lam S.L |
2017-04-07 | extend ufuzz generator (#1783)...- property access
- property assignment
- allow bare expression within try-block
- normalise `Error` in `console.log()`
- generate more unary expressions
- add parenthesis to enforce precedence
- adjust variable reuse/creation
- add parameters to function declaration & expression
- add return expression
- add trivial arguments to function call | Alex Lam S.L |
2017-04-07 | fix `pure_getters` for chained property access (#1798) | Alex Lam S.L |
2017-04-07 | fix corner cases with `delete` (#1796)...`delete Infinity` returns `false` where as `delete (1/0)` returns `true` | Alex Lam S.L |
2017-04-07 | introduce "strict" to `pure_getters` (#1795) | Alex Lam S.L |
2017-04-07 | fix `reduce_vars` on catch variable (#1794)...Improved catch handling in `figure_out_scope()` means special case treatment of IE8 is no longer valid in `reset_opt_flags()`.
Also fixed recursive assignment in variable definition. | Alex Lam S.L |
2017-04-07 | fix incorrect context in variable substitution (#1791)...`AST_Node.optimize()` is context-aware, so don't cache its results to be used elsewhere.
Also fixed a few cases of AST corruption and beef up safety of `pure_getters`. | Alex Lam S.L |
2017-04-06 | improve `pure_getters` (#1786)...- property access to `null` & `undefined` always has side effects
- utilise `reduce_vars` to determine safe property access
- may-be cases treated as side effects unless `unsafe` | Alex Lam S.L |
2017-04-05 | implement delayed resolution for `reduce_vars` (#1788)...Although it would be nice to enforce `AST_Node` cloning during transformation, that ship has sailed a long time ago.
We now get the assigned value when resolving `AST_SymbolRef` instead of `reset_opt_flags()`, which has the added advantage of improved compressor efficiency.
fixes #1787 | Alex Lam S.L |
2017-04-04 | optimise `do{...}while(false)` (#1785)...- better heuristics to avoid issues like #1532
- fix `TreeWalker.loopcontrol_target()`
- `continue` cannot refer to `switch` blocks | Alex Lam S.L |
2017-04-04 | remove `--mangle-props` from fuzzing (#1777)...The inherently unsafe nature makes this feature unsuitable to be tested this way.
fixes #1774 | Alex Lam S.L |
2017-04-04 | exclude mangling of special property names (#1779)...- `null`
- `true`
- `false`
- numeric literals | Alex Lam S.L |
2017-04-03 | fix `mangleProperties` on identifiers (#1776)...- fix handling of "-Infinity"
- add test case for "-0"
reverts #1481 | Alex Lam S.L |
2017-04-03 | workaround Node.js bugs (#1775)...Wrap test code in IIFE before passing to `vm`
fixes #1768
fixes #1771 | Alex Lam S.L |
2017-04-03 | fix mangleProperties of `undefined` & `Infinity` (#1772)...`NaN` already works by the happy accident of `Number.NaN`
fixes #1770 | Alex Lam S.L |
2017-04-03 | extend `test/ufuzz.js` (#1769)...New expressions:
- property access
- array literal
- object literal
Miscellaneous:
- reduce execution timeout
- test `toplevel` and `mangleProperties` | Alex Lam S.L |
2017-04-02 | fix corner case in `switch` (#1765) | Alex Lam S.L |
2017-04-02 | avoid confusion of `NaN` & `Infinity` with `catch` symbol of the same name (#......fixes #1760
fixes #1761 | Alex Lam S.L |
2017-04-02 | fix corner cases in switch and undefined (#1762)...- fix side effects in switch condition for singular blocks
- fix `undefined` confusion with local variable
- gate `OPT(AST_Switch)` with `switches`
fixes #1758
fixes #1759 | Alex Lam S.L |
2017-04-02 | speed up fuzzer code generation (#1757)...- only output one top-level function or statement block
- reduce `rng()` granularity from 2^32 to 65536
- fix overflow in `rng()`
- track `canThrow` during `typeof` creation | Alex Lam S.L |
2017-04-02 | minor tweaks to `test/ufuzz.js` (#1756)...- count iterations from `1` instead of `0`
- remove `unsafe` from default set of `minify()` tests
- improve usability of help | Alex Lam S.L |
2017-04-02 | upgrade fuzzer (#1754)...- configurable set of `minify()` options
- test and report suspects upon failure
- continue after failure if infinite iterations is specified | Alex Lam S.L |
2017-04-02 | fuzz regexp literals, more constant numbers, typeof expression (#1755) | kzc |
2017-04-01 | fix switch branch elimination (#1752)...Merge unreachable case body with previous fallthrough case
fixes #1750 | Alex Lam S.L |
2017-04-01 | minor tweaks to fuzzer (#1751)...- remove `let` as variable name
- employ `crypto.randomBytes()` | Alex Lam S.L |
2017-04-01 | implement `test/sandbox.js` (#1749)...- `test/run-tests.js` and `test/ufuzz.js` now shares the same `run_code()` and `same_stdout()`
- re-enable fuzzer to generate top-level `NaN`, `Infinity` & `undefined`
- attempt to show beautified output only when `run_code()` output is preserved | Alex Lam S.L |
2017-04-01 | improve compression of undefined, NaN & Infinitiy (#1748)...- migrate transformation logic from `OutputStream` to `Compressor`
- always turn `undefined` into `void 0` (unless `unsafe`)
- always keep `NaN` except when avoiding local variable redefinition
- introduce `keep_infinity` to suppress `1/0` transform, except when avoiding local variable redefinition
supersedes #1723
fixes #1730 | Alex Lam S.L |
2017-03-31 | combine rules for binary boolean operations (#1744) | Alex Lam S.L |
2017-03-31 | Massive extension of the fuzzer (#1697)...Fix bug where a `throw` was generated without expression
Reenable try/catch/finally and fix them up
Skip serialization errors
Allow function decl in other funcs but not in blocks etc
Rename function to be more appropriate
Fix global functions not getting certain names
Make the canaries more likely to appear as expressions
Add a silly rounding edge case
Add a new canary, `c`, which should only ever be incremented
Refactoring
Fix (another) iife not actually being invoked
When a statement hits recursion max return an expression instead of `;`
When a expression hits recursion max also inc `c`
Generate global code as well as function code
Also fixes some argument juggling related bugs.
No longer reduces the recursion max when generating sub functions.
Generates a function arg.
Add used names to var name pool while in that scope
This is a little wonky, possibly a hack, but since it's synchronous code I think it's alright to do this. The alternative is to slice the varnames array and juggle them through almost all the generator functions and there are various reasons why this patch is a better alternative.
Minify generated code, not beautified code. Prevents beautifier bias.
Prevent unnecessary duplication
Remove serialization protection because I think it got handled elsewhere
Abstract toplevel code generation
Add example line of running test case
Add poor man options parser, and some options
Reindent to 4 spaces
Lower chance of `default` generation
Comment example of testing a case and output improvement
Enable `default` clause appearing at any clause index
Removing some training wheels; dont add parens where we dont absolutely need them
Support `-s1` and `-s2` to force specific statements being generated at that recursion level
Add round number to output when failing. For stats and fun and profit.
Solidify statement depth counting. The argument juggling is real.
Renamed option to something long. -scf was ugly and probably confusing.
Fix missing arguments causing `canThrow` to be truthy, generating crashing code
Generate more binary nested expressions
Add black and white list cli options for statement generation
Allows you to explicitly require or forbid certain statements from/to being made.
```
node test/ufuzz.js --without-stmt switch,try -t 5 -r 5 -V
```
```
node test/ufuzz.js --only-stmt ifelse,expr -t 5 -r 5 -V
```
Similar granularity for expression may be added later.
There can be no comma between names; it just does a split on that arg.
Trim down the binary expression generator
Prevent scoping issues in nodejs by preventing certain names in global space
Oh this list was incomplete?
Allow bin-expr to generate assignments too. More vigilant with storing and reusing vars.
Add more global builtin names
Update wrapper code
Also patch Function valueOf | Peter van der Zee |
2017-03-31 | fix missing preamble when shebang is absent (#1742) | Alex Lam S.L |
2017-03-31 | fix catch symbol mangling (#1734)...Only need to look up the immediate non-block/catch scope for the same-name special case.
fixes #1733 | Alex Lam S.L |
2017-03-30 | remove paranthesis for `-(x*y)` (#1732) | Alex Lam S.L |
2017-03-30 | optimize try-catch-finally (#1731)...- eliminate empty blocks
- flatten out if try-block does not throw | Alex Lam S.L |
2017-03-30 | improve tests from #1726 (#1729) | Alex Lam S.L |
2017-03-29 | fix missing parentheses around NaN/Infinity shorthands (#1726)...fixes #1724
fixes #1725 | Alex Lam S.L |
2017-03-29 | output optimal representations of NaN & Infinity (#1723)...- move these optimisations out from `Compressor` to `OutputStream`
- fixes behaviour inconsistency when running uglified code from global or module levels due to redefinition | Alex Lam S.L |
2017-03-29 | improve beautified output of switch blocks (#1721) | Alex Lam S.L |
2017-03-29 | remove UGLIFY_DEBUG (#1720)...fixes #1719 | Alex Lam S.L |
2017-03-29 | fix corner case in `unused` (#1718)...When fixing catch-related issue in #1715, it tries to optimise for duplicate definitions but did not take anonymous functions into account.
Remove such optimisation for now and we can cover this as a more general rule later. | Alex Lam S.L |
2017-03-28 | fix `unused` on var of the same name within catch (#1716)...fixes #1715 | Alex Lam S.L |
2017-03-28 | fix `is_number()` on `+=` (#1714)...fixes #1710 | Alex Lam S.L |
2017-03-28 | drop anonymous function name when overshadowed by other declarations (#1712)...fixes #1709 | Alex Lam S.L |
2017-03-28 | handle var within catch of the same name (#1711)...The following code prints `1`:
var a = 1;
!function(){
a = 4;
try{
throw 2;
} catch (a) {
var a = 3;
}
}();
console.log(a);
fixes #1708 | Alex Lam S.L |
2017-03-28 | fix tail trimming of switch blocks (#1707)...now guarded under `dead_code`
fixes #1705 | Alex Lam S.L |
2017-03-28 | fix mangle for variable declared within catch block (#1706)...fixes #1704 | Alex Lam S.L |
2017-03-27 | ufuzz: workaround for Function.toString() v2 (#1700) | Alex Lam S.L |