Repository navigation
Docs: Say why the unused flags view stays put - #7655
Merged
Merged
Conversation
Collaborator
|
Merged, thank you giveen! I checked the file: MATCH, and place.py gives the shipped MD5 both with the original exe and with One thing, and this is the third time it has come up (after #7647 and #7645), so I'm asking a little more firmly: |
This branch is waiting to be deployed
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.
Closes #7074
Model: Ares / claude-opus-5
One comment fix in
src/units/unit_position_48b090.cpp. TheFlags_00489a90union declared there is never used by that file: the only occurrence offlag19in it is the member name inside the declaration itself, and the file has noFUNCTION: 0x489a90, so the function the comment cited is not in it either.0x489a90lives inunit.cpp, which is where the view is declared and actually read, at((Flags_00489a90*)&theirDef->flags2)->bits.flag19. This is a copy of that declaration left behind.The declaration cannot simply go, so the comment now says what it is instead of why it is supposedly kept. With it removed,
SetStateBits(0x48b090) drops to 83.3%: the ids its declarations take are what that function matches with, perdocs/c2-regalloc.md. The new wording is the standard "Unused here" form used elsewhere for exactly this.Checks: checkall 2 of 2 MATCH (0x48b090 and 0x489a90, the two functions the change could touch); place.py MD5 8e74a1dffa1f5988624c52048f5b20cd, with and without
--no-orig --strict; modules.py --check passes; progress.py still 100.00% matched, 3267 functionsLeft out:
Flags_00489a90into one header, which is what the issue asks. Both files declare it with byte-for-byte identical bodies and neither name appears in any decorated name indata/progress.csv, so it looks like a clean rule-2 fold, but it is not: replacing either declaration with an include movesSetStateBits(0x48b090) to 85.0%, in either file alone or in both together.idpad.pyfinds no real declaration that brings it back. The two files are the only place the union appears, so this is the case where a function only matches with the declaration in its own file.MovementClassTableinunit_types.cppandmovement_class.cppis not a rule-2 pair after all:unit_types.cppsizes it at 24 bytes (MovementClass entries[8]) andmovement_class.cppat 32 (entries[32]), and only the latter is real, sinceg_movementClassesis a static ofmovement_class.cppalone andunit_types.cppnever names it.movement_class.halready holds the completeMovementClass.ObjectState_00485d40andMapInfo_0048a490are each a forward declaration and a definition inside one file, not a shared pair.Suspected original bugs: