about summary refs log tree commit diff
path: root/src/librustc_metadata/decoder.rs
AgeCommit message (Collapse)AuthorLines
2016-08-17rustc: use Vec instead of VecPerParamSpace for ty::GenericPredicates.Eduard Burtescu-14/+4
2016-08-09replace Name with InternedString in DefPathDataNiko Matsakis-1/+1
Fixes #35292.
2016-08-02replace graph rewriting with detecting inlined idsNiko Matsakis-1/+1
We now detect inlined id's earlier (in the HIR map) and rewrite a read of them to be a read of the metadata for the associated item.
2016-08-01Move caching of HIR-inlining into CStore in order to avoid duplicating ↵Michael Woerister-1/+7
inlined HIR.
2016-07-30Auto merge of #35069 - wesleywiser:too_many_symbols, r=alexcrichtonbors-7/+2
Only export #[no_mangle] extern symbols during LTO Fixes #34985
2016-07-27Only export #[no_mangle] extern symbols during LTOWesley Wiser-7/+2
Previously, all extern symbols were exported even when performing LTO. Now, we only export symbols that are also marked #[no_mangle]. Fixes #34985
2016-07-25General MetaItem encapsulation rewrites.cgswords-9/+1
2016-07-17Do not resolve inherent static methods from other crates prematurelyVadim Petrochenkov-26/+0
2016-07-11Refactor `get_ident_interner` -> `with_ident_interner`.Jeffrey Seyfried-2/+2
2016-07-11Avoid passing around the thread-local interner in `librustc_metadata`.Jeffrey Seyfried-85/+45
2016-07-11Remove `Interner<T>` and rename `StrInterner` to `Interner`.Jeffrey Seyfried-2/+2
2016-07-08Remove unnecessary accessor function VariantDefData::kindVadim Petrochenkov-1/+1
2016-07-08Rewrite check_pat_enum, split it into check_pat_tuple_struct and check_pat_pathVadim Petrochenkov-4/+10
Update definitions in def_map for associated types written in unqualified form (like `Self::Output`) Cleanup finish_resolving_def_to_ty/resolve_ty_and_def_ufcs Make VariantDef's available through constructor IDs
2016-07-03prefer `if let` to match with `None => {}` arm in some placesZack M. Davis-9/+6
This is a spiritual succesor to #34268/8531d581, in which we replaced a number of matches of None to the unit value with `if let` conditionals where it was judged that this made for clearer/simpler code (as would be recommended by Manishearth/rust-clippy's `single_match` lint). The same rationale applies to matches of None to the empty block.
2016-06-28refactor rustc_metadata to use CamelCase names and IndexVecAriel Ben-Yehuda-24/+12
2016-06-23Move errors from libsyntax to its own crateJonathan Turner-8/+8
2016-06-04Auto merge of #33622 - arielb1:elaborate-drops, r=nikomatsakisbors-6/+16
[MIR] non-zeroing drop This enables non-zeroing drop through stack flags for MIR. Fixes #30380. Fixes #5016.
2016-06-03fix ICEs with RUST_LOGAriel Ben-Yehuda-6/+16
2016-05-31make region-param-def encoding more DRYNiko Matsakis-23/+4
we used to have two separate routines, one in tyencode/tydecode, and one in encode/decode.
2016-05-25trans: remove item_symbols from metadata and CrateContext.Eduard Burtescu-8/+0
2016-05-25trans: move exported_symbol to Instance::symbol_name.Eduard Burtescu-0/+10
2016-05-25rustc: use a simpler scheme for plugin registrar symbol names.Eduard Burtescu-8/+0
2016-05-18allow retracing paths across cratesNiko Matsakis-2/+34
For external crates, we must build up a map that goes from the DefKey to the DefIndex. We do this by iterating over each index that is found in the metadata and loading the associated DefKey.
2016-05-18change svh to store a u64Niko Matsakis-3/+3
We used to store a u64 converted to a String for some reason. Now we don't.
2016-05-18always encode variant fieldsNiko Matsakis-1/+4
we need them to be able to retrace.
2016-05-11rustc: More interning for data used in Ty<'tcx>.Eduard Burtescu-1/+1
2016-05-11rustc: Split 'tcx into 'gcx and 'tcx for InferCtxt and its users.Eduard Burtescu-23/+29
2016-05-11rustc: Replace &'a TyCtxt<'tcx> with a TyCtxt<'a, 'tcx> wrapper.Eduard Burtescu-68/+69
2016-05-09rustc: Implement custom panic runtimesAlex Crichton-0/+11
This commit is an implementation of [RFC 1513] which allows applications to alter the behavior of panics at compile time. A new compiler flag, `-C panic`, is added and accepts the values `unwind` or `panic`, with the default being `unwind`. This model affects how code is generated for the local crate, skipping generation of landing pads with `-C panic=abort`. [RFC 1513]: https://github.com/rust-lang/rfcs/blob/master/text/1513-less-unwinding.md Panic implementations are then provided by crates tagged with `#![panic_runtime]` and lazily required by crates with `#![needs_panic_runtime]`. The panic strategy (`-C panic` value) of the panic runtime must match the final product, and if the panic strategy is not `abort` then the entire DAG must have the same panic strategy. With the `-C panic=abort` strategy, users can expect a stable method to disable generation of landing pads, improving optimization in niche scenarios, decreasing compile time, and decreasing output binary size. With the `-C panic=unwind` strategy users can expect the existing ability to isolate failure in Rust code from the outside world. Organizationally, this commit dismantles the `sys_common::unwind` module in favor of some bits moving part of it to `libpanic_unwind` and the rest into the `panicking` module in libstd. The custom panic runtime support is pretty similar to the custom allocator support with the only major difference being how the panic runtime is injected (takes the `-C panic` flag into account).
2016-05-08Auto merge of #33091 - sanxiyn:unused-trait-import-3, r=nrcbors-1/+0
Warn unused trait imports, rebased Rebase of #30021. Fix #25730.
2016-05-07mir: prepare for rvalue promotion support.Eduard Burtescu-0/+3
2016-05-03Remove unused trait imports flagged by lintSeo Sanghyeon-1/+0
2016-04-12Do not encode name when encoding DefKeySeo Sanghyeon-2/+7
2016-04-07Auto merge of #32016 - nikomatsakis:incr-comp-save, r=mwbors-3/+3
Save/load incremental compilation dep graph Contains the code to serialize/deserialize the dep graph to disk between executions. We also hash the item contents and compare to the new hashes. Also includes a unit test harness. There are definitely some known limitations, such as https://github.com/rust-lang/rust/issues/32014 and https://github.com/rust-lang/rust/issues/32015, but I am leaving those for follow-up work. Note that this PR builds on https://github.com/rust-lang/rust/pull/32007, so the overlapping commits can be excluded from review. r? @michaelwoerister
2016-04-07Make `hir::Visibility` non-copyable and add `ty::Visibility`Jeffrey Seyfried-13/+13
2016-04-06make an incremental crateNiko Matsakis-3/+3
for now, this houses `svh` and the code to check `assert_dep_graph` is sane
2016-04-06rustc: retire hir::map's paths.Eduard Burtescu-26/+0
2016-04-06rustc: move middle::{def,def_id,pat_util} to hir.Eduard Burtescu-2/+2
2016-04-06rustc: move rustc_front to rustc::hir.Eduard Burtescu-3/+3
2016-03-31librustc_metadata: use bug!(), span_bug!()Benjamin Herr-34/+30
2016-03-30rename `rustc_const_eval` to `rustc_const_math`Oliver Schneider-1/+1
2016-03-27rustc: move cfg, infer, traits and ty from middle to top-level.Eduard Burtescu-3/+3
2016-03-27rustc: move middle::subst into middle::ty.Eduard Burtescu-1/+1
2016-03-25Correections due to refactoring .Niko Matsakis-2/+2
2016-03-25track the extern-crate def-id rather than pathNiko Matsakis-1/+3
We used to track, for each crate, a path that led to the extern-crate that imported it. Instead of that, track the def-id of the extern crate, along with a bit more information, and derive the path on the fly.
2016-03-25store krate information more uniformlyNiko Matsakis-5/+1
make DefPath store krate and enable uniform access to crate_name/crate_disambiguator
2016-03-25track def-id for inlined itemsNiko Matsakis-7/+25
2016-03-25Add a "link-guard" to avoid accidentally linking to a wrong dylib at runtime.Michael Woerister-3/+3
We want to prevent compiling something against one version of a dynamic library and then, at runtime accidentally using a different version of the dynamic library. With the old symbol-naming scheme this could not happen because every symbol had the SVH in it and you'd get an error by the dynamic linker when using the wrong version of a dylib. With the new naming scheme this isn't the case any more, so this patch adds the "link-guard" to prevent this error case. This is implemented as follows: - In every crate that we compile, we emit a function called "__rustc_link_guard_<crate-name>_<crate-svh>" - The body of this function contains calls to the "__rustc_link_guard" functions of all dependencies. - An executable contains a call to it's own "__rustc_link_guard" function. As a consequence the "__rustc_link_guard" function call graph mirrors the crate graph and the dynamic linker will fail if a wrong dylib is loaded somewhere because its "__rustc_link_guard" function will contain a different SVH in its name.
2016-03-25Make the compiler emit an error if the crate graph contains two crates with ↵Michael Woerister-2/+2
the same crate-name and crate-salt but different SVHs.
2016-03-25Compute a salt from arguments passed via -Cmetadata.Michael Woerister-0/+7