L5CVF6UJYR6FRQA2NULFHGQFID7BGM4D622OJ2TVWRU7EAR57DHAC
52X5P7NDBQHIJDIYNY3XUPDHHOO3PDPPNKGO2PGLXKVNM3EVECTQC
E4MD6T3LNOYWVFTFFWCUKRNS4M2XVSKRLDWPYHMZHGDNO2T5JREQC
H3FVSQIQGFCFKCPXVOSFHP4OSUOBBURJESCZNGQTNDAAD3WQSBEQC
Q7DRIBBRE4MNG4NP3PVIXAJF5PQYLFWYIVK2O4VVLEO6XY3BOSFQC
LSQ6V7M66TEGLJ7QBLRVDX4E7UKJTDQTEXZOS3KGPGFKVXNLPKBQC
73Z2UB3JGRLFNFORE7D64O4IHIFSZASD4G4FLJ4FJLHANT75MGIAC
KX3WVNZW5KHVEH6EOQTZ4RBEFFJ3SGF5I467X3JWZ74PURRK4HVAC
HN6Z5DU4WYMAIOOSNVHLIIMNF6Q53TNJ7YC27SLKWNXVYCTACQKQC
DV4A2LR7Q5LAEGAQHLO34PZCHGJUHPAMRZFGT7GUFNKVQKPJNOYQC
OP6SVMOD2GTQ7VNJ4E5KYFG4MIYA7HBMXJTADALMZH4PY7OQRMZQC
WS4ZQM4RMIHZ6XZKSDQJGHN5SSSWFL4H236USOPUA33S6RC53RFAC
TSMS6W4DOKQNUQ4PEMTLOIODR33VFPN6MMNS73ZPSU4BOQVRGPNAC
QEUTVAZ4F4EJXRDMWDMYXF6XEDMX7YPVG4IIXEKPIR3K54E5W5OAC
XEU2QVLCHPYOOD4TQIPEEVYOVSFMKFPLJYWEJYXYJAZ7S54KWDZAC
T73WR2BX2QDQ6APOREBXUKNH52FDLJNBGWPQUYB2TAF2PT7XCL2AC
T7QB6QEPWBXAU3RL7LE4GRDWWNQ65ZU2YNNTWBYLORJOABAQFEZQC
};
// Append the middle element of the concatenation at the end
// of the left page. We know the left page to be mutable by
// now, and we also know there's enough space to do this.
let lc = PageCursor::after(&new_left.0);
if let Put::Ok(Ok { freed, page }) = <Page<K, V>>::put(
txn, new_left.0, true, false, &lc, m.mid.0, m.mid.1, None, 0, rl,
)? {
assert_eq!(freed, 0);
page
} else {
unreachable!()
page
};
// Append the middle element of the concatenation at the end of
// the left page. We know the left page to be mutable by now, and
// we also know there's enough space to do this.
let lc = PageCursor::after(&new_left.0);
let new_left = if let Put::Ok(Ok { freed, page }) = <Page<K, V>>::put(
txn, new_left.0, true, false, &lc, m.mid.0, m.mid.1, None, 0, rl,
)? {
assert_eq!(freed, 0);
page
// Append the middle element of the concatenation at the end
// of the left page. We know the left page to be mutable by
// now, and we also know there's enough space to do this.
let lc = PageCursor::after(&page.0);
if let Put::Ok(Ok { freed, page }) = <Page<K, V>>::put(
txn, page.0, true, false, &lc, m.mid.0, m.mid.1, None, 0, rl,
)? {
assert_eq!(freed, 0);
page
} else {
unreachable!()
}
unreachable!()
// Append the middle element of the concatenation at the end
// of the left page. We know the left page to be mutable by
// now, and we also know there's enough space to do this.
let is_dirty = m.modified.page.is_dirty();
let lc = PageCursor::after(&m.modified.page);
if let Put::Ok(Ok { freed, page }) = <Page<K, V>>::put(
txn, m.modified.page, m.modified.mutable, false, &lc, m.mid.0, m.mid.1, None, 0, rl,
)? {
if freed > 0 {
let b = if is_dirty { 1 } else { 0 };
freed_[0] = freed | b;
}
page
} else {
unreachable!()
}
freed_[0] = if is_dirty { freed | 1 } else { freed };
if freed > 0 {
freed_[0] = if is_dirty { freed | 1 } else { freed };
}
page
} else {
unreachable!()
};
// Add the middle element of the concatenation as the first
// element of the right page. We know the right page is
// mutable, since we just modified it (hence the
// `assert_eq!(freed, 0)`.
if let Put::Ok(Ok { freed, page }) = P::put(
txn,
new_right.0,
true,
false,
&rc,
m.mid.0,
m.mid.1,
None,
r0,
rl,
)? {
debug_assert_eq!(freed, 0);
page
};
// Add the middle element of the concatenation as the first
// element of the right page. We know the right page is mutable,
// since we just modified it (hence the `assert_eq!(freed, 0)`.
let new_right = if let Put::Ok(Ok { freed, page }) = P::put(
txn,
new_right.0,
true,
false,
&rc,
m.mid.0,
m.mid.1,
None,
r0,
rl,
)? {
debug_assert_eq!(freed, 0);
page
// Add the middle element of the concatenation as the first
// element of the right page. We know the right page is
// mutable, since we just modified it (hence the
// `assert_eq!(freed, 0)`.
if let Put::Ok(Ok { freed, page }) = P::put(
txn,
page.0,
true,
false,
&rc,
m.mid.0,
m.mid.1,
None,
r0,
rl,
)? {
debug_assert_eq!(freed, 0);
page
} else {
unreachable!()
}
unreachable!()
let is_dirty = m.modified.page.is_dirty();
if let Put::Ok(Ok { freed, page }) = P::put(
txn,
m.modified.page,
m.modified.mutable,
false,
&rc,
m.mid.0,
m.mid.1,
None,
r0,
rl,
)? {
if freed > 0 {
freed_[0] = if is_dirty { freed | 1 } else { freed };
}
page
} else {
unreachable!()
}
return Ok(Op::Merged {
page,
freed,
marker: core::marker::PhantomData,
});
};
// Append the middle element of the concatenation at the end
// of the left page. We know the left page to be mutable by
// now, and we also know there's enough space to do this.
let lc = PageCursor::after(&page.0);
if let Put::Ok(Ok { page, freed }) = <Page<K, V>>::put(
txn, page.0, true, false, &lc, m.mid.0, m.mid.1, None, 0, rl,
)? {
assert_eq!(freed, 0);
page
} else {
unreachable!()
page
};
// Append the middle element of the concatenation at the end of
// the left page. We know the left page to be mutable by now, and
// we also know there's enough space to do this.
let lc = PageCursor::after(&new_left.0);
let new_left = if let Put::Ok(Ok { page, freed }) = <Page<K, V>>::put(
txn, new_left.0, true, false, &lc, m.mid.0, m.mid.1, None, 0, rl,
)? {
assert_eq!(freed, 0);
page
// Append the middle element of the concatenation at the end
// of the left page. We know the left page to be mutable by
// now, and we also know there's enough space to do this.
let lc = PageCursor::after(&page.0);
if let Put::Ok(Ok { page, freed }) = <Page<K, V>>::put(
txn, page.0, true, false, &lc, m.mid.0, m.mid.1, None, 0, rl,
)? {
assert_eq!(freed, 0);
page
} else {
unreachable!()
}
unreachable!()
let is_dirty = m.modified.page.is_dirty();
let lc = PageCursor::after(&m.modified.page);
if let Put::Ok(Ok { page, freed }) = <Page<K, V>>::put(
txn, m.modified.page, m.modified.mutable, false, &lc, m.mid.0, m.mid.1, None, 0, rl,
)? {
if freed > 0 {
debug!("freed {:?} {:?}", line!(), freed);
let b = if is_dirty { 1 } else { 0 };
freed_[0] = freed | b
}
page
} else {
unreachable!()
}
// If there's no insertion, and `m.l == 0`, we are
// actually deleting an entry of the root, and so we need
// to update the right child of the current entry. The
// following moves one step to the right and updates:
// If there's no insertion, and `m.l == 0`, we need to
// update the right child of the current entry. The
// following moves one step to the right and updates the
// left child: