Age | Commit message (Collapse) | Author |
|
- remove extra tree scanning phase for `negate_iife`
- `negate_iife` now only deals with the narrowest form, i.e. IIFE sitting directly under `AST_SimpleStatement`
- `booleans`, `conditionals` etc. will now take care the rest via more accurate accounting
- `a(); void b();` => `a(); b();`
fixes #1288
closes #1451
|
|
|
|
* Escaped newlines should also produce SyntaxError
* Fix multiline comment parsing and add tests
* Adapt makePredicate to handle \u2028 and \u2029
* Move up nlb check in regex so it's checked before any escape handling
* Change error messages to conform ecma standard
* Find_eol not recornizing \u2028 and \u2029 as line terminator
* Remove \u180e as it is removed in unicode 6.3.0 from the category zs
|
|
|
|
Fix #1031
|
|
We only touch properties that are present in an object literal, or which are
assigned to. Example:
x = { foo: 1 };
x.bar = 2;
x["baz"] = 3;
x[cond ? "qwe" : "asd"] = 4;
console.log(x.stuff);
The names "foo", "bar", "baz", "qwe" and "asd" will be mangled, and the
resulting mangled names will be used for the same properties throughout the
code. The "stuff" will not be, since it's just referenced but never
assigned to.
This *will* break most of the code out there, but could work on carefully
written code: do not use eval, do not define methods or properties by
walking an array of names, etc. Also, a comprehensive list of exclusions
needs to be passed, to avoid mangling properties that are standard in
JavaScript, DOM, used in external libraries etc.
|
|
|
|
Make `DefaultsError` a real `Error` object
|
|
for now only used for keys passed to `-c` or `-b`.
|
|
|
|
|
|
|
|
(for more fair comparison to Closure compiler)
|
|
to mitigate the `__proto__` issue
related to #30
|
|
|
|
|
|
string is keyword, reserved etc.
speeds up the parser a bit, though not spectacular.. still far from acorn.
|
|
- use prototype-less objects where feasible (minor speed improvement)
- get rid of HOP
|
|
|
|
to always print brackets around if/do/while/for statements; export more options via the CLI
|
|
|
|
referenced and have no side effects
|
|
optimizations of if/return/continue seem to be even better now
|
|
|
|
- all symbols now have a `thedef` property which is a SymbolDef object,
instead of the `uniq` that we had before (pointing to the first occurrence
of the name as declaration).
- for undeclared symbols we still create a SymbolDef object in the toplevel
scope but mark it "undeclared"
- we can now call figure_out_scope after squeezing, which is useful in order
not to mangle names that were dropped by the squeezer
|
|
|
|
|
|
|
|
Revert "minor perf. improvements"
This reverts commit 24bfd55a22afd791d4a97694641831cfbd27fb14.
broke the parser somehow; too early to optimize, let's get the other stuff running.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|