Repository navigation
Inspect inline helpers in read-only source diagnostics - #28
Merged
Merged
Conversation
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.
Problem and resulting behavior
Read-only source diagnostics reused the search parser's exactly-one-function guard. A normal translation unit containing three
static inlinehelpers and one emitted function therefore reported that AST analysis was unavailable. Suspicious address expressions inside helpers could also remain uninspected.Separate guarded translation-unit parsing from the single-function search entry point. Source diagnostics now inspect every supported helper body and declaration. Search mutations and reviewed search seeds retain their existing single-function restriction; diagnostics never grant semantic approval.
Scope
GameName_PALor a separate region folderThis changes read-only diagnostics. It adds no source transformation, compiler profile, address mapping, score adjustment or budget change. Existing preprocessing and compiler-flag guards remain in force.
Evidence and validation
-O2 -G8 -fopt-stack -mno-check-zero-divisionand the existing local assembly pipeline. Bothint/float/byte*andshort/double/void*header contexts are covered. The optional argv-based compiler harness and source/object/text hashes are included.R_MIPS_HI16/R_MIPS_LO16relocations, and ordinary floating helpers remain accepted. The double helper's actual runtime-support call relocations are retained in the evidence.git diff --checkpassed.Remaining limits
Diagnostics cover the existing narrow source checks and supported parser input. They do not preprocess arbitrary headers/macros or establish types, ABI, ownership, initialization, boundaries, relocations or runtime semantics. A clean diagnostic report is not match approval. Multi-function search mutations remain unsupported.
Review corrections: direct literal-pointer diagnostics now resolve typedefs in lexical scopes and capture each alias at declaration time. This diagnoses helper-local pointer aliases, avoids treating a shadowing scalar alias as a pointer, and prevents helper aliases leaking into another function. Two new regressions cover these cases. Combined with PR #29, all 580 Python tests (9 optional skips), 23 JavaScript tests and offline packaging pass. The single-function search and reviewed-seed guards still reject helper-containing input. No additional native game or proprietary compiler runs were performed in this review.