-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
simplify entry points to type inference #18591
Conversation
34a1c99
to
0e4cf64
Compare
@nanosoldier |
return code.rettype | ||
end | ||
else | ||
return code.rettype |
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.
the logic flow is a bit tough to follow, add more comments here?
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.
Maybe easier to read as
isa(inf, CodeInfo) || return code.rettype
if (inf::CodeInfo).inferred
return code.rettype
end
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.
agree, it would be
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.
agreed 3. I'm not sure why Github doesn't hide the comments anymore after the code is changed.
# don't infer it now, as attempting to force it now would be a bad idea (non terminating) | ||
force_infer = false | ||
if method.module == _topmod(method.module) || (isdefined(Main, :Base) && method.module == Main.Base) | ||
# however, some gf have special tfunc and meaning they wouldn't have been inferred yet |
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.
is there a missing word here? "special tfunc and ___ meaning they" ?
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @jrevels |
0e4cf64
to
d0b1ac0
Compare
@nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @jrevels |
this breaks up the typeinf_edge function into its subcomponents, allowing callers to exercise only the pieces they care about rather than returning all possible values the caller might care about in a Tuple also adds missing test-and-lock-and-test for threaded inference entry points
d0b1ac0
to
03cff8b
Compare
The logic had been switched since #18591.
this breaks up the typeinf_edge function into its subcomponents,
allowing callers to exercise only the pieces they care about
rather than returning all possible values the caller might care
about in a Tuple
also fixes missing test-and-lock-and-test for threaded inference
(backporting from #17057 WIP)