Age | Commit message (Collapse) | Author |
|
- rename `AST_Seq` to `AST_Sequence`
- raise default sequences_limit from 200 to 800
|
|
Liberal use of `Compressor.transform()` and `AST_Node.optimize()` presents an issue for look-up operations like `TreeWalker.in_boolean_context()` and `TreeWalker.parent()`.
This is an incremental fix such that `AST_Node.optimize()` would now contain the correct stack information when called correctly.
|
|
Patched up `make_node()` without `orig`.
There may be other cases where `start` could be missing, so make it print "undefined" instead of crashing.
fixes #1518
|
|
- better inheritance of `Error` sub-classes
- mark parse error against source in CLI
closes #235
closes #348
closes #524
closes #1356
closes #1405
|
|
- 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|