Fixed lfsr_o_isbshrub falling out-of-date
In hindsight this was way too fragile.
Explicitly checking for both LFS_TYPE_REG and LFS_type_TRAVERSAL (the 2
in-device types that can have attached bshrubs) solves this and
hopefully prevents lfsr_o_isbshrub from falling out-of-date in the
future.
The downside being a little bit more code:
code stack ctx
before: 35832 2440 640
after: 35864 (+0.1%) 2440 (+0.0%) 640 (+0.0%)
Found by test_traversal_mutation_mroot_split_bshrub_l and
test_traversal_mutation_mroot_split_bshrub_r.
This commit is contained in:
@@ -6890,8 +6890,8 @@ static inline uint32_t lfsr_o_settype(uint32_t flags, uint8_t type) {
|
||||
}
|
||||
|
||||
static inline bool lfsr_o_isbshrub(uint32_t flags) {
|
||||
// it turns out that bshrub types share a bit
|
||||
return flags & 0x10000000;
|
||||
return lfsr_o_type(flags) == LFS_TYPE_REG
|
||||
|| lfsr_o_type(flags) == LFS_type_TRAVERSAL;
|
||||
}
|
||||
|
||||
static inline bool lfsr_o_isunflush(uint32_t flags) {
|
||||
|
||||
Reference in New Issue
Block a user