Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ resolver = "2"
thiserror = "1.0.30"
tokio = { version = "1", default-features = false }
toml = "0.8.2"
tracing = "0.1.41"
tracing = { version = "0.1.41", features = ["max_level_off", "release_max_level_off"] }
tracing-chrome = "0.7.2"
tracing-subscriber = "0.3.20"
triomphe = "0.1.13"
Expand Down
1 change: 0 additions & 1 deletion crates/swc_cli_impl/src/commands/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use swc_core::trace_macro::swc_trace;
#[derive(Parser)]
pub struct BundleOptions {}

#[swc_trace]
impl super::CommandRunner for BundleOptions {
fn execute(&self) -> anyhow::Result<()> {
unimplemented!("Bundle command is not yet implemented")
Expand Down
2 changes: 0 additions & 2 deletions crates/swc_cli_impl/src/commands/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ struct InputContext {
file_extension: PathBuf,
}

#[swc_trace]
impl CompileOptions {
fn build_transform_options(&self, file_path: &Option<&Path>) -> anyhow::Result<Options> {
let config_file = self.config_file.as_ref().map(|config_file_path| {
Expand Down Expand Up @@ -552,7 +551,6 @@ impl CompileOptions {
}
}

#[swc_trace]
impl super::CommandRunner for CompileOptions {
fn execute(&self) -> anyhow::Result<()> {
let guard = if self.experimental_trace {
Expand Down
1 change: 0 additions & 1 deletion crates/swc_cli_impl/src/commands/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use swc_core::trace_macro::swc_trace;
#[derive(Parser)]
pub struct LintOptions {}

#[swc_trace]
impl super::CommandRunner for LintOptions {
fn execute(&self) -> anyhow::Result<()> {
unimplemented!("Lint command is not yet implemented")
Expand Down
1 change: 0 additions & 1 deletion crates/swc_cli_impl/src/commands/minify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use swc_core::trace_macro::swc_trace;
#[derive(Parser)]
pub struct MinifyOptions {}

#[swc_trace]
impl super::CommandRunner for MinifyOptions {
fn execute(&self) -> anyhow::Result<()> {
unimplemented!("Minify command is not yet implemented")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ struct AsyncArrowsInClass {
}

/// TODO: VisitMut
#[swc_trace]
impl Fold for AsyncArrowsInClass {
standard_only_fold!();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ struct EdgeDefaultParam {
in_arrow: bool,
}

#[swc_trace]
impl VisitMut for EdgeDefaultParam {
noop_visit_mut_type!(fail);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ impl SafariIdDestructuringCollisionInFunctionExpression {
}
}

#[swc_trace]
impl VisitMut for SafariIdDestructuringCollisionInFunctionExpression {
noop_visit_mut_type!(fail);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ impl TemplateLiteralCaching {
}

/// TODO: VisitMut
#[swc_trace]
impl Fold for TemplateLiteralCaching {
standard_only_fold!();

Expand Down
1 change: 0 additions & 1 deletion crates/swc_ecma_compat_es2015/src/arrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ struct Arrow {
hoister: FnEnvHoister,
}

#[swc_trace]
impl VisitMut for Arrow {
noop_visit_mut_type!(fail);

Expand Down
1 change: 0 additions & 1 deletion crates/swc_ecma_compat_es2015/src/block_scoped_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ pub fn block_scoped_functions() -> impl Pass {
#[derive(Clone, Copy)]
struct BlockScopedFns;

#[swc_trace]
impl VisitMut for BlockScopedFns {
noop_visit_mut_type!(fail);

Expand Down
3 changes: 0 additions & 3 deletions crates/swc_ecma_compat_es2015/src/block_scoping/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ impl BlockScoping {
}
}

#[swc_trace]
impl VisitMut for BlockScoping {
noop_visit_mut_type!(fail);

Expand Down Expand Up @@ -679,7 +678,6 @@ impl FlowHelper<'_> {
}
}

#[swc_trace]
impl VisitMut for FlowHelper<'_> {
noop_visit_mut_type!(fail);

Expand Down Expand Up @@ -912,7 +910,6 @@ impl MutationHandler<'_> {
}
}

#[swc_trace]
impl VisitMut for MutationHandler<'_> {
noop_visit_mut_type!(fail);

Expand Down
3 changes: 0 additions & 3 deletions crates/swc_ecma_compat_es2015/src/block_scoping/vars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ struct ParentScope<'a> {
vars: &'a IndexMap<Id, VarDeclKind, FxBuildHasher>,
}

#[swc_trace]
impl BlockScopedVars {
fn add_usage(&mut self, id: Id) {
if !self.scope.usages.contains(&id) {
Expand Down Expand Up @@ -103,7 +102,6 @@ impl BlockScopedVars {
}
}

#[swc_trace]
impl Scope {
fn rename(&mut self, parent: ParentScope, rename_map: &mut FxHashMap<Id, Id>, fn_only: bool) {
for s in self.children.iter_mut() {
Expand Down Expand Up @@ -234,7 +232,6 @@ impl ParentScope<'_> {
}
}

#[swc_trace]
impl VisitMut for BlockScopedVars {
noop_visit_mut_type!(fail);

Expand Down
2 changes: 0 additions & 2 deletions crates/swc_ecma_compat_es2015/src/classes/constructor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ struct ConstructorFolder {
this_ref_count: usize,
}

#[swc_trace]
impl VisitMut for ConstructorFolder {
noop_visit_mut_type!(fail);

Expand Down Expand Up @@ -420,7 +419,6 @@ impl VisitMut for ConstructorFolder {
}
}

#[swc_trace]
impl ConstructorFolder {
fn get_this(&mut self) -> &Ident {
self.this_ref_count += 1;
Expand Down
3 changes: 0 additions & 3 deletions crates/swc_ecma_compat_es2015/src/classes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ struct Data {
get: Option<Box<Expr>>,
}

#[swc_trace]
impl Classes {
fn visit_mut_stmt_like<T>(&mut self, stmts: &mut Vec<T>)
where
Expand Down Expand Up @@ -201,7 +200,6 @@ impl Classes {
}
}

#[swc_trace]
#[fast_path(ClassFinder)]
impl VisitMut for Classes {
noop_visit_mut_type!(fail);
Expand Down Expand Up @@ -331,7 +329,6 @@ impl VisitMut for Classes {
}
}

#[swc_trace]
impl Classes {
fn add_pure_comments(&mut self, start: &mut BytePos) {
*start = BytePos::PURE;
Expand Down
2 changes: 0 additions & 2 deletions crates/swc_ecma_compat_es2015/src/computed_props.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ struct ComputedProps {
c: Config,
}

#[swc_trace]
impl VisitMut for ComputedProps {
noop_visit_mut_type!(fail);

Expand Down Expand Up @@ -368,7 +367,6 @@ impl Visit for ComplexVisitor {
}
}

#[swc_trace]
impl ComputedProps {
fn visit_mut_stmt_like<T>(&mut self, stmts: &mut Vec<T>)
where
Expand Down
5 changes: 0 additions & 5 deletions crates/swc_ecma_compat_es2015/src/destructuring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ fn make_ref_ident_for_for_stmt() -> Ident {
private_ident!("ref")
}

#[swc_trace]
impl AssignFolder {
fn visit_mut_var_decl(&mut self, decls: &mut Vec<VarDeclarator>, decl: VarDeclarator) {
match decl.name {
Expand Down Expand Up @@ -474,7 +473,6 @@ impl AssignFolder {
}
}

#[swc_trace]
#[fast_path(DestructuringVisitor)]
impl VisitMut for Destructuring {
noop_visit_mut_type!(fail);
Expand All @@ -494,7 +492,6 @@ impl VisitMut for Destructuring {
}
}

#[swc_trace]
impl Destructuring {
fn visit_mut_fn_like(
&mut self,
Expand Down Expand Up @@ -606,7 +603,6 @@ impl AssignFolder {
}
}

#[swc_trace]
#[fast_path(DestructuringVisitor)]
impl VisitMut for AssignFolder {
noop_visit_mut_type!(fail);
Expand Down Expand Up @@ -1104,7 +1100,6 @@ impl VisitMut for AssignFolder {
}
}

#[swc_trace]
impl Destructuring {
fn visit_mut_stmt_like<T>(&mut self, stmts: &mut Vec<T>)
where
Expand Down
3 changes: 0 additions & 3 deletions crates/swc_ecma_compat_es2015/src/duplicate_keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ impl Parallel for DuplicateKeys {
}
}

#[swc_trace]
impl VisitMut for DuplicateKeys {
noop_visit_mut_type!(fail);

Expand Down Expand Up @@ -49,7 +48,6 @@ fn atom_from_wtf8(value: &Wtf8Atom) -> Atom {
.unwrap_or_else(|| Atom::from(value.to_string_lossy()))
}

#[swc_trace]
impl VisitMut for PropFolder {
noop_visit_mut_type!(fail);

Expand Down Expand Up @@ -97,7 +95,6 @@ struct PropNameFolder<'a> {
props: &'a mut FxHashSet<Atom>,
}

#[swc_trace]
impl VisitMut for PropNameFolder<'_> {
noop_visit_mut_type!(fail);

Expand Down
3 changes: 0 additions & 3 deletions crates/swc_ecma_compat_es2015/src/for_of.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ struct ForOf {
top_level_vars: Vec<VarDeclarator>,
}

#[swc_trace]
impl ForOf {
fn fold_for_stmt(
&mut self,
Expand Down Expand Up @@ -656,7 +655,6 @@ impl Parallel for ForOf {
}
}

#[swc_trace]
impl ParExplode for ForOf {
fn after_one_stmt(&mut self, stmts: &mut Vec<Stmt>) {
// Add variable declaration
Expand Down Expand Up @@ -693,7 +691,6 @@ impl ParExplode for ForOf {
}
}

#[swc_trace]
#[parallel(explode)]
impl VisitMut for ForOf {
noop_visit_mut_type!(fail);
Expand Down
1 change: 0 additions & 1 deletion crates/swc_ecma_compat_es2015/src/function_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ fn prepare(i: Ident) -> Ident {
private_ident!(i.span, i.sym)
}

#[swc_trace]
impl VisitMut for FnName {
noop_visit_mut_type!(fail);

Expand Down
1 change: 0 additions & 1 deletion crates/swc_ecma_compat_es2015/src/instanceof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ impl Parallel for InstanceOf {
}
}

#[swc_trace]
impl VisitMut for InstanceOf {
noop_visit_mut_type!(fail);

Expand Down
1 change: 0 additions & 1 deletion crates/swc_ecma_compat_es2015/src/new_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ impl NewTarget {
}
}

#[swc_trace]
impl VisitMut for NewTarget {
noop_visit_mut_type!(fail);

Expand Down
3 changes: 0 additions & 3 deletions crates/swc_ecma_compat_es2015/src/object_super.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pub fn object_super() -> impl Pass {
})
}

#[swc_trace]
impl VisitMut for ObjectSuper {
noop_visit_mut_type!(fail);

Expand Down Expand Up @@ -132,7 +131,6 @@ struct SuperReplacer {
vars: Vec<Ident>,
}

#[swc_trace]
impl VisitMut for SuperReplacer {
noop_visit_mut_type!(fail);

Expand Down Expand Up @@ -166,7 +164,6 @@ impl VisitMut for SuperReplacer {
}
}

#[swc_trace]
impl SuperReplacer {
fn get_obj_ref(&mut self) -> Ident {
if let Some(obj) = &self.obj {
Expand Down
2 changes: 0 additions & 2 deletions crates/swc_ecma_compat_es2015/src/parameters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ pub struct Config {
// }
// }

#[swc_trace]
impl Params {
fn visit_mut_fn_like(&mut self, ps: &mut Vec<Param>, body: &mut BlockStmt, is_setter: bool) {
let mut params = Vec::new();
Expand Down Expand Up @@ -465,7 +464,6 @@ impl Params {
}
}

#[swc_trace]
impl VisitMut for Params {
noop_visit_mut_type!(fail);

Expand Down
1 change: 0 additions & 1 deletion crates/swc_ecma_compat_es2015/src/shorthand_property.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ impl Parallel for Shorthand {
fn merge(&mut self, _: Self) {}
}

#[swc_trace]
impl VisitMut for Shorthand {
noop_visit_mut_type!(fail);

Expand Down
3 changes: 0 additions & 3 deletions crates/swc_ecma_compat_es2015/src/spread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ struct Spread {
vars: Vec<VarDeclarator>,
}

#[swc_trace]
#[fast_path(SpreadFinder)]
impl VisitMut for Spread {
noop_visit_mut_type!(fail);
Expand Down Expand Up @@ -198,7 +197,6 @@ impl VisitMut for Spread {
}
}

#[swc_trace]
impl Spread {
fn visit_mut_stmt_like<T>(&mut self, items: &mut Vec<T>)
where
Expand Down Expand Up @@ -227,7 +225,6 @@ impl Spread {
}
}

#[swc_trace]
impl Spread {
fn concat_args(
&self,
Expand Down
1 change: 0 additions & 1 deletion crates/swc_ecma_compat_es2015/src/sticky_regex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ impl Parallel for StickyRegex {
}
}

#[swc_trace]
impl VisitMut for StickyRegex {
noop_visit_mut_type!(fail);

Expand Down
Loading
Loading