Skip to content

Reduce reliance on the IMMUTABLE tnum bit in the plain list code - #6707

Open
fingolfin wants to merge 4 commits into
masterfrom
mh-claude/immutable-prep-refactorings
Open

fingolfin wants to merge 4 commits into
masterfrom
mh-claude/immutable-prep-refactorings

Conversation

@fingolfin

@fingolfin fingolfin commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Preparation for #6025, which moves the mutability of lists and records from the tnum into an object flag. These commits stop a few places from handling the IMMUTABLE bit by hand. No change in behaviour.

  • ShallowCopyPlist and ElmsPlistDense use MUTABLE_TNUM instead of subtracting IMMUTABLE or comparing against ... + IMMUTABLE.
  • KTNumPlist and KTNumHomPlist return the mutable tnum. TypePlistHomHelper, which needs the bit to pick the type, adds it back from IS_MUTABLE_OBJ. This continues kernel: avoid some uses of IMMUTABLE in plist.c #6024 and is the one commit that needs a careful look.
  • IS_PLIST_MUTABLE is replaced by IS_MUTABLE_OBJ and removed. I found no use of it in the distributed packages.
  • NEW_PLIST_IMM and NEW_PLIST_WITH_MUTABILITY go through MakeImmutableNoRecurse instead of or-ing the bit into the tnum.

AI disclosure: Claude Code (Opus 5.5)

@fingolfin fingolfin added topic: kernel release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes labels Oct 8, 2026
@codecov

codecov Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.24390% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.54%. Comparing base (482ebce) to head (16a3fc4).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
src/plist.c 88.88% 3 Missing ⚠️
src/listfunc.c 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6707      +/-   ##
==========================================
- Coverage   79.56%   79.54%   -0.03%     
==========================================
  Files         684      684              
  Lines      295665   295668       +3     
  Branches     8656     8656              
==========================================
- Hits       235259   235190      -69     
- Misses      58582    58654      +72     
  Partials     1824     1824              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fingolfin
fingolfin force-pushed the mh-claude/immutable-prep-refactorings branch from 4db271a to 16a3fc4 Compare October 8, 2026 20:15

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes topic: kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant