inference: avoid inferring unreachable code methods#51317
Merged
Conversation
aviatesk
approved these changes
Sep 18, 2023
Member
aviatesk
left a comment
There was a problem hiding this comment.
LGTM. While it does introduce some complexity to our codebase, mostly due to the extra arguments in valid_as_lattice and instanceof_tfunc, but it's great that we now identify invalid type parameters and can fix the issue.
Member
|
We also need to resolve the conflict in |
Avoids causing issues in matching_cache_argtypes/tuple_tfunc with invalid contents appearing in the Tuple parameters after intersections (such as Int, tuple of Symbol, etc). Also sharpen valid_as_lattice / instanceof_tfunc to be able to filter out and reject types that cannot appear as tags at runtime, except where they are used for non-tag queries (like fieldtype_tfunc and subtype_tfunc). Fixes #51228 (part 2)
Member
Author
|
Ah oops, it became conflicted again between the time I rebased and pushed |
aviatesk
approved these changes
Sep 26, 2023
vtjnash
added a commit
that referenced
this pull request
Jan 21, 2025
vtjnash
added a commit
that referenced
this pull request
Feb 19, 2025
(cherry picked from commit 0a82b71)
kpamnany
pushed a commit
to RelationalAI/julia
that referenced
this pull request
Feb 19, 2025
(cherry picked from commit 0a82b71)
kpamnany
pushed a commit
to RelationalAI/julia
that referenced
this pull request
Feb 19, 2025
PR JuliaLang#51317 was a bit over-eager about inferring inferring unreachable code methods. Filter out the Vararg case, since that can be handled by simply removing it instead of discarding the whole call. Fixes JuliaLang#56628 (cherry picked from commit eb9f24c)
kpamnany
pushed a commit
to RelationalAI/julia
that referenced
this pull request
Feb 19, 2025
(cherry picked from commit 0a82b71)
kpamnany
pushed a commit
to RelationalAI/julia
that referenced
this pull request
Feb 19, 2025
PR JuliaLang#51317 was a bit over-eager about inferring inferring unreachable code methods. Filter out the Vararg case, since that can be handled by simply removing it instead of discarding the whole call. Fixes JuliaLang#56628 (cherry picked from commit eb9f24c)
kpamnany
added a commit
to RelationalAI/julia
that referenced
this pull request
Feb 25, 2025
* inference: avoid inferring unreachable code methods (JuliaLang#51317) (cherry picked from commit 0a82b71) * inference: ensure inferring reachable code methods (JuliaLang#57088) PR JuliaLang#51317 was a bit over-eager about inferring inferring unreachable code methods. Filter out the Vararg case, since that can be handled by simply removing it instead of discarding the whole call. Fixes JuliaLang#56628 (cherry picked from commit eb9f24c) --------- Co-authored-by: Jameson Nash <vtjnash@gmail.com>
nickrobinson251
pushed a commit
to RelationalAI/julia
that referenced
this pull request
Feb 26, 2025
* inference: avoid inferring unreachable code methods (JuliaLang#51317) (cherry picked from commit 0a82b71) * inference: ensure inferring reachable code methods (JuliaLang#57088) PR JuliaLang#51317 was a bit over-eager about inferring inferring unreachable code methods. Filter out the Vararg case, since that can be handled by simply removing it instead of discarding the whole call. Fixes JuliaLang#56628 (cherry picked from commit eb9f24c) --------- Co-authored-by: Jameson Nash <vtjnash@gmail.com>
serenity4
pushed a commit
to serenity4/julia
that referenced
this pull request
May 1, 2025
PR JuliaLang#51317 was a bit over-eager about inferring inferring unreachable code methods. Filter out the Vararg case, since that can be handled by simply removing it instead of discarding the whole call. Fixes JuliaLang#56628
Closed
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.
Avoids causing issues in matching_cache_argtypes/tuple_tfunc with invalid contents appearing in the Tuple parameters after intersections (such as Int, tuple of Symbol, etc).
Also sharpen valid_as_lattice / instanceof_tfunc to be able to filter out and reject types that cannot appear as tags at runtime, except where they are used for non-tag queries (like fieldtype_tfunc and subtype_tfunc).
Fixes #51311
Fixes #51228 (part 2)