Skip to content

Commit ef9f932

Browse files
authored
Run fixpoint per strongly connected component (#999)
* Run nested cycles in a single fixpoint iteration Fix serde attribute * Remove inline from `validate_same_iteration` * Nits * Move locking into sync table * More trying * More in progress work * More progress * Fix most parallel tests * More bugfixes * Short circuit in some cases * Short circuit in drop * Delete some unused code * A working solution * Simplify more * Avoid repeated query lookups in `transfer_lock` * Use recursion for unblocking * Fix hang in `maybe_changed_after` * Move claiming of transferred memos into a separate function * More aggressive use of attributes * Make re-entrant a const parameter * Smaller clean-ups * Only collect cycle heads one level deep * More cleanups * More docs * More comments * More documentation, cleanups * More documentation, cleanups * Remove inline attribute * Fix failing tracked structs test * Fix panic * Fix persistence test * Add test for panic in nested cycle * Allow cycle initial values same-stack * Try inlining fetch * Remove some inline attributes * Add safety comment * Clippy * Panic if `provisional_retry` runs too many times * Better handling of panics in cycles * Don't use const-generic for `REENTRANT` * More nit improvements * Remove `IterationCount::panicked` * Prefer outer most cycles in `outer_cycle` * Code review feedback * Iterate only once in panic test when running with miri
1 parent 8b0831f commit ef9f932

27 files changed

+2093
-561
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ intrusive-collections = "0.9.7"
2222
parking_lot = "0.12"
2323
portable-atomic = "1"
2424
rustc-hash = "2"
25-
smallvec = "1"
25+
smallvec = { version = "1", features = ["const_new"] }
2626
thin-vec = { version = "0.2.14" }
2727
tracing = { version = "0.1", default-features = false, features = ["std"] }
2828

src/active_query.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ impl fmt::Display for Backtrace {
498498
if full {
499499
write!(fmt, " -> ({changed_at:?}, {durability:#?}")?;
500500
if !cycle_heads.is_empty() || !iteration_count.is_initial() {
501-
write!(fmt, ", iteration = {iteration_count:?}")?;
501+
write!(fmt, ", iteration = {iteration_count}")?;
502502
}
503503
write!(fmt, ")")?;
504504
}
@@ -517,7 +517,7 @@ impl fmt::Display for Backtrace {
517517
}
518518
write!(
519519
fmt,
520-
"{:?} -> {:?}",
520+
"{:?} -> iteration = {}",
521521
head.database_key_index, head.iteration_count
522522
)?;
523523
}

src/cancelled.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ pub enum Cancelled {
2020
}
2121

2222
impl Cancelled {
23+
#[cold]
2324
pub(crate) fn throw(self) -> ! {
2425
// We use resume and not panic here to avoid running the panic
2526
// hook (that is, to avoid collecting and printing backtrace).

0 commit comments

Comments
 (0)