Adopted lfsr_bshrub_t in LFSR_TAG_SHRUBCOMMIT/SHRUBTRUNK

This makes a bit less sense than adopting lfsr_bshrub_t in lfsr_bshrub_*
functions, but it gives LFSR_TAG_SHRUBCOMMIT/SHRUBTRUNK direct access to
the staging shrub without needing the shrub + 1 hack.

The whole shrub vs bshrub distinction is already a bit broken anyways,
with us relying on the opened-mdir list to correctly stage all shrubs in
the filesystem.

---

Curiously, this again ends up with net negative impact on code cost:

           code          stack          ctx
  before: 36484           2608          640
  after:  36492 (+0.0%)   2608 (+0.0%)  640 (+0.0%)
This commit is contained in:
Christopher Haster
2025-02-04 02:22:01 -06:00
parent bc639b03f2
commit aaae25243b
2 changed files with 23 additions and 24 deletions
+3 -3
View File
@@ -1097,19 +1097,19 @@ code = '''
lfsr_mdir_commit(&lfs, &file.b.o.mdir, LFSR_RATS(
LFSR_RAT_SHRUBCOMMIT(
LFSR_TAG_SHRUBCOMMIT, 0,
&file.b.shrub, 0, ((lfsr_rat_t[]){
&file.b, 0, ((lfsr_rat_t[]){
LFSR_RAT(LFSR_TAG_DATA, +1, LFSR_DATA_BUF("?", 1))}),
1))) => 0;
lfsr_mdir_commit(&lfs, &file.b.o.mdir, LFSR_RATS(
LFSR_RAT_SHRUBCOMMIT(
LFSR_TAG_SHRUBCOMMIT, 0,
&file.b.shrub, 0, ((lfsr_rat_t[]){
&file.b, 0, ((lfsr_rat_t[]){
LFSR_RAT(LFSR_TAG_RM, -1, LFSR_DATA_NULL())}),
1))) => 0;
lfsr_mdir_commit(&lfs, &file.b.o.mdir, LFSR_RATS(
LFSR_RAT_SHRUBTRUNK(
LFSR_TAG_SUB | LFSR_TAG_SHRUBTRUNK, 0,
&file.b.shrub))) => 0;
&file.b))) => 0;
lfsr_file_close(&lfs, &file) => 0;