Skip to content

Commit

Permalink
[BREAKING CHANGE] Change Atom to Atom<'a> to make it safe (#2497)
Browse files Browse the repository at this point in the history
Part of #2295

This PR splits the `Atom` type into `Atom<'a>` and `CompactString`.

All the AST node strings now use `Atom<'a>` instead of `Atom` to signify
it belongs to the arena.

It is now up to the user to select which form of the string to use.

This PR essentially removes the really unsafe code 


https://github.com/oxc-project/oxc/blob/93742f89e91bc7c45491b6d2b49a134fa65f2b5c/crates/oxc_span/src/atom.rs#L98-L107

which can lead to 

![image](https://github.com/oxc-project/oxc/assets/1430279/8c513c4f-19b0-4b63-b61c-e07c187c95b5)
  • Loading branch information
Boshen authored Feb 26, 2024
1 parent 4fabe66 commit be6b8b7
Show file tree
Hide file tree
Showing 109 changed files with 1,165 additions and 966 deletions.
30 changes: 30 additions & 0 deletions Cargo.lock

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

Loading

0 comments on commit be6b8b7

Please sign in to comment.