about summary refs log tree commit diff
path: root/src/librustc/ty/query
AgeCommit message (Collapse)AuthorLines
2018-11-13A few tweaks to iterations/collectingljedrz-1/+1
2018-11-11Reference count `crate_inherent_impls`s return value.Hugo van der Wijst-1/+2
The repeated cloning of the result in `inherent_impls` queries has quite an impact on crates with many inherent trait implementations.
2018-11-11Fix typos.Bruce Mitchener-2/+2
2018-11-08Improve creation of 3 IndexVecsljedrz-2/+1
2018-10-30Rollup merge of #55205 - ljedrz:faster_fxhashmap/set_population, r=estebankkennytm-3/+6
Improve a few cases of collecting to an FxHash(Map/Set) Either use `collect` or procure specified capacity when possible.
2018-10-29Rename other occs of (Code/File)Map to Source(Map/File) #51574David Lavati-5/+5
2018-10-29Improve a few cases of collecting to an FxHash(Map/Set)ljedrz-3/+6
2018-10-25Report const eval error inside the queryOliver Schneider-0/+37
2018-10-24introduce (but do not use) `ascribe_user_type` goalNiko Matsakis-5/+27
Lots of annoying boilerplate.
2018-10-20Auto merge of #55014 - ljedrz:lazyboye_unwraps, r=matthewjasperbors-1/+1
Prefer unwrap_or_else to unwrap_or in case of function calls/allocations The contents of `unwrap_or` are evaluated eagerly, so it's not a good pick in case of function calls and allocations. This PR also changes a few `unwrap_or`s with `unwrap_or_default`. An added bonus is that in some cases this change also reveals if the object it's called on is an `Option` or a `Result` (based on whether the closure takes an argument).
2018-10-19Prefer `Default::default` over `FxHash*::default` in struct constructorsOliver Scherer-16/+16
2018-10-19Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hackOliver Scherer-17/+17
2018-10-19Prefer unwrap_or_else to unwrap_or in case of function calls/allocationsljedrz-1/+1
2018-10-19Auto merge of #55040 - scalexm:param-env, r=nikomatsakisbors-3/+24
Replace `ParamEnv` with a new type in chalk context. I left a few FIXMEs. r? @nikomatsakis
2018-10-18Rollup merge of #55016 - oli-obk:vtables💥_vtables_everywhere, r=RalfJungkennytm-8/+8
Deduplicate some code and compile-time values around vtables r? @RalfJung
2018-10-17Add `FromEnv` for input types in the environmentscalexm-3/+3
2018-10-17Implement the `environment` queryscalexm-0/+1
2018-10-17Use `Environment` instead of `ty::ParamEnv` in chalk contextscalexm-3/+23
2018-10-15Uplift some comments to doc commentsOliver Scherer-8/+8
2018-10-15rename `QueryResult` to `QueryResponse`Niko Matsakis-10/+10
`Result` really sounds like the rustc result type
2018-10-05rustc/ty: improve stack shifting and remove related allocationsljedrz-10/+10
2018-10-05rustc/ty: move a faster early return upljedrz-5/+5
2018-10-05rustc/ty: improve allocationsljedrz-28/+30
2018-10-05rustc/ty: simplify common patternsljedrz-9/+4
2018-10-05rustc/ty: use Cow<str> where applicableljedrz-208/+220
2018-10-05rustc/ty: whitespace fixesljedrz-18/+15
2018-10-03Only promote calls to `#[rustc_promotable]` const fnsOliver Schneider-4/+20
2018-09-29don't elide lifetimes in paths in librustc/Zack M. Davis-156/+161
This seemed like a good way to kick the tires on the elided-lifetimes-in-paths lint (#52069)—seems to work! This was also pretty tedious—it sure would be nice if `cargo fix` worked on this codebase (#53896)!
2018-09-19Use full name to identify a macro in a `FileName`.Diogo Sousa-0/+1
Before this two macros with same name would be indistinguishable inside a `FileName`. This caused a bug in incremental compilation (see #53097) since two different macros would map out to the same `StableFilemapId`. Fixes #53097.
2018-09-18Merge indexed_set.rs into bitvec.rs, and rename it bit_set.rs.Nicholas Nethercote-4/+4
Currently we have two files implementing bitsets (and 2D bit matrices). This commit combines them into one, taking the best features from each. This involves renaming a lot of things. The high level changes are as follows. - bitvec.rs --> bit_set.rs - indexed_set.rs --> (removed) - BitArray + IdxSet --> BitSet (merged, see below) - BitVector --> GrowableBitSet - {,Sparse,Hybrid}IdxSet --> {,Sparse,Hybrid}BitSet - BitMatrix --> BitMatrix - SparseBitMatrix --> SparseBitMatrix The changes within the bitset types themselves are as follows. ``` OLD OLD NEW BitArray<C> IdxSet<T> BitSet<T> -------- ------ ------ grow - grow new - (remove) new_empty new_empty new_empty new_filled new_filled new_filled - to_hybrid to_hybrid clear clear clear set_up_to set_up_to set_up_to clear_above - clear_above count - count contains(T) contains(&T) contains(T) contains_all - superset is_empty - is_empty insert(T) add(&T) insert(T) insert_all - insert_all() remove(T) remove(&T) remove(T) words words words words_mut words_mut words_mut - overwrite overwrite merge union union - subtract subtract - intersect intersect iter iter iter ``` In general, when choosing names I went with: - names that are more obvious (e.g. `BitSet` over `IdxSet`). - names that are more like the Rust libraries (e.g. `T` over `C`, `insert` over `add`); - names that are more set-like (e.g. `union` over `merge`, `superset` over `contains_all`, `domain_size` over `num_bits`). Also, using `T` for index arguments seems more sensible than `&T` -- even though the latter is standard in Rust collection types -- because indices are always copyable. It also results in fewer `&` and `*` sigils in practice.
2018-09-15rustc: support extern crates loaded after query engine creation.Eduard-Mihai Burtescu-1/+10
2018-09-14Auto merge of #54032 - oli-obk:layout_scalar_ranges, r=eddybbors-3/+2
Add forever unstable attribute to allow specifying arbitrary scalar ranges r? @eddyb for the first commit and @nikomatsakis for the second one
2018-09-11renamed emit_nil to emit_unitkenta7777-1/+1
2018-09-11Revert "renamed emit_nil to emit_unit"kenta7777-1/+1
This reverts commit d02a5ffaed9c395ae62ee12d0f4e04946c62edb1.
2018-09-11Split `CrateNum` into an enum instead of having magic constantsOliver Schneider-3/+2
2018-09-10renamed emit_nil to emit_unitkenta7777-1/+1
2018-09-06crates that provide a `panic_handler` are exempt from `unused_extern_crates`Jorge Aparicio-0/+8
fixes the *first* false positive reported in #53964
2018-09-03Auto merge of #53673 - michaelwoerister:incr-thinlto-2000, r=alexcrichtonbors-8/+1
Enable ThinLTO with incremental compilation. This is an updated version of #52309. This PR allows `rustc` to use (local) ThinLTO and incremental compilation at the same time. In theory this should allow for getting compile-time improvements for small changes while keeping the runtime performance of the generated code roughly the same as when compiling non-incrementally. The difference to #52309 is that this version also caches the pre-LTO version of LLVM bitcode. This allows for another layer of caching: 1. if the module itself has changed, we have to re-codegen and re-optimize. 2. if the module itself has not changed, but a module it imported from during ThinLTO has, we don't need to re-codegen and don't need to re-run the first optimization phase. Only the second (i.e. ThinLTO-) optimization phase is re-run. 3. if neither the module itself nor any of its imports have changed then we can re-use the final, post-ThinLTO version of the module. (We might have to load its pre-ThinLTO version though so it's available for other modules to import from)
2018-08-31Make codegen not be a query (since it's not a real query anyway).Michael Woerister-8/+1
2018-08-31trip const_to_alloc querycsmoe-19/+1
2018-08-30Rollup merge of #53786 - frewsxcv:frewsxcv-bad-style, r=ManishearthPietro Albini-2/+2
Replace usages of 'bad_style' with 'nonstandard_style'. `bad_style` is being deprecated in favor of `nonstandard_style`: - https://github.com/rust-lang/rust/issues/41646
2018-08-29Replace usages of 'bad_style' with 'nonstandard_style'.Corey Farwell-2/+2
`bad_style` is being deprecated in favor of `nonstandard_style`: - https://github.com/rust-lang/rust/issues/41646
2018-08-28Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.Eduard-Mihai Burtescu-5/+6
2018-08-23Auto merge of #53520 - nnethercote:merge-IdxSet-IdxSetBuf, r=nikomatsakisbors-2/+2
Merge `IdxSet` and `IdxSetBuf` Because it simplifies things. @r? nikomatsakis
2018-08-22miri/CTFE refactorRalf Jung-7/+7
* Value gets renamed to Operand, so that now interpret::{Place, Operand} are the "dynamic" versions of mir::{Place, Operand}. * Operand and Place share the data for their "stuff is in memory"-base in a new type, MemPlace. This also makes it possible to give some more precise types in other areas. Both Operand and MemPlace have methods available to project into fields (and other kinds of projections) without causing further allocations. * The type for "a Scalar or a ScalarPair" is called Value, and again used to give some more precise types. * All of these have versions with an attached layout, so that we can more often drag the layout along instead of recomputing it. This lets us get rid of `PlaceExtra::Downcast`. MPlaceTy and PlaceTy can only be constructed in place.rs, making sure the layout is handled properly. (The same should eventually be done for ValTy and OpTy.) * All the high-level functions to write typed memory take a Place, and live in place.rs. All the high-level typed functions to read typed memory take an Operand, and live in operands.rs.
2018-08-21Rollup merge of #53496 - matthiaskrgr:codespell_08_2018, r=varkorkennytm-1/+1
Fix typos found by codespell.
2018-08-20Remove IdxSet typedef and Rename {,Hybrid}IdxSetBuf as {,Hybrid}IdxSet.Nicholas Nethercote-2/+2
Now that the `Buf` vs. non-`Buf` distinction has been removed, it makes sense to drop the `Buf` suffix and use the shorter names everywhere.
2018-08-19mv CachingCodemapView CachingSourceMapViewDonato Sciarra-3/+3
2018-08-19mv codemap source_mapDonato Sciarra-11/+11
2018-08-19mv codemap() source_map()Donato Sciarra-5/+5