Skip to content
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

Improve inference in Docs and Markdown #37087

Merged
merged 2 commits into from
Aug 21, 2020
Merged

Improve inference in Docs and Markdown #37087

merged 2 commits into from
Aug 21, 2020

Conversation

timholy
Copy link
Member

@timholy timholy commented Aug 17, 2020

Because Docs is set to @nospecialize for the entire module, declaring types on input arguments makes a large difference in what
methods get inferred. This heads off a number of completely impossible combinations.

It's worth noting that enough methods have @nospecialize arguments that it might be worth considering removing the module-global @nospecialize. I understand the convenience of the module-global version, but it made for some really bizarre headscratching for why we were getting a signature!(::Any, ::Expr) MethodInstance.

@timholy timholy added the compiler:latency Compiler latency label Aug 17, 2020
Copy link
Member

@KristofferC KristofferC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But seems to be some new ambiguities this hits.

Because Docs is set to `@nospecialize` for the entire module,
declaring types on input arguments makes a large difference in what
methods get inferred. This heads off a number of completely impossible
combinations.
@timholy timholy merged commit 89b018f into master Aug 21, 2020
@timholy timholy deleted the teh/docs_inference branch August 21, 2020 13:34
simeonschaub pushed a commit to simeonschaub/julia that referenced this pull request Aug 29, 2020
* Improve inference in Docs and Markdown

Because Docs is set to `@nospecialize` for the entire module,
declaring types on input arguments makes a large difference in what
methods get inferred. This heads off a number of completely impossible
combinations.

* Improve Dict-creation typing in metadata()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:latency Compiler latency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants