Commit Graph

2 Commits

Author SHA1 Message Date
Donny/강동윤
1645bb30b7
perf(es/transforms): Reduce usage of #[fast_path] (#2442)
swc_ecma_ast:
 - Implement `Take` for `ObjectLit`.
 - Implement `Take` for `ArrayLit`.

swc_ecma_transforms_compat:
 - `nullish_coalescing`: Remove exponential visit.
 - `nullish_coalescing`: Migrate to `VisitMut`.
 - `optional_chaining`: Reduce exponential visit. (But it's not removed)
 - `class_properties`: Remove exponential visit.
 - `jsx_src`: Migrate to `VisitMut`.
 - `optional_chaining`: Mae it parallel.
 - `async_to_generator`: Remove `#[fast_path]`.
 - `arrow`: Remove `#[fast_path]`.
 - `destructuring`: Remove `#[fast_path]`.
 - `block_scoped_functions`:  Remove `#[fast_path]`.
 - `classes`: Remove `#[fast_path]`.
2021-10-16 08:12:02 +00:00
Donny/강동윤
4c983e9158
perf(es/codegen, es/parser): Improve performance (#2406)
ast_node:
 - Make `.span()` inlinable.

swc_ecma_codegen:
 - Reduce call to *heavy* `.span()` calls.

swc_ecma_parser:
 - Reduce `memmove` by using typed-arena.

swc_bundler:
 - Make `Bundle.bundle` take `&mut self`.
 - Make drop concurrent.
2021-10-15 12:49:37 +09:00