Commit Graph

83 Commits

Author SHA1 Message Date
Donny/강동윤
fce3b79e79
fix(es/minifier): Improve name mangler ()
swc_ecma_transforms_base:
 - Expose renamer.

swc_ecma_minifier:
 - Improve name mangler.

swc:
 - Disable hygiene if mangler is enabled.
2021-10-24 10:52:09 +00:00
Donny/강동윤
5afedf83c9
fix(bundler): Fix name of helper ()
swc_bundler:
 - Use correct name for helpers. ()
2021-10-23 13:18:14 +00:00
Donny/강동윤
9e215769cc
fix(es/minifier): Fix minifier using Deno test suite ()
swc_ecma_codegen:
 - Emit `;` after private class properties.

swc_ecma_minifier:
 - `pure`: Drop more invalid expressions.
 - `sequences`: Drop more invalid expressions.
 - `strings`: Fix concat.
 - `inline`: Inline into `b` in `a[b] = foo`.
2021-10-21 11:56:48 +00:00
Donny/강동윤
26944e159d
fix(es/transforms/base): Reimplement hygiene ()
swc_ecma_transforms_base:
 - Reimplement `hygiene`.
2021-10-21 05:12:50 +00:00
Donny/강동윤
123c1f5d02
chore: Fix typo () 2021-10-19 08:25:57 +00:00
Donny/강동윤
4c983e9158
perf(es/codegen, es/parser): Improve performance ()
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
Donny/강동윤
8074c72ce9
fix(es/transforms/base): Fix hyigiene ()
swc_ecma_transforms_base:
 - `hygiene`: Considering scoping of `var`.
 - `hygiene`: Avoid creating too many `JsWord` by caching index.
2021-10-13 17:32:37 +09:00
Donny/강동윤
ac3fbd91ac
perf(bundler): Improve performance ()
*:
 - Use `ahash` instread of `rustc-hash`.

swc_ecma_transforms_optimization:
 - Make `dce` parallel.
2021-10-09 08:08:13 +00:00
Donny/강동윤
d0342a5a58
feat(swcpack): Enable concurrent mode ()
swc_common:
 - Use `Mutex` from `parking_lot` instead of it from std.

swc_bundler:
 - Use `fxhash` if possible.
 - Don't `clone()` all modules if the entry has only one item.

swc_ecma_loader:
 - `NodeModulesResolver`: Use `path-clean` instead of `canonicalize`.

swc_ecma_transforms_optimization:
 - Reimplement `dce`

node_bundler:
 - Enable `concurrent` of `swc_bundler`.
2021-10-08 16:47:01 +09:00
Donny/강동윤
edc4cb432e
fix(swc): Fix order of custom passes ()
swc_ecma_transform_react:
 - Accept `top_level_mark`.

swc:
 - Fix order of `custom_before_pass`.
2021-10-07 15:13:21 +09:00
Donny/강동윤
180dc31550
fix(es/transforms/base): Fix hygiene pass ()
swc_ecma_transforms_base:
 - `hygiene`: Consider nested scopes correctly. ()
 - `hygiene`: Fix handling of constructors.
2021-09-21 12:21:49 +00:00
강동윤
cb2b0c671f
fix(es/transforms/base): Optimize hygiene ()
swc_ecma_transforms_base:
 - `hygiene`: Don't rename if not required. ()

swc_ecma_minifier:
 - Remove `hygiene_optimizer`.
2021-09-01 13:11:55 +00:00
강동윤
b0278242ba
fix(bundler): Fix handling of reexports from cjs modules ()
swc_bundler:
 - Handle reexports from cjs modules. ()
 - Inject `__spack_require__` helper if required.
2021-08-24 07:20:15 +00:00
muji
e84ed13ffe
feat(es/loader): Support more types for browser in package.json () 2021-08-16 17:34:53 +09:00
강동윤
f8aa0509ce
fix(bundler): Fix stack overflow ()
swc_bundler:
 - Prevent infinite recursions. ()
2021-08-15 02:37:31 +00:00
강동윤
f6aabfce9c
perf: Use ahash instead of sip hash ()
swc_common:
 - Add `AHashMap`.
 - Add `AHashSet`.
2021-08-14 10:33:16 +00:00
강동윤
b0c41bb3f2
chore: Cleanup codes for fixture testing () 2021-08-14 06:34:04 +00:00
강동윤
883c1ac4e4
fix(bundler): Prepare renaming of bundler ()
- Rename `spack` crate to `swc_node_bundler`. ()
2021-08-13 10:03:04 +00:00
LongYinan
fe2a063525
perf(node/swc): Use mimalloc () 2021-08-13 18:39:13 +09:00
강동윤
4011703af5
fix(testing): Allow using it with stable rustc ()
testing_macros:
 - Make `#[fixture]` relative to cargo manifest dir.
2021-07-29 14:18:21 +09:00
강동윤
204a71ca94
fix(es/transforms): Fix bugs ()
swc_ecma_trasnsforms_base:
 - `fixer`: Don't de-optimize `++foo || bar`.

swc_ecma_trasnsforms_typescript:
 - Allow using properties from a decorated class. ()

swc_ecma_transforms_optimization:
 - Fix infinite loop. (, )
2021-07-22 07:33:00 +00:00
강동윤
21848ce2ea
fix(es/transforms): Fix passes related to optimizations ()
swc_ecma_transofrms_base:
 - `fixer`: Handle `in`.
 - `fixer`: Handle `in` in the head of for statements.
 - `fixer`: Optimize `- (1 / 0)`.
 - `fixer`: Optimize `void 0 === a`.
 - `fixer`: Optimize `a-- && b = c`.
 - `fixer`: Don't de-optimize if statements.
 - `fixer`: Fix handling of if statements.

swc_ecma_transforms_optimization:
 - `dead_branch_remover`: Preserve `var`s in dropped switch cases.
2021-07-20 11:07:36 +00:00
강동윤
39ee7b962d
fix(es/codegen): Fix codegen of template literals ()
swc_ecma_codegen:
 - Fix codegen of template literals. (Closes )
2021-07-20 14:11:33 +09:00
강동윤
a26a18989f
fix(es/transforms): Allow using rest pattern in arrow functions. ()
swc_ecma_transforms_compat:
 - `parameters`: Allow using rest pattern within arrow functions.
2021-07-16 07:05:00 +00:00
강동윤
104be9837b
fix(es/transforms): Fix transforms ()
swc_ecma_transforms_compat:
 - `regenerator`: Use es6 import while folding module. ()
 - `typeof_symbol`: Handle `undefined` specially. ()
 - `regenerator`: Do not create useless codes. ()
 - `typeof_symbol`: Migrate to `VisitMut`.

swc_ecma_transforms_module:
 - Add `import_hoister`.
 - Improve import analyzer. ()
 - Allow overriding `export *` wth named exports. ()

swc_ecma_transforms_testing:
 - Add a hack for `regenerator-runtime`.

swc:
 - Run import analyzer ahead of time. ()

misc:
 - Downgrade rustc to the version rust-analyzer supports.
2021-07-10 11:18:28 +00:00
강동윤
35af4c5186
chore: Publish v1.2.63 & Update rustc () 2021-07-05 12:51:09 +00:00
강동윤
ea93e1d1be
fix(bundler): Prevent infinite loop ()
swc_bundler:
 - Fix cycle detection. ()
 - Add fallback logic for topoligcal sorting.
2021-07-01 12:56:08 +00:00
강동윤
4e7723a7a0
fix(bundler): Fix cycle detection ()
swc_bundler:
 - Fix cycle detection. ()
2021-06-03 14:15:20 +09:00
강동윤
d60c3242af
fix(swc): Fix bugs ()
swc_bundler:
 - Fix cycle detection for complex circular imports. ()

swc_ecma_transforms_typescript:
 - Allow using large values for an enum variant.
2021-05-25 14:30:17 +09:00
강동윤
731dc68c92
fix(bundler): Use proper algorithm for dependency analysis ()
swc_bundler:
 - Optimize detection of circular imports.
2021-04-26 09:18:57 +00:00
강동윤
308792dc90
fix(bundler): Fix performance ()
swc_bundler
 - Use a faster hash algorithm while sorting modules.
 - Remove plan system.
2021-04-24 04:28:38 +00:00
강동윤
9a07869c21
fix(bundler): Improve performance ()
swc_bundler:
 - Skip sorting of statements if a module does not import anything.
2021-04-22 10:43:35 +00:00
강동윤
8222cc075d
feat(ast_node): Add #[ast_serde] ()
ast_node:
 - Add `#[ast_serde]`.
2021-04-21 09:11:50 +00:00
강동윤
1178686a4c
fix(bundler): Fix bundler ()
swc_bundler:
 - Fix remapping of exports. ()
2021-04-16 18:09:38 +00:00
강동윤
246bdd5088
fix(bundler): Fix bugs ()
swc_bundler:
 - Ensure that denoland/deno#10141 is fixed. 
 - Run deno tests on ci.
 - Support nested `export *`. (denoland/deno#10153, denoland/deno#10174)

swc_ecma_codegen:
 - Remove `,` after rest elements. (, )

swc_ecma_transforms_optimization:
 - Don't drop items used by the discriminant of a switch.

swc_ecma_transforms_typescript:
 - Remove constructors without a body.
2021-04-14 14:00:33 +00:00
Devon Govett
14edb69826
fix(es/transforms/base/fixer): Fix parens of sequence expressions ()
swc_ecma_transforms_base:
 - Fix parens of sequence expressions in callee and function parameters.
2021-04-12 06:14:55 +00:00
Nayeem Rahman
8b1f8dde4b
fix(strip): Expand class expressions as sequences
swc_ecma_transforms_typescript:
 - `strip`: Expand class expressions as sequences.

Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-03-30 12:09:11 +09:00
강동윤
7853b0a76c
fix(bundler): Fix inlining pass ()
swc_bundler:
 - Fix inlining pass. ()
2021-03-26 16:21:30 +09:00
강동윤
fec189f2f3
fix(bundler): Fix stack overflow on Windows ()
bundler:
 - Prevent stack overflow. ()

testing:
 - Bump version
 - Fix handling of paths on windows.

testing_macros:
 - Bump version
 - Correctly ignore files.
2021-03-22 19:42:42 +09:00
Nayeem Rahman
9bc074ed46
fix(strip): Combine typescript_class_properties() into strip() ()
swc_ecma_utils:
 - Use `&mut` for inject_after_super.

swc_ecma_transforms_typescript:
 - Merge `typescript_class_properties` into `strip`.

Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-03-21 22:31:35 +09:00
강동윤
bc07215d4d
fix(es/parser): Fix lexing of template literals. ()
swc_ecma_parser:
 - Fix lexing of template literals. ()
 - Ensure that  is not a bug of parser.
2021-03-03 17:46:36 +09:00
강동윤
bbaf619f63
fix(bundler): Fix bugs ()
swc_bundler:
 - [x] Fix wrapped esms. ()
 - [x] Make test secure.
2021-03-02 17:33:03 +09:00
강동윤
c047e0e54d
fix(bundler): Fix bundler ()
swc_bundler:
 - Create variables for export while preparing a module. ()
 - Fix order of statements.
 - Invoke dce multiple time if required. ()

swc_ecma_transforms_optimization:
 - dce: Track modifications correctly.
2021-02-26 18:21:42 +09:00
강동윤
7f5bfdcc00
fix(bundler): Fix bugs ()
swc_bundler:
 - Improve performance
 - Use `Vec<AHashSet<usize>>` instead of `AHashSet<(usize, usize)>`.
 - Fix statement orderings. () 
 - Fix wrapped esm mixed with circular imports. ()
 - Store content of wrapped esm at top level. ()
2021-02-22 17:27:40 +09:00
강동윤
27aad87798
fix(es/transforms/base): Fix hygiene of catch clause ()
swc_ecma_transforms_base:
 - `hygiene`: Apply ops in catch clauses. ()
2021-02-19 16:52:02 +09:00
강동윤
bf445a75c4
fix(swc): Fix bugs ()
swc_ecma_ast:
 - Support import assertions for exports.

swc_ecma_parser:
 - Support import assertions for exports.

swc_ecma_transform_typescript:
 - Strip `declare globals` correctly. ()

spack:
 - Re-enable multi-entry tests.
2021-02-10 17:25:28 +09:00
Michael Nicholls
bd119e6634
feat(es/preset-env): Custom config path ()
swc_ecma_preset_env:
 - Support custom path.

Co-authored-by: 강동윤 <kdy1@dudy.kr>
2021-02-03 13:27:11 +09:00
강동윤
bfde9a1f6e
fix(bundler): Fix bugs ()
swc_bundler:
- Handle export default-ed functions correctly.
2021-02-01 12:31:03 +09:00
강동윤
0d130f8103
fix(bundler): Prevent hanging ()
swc_bundler:
 - Prevent infinite loop.
2021-01-30 13:35:07 +09:00
강동윤
93a19140a8
fix(es): Fixes for type checker ()
swc_ecma_codegen:
 - Print type parameters of a class method.

swc_ecam_transforms_base:
 - `ts_resolver`: Handle type parameter constraints correctly.
2021-01-26 22:05:30 +09:00