diff --git a/ConflictSet.cpp b/ConflictSet.cpp index ddba01a..619b6fc 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -2919,12 +2919,6 @@ Node *firstGeqPhysical(Node *n, const std::span key) { #define PRESERVE_NONE #endif -#if __has_attribute(flatten) -#define FLATTEN __attribute__((flatten)) -#else -#define FLATTEN -#endif - typedef PRESERVE_NONE void (*Continuation)(struct CheckJob *, struct CheckContext *); @@ -2968,7 +2962,7 @@ struct CheckContext { #endif }; -FLATTEN PRESERVE_NONE void keepGoing(CheckJob *job, CheckContext *context) { +PRESERVE_NONE void keepGoing(CheckJob *job, CheckContext *context) { #if __has_attribute(musttail) job = job->next; MUSTTAIL return job->continuation(job, context); @@ -2978,7 +2972,7 @@ FLATTEN PRESERVE_NONE void keepGoing(CheckJob *job, CheckContext *context) { #endif } -FLATTEN PRESERVE_NONE void complete(CheckJob *job, CheckContext *context) { +PRESERVE_NONE void complete(CheckJob *job, CheckContext *context) { if (context->started == context->count) { if (job->prev == job) { #if !__has_attribute(musttail) @@ -2999,12 +2993,11 @@ FLATTEN PRESERVE_NONE void complete(CheckJob *job, CheckContext *context) { namespace check_point_read_state_machine { -FLATTEN PRESERVE_NONE void begin(CheckJob *, CheckContext *); +PRESERVE_NONE void begin(CheckJob *, CheckContext *); -template -FLATTEN PRESERVE_NONE void iter(CheckJob *, CheckContext *); +template PRESERVE_NONE void iter(CheckJob *, CheckContext *); -FLATTEN PRESERVE_NONE void down_left_spine(CheckJob *, CheckContext *); +PRESERVE_NONE void down_left_spine(CheckJob *, CheckContext *); static Continuation iterTable[] = {iter, iter, iter, iter, iter}; @@ -3132,12 +3125,11 @@ void down_left_spine(CheckJob *job, CheckContext *context) { namespace check_prefix_read_state_machine { -FLATTEN PRESERVE_NONE void begin(CheckJob *, CheckContext *); +PRESERVE_NONE void begin(CheckJob *, CheckContext *); -template -FLATTEN PRESERVE_NONE void iter(CheckJob *, CheckContext *); +template PRESERVE_NONE void iter(CheckJob *, CheckContext *); -FLATTEN PRESERVE_NONE void down_left_spine(CheckJob *, CheckContext *); +PRESERVE_NONE void down_left_spine(CheckJob *, CheckContext *); static Continuation iterTable[] = {iter, iter, iter, iter, iter}; @@ -3259,12 +3251,12 @@ void down_left_spine(CheckJob *job, CheckContext *context) { } // namespace check_prefix_read_state_machine namespace check_range_read_state_machine { -FLATTEN PRESERVE_NONE void begin(CheckJob *, CheckContext *); +PRESERVE_NONE void begin(CheckJob *, CheckContext *); template -FLATTEN PRESERVE_NONE void common_prefix_iter(CheckJob *, CheckContext *); +PRESERVE_NONE void common_prefix_iter(CheckJob *, CheckContext *); -FLATTEN PRESERVE_NONE void done_common_prefix_iter(CheckJob *, CheckContext *); +PRESERVE_NONE void done_common_prefix_iter(CheckJob *, CheckContext *); static Continuation commonPrefixIterTable[] = { common_prefix_iter, common_prefix_iter, @@ -3272,18 +3264,17 @@ static Continuation commonPrefixIterTable[] = { common_prefix_iter}; template -FLATTEN PRESERVE_NONE void left_side_iter(CheckJob *, CheckContext *); +PRESERVE_NONE void left_side_iter(CheckJob *, CheckContext *); -FLATTEN PRESERVE_NONE void left_side_down_left_spine(CheckJob *, - CheckContext *); +PRESERVE_NONE void left_side_down_left_spine(CheckJob *, CheckContext *); -FLATTEN PRESERVE_NONE void done_left_side_iter(CheckJob *, CheckContext *); +PRESERVE_NONE void done_left_side_iter(CheckJob *, CheckContext *); static Continuation leftSideIterTable[] = { left_side_iter, left_side_iter, left_side_iter, left_side_iter, left_side_iter}; -FLATTEN PRESERVE_NONE void begin(CheckJob *job, CheckContext *context) { +PRESERVE_NONE void begin(CheckJob *job, CheckContext *context) { job->lcp = longestCommonPrefix(job->begin.data(), job->end.data(), std::min(job->begin.size(), job->end.size())); if (job->lcp == int(job->begin.size()) && @@ -3355,8 +3346,8 @@ void common_prefix_iter(CheckJob *job, CheckContext *context) { MUSTTAIL return keepGoing(job, context); } -FLATTEN PRESERVE_NONE void done_common_prefix_iter(CheckJob *job, - CheckContext *context) { +PRESERVE_NONE void done_common_prefix_iter(CheckJob *job, + CheckContext *context) { { Arena arena; @@ -3454,8 +3445,7 @@ FLATTEN PRESERVE_NONE void done_common_prefix_iter(CheckJob *job, // Return true if the max version among all keys that start with key[:prefixLen] // that are >= key is <= readVersion template -FLATTEN PRESERVE_NONE void left_side_iter(CheckJob *job, - CheckContext *context) { +PRESERVE_NONE void left_side_iter(CheckJob *job, CheckContext *context) { assert(NodeT::kType == job->n->getType()); NodeT *n = static_cast(job->n); @@ -3570,8 +3560,7 @@ FLATTEN PRESERVE_NONE void left_side_iter(CheckJob *job, MUSTTAIL return keepGoing(job, context); } -FLATTEN PRESERVE_NONE void done_left_side_iter(CheckJob *job, - CheckContext *context) { +PRESERVE_NONE void done_left_side_iter(CheckJob *job, CheckContext *context) { job->setResult(checkRangeRightSide(job->commonPrefixNode, job->end, job->lcp + 1, job->readVersion,