Skip to content

Commit cf47f87

Browse files
committed
kill me
1 parent 561dbd6 commit cf47f87

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

cobalt-ast/src/types/agg.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,6 @@ impl Type for SizedArray {
773773
eprintln!("base kind: {}, our int kind: {}, real int kind: {}", base.kind(), self.elem().kind(), types::Int::KIND);
774774
dbg!(base == self.elem());
775775
eprintln!("base: {base:p}, elem: {:p}", self.elem());
776-
eprintln!("{:?}", types::int::INTERN);
777776
}
778777
dbg!(target.is_and::<types::Pointer>(|r| r.base() == self.elem()))
779778
}

cobalt-ast/src/types/int.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ impl Int {
1010
fn from_ref(val: &(u16, bool)) -> &Self;
1111
pub fn new(bits: u16, unsigned: bool) -> &'static Self {
1212
eprintln!("new int: {bits}, {unsigned}");
13+
eprintln!("INTERN: {INTERN:#?}");
1314
let ret = Self::from_ref(INTERN.intern((bits, unsigned)));
1415
eprintln!("finished making int");
1516
ret

cobalt-utils/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ description.workspace = true
99
documentation.workspace = true
1010

1111
[dependencies]
12-
aovec = "1.1.0"
12+
boxcar = "0.2.4"
1313
hashbrown = { version = "0.14.2", features = ["raw"] }
1414
once_cell = "1.18.0"

cobalt-utils/src/intern.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,15 @@ fn hash(val: &impl Hash) -> u64 {
99
val.hash(&mut state);
1010
state.finish()
1111
}
12+
#[derive(Debug)]
1213
pub struct Interner<'a, T: PartialEq + Eq + Hash> {
13-
vec: Lazy<aovec::Aovec<T>>,
14+
vec: Lazy<boxcar::Vec<T>>,
1415
map: RwLock<HashTable<(&'a T, usize)>>,
1516
}
16-
impl<T: Debug + PartialEq + Eq + Hash> Debug for Interner<'_, T> {
17-
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
18-
f.debug_struct("Interner").field("map", &self.map.read().unwrap()).finish_non_exhaustive()
19-
}
20-
}
2117
impl<'a, K: PartialEq + Eq + Hash> Interner<'a, K> {
2218
pub const fn new() -> Self {
2319
Self {
24-
vec: Lazy::new(|| aovec::Aovec::new(16)),
20+
vec: Lazy::new(|| boxcar::Vec::new(16)),
2521
map: RwLock::new(HashTable::new()),
2622
}
2723
}

0 commit comments

Comments
 (0)