Repository navigation
detector: extract every inline definition on a shared line (Fixes #7504) - #7603
Merged
Merged
Conversation
…anguages (Fixes #7504) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
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.
Fixes #7504
What
Brace-sliced detection found a definition only where it started a line (
func_startis^-anchored), soint f(){..} int g(){..}on one line recorded onlyf.dense_source.split_inline_definitions(reusing #7503's bounded_DENSE_DEFscan) swaps the whitespace before each later inline definition for a newline insafe_codeonly, same length, so every index and the line numbers (counted fromcode) are unchanged._slice_by_bracescalls it forDENSE_LANGS. A line is read only if it has 2+{and at most 5,000 chars.Class / Sibling gaps
Class: brace-sliced compiled languages (
DENSE_LANGS: C, C++, Rust, Go, Java, C#, Zig, Swift, Kotlin, Scala) lose every definition after the first on a physical line. All members share the one hook; tests prove C, Rust and Java at 2, 5 and 10 per line (names, args, spans vs. the one-per-line copy), the others by mechanism only.Sibling gaps: (1)
}int g(){with no whitespace before the definition is not split; no burned-estate program needs it. (2) Python indentation slicing and Mode A / label slicers: not a realistic one-line-pack input, unchecked; no burned-estate program. (3) JS/TS excluded on purpose (minified bundles).Evidence
tests/core_engine/test_dense_source_7504.pyplustest_dense_source_7501.py: 46 pass.crucible_check.py --update --yes(both legs): no drift, goldens unchanged, so ordinary files are byte-identical.pr_gates --fast: 9/9 pass;--ratchets: 9 pass, 0 skipped.Cross-repo: none.
🤖 Generated with Claude Code