From eb0a8fd22f39f992fa7ff3c8f9900831e0983354 Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Tue, 1 Nov 2022 10:30:30 -0700 Subject: [PATCH] Bump to version 0.4.2 (#99) * Bump to version 0.4.2 * Remove take-and-replace dance There are no conflicting borrows of `self` anymore. --- Cargo.toml | 2 +- src/ion/spill.rs | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) 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) {