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
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:
@@ -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
|
// 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
|
// the node after self. If erase invalidates the pointee of `dontInvalidate`, it
|
||||||
// will update it to its new pointee as well. Precondition: `self->entryPresent`
|
// 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,
|
Node *erase(Node *self, WriteContext *tls, ConflictSet::Impl *impl,
|
||||||
bool logical, Node *&dontInvalidate) {
|
bool logical, Node *&dontInvalidate) {
|
||||||
++tls->accum.entries_erased;
|
++tls->accum.entries_erased;
|
||||||
@@ -1768,8 +1769,10 @@ Node *erase(Node *self, WriteContext *tls, ConflictSet::Impl *impl,
|
|||||||
if (self->numChildren != 0) {
|
if (self->numChildren != 0) {
|
||||||
const bool update = result == dontInvalidate;
|
const bool update = result == dontInvalidate;
|
||||||
maybeDownsize(self, tls, impl, result);
|
maybeDownsize(self, tls, impl, result);
|
||||||
if (update) {
|
if constexpr (kCheckDontInvalidate) {
|
||||||
dontInvalidate = result;
|
if (update) {
|
||||||
|
dontInvalidate = result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -1852,13 +1855,21 @@ Node *erase(Node *self, WriteContext *tls, ConflictSet::Impl *impl,
|
|||||||
|
|
||||||
const bool update = result == dontInvalidate;
|
const bool update = result == dontInvalidate;
|
||||||
maybeDownsize(parent, tls, impl, result);
|
maybeDownsize(parent, tls, impl, result);
|
||||||
if (update) {
|
if constexpr (kCheckDontInvalidate) {
|
||||||
dontInvalidate = result;
|
if (update) {
|
||||||
|
dontInvalidate = result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 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) {
|
Node *nextSibling(Node *node) {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (node->parent == nullptr) {
|
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
|
// 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
|
// node is greater than the point version of the left node
|
||||||
assert(n->entry.rangeVersion <= oldestVersion);
|
assert(n->entry.rangeVersion <= oldestVersion);
|
||||||
Node *dummy = nullptr;
|
n = erase(n, &tls, this, /*logical*/ false);
|
||||||
n = erase(n, &tls, this, /*logical*/ false, dummy);
|
|
||||||
} else {
|
} else {
|
||||||
maybeDecreaseCapacity(n, &tls, this);
|
maybeDecreaseCapacity(n, &tls, this);
|
||||||
n = nextPhysical(n);
|
n = nextPhysical(n);
|
||||||
|
Reference in New Issue
Block a user