about summary refs log tree commit diff
path: root/src/librustc_driver
AgeCommit message (Collapse)AuthorLines
2017-11-01Auto merge of #45538 - nikomatsakis:nll-liveness, r=pnkfelixbors-1/+0
enable non-lexical lifetimes in the MIR borrow checker This PR, joint work with @spastorino, fills out the NLL infrastructure and integrates it with the borrow checker. **Don't get too excited:** it includes still a number of hacks (the subtyping code is particularly hacky). However, it *does* kinda' work. =) The final commit demonstrates this by including a test that -- with both the AST borrowck and MIR borrowck -- reports an error by default. But if you pass `-Znll`, you only get an error from the AST borrowck, demonstrating that the integration succeeds: ``` struct MyStruct { field: String } fn main() { let mut my_struct = MyStruct { field: format!("Hello") }; let value = &my_struct.field; if value.is_empty() { my_struct.field.push_str("Hello, world!"); //~^ ERROR cannot borrow (Ast) } } ```
2017-11-01Auto merge of #45472 - michaelwoerister:incr-comp-caching-base, r=nikomatsakisbors-0/+7
incr.comp.: Implement compiler diagnostic persistence. This PR implements storing and loading diagnostics that the compiler generates and thus allows for emitting warnings during incremental compilation without actually re-evaluating the thing the warning originally came from. It also lays some groundwork for storing and loading type information and MIR in the incr. comp. cache. ~~It is still work in progress:~~ - ~~There's still some documentation to be added.~~ - ~~The way anonymous queries are handled might lead to duplicated emissions of warnings. Not sure if there is a better way or how frequent such duplication would be in practice.~~ Diagnostic message duplication is addressed separately in #45519. r? @nikomatsakis
2017-10-31remove the NLL pass (it is now invoked by mir borrowck)Niko Matsakis-1/+0
2017-10-25Auto merge of #44636 - GuillaumeGomez:little-error-msg, r=michaelwoeristerbors-2/+6
Add short error message-format Fixes #42653.
2017-10-25Fix librustc_driver unit test after API change.Michael Woerister-0/+2
2017-10-25incr.comp.: Implement query diagnostic persistence.Michael Woerister-0/+5
2017-10-24Introduce CrateDisambiguator newtype and fix testsIgor Matuszewski-4/+4
2017-10-23Use 128 bit instead of Symbol for crate disambiguatorIgor Matuszewski-10/+8
2017-10-20Add short message-formatGuillaume Gomez-2/+6
2017-10-16convert constant promotion into a queryNiko Matsakis-1/+2
2017-10-10Fixed client code for diagnostics migration, adding new methods to `trait ↵Felix S. Klock II-1/+0
BorrowckErrors` as necessary.
2017-10-10Auto merge of #44822 - frewsxcv:frewsxcv-eprintln, r=Kimundibors-1/+1
Migrate to eprint/eprintln macros where appropriate. None
2017-10-07Auto merge of #44860 - kennytm:fix-44731, r=alexcrichtonbors-1/+17
Fix issue #44731. Also excludes `impl Trait` from everybody_loops if it appears in the path. Fixes #44731.
2017-10-02incr.comp.: Remove saving and loading of legacy dep-graph.Michael Woerister-5/+5
2017-09-28Migrate to eprint/eprintln macros where appropriate.Corey Farwell-1/+1
2017-09-26Fix issue #44731.kennytm-1/+17
Also excludes `impl Trait` from everybody_loops if it appears in the path.
2017-09-25Auto merge of #44085 - bjorn3:no_llvm_write_metadata, r=arielb1bors-150/+64
Allow writing metadata without llvm # Todo: * [x] Rebase * [x] Fix eventual errors * [x] <strike>Find some crate to write elf files</strike> (will do it later) Cc #43842
2017-09-25Auto merge of #44646 - petrochenkov:scompress, r=michaelwoeristerbors-2/+2
Compress most of spans to 32 bits As described in https://internals.rust-lang.org/t/rfc-compiler-refactoring-spans/1357/28 Closes https://github.com/rust-lang/rust/issues/15594 r? @michaelwoerister
2017-09-24address review commentsAriel Ben-Yehuda-4/+0
2017-09-24move unsafety checking to MIRAriel Ben-Yehuda-4/+5
No functional changes intended.
2017-09-24add lint levels to VisibilityScopeAriel Ben-Yehuda-3/+4
2017-09-23incr.comp.: Serialize and deserialize new DepGraphMichael Woerister-2/+10
2017-09-23incr.comp.: Do some various cleanup.Michael Woerister-7/+0
2017-09-23Fix errorbjorn3-1/+2
2017-09-23Remove now unused dependency on flate2 from rustc_driverbjorn3-1/+0
2017-09-23Fix tidy errorsbjorn3-1/+2
2017-09-23Remove build_diagnostic_array hackbjorn3-2/+1
2017-09-23Fix some nitsbjorn3-19/+13
2017-09-23Merge rustc_trans_trait into rustc_trans_utilsbjorn3-7/+5
2017-09-23Move NoLlvmMetadataLoader to rustc_trans_traitsbjorn3-204/+25
2017-09-23Add TransCrate traitbjorn3-50/+136
2017-09-23[WIP] Less hacky way of supporting dylibsbjorn3-20/+14
2017-09-23Dont do no-trans for llvm enabled buildsbjorn3-1/+1
2017-09-23Allow building stage 2 compiler librariesbjorn3-9/+28
2017-09-23Allow writing metadata without llvmbjorn3-3/+5
2017-09-23Compress "small" spans to 32 bits and intern "large" spansVadim Petrochenkov-2/+2
2017-09-20incr.comp.: Add some comments.Michael Woerister-1/+1
2017-09-20incr.comp.: Remove IncrementalHashesMap and calculate_svh module.Michael Woerister-20/+10
2017-09-20incr.comp.: Store result fingerprints in DepGraph.Michael Woerister-1/+1
2017-09-19rework the README.md for rustc and add other readmesNiko Matsakis-0/+12
This takes way longer than I thought it would. =)
2017-09-18incr.comp.: Remove tcx from StableHashingContext.Michael Woerister-2/+2
2017-09-17rustc: Move codegen to a queryAlex Crichton-13/+41
This commit moves the actual code generation in the compiler behind a query keyed by a codegen unit's name. This ended up entailing quite a few internal refactorings to enable this, along with a few cut corners: * The `OutputFilenames` structure is now tracked in the `TyCtxt` as it affects a whole bunch of trans and such. This is now behind a query and threaded into the construction of the `TyCtxt`. * The `TyCtxt` now has a channel "out the back" intended to send data to worker threads in rustc_trans. This is used as a sort of side effect of the codegen query but morally what's happening here is the return value of the query (currently unit but morally a path) is only valid once the background threads have all finished. * Dispatching work items to the codegen threads was refactored to only rely on data in `TyCtxt`, which mostly just involved refactoring where data was stored, moving it from the translation thread to the controller thread's `CodegenContext` or the like. * A new thread locals was introduced in trans to work around the query system. This is used in the implementation of `assert_module_sources` which looks like an artifact of the old query system and will presumably go away once red/green is up and running.
2017-09-17rustc: Attach an mpsc channel to TyCtxtAlex Crichton-6/+15
This commit attaches a channel to the LLVM workers to the `TyCtxt` which will later be used during the codegen query to actually send work to LLVM workers. Otherwise this commit is just plumbing this channel throughout the compiler to ensure it reaches the right consumers.
2017-09-17rustc: Calculate `ExportedSymbols` in a queryAlex Crichton-2/+2
This commit moves the definition of the `ExportedSymbols` structure to the `rustc` crate and then creates a query that'll be used to construct the `ExportedSymbols` set. This in turn uses the reachablity query exposed in the previous commit.
2017-09-17rustc: Use reachablility through a queryAlex Crichton-10/+2
Turns out this was already set up as a query, just wasn't using it yet!
2017-09-14rustc: Remove `Session::dep_graph`Alex Crichton-21/+34
This commit removes the `dep_graph` field from the `Session` type according to issue #44390. Most of the fallout here was relatively straightforward and the `prepare_session_directory` function was rejiggered a bit to reuse the results in the later-called `load_dep_graph` function. Closes #44390
2017-09-12rustc: Make `CrateStore` private to `TyCtxt`Alex Crichton-3/+1
This commit removes the `cstore_untracked` method, making the `CrateStore` trait object entirely private to the `ty/context.rs` module.
2017-09-12Remove the `cstore` reference from Session in order to prepare encapsulating ↵Michael Woerister-19/+49
CrateStore access in tcx.
2017-09-11rustc: replace usize with u64 and ConstUsize.Eduard-Mihai Burtescu-11/+11
2017-09-09rustc: Remove `DepGraph` handling from rustc_metadataAlex Crichton-3/+3
This should now be entirely tracked through queries, so no need to have a `DepGraph` in the `CStore` object any more!