about summary refs log tree commit diff
path: root/src/librustc_incremental
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-2936/+0
2020-08-17rust_ast::ast => rustc_astUjjwal Sharma-3/+3
2020-08-15replaced log with tracingGurpreet Singh-2/+2
2020-08-14Rework `rustc_serialize`Matthew Jasper-1/+3
- Move the type parameter from `encode` and `decode` methods to the trait. - Remove `UseSpecialized(En|De)codable` traits. - Remove blanket impls for references. - Add `RefDecodable` trait to allow deserializing to arena-allocated references safely. - Remove ability to (de)serialize HIR. - Create proc-macros `(Ty)?(En|De)codable` to help implement these new traits.
2020-08-08Eliminate the `SessionGlobals` from `librustc_ast`.Nicholas Nethercote-24/+25
By moving `{known,used}_attrs` from `SessionGlobals` to `Session`. This means they are accessed via the `Session`, rather than via TLS. A few `Attr` methods and `librustc_ast` functions are now methods of `Session`. All of this required passing a `Session` to lots of functions that didn't already have one. Some of these functions also had arguments removed, because those arguments could be accessed directly via the `Session` argument. `contains_feature_attr()` was dead, and is removed. Some functions were moved from `librustc_ast` elsewhere because they now need to access `Session`, which isn't available in that crate. - `entry_point_type()` --> `librustc_builtin_macros` - `global_allocator_spans()` --> `librustc_metadata` - `is_proc_macro_attr()` --> `Session`
2020-08-07Change the type of `AssertModuleSource::available_cgus`.Nicholas Nethercote-6/+5
It's currently a `BTreeSet<Symbol>`, which is a strange type. The `BTreeSet` suggests that element order is important, but `Symbol` is a type whose ordering isn't useful to humans. The ordering of the collection only manifests in an obscure error message ("no module named `...`") that doesn't appear in any tests. This commit changes the `Symbol` to a `String`, which is more typical.
2020-08-04rustc_ast: `(Nested)MetaItem::check_name` -> `has_name`Vadim Petrochenkov-6/+6
For consistency with `Attribute::has_name` which doesn't mark the attribute as used either. Replace all uses of `check_name` with `has_name` outside of rustc
2020-07-31Move from `log` to `tracing`Oliver Scherer-1/+1
2020-07-22build: Remove unnecessary `cargo:rerun-if-env-changed` annotationsVadim Petrochenkov-4/+0
2020-07-17Rename TypeckTables to TypeckResults.Valentin Lazureanu-3/+3
2020-07-15mir_built is a lieBastian Kauschke-3/+2
2020-07-15Remove lots of `Symbol::as_str()` calls.Nicholas Nethercote-5/+5
In various ways, such as changing functions to take a `Symbol` instead of a `&str`.
2020-07-15Add and use more static symbols.Nicholas Nethercote-5/+5
Note that the output of `unpretty-debug.stdout` has changed. In that test the hash values are normalized from a symbol numbers to small numbers like "0#0" and "0#1". The increase in the number of static symbols must have caused the original numbers to contain more digits, resulting in different pretty-printing prior to normalization.
2020-07-10Avoid "whitelist"Tamir Duberstein-1/+1
Other terms are more inclusive and precise.
2020-06-11Remove associated opaque typesMatthew Jasper-1/+0
They're unused now.
2020-06-02Rename the crates in source codeVadim Petrochenkov-2/+2
2020-06-02Make things build againVadim Petrochenkov-2/+2
2020-05-12Change `WorkProduct::saved_files` to an `Option`.Nicholas Nethercote-31/+29
Because there is at most one file.
2020-05-08Remove ast::{Ident, Name} reexports.Camille GILLOT-5/+5
2020-05-01Don't copy bytecode files into the incr. comp. cache.Nicholas Nethercote-15/+11
It's no longer necessary now that bitcode is embedded into object files. This change meant that `WorkProductFileKind::Bytecode` is no longer necessary, which means that type is no longer necessary, which allowed several places in the code to become simpler.
2020-04-29Auto merge of #71528 - alexcrichton:no-more-bitcode, r=nnethercotebors-1/+0
Store LLVM bitcode in object files, not compressed This commit is an attempted resurrection of #70458 where LLVM bitcode emitted by rustc into rlibs is stored into object file sections rather than in a separate file. The main rationale for doing this is that when rustc emits bitcode it will no longer use a custom compression scheme which makes it both easier to interoperate with existing tools and also cuts down on compile time since this compression isn't happening. The blocker for this in #70458 turned out to be that native linkers didn't handle the new sections well, causing the sections to either trigger bugs in the linker or actually end up in the final linked artifact. This commit attempts to address these issues by ensuring that native linkers ignore the new sections by inserting custom flags with module-level inline assembly. Note that this does not currently change the API of the compiler at all. The pre-existing `-C bitcode-in-rlib` flag is co-opted to indicate whether the bitcode should be present in the object file or not. Finally, note that an important consequence of this commit, which is also one of its primary purposes, is to enable rustc's `-Clto` bitcode loading to load rlibs produced with `-Clinker-plugin-lto`. The goal here is that when you're building with LTO Cargo will tell rustc to skip codegen of all intermediate crates and only generate LLVM IR. Today rustc will generate both object code and LLVM IR, but the object code is later simply thrown away, wastefully.
2020-04-29Store LLVM bitcode in object files, not compressedAlex Crichton-1/+0
This commit is an attempted resurrection of #70458 where LLVM bitcode emitted by rustc into rlibs is stored into object file sections rather than in a separate file. The main rationale for doing this is that when rustc emits bitcode it will no longer use a custom compression scheme which makes it both easier to interoperate with existing tools and also cuts down on compile time since this compression isn't happening. The blocker for this in #70458 turned out to be that native linkers didn't handle the new sections well, causing the sections to either trigger bugs in the linker or actually end up in the final linked artifact. This commit attempts to address these issues by ensuring that native linkers ignore the new sections by inserting custom flags with module-level inline assembly. Note that this does not currently change the API of the compiler at all. The pre-existing `-C bitcode-in-rlib` flag is co-opted to indicate whether the bitcode should be present in the object file or not. Finally, note that an important consequence of this commit, which is also one of its primary purposes, is to enable rustc's `-Clto` bitcode loading to load rlibs produced with `-Clinker-plugin-lto`. The goal here is that when you're building with LTO Cargo will tell rustc to skip codegen of all intermediate crates and only generate LLVM IR. Today rustc will generate both object code and LLVM IR, but the object code is later simply thrown away, wastefully.
2020-04-23librustc_middle: return LocalDefId instead of DefId in local_def_idmarmeladema-5/+5
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-10/+10
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-17/+17
2020-03-30rustc -> rustc_middle part 1Mazdak Farrokhzad-2/+2
2020-03-25Auto merge of #70297 - nnethercote:clean-up-debugging-options, ↵bors-6/+4
r=michaelwoerister Clean up debugging options I found various sub-optimal things when I was looking at option handling.
2020-03-24Remove `-Z incremental-queries`.Nicholas Nethercote-6/+4
Because it uses `parse_bool` and defaults to true, it is actually impossible to set it to false. And it hasn't been experimental for some time now.
2020-03-23Put extract_def_id back on DepNode.Camille GILLOT-2/+2
2020-03-23Fallout in other crates.Camille GILLOT-3/+3
2020-03-21Rollup merge of #70092 - eddyb:hir-items-are-just-nodes, r=ZoxcMazdak Farrokhzad-2/+2
hir: replace "items" terminology with "nodes" where appropriate. The newly added `HirOwnerItems` confused me before I realized that "items" there actually referred to HIR nodes, not `hir:Item` or "item-like" (which we should IMO replace with "owner"). I suspect the naming had something to do with `ItemLocalId`'s use of "item". That is, `ItemLocalId` could be interpreted to mean one of two things: * `IntraItemNodeId` i.e. `IntraOwnerNodeId` * this is IMO correct, and I'd even like to rename it, but I didn't want to throw that into this PR * `IntraOwnerItemId` * this is what `HirOwnerItems` would seem to imply r? @Zoxc cc @michaelwoerister @nikomatsakis
2020-03-20remove redundant returns (clippy::needless_return)Matthias Krüger-2/+1
2020-03-19hir: replace "items" terminology with "nodes" where appropriate.Eduard-Mihai Burtescu-2/+2
2020-03-18Rollup merge of #69920 - Centril:hir-cleanup, r=ZoxcMazdak Farrokhzad-5/+5
Remove some imports to the rustc crate - When we have `NestedVisitorMap::None`, we use `type Map = dyn intravisit::Map<'v>;` instead of the actual map. This doesn't actually result in dynamic dispatch (in the future we may want to use an associated type default to simplify the code). - Use `rustc_session::` imports instead of `rustc::{session, lint}`. r? @Zoxc
2020-03-16use direct imports for `rustc::{lint, session}`.Mazdak Farrokhzad-5/+5
2020-03-15More Method->Fn renamingMark Mansi-1/+1
2020-03-14Replace `HirBody` with `hir_owner_items` in testsJohn Kåre Alsaker-2/+3
2020-03-14Index HIR after creating TyCtxtJohn Kåre Alsaker-4/+4
2020-03-14Remove `Hir` and `HirBody` dep nodesJohn Kåre Alsaker-3/+2
2020-03-14Update `visit_item_likes_in_module`John Kåre Alsaker-1/+1
2020-03-14Update `krate_attrs` and `get_module`John Kåre Alsaker-2/+2
2020-03-14Rollup merge of #69809 - matthiaskrgr:lifetimes, r=eddybYuki Okushi-2/+2
remove lifetimes that can be elided (clippy::needless_lifetimes)
2020-03-12remove lifetimes that can be elided (clippy::needless_lifetimes)Matthias Krüger-2/+2
2020-03-12Rollup merge of #69747 - spastorino:rename-rustc-guide, r=pietroalbiniMazdak Farrokhzad-2/+2
Rename rustc guide This is in preparation for https://github.com/rust-lang/rustc-guide/issues/470 Needs to be merged after we actually rename the guide. Have used this to rename: `git grep -l 'rustc_guide' | xargs sed -i 's/rustc_guide/rustc_dev_guide/g'` `git grep -l 'rustc-guide' | xargs sed -i 's/rustc-guide/rustc-dev-guide/g'` `git grep -l 'rustc guide' | xargs sed -i 's/rustc guide/rustc dev guide/g'`
2020-03-12Rollup merge of #69674 - mark-i-m:assoc-fn, r=matthewjasperMazdak Farrokhzad-1/+1
Rename DefKind::Method and TraitItemKind::Method r? @eddyb, @Centril, or @matthewjasper cc #69498 #60163
2020-03-10rust-lang.github.io/rustc-dev-guide -> rustc-dev-guide.rust-lang.orgSantiago Pastorino-1/+1
2020-03-10Rename rustc guide to rustc dev guideSantiago Pastorino-2/+2
2020-03-10Rename rustc-guide to rustc-dev-guideSantiago Pastorino-1/+1
2020-03-05Use more efficient &&str to String conversion (clippy::inefficient_to_string)Matthias Krüger-1/+2
2020-03-03rename TraitItemKind::Method -> FnMark Mansi-1/+1