From e213237698139c8e4eaf7cf6196a5e66bb0944cb Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Thu, 10 Oct 2024 13:21:13 -0700 Subject: [PATCH] Remove some dead code --- ConflictSet.cpp | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index c0ae817..6f4a368 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -3302,14 +3302,10 @@ void begin(CheckJob *job, CheckContext *context) { #endif if (job->begin.size() == 0) [[unlikely]] { - if (job->n->entryPresent) { - job->setResult(job->n->entry.pointVersion <= job->readVersion); - MUSTTAIL return complete(job, context); - } - job->n = getFirstChildExists(job->n); - job->continuation = down_left_spine; - __builtin_prefetch(job->n); - MUSTTAIL return keepGoing(job, context); + // We don't erase the root + assert(job->n->entryPresent); + job->setResult(job->n->entry.pointVersion <= job->readVersion); + MUSTTAIL return complete(job, context); } auto taggedChild = getChild(job->n, job->begin[0]); @@ -3322,14 +3318,9 @@ void begin(CheckJob *job, CheckContext *context) { __builtin_prefetch(job->n); MUSTTAIL return keepGoing(job, context); } else { - job->n = nextSibling(job->n); - if (job->n == nullptr) { - job->setResult(true); - MUSTTAIL return complete(job, context); - } - job->continuation = down_left_spine; - __builtin_prefetch(job->n); - MUSTTAIL return keepGoing(job, context); + // The root never has a next sibling + job->setResult(true); + MUSTTAIL return complete(job, context); } } job->continuation = iterTable[taggedChild.getType()];