Repository navigation
kernel: check mutability where a tnum implied it - #6705
Merged
Merged
Conversation
ChrisJefferson
approved these changes
Oct 8, 2026
fingolfin
commented
Oct 8, 2026
| for (i = 0; i < count; i++) { | ||
| Obj obj = objects[i]; | ||
| if (TNUM_OBJ(obj) == T_PREC) { | ||
| if (TNUM_OBJ(obj) == T_PREC && IS_MUTABLE_OBJ(obj)) { |
Member
Author
There was a problem hiding this comment.
@ChrisJefferson sorry I had forgotten to put this in here -- added after your review, but I hope it is fine, as it is in the same spirit as the rest of the changes in here.
Two places test for an exact tnum and rely on it implying that the object is mutable: the interpreter and compiled code assign directly to a list with tnum T_PLIST, and MigrateObjects in HPC-GAP sorts the components of a record with tnum T_PREC. Test the mutability as well, so that this keeps working once mutability is no longer part of the tnum (see #6025). Assisted-by: Claude Code (Opus 5.5)
fingolfin
force-pushed
the
mh-claude/plist-assign-fastpath-mutability
branch
from
October 8, 2026 13:44
bddafb9 to
559efec
Compare
fingolfin
enabled auto-merge (squash)
October 8, 2026 14:04
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6705 +/- ##
==========================================
- Coverage 79.57% 79.57% -0.01%
==========================================
Files 683 683
Lines 295429 295430 +1
Branches 8648 8648
==========================================
- Hits 235091 235089 -2
Misses 58518 58518
- Partials 1820 1823 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two places test for an exact tnum and rely on it implying that the object is mutable: the interpreter and compiled code assign directly to a list with tnum
T_PLIST, andMigrateObjectsin HPC-GAP sorts the components of a record with tnumT_PREC. Test the mutability as well, so that this keeps working once mutability is no longer part of the tnum (see #6025).Assisted-by: Claude Code (Opus 5.5)