Only search backward for materializing clear range
This commit is contained in:
@@ -1220,20 +1220,20 @@ VersionedMap::Iterator::operator*() const {
|
||||
|
||||
void materializeMutations(VersionedMap::Iterator::Impl *impl,
|
||||
const Entry *prev) {
|
||||
if (prev == nullptr) {
|
||||
Finger copy;
|
||||
impl->finger.copyTo(copy);
|
||||
impl->map->move<std::memory_order_acquire, false>(copy, impl->version);
|
||||
if (copy.searchPathSize() > 0) {
|
||||
prev = impl->map->mm.base[copy.backNode()].entry;
|
||||
} else {
|
||||
assert(!impl->map->mm.base[impl->finger.backNode()].entry->clearTo());
|
||||
}
|
||||
}
|
||||
|
||||
const auto &entry = *impl->map->mm.base[impl->finger.backNode()].entry;
|
||||
impl->mutationCount = 0;
|
||||
if (entry.clearTo()) {
|
||||
if (prev == nullptr) {
|
||||
Finger copy;
|
||||
impl->finger.copyTo(copy);
|
||||
impl->map->move<std::memory_order_acquire, false>(copy, impl->version);
|
||||
if (copy.searchPathSize() > 0) {
|
||||
prev = impl->map->mm.base[copy.backNode()].entry;
|
||||
} else {
|
||||
assert(!impl->map->mm.base[impl->finger.backNode()].entry->clearTo());
|
||||
}
|
||||
}
|
||||
|
||||
impl->mutations[impl->mutationCount++] = {
|
||||
prev->getKey(),
|
||||
entry.getKey(),
|
||||
|
Reference in New Issue
Block a user