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.
This commit is contained in:
Nick Fitzgerald
2022-11-01 10:30:30 -07:00
committed by GitHub
parent fdcf7b694f
commit eb0a8fd22f
2 changed files with 2 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "regalloc2"
version = "0.4.1"
version = "0.4.2"
authors = [
"Chris Fallin <chris@cfallin.org>",
"Mozilla SpiderMonkey Developers",

View File

@@ -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) {