-
-
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
more per-module compiler options #37041
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -513,6 +513,9 @@ function typeinf_edge(interp::AbstractInterpreter, method::Method, @nospecialize | |
return code.rettype, mi | ||
end | ||
end | ||
if ccall(:jl_get_module_infer, Cint, (Any,), method.module) == 0 | ||
return Any, nothing | ||
end | ||
if !caller.cached && caller.parent === nothing | ||
# this caller exists to return to the user | ||
# (if we asked resolve_call_cyle, it might instead detect that there is a cycle that it can't merge) | ||
|
@@ -617,6 +620,9 @@ function typeinf_ext(interp::AbstractInterpreter, mi::MethodInstance) | |
end | ||
end | ||
end | ||
if ccall(:jl_get_module_infer, Cint, (Any,), method.module) == 0 | ||
return retrieve_code_info(mi) | ||
end | ||
Comment on lines
+623
to
+625
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here. and also because this code is holding a lock, which must be released before returning There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure this code is needed here, though, or if it should go in |
||
lock_mi_inference(interp, mi) | ||
frame = InferenceState(InferenceResult(mi), #=cached=#true, interp) | ||
frame === nothing && return nothing | ||
|
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.
this needs to go at the top of the method (before looking at the cache), to ensure this code is stable