Remove unneeded mut keywords.
This commit is contained in:
@@ -467,7 +467,7 @@ impl<T: EntityRef> EntityList<T> {
|
|||||||
/// Since the memory comes from the pool, this will be either zero entity references or
|
/// Since the memory comes from the pool, this will be either zero entity references or
|
||||||
/// whatever where in a previously deallocated list.
|
/// whatever where in a previously deallocated list.
|
||||||
pub fn grow_at(&mut self, index: usize, count: usize, pool: &mut ListPool<T>) {
|
pub fn grow_at(&mut self, index: usize, count: usize, pool: &mut ListPool<T>) {
|
||||||
let mut data = self.grow(count, pool);
|
let data = self.grow(count, pool);
|
||||||
|
|
||||||
// Copy elements after `index` up.
|
// Copy elements after `index` up.
|
||||||
for i in (index + count..data.len()).rev() {
|
for i in (index + count..data.len()).rev() {
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ impl Liveness {
|
|||||||
where
|
where
|
||||||
PP: Into<ProgramPoint>,
|
PP: Into<ProgramPoint>,
|
||||||
{
|
{
|
||||||
let mut lr = self.ranges.get_mut(value).expect("Value has no live range");
|
let lr = self.ranges.get_mut(value).expect("Value has no live range");
|
||||||
lr.move_def_locally(def.into());
|
lr.move_def_locally(def.into());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -345,7 +345,7 @@ impl Liveness {
|
|||||||
layout: &Layout,
|
layout: &Layout,
|
||||||
) -> &mut Affinity {
|
) -> &mut Affinity {
|
||||||
debug_assert_eq!(Some(ebb), layout.inst_ebb(user));
|
debug_assert_eq!(Some(ebb), layout.inst_ebb(user));
|
||||||
let mut lr = self.ranges.get_mut(value).expect("Value has no live range");
|
let lr = self.ranges.get_mut(value).expect("Value has no live range");
|
||||||
let livein = lr.extend_in_ebb(ebb, user, layout);
|
let livein = lr.extend_in_ebb(ebb, user, layout);
|
||||||
assert!(!livein, "{} should already be live in {}", value, ebb);
|
assert!(!livein, "{} should already be live in {}", value, ebb);
|
||||||
&mut lr.affinity
|
&mut lr.affinity
|
||||||
@@ -353,7 +353,7 @@ impl Liveness {
|
|||||||
|
|
||||||
/// Change the affinity of `value` to `Stack` and return the previous affinity.
|
/// Change the affinity of `value` to `Stack` and return the previous affinity.
|
||||||
pub fn spill(&mut self, value: Value) -> Affinity {
|
pub fn spill(&mut self, value: Value) -> Affinity {
|
||||||
let mut lr = self.ranges.get_mut(value).expect("Value has no live range");
|
let lr = self.ranges.get_mut(value).expect("Value has no live range");
|
||||||
mem::replace(&mut lr.affinity, Affinity::Stack)
|
mem::replace(&mut lr.affinity, Affinity::Stack)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user