Skip to content

Commit

Permalink
perf(es/compat): Migrate class_properties to VisitMut partially (s…
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj authored and nicholasxjy committed Dec 18, 2021
1 parent 50cc642 commit a968d9c
Show file tree
Hide file tree
Showing 2 changed files with 133 additions and 140 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -737,17 +737,19 @@ impl ClassProperties {
members.push(ClassMember::Constructor(c));
}

extra_stmts.extend(private_method_fn_decls.fold_with(&mut FieldAccessFolder {
private_method_fn_decls.visit_mut_with(&mut FieldAccessFolder {
mark: self.mark,
method_mark: self.method_mark,
private_methods: &private_methods,
statics: &statics,
vars: vec![],
class_name: &class_ident,
in_assign_pat: false,
}));
});

extra_stmts.extend(private_method_fn_decls);

let members = members.fold_with(&mut FieldAccessFolder {
members.visit_mut_with(&mut FieldAccessFolder {
mark: self.mark,
method_mark: self.method_mark,
private_methods: &private_methods,
Expand Down
Loading

0 comments on commit a968d9c

Please sign in to comment.