summary refs log tree commit diff
path: root/src/librustc_driver
AgeCommit message (Collapse)AuthorLines
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-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!
2017-09-05rustc: Store InternedString in `DefPathData`Alex Crichton-3/+0
Previously a `Symbol` was stored there, but this ended up causing hash collisions in situations that otherwise shouldn't have a hash collision. Only the symbol's string value was hashed, but it was possible for distinct symbols to have the same string value, fooling various calcuations into thinking that these paths *didn't* need disambiguating data when in fact they did! By storing `InternedString` instead we're hopefully triggering all the exising logic to disambiguate paths with same-name `Symbol` but actually distinct locations.
2017-09-05rustc: Move stability functionality into queriesAlex Crichton-7/+0
This commit primarily removes the `stability` field from `TyCtxt` as well as its internal mutable state, instead using a query to build the stability index as well as primarily using queries for other related lookups. Like previous commits the calculation of the stability index is wrapped in a `with_ignore` node to avoid regressing the current tests, and otherwise this commit also introduces #44232 but somewhat intentionally so.
2017-09-05rustc: Remove lang item methods from CrateStoreAlex Crichton-3/+0
Given the previous commit, these are now trivially representable as queries!
2017-09-05rustc: Migrate lang items to a queryAlex Crichton-7/+0
This commit moves the calculation of the `LanguageItems` structure into a query rather than being calculated before the `TyCtxt` exists, with the eventual end goal of removing some `CrateStore` methods.
2017-09-05rustc: Remove a number of mutable fields in cstoreAlex Crichton-1/+0
This commit started by moving methods from `CrateStore` to queries, but it ended up necessitating some deeper refactorings to move more items in general to queries. Before this commit the *resolver* would walk over the AST and process foreign modules (`extern { .. }` blocks) and collect `#[link]` annotations. It would then also process the command line `-l` directives and such. This information was then stored as precalculated lists in the `CrateStore` object for iterating over later. After this, commit, however, this pass no longer happens during resolution but now instead happens through queries. A query for the linked libraries of a crate will crawl the crate for `extern` blocks and then process the linkage annotations at that time.
2017-09-04Auto merge of #43067 - pornel:libdeps, r=nrcbors-1/+6
Compact display of static lib dependencies Fixes #33173 Instead of displaying one dependency per line, I've changed the format to display them all in one line. As a bonus they're in format of linker flags (`-lfoo`), so the output can be copy&pasted if one is actually going to link as suggested.
2017-09-01rustc: rename CodeExtent to Scope and RegionMaps to ScopeTree.Eduard-Mihai Burtescu-11/+11
2017-09-01rustc: use hir::ItemLocalId instead of ast::NodeId in CodeExtent.Eduard-Mihai Burtescu-16/+14
2017-09-01rustc: use hir::ItemLocalId instead of ast::NodeId in CFG.Eduard-Mihai Burtescu-1/+1
2017-08-28Merge branch 'master' of https://github.com/rust-lang/rust into genJohn Kåre Alsaker-4/+3
2017-08-27Additional libc cleanupTatsuyuki Ishi-1/+2
2017-08-27Move unused-extern-crate to late passTatsuyuki Ishi-0/+1
2017-08-25*: remove crate_{name,type} attributesTamir Duberstein-3/+0
Fixes #41701.