Repository navigation
Try a typed local for indexed comparison bases - #29
Merged
Merged
Conversation
1 of 2 tasks
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.
An inline cast used as an indexed base can keep an otherwise exact candidate on a different register allocation. Add a bounded, game-independent search variant that gives the existing cast its own local before a plain comparison, inside the same gate or loop.
The variant preserves the cast type, address expression, index, comparison and ABI. It infers no array bound, element width, data ownership or initial value. Short-circuits, side effects, hidden qualifiers, escaped/shadowed bases, attributes, macro-altered headers and ambiguous insertion points are rejected. Claims, handoff, search budgets and independent promotion checks are unchanged.
Validation:
Synthetic compiler metadata and an optional reproduction runner are included. A generated candidate still requires full independent byte, relocation, ABI, ownership and semantic review; this rule does not approve matches.
Review corrections: reject function-local typedefs rather than hoisting the new declaration across an alias scope, reject source/context-dependent reserved identifiers throughout the translation unit, and include enum constants when choosing a fresh local name. Three new regressions cover these counterexamples. All 570 Python tests (9 optional skips), 23 JavaScript tests and packaging pass on this branch; the combined #28/#29 tree passes 580 Python tests (9 optional skips) and all 23 JavaScript tests. All eight synthetic source hashes and all four recorded relocation/addend inventories still match the retained evidence. No additional native game or proprietary compiler runs were performed in this review.