Remove performance-only code from debug build for increased coverage
This commit is contained in:
@@ -2431,9 +2431,14 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
||||
return;
|
||||
}
|
||||
this->oldestVersion = oldestVersion;
|
||||
#ifdef NDEBUG
|
||||
// This is here for performance reasons, since we want to amortize the cost
|
||||
// of storing the search path as a string. In tests, we want to exercise the
|
||||
// rest of the code often.
|
||||
if (keyUpdates < 100) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
Node *n = firstGeq(root, removalKey).n;
|
||||
// There's no way to erase removalKey without introducing a key after it
|
||||
assert(n != nullptr);
|
||||
@@ -2461,9 +2466,6 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
||||
removalKey = {};
|
||||
return;
|
||||
}
|
||||
if (keyUpdates == 0) {
|
||||
keyUpdates = 10;
|
||||
}
|
||||
removalKeyArena = Arena();
|
||||
removalKey = getSearchPath(removalKeyArena, n);
|
||||
}
|
||||
@@ -2504,7 +2506,7 @@ int64_t &maxVersion(Node *n, ConflictSet::Impl *impl) {
|
||||
return impl->rootMaxVersion;
|
||||
}
|
||||
switch (n->getType()) {
|
||||
case Type_Node0:
|
||||
case Type_Node0: // GCOVR_EXCL_LINE
|
||||
__builtin_unreachable(); // GCOVR_EXCL_LINE
|
||||
case Type_Node3: {
|
||||
auto *n3 = static_cast<Node3 *>(n);
|
||||
|
Reference in New Issue
Block a user