Fix recursive inline member ordering in optimizer - #20111
Open
majocha wants to merge 45 commits into
Open
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This reverts commit a942862.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
✅ No release notes required |
This reverts commit 7bfd44a.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
It works. I'll mark as ready for review but I'm not sure the approach here is the best. |
T-Gro
reviewed
Aug 10, 2026
T-Gro
left a comment
Member
There was a problem hiding this comment.
🤖 This review was generated by AI (@expert-reviewer agent). Findings may contain inaccuracies — please verify independently.
T-Gro
self-requested a review
August 10, 2026 09:11
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
T-Gro
reviewed
Aug 25, 2026
Contributor
|
🔍 Tooling Safety Check — Affects-Compiler-Output
|
A single nested ModuleOrNamespaceBinding.Module element previously disabled the dependency-first optimization schedule for the entire recursive group, so a non-inline binding forward-referencing an inline sibling (directly, or through vals in a later nested module) still failed with FS1114/FS1118. Generalize the schedule to group elements: a nested module publishes all of its contained vals, and both sides of the dependency edge (bindings that reference a nested module's vals, and modules whose contents reference sibling bindings) are tracked.
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.
Recursive inline members in a recursive binding group can depend on siblings that appear later in source order. The optimizer now discovers these dependencies, optimizes bindings in dependency order, and restores source order before emitting the result. Trait-witness dependencies and module-level recursive groups are handled as well, while non-inline recursive groups retain the existing behavior.
Regression coverage exercises recursive inline member access, trait-witness resolution, and the existing Issue 1565 cases. Emitted-IL and AOT baselines are updated for the resulting stable output.
Fixes #1565