Skip "dontInvalidate" check in erase from gc
Some checks failed
Tests / Clang total: 2500, passed: 2500
Clang |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / Debug total: 2498, passed: 2498
Tests / SIMD fallback total: 2500, passed: 2500
Tests / Release [gcc] total: 2500, passed: 2500
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 1867, passed: 1867
Tests / Coverage total: 1877, passed: 1877
Code Coverage #### Project Overview No changes detected, that affect the code coverage. * Line Coverage: 98.64% (1815/1840) * Branch Coverage: 67.14% (1479/2203) * Complexity Density: 0.00 * Lines of Code: 1840 #### Quality Gates Summary Output truncated.
weaselab/conflict-set/pipeline/head There was a failure building this commit

This commit is contained in:
2024-08-15 19:07:53 -07:00
parent 359f6f0042
commit 0280bd77e5

View File

@@ -1747,6 +1747,7 @@ void maybeDownsize(Node *self, WriteContext *tls, ConflictSet::Impl *impl,
// path to self. May invalidate children of self->parent. Returns a pointer to
// the node after self. If erase invalidates the pointee of `dontInvalidate`, it
// will update it to its new pointee as well. Precondition: `self->entryPresent`
template <bool kCheckDontInvalidate = true>
Node *erase(Node *self, WriteContext *tls, ConflictSet::Impl *impl,
bool logical, Node *&dontInvalidate) {
++tls->accum.entries_erased;
@@ -1768,8 +1769,10 @@ Node *erase(Node *self, WriteContext *tls, ConflictSet::Impl *impl,
if (self->numChildren != 0) {
const bool update = result == dontInvalidate;
maybeDownsize(self, tls, impl, result);
if (update) {
dontInvalidate = result;
if constexpr (kCheckDontInvalidate) {
if (update) {
dontInvalidate = result;
}
}
return result;
}
@@ -1852,13 +1855,21 @@ Node *erase(Node *self, WriteContext *tls, ConflictSet::Impl *impl,
const bool update = result == dontInvalidate;
maybeDownsize(parent, tls, impl, result);
if (update) {
dontInvalidate = result;
if constexpr (kCheckDontInvalidate) {
if (update) {
dontInvalidate = result;
}
}
return result;
}
Node *erase(Node *self, WriteContext *tls, ConflictSet::Impl *impl,
bool logical) {
Node *dummy;
return erase<false>(self, tls, impl, logical, dummy);
}
Node *nextSibling(Node *node) {
for (;;) {
if (node->parent == nullptr) {
@@ -3262,8 +3273,7 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
// There's no way to insert a range such that range version of the right
// node is greater than the point version of the left node
assert(n->entry.rangeVersion <= oldestVersion);
Node *dummy = nullptr;
n = erase(n, &tls, this, /*logical*/ false, dummy);
n = erase(n, &tls, this, /*logical*/ false);
} else {
maybeDecreaseCapacity(n, &tls, this);
n = nextPhysical(n);