Skip to content

Commit 6643336

Browse files
committed
Implement rough symbol interning infra
1 parent 7fa20cb commit 6643336

File tree

5 files changed

+2223
-1
lines changed

5 files changed

+2223
-1
lines changed

.typos.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ extend-ignore-re = [
1414
"\\w*\\.{3,4}\\w*",
1515
'"flate2"',
1616
"raison d'être",
17+
"inout",
18+
"optin"
1719
]
1820

1921
[default.extend-words]

Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/intern/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ dashmap.workspace = true
1818
hashbrown.workspace = true
1919
rustc-hash.workspace = true
2020
triomphe.workspace = true
21+
sptr = "0.3.2"
2122

2223
[lints]
23-
workspace = true
24+
workspace = true

crates/intern/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ type Guard<T> = dashmap::RwLockWriteGuard<
2020
HashMap<Arc<T>, SharedValue<()>, BuildHasherDefault<FxHasher>>,
2121
>;
2222

23+
mod symbol;
24+
pub use self::symbol::{symbols, Symbol};
25+
2326
pub struct Interned<T: Internable + ?Sized> {
2427
arc: Arc<T>,
2528
}

0 commit comments

Comments
 (0)