about summary refs log tree commit diff
path: root/src/librustc_interface
AgeCommit message (Collapse)AuthorLines
2019-11-03Delete lint buffer from SessionMark Rousskov-6/+6
2019-11-03Move crate type checking laterMark Rousskov-50/+61
This allows us to directly pass in a lint buffer
2019-11-03Utilize Resolver lint buffer during HIR loweringMark Rousskov-2/+2
2019-11-03Migrate resolver over to internal lint bufferMark Rousskov-3/+5
2019-10-27rustc, rustc_passes: don't depend on syntax_expand.Mazdak Farrokhzad-1/+1
This is done by moving some data definitions to syntax::expand.
2019-10-24rustc_interface: Remove `ExpansionResult` and some `Steal`sVadim Petrochenkov-28/+14
2019-10-24Turn crate store into a resolver outputVadim Petrochenkov-44/+33
2019-10-24rustc: Combine resolver outputs into a single structVadim Petrochenkov-14/+9
2019-10-24resolve: Privatize all resolver fieldsVadim Petrochenkov-38/+5
2019-10-24rustc_metadata: Remove unnecessary use of crate store in plugin loaderVadim Petrochenkov-5/+4
2019-10-23Rollup merge of #65193 - Mark-Simulacrum:lockless-lintstore, r=nikomatsakisMazdak Farrokhzad-31/+56
Lockless LintStore This removes mutability from the lint store after registration. Each commit stands alone, for the most part, though they don't make sense out of sequence. The intent here is to move LintStore to a more parallel-friendly architecture, although also just a cleaner one from an implementation perspective. Specifically, this has the following changes: * We no longer implicitly register lints when registering lint passes * For the most part this means that registration calls now likely want to call something like: `lint_store.register_lints(&Pass::get_lints())` as well as `register_*_pass`. * In theory this is a simplification as it's much easier for folks to just register lints and then have passes that implement whichever lint however they want, rather than necessarily tying passes to lints. * Lint passes still have a list of associated lints, but a followup PR could plausibly change that * This list must be known for a given pass type, not instance, i.e., `fn get_lints()` is the signature instead of `fn get_lints(&self)` as before. * We do not store pass objects, instead storing constructor functions. This means we always get new passes when running lints (this happens approximately once though for a given compiler session, so no behavior change is expected). * Registration API is _much_ simpler: generally all functions are just taking `Fn() -> PassObject` rather than several different `bool`s.
2019-10-22Add some documentationMark Rousskov-0/+5
2019-10-19move parse_cfgspecs to rustc_interfaceMazdak Farrokhzad-3/+773
2019-10-17Update API to be more compatible with plugin needsMark Rousskov-0/+14
Move to using Box<dyn Fn() -> ...> so that we can let plugins register state. This also adds a callback that'll get called from plugin registration so that Clippy and other tools can register lints without using the plugin API. The plugin API still works, but this new API is more compatible with drivers other than rustc.
2019-10-17Create lint store during plugin registrationMark Rousskov-35/+31
Remove lint store from Session
2019-10-17Remove all borrows of lint store from Session from librustcMark Rousskov-1/+8
Access through tcx is fine -- by that point, the lint store is frozen, but direct access through Session will go away in future commits, as lint store is still mutable in early stages of Session, and will be removed completely.
2019-10-17Make get_lints be a static functionMark Rousskov-2/+2
This moves from calling get_lints on instantiated pass objects to the raw object
2019-10-17No longer implicitly register lints when registering passesMark Rousskov-0/+2
This is in preparation for on-demand constructing passes
2019-10-17Split out just registration to separate functionMark Rousskov-2/+2
2019-10-17Split module and crate late pass registrationMark Rousskov-1/+1
2019-10-17Lints being from a plugin is dependent on the lint, not the registrationMark Rousskov-2/+2
2019-10-17De-propagate optional session from lint registrationMark Rousskov-5/+6
This is straight up removing dead code, but is a separate commit from the previous to avoid conflating clean up and important changes.
2019-10-16move syntax::ext to new crate syntax_expandMazdak Farrokhzad-4/+5
2019-10-14Rollup merge of #65340 - bjorn3:cg_ssa_refactor4, r=eddybTyler Mandry-0/+3
Several changes to the codegen backend organization * Split functions from values in cg_ssa `BackendTypes`. * Remove `is_const_integral` function from `ConstMethods`. * Actually register the invalid monomorphization of intrinsic long diagnostic and remove the `diagnostics` method from `CodegenBackends`, as it was unused. * Add cg_ssa and cg_utils provided methods to `default_provide`, so codegen backend don't have to do it themself.
2019-10-14rustc_metadata: Remove resolutions for extern crate items from `CStore`Vadim Petrochenkov-0/+2
Use a more traditional scheme with providing them as a resolver output
2019-10-14rustc_metadata: Crate loader is immutableVadim Petrochenkov-3/+3
2019-10-14rustc_metadata: Privatize private code and remove dead codeVadim Petrochenkov-8/+7
2019-10-13lowering: connect to parser via function pointer insteadMazdak Farrokhzad-16/+4
2019-10-13lowering: don't rely on parser directly.Mazdak Farrokhzad-3/+16
2019-10-13Add top level provide/provide_extern to cg_ssa and cg_utilsbjorn3-5/+3
2019-10-13Move some provides from cg_llvm to rustc_interfacebjorn3-0/+5
2019-10-09self-profiling: Add events for everything except trait selection.Michael Woerister-0/+2
2019-10-08Rollup merge of #65081 - Mark-Simulacrum:remove-profile-queries, ↵Mazdak Farrokhzad-614/+1
r=michaelwoerister Remove -Zprofile-queries r? @michaelwoerister Per [zulip thread](https://zulip-archive.rust-lang.org/131828tcompiler/57361RemoveZprofilequeries.html).
2019-10-07Name the threads in rayon's poolJosh Stone-0/+1
2019-10-07Rebase rustc-rayon on rayon-1.2Josh Stone-5/+5
See also https://github.com/rust-lang/rustc-rayon/pull/3
2019-10-04middle::intrinsicck -> rustc_passesMark Rousskov-1/+0
2019-10-04middle::entry -> rustc_passesMark Rousskov-2/+1
2019-10-04middle::dead -> rustc_passesMark Rousskov-1/+1
2019-10-04move middle::liveness to rustc_passesMark Rousskov-1/+0
2019-10-04Rollup merge of #64874 - matthewjasper:simplify-euv, r=eddybMazdak Farrokhzad-2/+1
Simplify ExprUseVisitor * Remove HIR const qualification * Remove parts of ExprUseVisitor that aren't being used r? @eddyb
2019-10-03Remove -Zprofile-queriesMark Rousskov-614/+1
2019-10-01Rollup merge of #64840 - michaelwoerister:self-profiling-raii-refactor, ↵Tyler Mandry-12/+12
r=wesleywiser SelfProfiler API refactoring and part one of event review This PR refactors the `SelfProfiler` a little bit so that most profiling methods are RAII-based. The codegen backend code already had something similar, this refactoring pulls this functionality up into `SelfProfiler` itself, for general use. The second commit of this PR is a review and update of the existing events we are already recording. Names have been made more consistent. CGU names have been removed from event names. They will be added back in when function parameter recording is implemented. There is still some work to be done for adding new events, especially around trait resolution and the incremental system. r? @wesleywiser
2019-10-01Rollup merge of #64722 - Mark-Simulacrum:alt-parallel, r=alexcrichtonTyler Mandry-4/+7
Make all alt builders produce parallel-enabled compilers We're not quite ready to ship parallel compilers by default, but the alt builders are not used too much (in theory), so we believe that shipping a possibly-broken compiler there is not too problematic. r? @nikomatsakis
2019-09-30Make the default parallelism 1Mark Rousskov-4/+7
This changes the default parallelism for parallel compilers to one, instead of the previous default, which was "num cpus". This is likely not an optimal default long-term, but it is a good default for testing whether parallel compilers are not a significant regression over a sequential compiler. Notably, this in theory makes a parallel-enabled compiler behave exactly like a sequential compiler with respect to the jobserver.
2019-09-30Remove HIR based const qualificationMatthew Jasper-2/+1
2019-09-30Self-Profiling: Make names of existing events more consistent and use new API.Michael Woerister-12/+12
2019-09-30Fixed grammar for some `time` fn calls and a diagnostic.Alexander Regueiro-8/+8
2019-09-29Auto merge of #64158 - tmandry:libtest-panic-abort, r=alexcrichtonbors-0/+3
panic=abort support in libtest Add experimental support for tests compiled with panic=abort. Enabled with `-Z panic_abort_tests`. r? @alexcrichton cc @cramertj
2019-09-28Put panic=abort test support behind -Z panic_abort_testsTyler Mandry-0/+2
2019-09-28Spawn one subprocess per unit test when panic=abortTyler Mandry-0/+1