swc_ecma_minifier:
- Implement more rules.
swc_ecma_transforms_base:
- `resolver`: Fix syntax context of catch block.
swc_ecma_transforms_optimization:
- `expr_simplifier`: Fix a bug related to `this` of call expressions.
- `dead_branch_remover`: Don't reduce switch cases if test is now known.
- `dead_branch_remover`: Don't break `&&`.
swc_ecma_codegen:
- Fix codegen of large binary expressions.
swc_ecma_parser:
- Fix stack overflow while parsing large binary expressions.
swc_ecma_transforms:
- typescrip::strip: Fix stack overflow while handling large binary operations.
- hygiene: Fix stack overflow by migrating it to `VisitMut`.
- hygiene: Improve performance.
- fixer: Fix stack overflow by migrating it to `VisitMut`.
- resolver: Migrate to `VisitMut`.
testing:
- Remove dependency on relative_path
swc_common:
- Span's byte positions are now self-contained and `GLOBALS` is not required while parsing.
- Changed `Comments` into a trait.
- Provide single-threaded implementation of `Comments`
- Cargo feature `tty-emiiter` (To remove tty related stuffs )
- Cargo feature `sourcemap` (To remove sourcemap for web assets)
- Removed dependency on dashmap
swc_ecma_parser:
- No duplicated comments.
- Removed dependency on once_cell and regex
- Add a test suite to visualize and test span of nodes.
swc_ecma_utils:
- Removed dependency on parser
swc:
- Remove dependency on derive_more and path-clean
- Add multi-threaded implementation of `Comments`
swc_ecmascript:
- A new crate contains `ast`, `codegen`, `parser`, `utils`, `visit`.
This pr introduces some cargo features. For `swc_common` and `swc_ecma_ast`, it introduces a feature flag `fold`.
`Fold` and `Visit` traits exist only if the feature is enabled.
For `swc_ecma_parser`, flag called `verify` is added. When disabled, we skip checking of validity of some expressions.
e.g. `{foo = bar}`
Verification is disabled by default it requires nightly compiler
swc_common:
- update rustc-ap crates to v313
swc_ecma_ast:
- use bool instead of Option<Span>
swc_ecma_parser:
- remove LexerInput
- use uncons_while
- assert only on debug mode
- use Visit instead of Fold while verifying
- replace debug! with trace!
- disable logging while benchmarking
- drop slog
swc_ecma_transforms:
- classes: fold Decl instead of Stmt
swc:
- add nodejs binding
ecma_transforms:
- implement es2015::instanceof
- implement es2015::typeof_symbol
- implement inline_globals pass
ecma_parser:
- `PResult<T>` is now `Result<T, ()>` and `Err(())` means that an error is emitted.
- add docs
common:
- upgrade rustc-ap crates to 297
- swc_common does not reexport sourcemap anymore
- update rustfmt to 0.99.6
simplifier:
- make some tests success when source code is equavalent
- implement fixer to fix ast broken by simplifier
- implement bit shift operators
- fix str.length
- ignore some tests
compat:
- fix `**=`
- fix es3::prop_lits
- Make rls happy.
- Some minor parser error improvements.
- Add reference files for ecmascript parser errors.
- Improve error message of import/export used outside of a module
- Parser and lexer for lastest ecma spec https://tc39.github.io/ecma262
- Lexer is currently very inefficient
- Use https://github.com/tc39/test262-parser-tests/ for testing.
- Implement proc-macro based ast folder and assert_eq_ignore_span! based on it.
- Some utilities for proc macro at /macros/common