Skip to content

Turn crate store into a resolver output#65625

Merged
bors merged 10 commits intorust-lang:masterfrom
petrochenkov:cstore
Oct 25, 2019
Merged

Turn crate store into a resolver output#65625
bors merged 10 commits intorust-lang:masterfrom
petrochenkov:cstore

Conversation

@petrochenkov
Copy link
Contributor

Crate store (CStore) is a vector of data (CrateMetadata) associated with extern crates loaded during the current compilation session.

All crates are loaded in the resolver when resolving either paths pointing to extern prelude or extern crate items. (There are also a couple of crates like panic runtime that are loaded kind of like implicit extern crates, but that also happens in resolve.)

The use of CStore from rustc_plugin (which is outside of the resolver) was unnecessary because legacy plugins are not added to the crate store and don't use CrateNums.

So, CStore can be produced by the resolver instead of being kept in some really global data (rustc_interface::Compiler) like now.

As a result of crate store being more "local" we can now remove some locks and Lrcs.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants