-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
inference: always use const-prop'ed result (#44001)
Previously, for `invoke`/opaque closure callsite, we use constant-prop'ed method body only when the inferred return type gets strictly improved by const-prop. But since the inliner is now able to inline the method body from `InferenceResult`, I believe it is always better to use method body shaped up by const-prop' no matter if the return type is improved (as we already do for ordinal call sites). > use constant prop' result even when the return type doesn't get refined ```julia const Gx = Ref{Any}() Base.@constprop :aggressive function conditional_escape!(cnd, x) if cnd Gx[] = x end return nothing end @test fully_eliminated((String,)) do x Base.@invoke conditional_escape!(false::Any, x::Any) end ```
- Loading branch information
Showing
2 changed files
with
20 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
e3b681c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Executing the daily package evaluation, I will reply here when finished:
@nanosoldier
runtests(ALL, isdaily = true)
e3b681c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your package evaluation job has completed - possible new issues were detected. A full report can be found here.