Commits
Click on a commit to change the comparison rangefeat(ast): add `AstBuilder::atom_from_cow` (#7974)
Various methods e.g. `PropertyKey::static_name` return a `Cow<'a, str>`.
When we need to create an `Atom` from such a `Cow`, we can avoid reallocating the string into arena again if the `Cow` already borrows an arena string. The `Atom` can reference that same string, rather than making another copy of it in arena.
Add `AstBuilder::atom_from_cow` method for this purpose.1 year ago
by overlookmotel