Skip to content

Commit 0e8fc63

Browse files
committed
Revert "Garbage test"
This reverts commit 418f02b.
1 parent 418f02b commit 0e8fc63

File tree

5 files changed

+10
-51
lines changed

5 files changed

+10
-51
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ testing = []
4646
comemo-macros = { workspace = true, optional = true }
4747
parking_lot = { workspace = true }
4848
siphasher = { workspace = true }
49+
bumpalo = "*"
4950
slab = { workspace = true }
5051

5152
[dev-dependencies]

src/arena.rs

Lines changed: 0 additions & 42 deletions
This file was deleted.

src/cache.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
use std::sync::LazyLock;
22
use std::sync::atomic::{AtomicUsize, Ordering};
33

4+
use bumpalo::Bump;
45
use parking_lot::{Mutex, RwLock};
56
use siphasher::sip128::{Hasher128, SipHasher13};
67

78
use crate::accelerate;
8-
use crate::arena::Arena;
99
use crate::call::Call;
1010
use crate::calltree::{CallSequence, CallTree, InsertError};
1111
use crate::input::Input;
@@ -37,7 +37,7 @@ impl<C> Default for Recording<C> {
3737
pub fn memoized<'c, In, Out, F>(
3838
mut input: In,
3939
list: &'c Mutex<Recording<In::Call>>,
40-
bump: &'c Arena,
40+
bump: &'c Bump,
4141
cache: &Cache<In::Call, Out>,
4242
enabled: bool,
4343
func: F,

src/input.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use std::hash::{Hash, Hasher};
22

3-
use crate::arena::Arena;
3+
use bumpalo::Bump;
4+
45
use crate::call::Call;
56
use crate::track::{Track, Tracked, TrackedMut};
67

@@ -40,7 +41,7 @@ pub trait Input {
4041
fn retrack<'r>(
4142
self,
4243
sink: impl Fn(Self::Call, u128) -> bool + Copy + Send + Sync + 'r,
43-
b: &'r Arena,
44+
b: &'r Bump,
4445
) -> Self::WithLifetime<'r>
4546
where
4647
Self: 'r;
@@ -79,7 +80,7 @@ impl<T: Hash> Input for T {
7980
fn retrack<'r>(
8081
self,
8182
_: impl Fn(Self::Call, u128) -> bool + Copy + Send + Sync + 'r,
82-
_: &'r Arena,
83+
_: &'r Bump,
8384
) -> Self::WithLifetime<'r>
8485
where
8586
Self: 'r,
@@ -135,7 +136,7 @@ where
135136
fn retrack<'r>(
136137
self,
137138
sink: impl Fn(Self::Call, u128) -> bool + Copy + Send + Sync + 'r,
138-
b: &'r Arena,
139+
b: &'r Bump,
139140
) -> Self::WithLifetime<'r>
140141
where
141142
Self: 'r,
@@ -199,7 +200,7 @@ where
199200
fn retrack<'r>(
200201
self,
201202
sink: impl Fn(Self::Call, u128) -> bool + Copy + Send + Sync + 'r,
202-
b: &'r Arena,
203+
b: &'r Bump,
203204
) -> Self::WithLifetime<'r>
204205
where
205206
Self: 'r,
@@ -260,7 +261,7 @@ macro_rules! multi {
260261
fn retrack<'r>(
261262
self,
262263
sink: impl Fn(Self::Call, u128)-> bool + Copy + Send + Sync + 'r,
263-
bump: &'r Arena,
264+
bump: &'r Bump,
264265
) -> Self::WithLifetime<'r>
265266
where
266267
Self: 'r,

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ For the full example see [`examples/calc.rs`][calc].
8989
*/
9090

9191
mod accelerate;
92-
mod arena;
9392
mod cache;
9493
mod call;
9594
mod calltree;

0 commit comments

Comments
 (0)