Skip to content

Commit

Permalink
refactor(visit): Pre-generate visitor code (#9262)
Browse files Browse the repository at this point in the history
**Description:**

This would improve compile time by a margin, and this is a refactoring that should be done before applying `swc_allocator::boxed::Box` to ES AST.

This PR removes `swc_visit_macros` because we now use a simple binary to generate code before publishing.


**Related issue:**

 - Closes #9101
  • Loading branch information
kdy1 authored Jul 17, 2024
1 parent 01d474b commit 9c17663
Show file tree
Hide file tree
Showing 54 changed files with 307,631 additions and 3,636 deletions.
3 changes: 2 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[alias]
xtask = "run --package xtask --"
codegen = "run --package generate-code --"
xtask = "run --package xtask --"

[build]

Expand Down
57 changes: 41 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,15 @@ members = [
"crates/swc_transform_common",
"crates/swc_typescript",
"crates/swc_fast_ts_strip",
"tools/generate-code",
]
resolver = "2"

[workspace.package]
license = "Apache-2.0"
repository = "https://github.com/swc-project/swc.git"


[workspace.dependencies]
# bytecheck version should be in sync with rkyv version. Do not bump individually.
bytecheck = "0.6.10"
Expand Down
Loading

0 comments on commit 9c17663

Please sign in to comment.