about summary refs log tree commit diff
path: root/src/librustc_driver
AgeCommit message (Collapse)AuthorLines
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.
2017-08-25Merge remote-tracking branch 'origin/master' into genAlex Crichton-19/+651
2017-08-24Auto merge of #43345 - matthewhammer:master, r=nikomatsakisbors-0/+646
Profile queries This PR implements the "profile queries" debugging feature described here: https://github.com/rust-lang-nursery/rust-forge/blob/master/profile-queries.md In particular, it implements the debugging flag `-Z profile-queries` FYI: This PR is my second attempt at pushing these changes. My original PR required a rebase; I have now done that rebase manually, after messing up with git's "interactive" rebase support. The original (now closed/cancelled) PR is this one: https://github.com/rust-lang/rust/issues/43156 r? @nikomatsakis
2017-08-24Auto merge of #43532 - petrochenkov:pgargs, r=nikomatsakisbors-4/+4
Desugar parenthesized generic arguments in HIR Fixes ICE in https://github.com/rust-lang/rust/issues/43431 and maybe some other similar issues. r? @eddyb
2017-08-23-Z profile-query-and-key, separate from -Z profile-query; query key is ↵Matthew Hammer-25/+47
string option
2017-08-23-Z profile-queries includes dep_graph.with_task uses in outputMatthew Hammer-12/+86
2017-08-23-Z profile-queries: remove panic when channel is unsetMatthew Hammer-12/+18
2017-08-23profiling with -Z profile-queries recognizes -Z time-passesMatthew Hammer-25/+128
2017-08-23inc comp: -Z profile-queries support; see also ↵Matthew Hammer-0/+441
https://github.com/rust-lang-nursery/rust-forge/blob/master/profile-queries.md
2017-08-22Introduce temporary target feature crt_static_respectedSamuel Holland-1/+1
This feature allows targets to opt in to full support of the crt-static feature. Currently, crt-static is allowed on all targets, even those that really can't or really shouldn't support it. This works because it is very loose in the specification of its effects. Changing the behavior of crt-static to be more strict in how it chooses libraries and links executables would likely cause compilation to fail on these platforms. To avoid breaking existing uses of crt-static, whitelist targets that support the new, stricter behavior. For all other targets, this changes crt-static from being "mostly a no-op" to "explicitly a no-op".
2017-08-22Factor out a helper for the getting C runtime linkageSamuel Holland-15/+1
This commit makes no functional changes.
2017-08-22--print=native-static-libsKornel-1/+6
2017-08-21Merge remote-tracking branch 'origin/master' into genAlex Crichton-4/+4
2017-08-21Merge remote-tracking branch 'origin/master' into genAlex Crichton-4/+4
2017-08-21Remove the `rustc_mir::transform` entry point for mir-borrowck.Felix S. Klock II-4/+0
2017-08-21Expose mir-borrowck via a query.Felix S. Klock II-0/+4
(A followup commit removes the mir::transform based entry point.)
2017-08-19rustc: Remove some dead codeVadim Petrochenkov-4/+4
2017-08-19Desugar parenthesized generic arguments in HIRVadim Petrochenkov-4/+4
2017-08-17Merge remote-tracking branch 'origin/master' into genAlex Crichton-7/+36
2017-08-17Rollup merge of #43891 - Fourchaux:master, r=steveklabnikCorey Farwell-1/+1
Fix typos & us spellings Fixing some typos and non en-US spellings. (Update of PR https://github.com/rust-lang/rust/pull/42812 )
2017-08-17Auto merge of #43878 - kennytm:fix-43869-put-impl-trait-out-of-the-loop, ↵bors-6/+35
r=alexcrichton Exclude `impl Trait` functions from everybody_loops. Fixes #43869. cc #34511.
2017-08-16Merge remote-tracking branch 'origin/master' into genAlex Crichton-0/+9
2017-08-16Merge remote-tracking branch 'origin/master' into genAlex Crichton-13/+13
2017-08-16Moved mir-borrowck pass down to where comments say it should be.Felix S. Klock II-1/+9
Added two fixmes: The `SimplifyBranches` pass cannot stay where it is, and `BorrowckMir` should be a query, not a pass. But I am going to leave those changes to a future PR.
2017-08-16MIR based borrow check (opt-in).Felix S. Klock II-0/+1
One can either use `-Z borrowck-mir` or add the `#[rustc_mir_borrowck]` attribute to opt into MIR based borrow checking. Note that regardless of whether one opts in or not, AST-based borrow check will still run as well. The errors emitted from AST-based borrow check will include a "(Ast)" suffix in their error message, while the errors emitted from MIR-based borrow check will include a "(Mir)" suffix. post-rebase: removed check for intra-statement mutual conflict; replaced with assertion checking that at most one borrow is generated per statement. post-rebase: removed dead code: `IdxSet::pairs` and supporting stuff.
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-13/+13
Like #43008 (f668999), but _much more aggressive_.
2017-08-15Fix typos & us spellingsFourchaux-1/+1
2017-08-15Exclude `impl Trait` functions from everybody_loops.kennytm-6/+35
Fixes #43869.
2017-08-14Merge remote-tracking branch 'origin/master' into genAlex Crichton-130/+149
2017-08-14Auto merge of #43740 - michaelwoerister:local-id-in-typecktables, r=arielb1bors-1/+1
Use hir::ItemLocalId as keys in TypeckTables. This PR makes `TypeckTables` use `ItemLocalId` instead of `NodeId` as key. This is needed for incremental compilation -- for stable hashing and for being able to persist and reload these tables. The PR implements the most important part of https://github.com/rust-lang/rust/issues/40303. Some notes on the implementation: * The PR adds the `HirId` to HIR nodes where needed (`Expr`, `Local`, `Block`, `Pat`) which obviates the need to store a `NodeId -> HirId` mapping in crate metadata. Thanks @eddyb for the suggestion! In the future the `HirId` should completely replace the `NodeId` in HIR nodes. * Before something is read or stored in one of the various `TypeckTables` subtables, the entry's key is validated via the new `TypeckTables::validate_hir_id()` method. This makes sure that we are not mixing information from different items in a single table. That last part could be made a bit nicer by either (a) new-typing the table-key and making `validate_hir_id()` the only way to convert a `HirId` to the new-typed key, or (b) just encapsulate sub-table access a little better. This PR, however, contents itself with not making things significantly worse. Also, there's quite a bit of switching around between `NodeId`, `HirId`, and `DefIndex`. These conversions are cheap except for `HirId -> NodeId`, so if the valued reviewer finds such an instance in a performance critical place, please let me know. Ideally we convert more and more code from `NodeId` to `HirId` in the future so that there are no more `NodeId`s after HIR lowering anywhere. Then the amount of switching should be minimal again. r? @eddyb, maybe?
2017-08-14Auto merge of #43842 - bjorn3:no_llvm_cleanup, r=alexcrichtonbors-97/+114
Cleanup for "Support compiling rustc without LLVM (try 2)" This includes a small patch to allow running tests without llvm. Also check if you are not trying to compile a dylib. cc #42932 r? @alexcrichton
2017-08-13Fix errorbjorn3-0/+1
2017-08-13Update driver.rsbjorn3-1/+1
2017-08-13Change a #[cfg()] to a cfg!()bjorn3-2/+1
2017-08-13Fix tidy errorsbjorn3-7/+15
2017-08-13Remove some more cfg'sbjorn3-89/+93
2017-08-13Rollup merge of #43814 - Eijebong:fix_typos2, r=petrochenkovGuillaume Gomez-1/+1
Fix some typos Follow up of #43794 If refined my script a little bit and found some more.
2017-08-13Auto merge of #43348 - kennytm:fix-24658-doc-every-platform, r=alexcrichtonbors-30/+32
Expose all OS-specific modules in libstd doc. 1. Uses the special `--cfg dox` configuration passed by rustbuild when running `rustdoc`. Changes the `#[cfg(platform)]` into `#[cfg(any(dox, platform))]` so that platform-specific API are visible to rustdoc. 2. Since platform-specific implementations often won't compile correctly on other platforms, `rustdoc` is changed to apply `everybody_loops` to the functions during documentation and doc-test harness. 3. Since platform-specific code are documented on all platforms now, it could confuse users who found a useful API but is non-portable. Also, their examples will be doc-tested, so must be excluded when not testing on the native platform. An undocumented attribute `#[doc(cfg(...))]` is introduced to serve the above purposed. Fixes #24658 (Does _not_ fully implement #1998).