@@ -474,26 +474,10 @@ impl<V: Clone> State<V> {
474
474
}
475
475
}
476
476
477
- pub fn is_reachable(&self) -> bool {
477
+ fn is_reachable(&self) -> bool {
478
478
matches!(&self.0, StateData::Reachable(_))
479
479
}
480
480
481
- pub fn mark_unreachable(&mut self) {
482
- self.0 = StateData::Unreachable;
483
- }
484
-
485
- pub fn flood_all(&mut self)
486
- where
487
- V: HasTop,
488
- {
489
- self.flood_all_with(V::TOP)
490
- }
491
-
492
- pub fn flood_all_with(&mut self, value: V) {
493
- let StateData::Reachable(values) = &mut self.0 else { return };
494
- values.raw.fill(value);
495
- }
496
-
497
481
/// Assign `value` to all places that are contained in `place` or may alias one.
498
482
pub fn flood_with(&mut self, place: PlaceRef<'_>, map: &Map, value: V) {
499
483
self.flood_with_tail_elem(place, None, map, value)
@@ -508,7 +492,7 @@ impl<V: Clone> State<V> {
508
492
}
509
493
510
494
/// Assign `value` to the discriminant of `place` and all places that may alias it.
511
- pub fn flood_discr_with(&mut self, place: PlaceRef<'_>, map: &Map, value: V) {
495
+ fn flood_discr_with(&mut self, place: PlaceRef<'_>, map: &Map, value: V) {
512
496
self.flood_with_tail_elem(place, Some(TrackElem::Discriminant), map, value)
513
497
}
514
498
@@ -544,7 +528,7 @@ impl<V: Clone> State<V> {
544
528
/// This does nothing if the place is not tracked.
545
529
///
546
530
/// The target place must have been flooded before calling this method.
547
- pub fn insert_idx(&mut self, target: PlaceIndex, result: ValueOrPlace<V>, map: &Map) {
531
+ fn insert_idx(&mut self, target: PlaceIndex, result: ValueOrPlace<V>, map: &Map) {
548
532
match result {
549
533
ValueOrPlace::Value(value) => self.insert_value_idx(target, value, map),
550
534
ValueOrPlace::Place(source) => self.insert_place_idx(target, source, map),
@@ -908,11 +892,6 @@ impl Map {
908
892
self.inner_values[root] = start..end;
909
893
}
910
894
911
- /// Returns the number of tracked places, i.e., those for which a value can be stored.
912
- pub fn tracked_places(&self) -> usize {
913
- self.value_count
914
- }
915
-
916
895
/// Applies a single projection element, yielding the corresponding child.
917
896
pub fn apply(&self, place: PlaceIndex, elem: TrackElem) -> Option<PlaceIndex> {
918
897
self.projections.get(&(place, elem)).copied()
@@ -952,7 +931,7 @@ impl Map {
952
931
}
953
932
954
933
/// Iterate over all direct children.
955
- pub fn children(&self, parent: PlaceIndex) -> impl Iterator<Item = PlaceIndex> + '_ {
934
+ fn children(&self, parent: PlaceIndex) -> impl Iterator<Item = PlaceIndex> + '_ {
956
935
Children::new(self, parent)
957
936
}
958
937
0 commit comments