diff --git a/Cargo.toml b/Cargo.toml index 8eea9c7..520f623 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "regalloc2" -version = "0.4.1" +version = "0.4.2" authors = [ "Chris Fallin ", "Mozilla SpiderMonkey Developers", diff --git a/src/ion/spill.rs b/src/ion/spill.rs index a95eed5..3583080 100644 --- a/src/ion/spill.rs +++ b/src/ion/spill.rs @@ -90,10 +90,7 @@ impl<'a, F: Function> Env<'a, F> { ) { self.spillsets[spillset.index()].slot = spillslot; - // Take `spillsets` to avoid a conflicting borrow of `self`. - let spillsets = std::mem::take(&mut self.spillsets); - - for vreg in &spillsets[spillset.index()].vregs { + for vreg in &self.spillsets[spillset.index()].vregs { trace!( "spillslot {:?} alloc'ed to spillset {:?}: vreg {:?}", spillslot, @@ -114,10 +111,6 @@ impl<'a, F: Function> Env<'a, F> { .insert(LiveRangeKey::from_range(&entry.range), entry.index); } } - - // Replace `spillsets`. - let default = std::mem::replace(&mut self.spillsets, spillsets); - debug_assert!(default.is_empty()); } pub fn allocate_spillslots(&mut self) {