summary refs log tree commit diff
path: root/src/librustc_metadata/rmeta/decoder.rs
AgeCommit message (Collapse)AuthorLines
2020-03-05rustc_metadata: Move some code from `impl CrateMetadataRef` to `impl ↵Vadim Petrochenkov-89/+87
CrateMetadata`
2020-03-05rustc_metadata: Give decoder access to whole crate storeVadim Petrochenkov-17/+22
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-1/+1
2020-02-29Make it build againVadim Petrochenkov-1/+1
2020-02-26Auto merge of #67742 - mark-i-m:describe-it, r=matthewjasperbors-6/+13
Generalized article_and_description r? @matthewjasper The logic of finding the right word and article to print seems to be repeated elsewhere... this is an experimental method to unify this logic...
2020-02-24rustc_metadata: Use binary search from standard libraryVadim Petrochenkov-13/+5
instead of a hand rolled one.
2020-02-22get rid of lazymark-1/+1
2020-02-22add generator_kind queryMark Mansi-6/+13
2020-02-15Record proc macro harness order for use during metadata deserializationAaron Hill-4/+0
Fixes #68690 When we generate the proc macro harness, we now explicitly recorder the order in which we generate entries. We then use this ordering data to deserialize the correct proc-macro-data from the crate metadata.
2020-02-01Move builtin attribute logic to new rustc_attr crate.Mazdak Farrokhzad-1/+1
For now, this is all the crate contains, but more attribute logic & types will be moved there over time.
2020-01-16don't clone types that are copyMatthias Krüger-1/+1
found via clippy
2020-01-10Auto merge of #65241 - tmiasko:no-std-san, r=alexcrichtonbors-4/+0
build-std compatible sanitizer support ### Motivation When using `-Z sanitizer=*` feature it is essential that both user code and standard library is instrumented. Otherwise the utility of sanitizer will be limited, or its use will be impractical like in the case of memory sanitizer. The recently introduced cargo feature build-std makes it possible to rebuild standard library with arbitrary rustc flags. Unfortunately, those changes alone do not make it easy to rebuild standard library with sanitizers, since runtimes are dependencies of std that have to be build in specific environment, generally not available outside rustbuild process. Additionally rebuilding them requires presence of llvm-config and compiler-rt sources. The goal of changes proposed here is to make it possible to avoid rebuilding sanitizer runtimes when rebuilding the std, thus making it possible to instrument standard library for use with sanitizer with simple, although verbose command: ``` env CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS=-Zsanitizer=thread cargo test -Zbuild-std --target x86_64-unknown-linux-gnu ``` ### Implementation * Sanitizer runtimes are no long packed into crates. Instead, libraries build from compiler-rt are used as is, after renaming them into `librusc_rt.*`. * rustc obtains runtimes from target libdir for default sysroot, so that they are not required in custom build sysroots created with build-std. * The runtimes are only linked-in into executables to address issue #64629. (in previous design it was hard to avoid linking runtimes into static libraries produced by rustc as demonstrated by sanitizer-staticlib-link test, which still passes despite changes made in #64780). cc @kennytm, @japaric, @firstyear, @choller
2020-01-09{rustc::util -> rustc_data_structures}::capturesMazdak Farrokhzad-1/+1
2020-01-09Remove sanitizer_runtime attributeTomasz Miąsko-4/+0
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-3/+3
2020-01-04extract Export, ExportMap from hir::defMazdak Farrokhzad-12/+8
2020-01-02Normalize `syntax::source_map` imports.Mazdak Farrokhzad-1/+1
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-7/+7
2019-12-30Rename `libsyntax_ext` and `libsyntax_expand` in codeVadim Petrochenkov-2/+2
2019-12-30Make things build againVadim Petrochenkov-1/+1
2019-12-22Format the worldMark Rousskov-304/+305
2019-12-201. ast::Mutability::{Mutable -> Mut, Immutable -> Not}.Mazdak Farrokhzad-2/+2
2. mir::Mutability -> ast::Mutability.
2019-12-13Require stable/unstable annotations for the constness of all stable ↵Oliver Scherer-0/+4
functions with a `const` modifier
2019-12-05rustc: Apply clearer naming to BodyAndCache, fix Deref impl, remove unneeded ↵Paul Daniel Faria-3/+3
Index impl, remove body fn rustc_codegen_ssa: Fix BodyAndCache reborrow to Body and change instances of body() call to derefence rustc_mir: Fix BodyAndCache reborrow to Body and change intances of body() call to derefence
2019-12-03Explain why "loading" constness from extern crates does not necessarily load ↵Oliver Scherer-1/+5
anything
2019-12-03Check intrinsics for callability in const fnsMahmut Bulut-0/+2
2019-12-02Remove HasLocalDecls impl from BodyCache's, properly reborrow to Body, ↵Paul Daniel Faria-2/+2
rename all body_cache back to body
2019-12-02Fix remaining compilation issuesPaul Daniel Faria-4/+10
2019-12-02Simplify BodyCache impl and fix all remaining type errors in librustc_mir ↵Paul Daniel Faria-4/+3
(lifetime errors still exist)
2019-12-02Fix typo caused by rebasingPaul Daniel Faria-1/+1
2019-12-02Move predecessors cache back to its own typePaul Daniel Faria-1/+1
This ensures that the cache can be properly ignored during encoding and decoding. Fix panics that arose due to lack of encoding
2019-11-28rustc_metadata: Privatize `CrateMetadata::root`Vadim Petrochenkov-1/+17
2019-11-28rustc_metadata: Privatize all fields of `CrateRoot`Vadim Petrochenkov-0/+48
All of them are read-only
2019-11-28rustc_metadata: Privatize `CrateMetadata::dep_kind`Vadim Petrochenkov-1/+9
2019-11-28rustc_metadata: Privatize `CrateMetadata::source`Vadim Petrochenkov-1/+5
2019-11-28rustc_metadata: Privatize `CrateMetadata::extern_crate`Vadim Petrochenkov-1/+10
2019-11-28rustc_metadata: Privatize `CrateMetadata::dependencies`Vadim Petrochenkov-2/+10
2019-11-27rustc_metadata: remove Encodable requirements from LazyMeta impls.Eduard-Mihai Burtescu-5/+5
2019-11-27rustc_metadata: replace PerDefTable<T> with Table<DefIndex, T>.Eduard-Mihai Burtescu-4/+4
2019-11-20Rollup merge of #66496 - petrochenkov:metapriv2, r=eddybMazdak Farrokhzad-23/+157
rustc_metadata: Privatize more things Continuation of https://github.com/rust-lang/rust/pull/66056. The most notable change here is that `CrateMetadata` is moved from `cstore.rs` to `decoder.rs`. Most of uses of `CrateMetadata` fields are in the decoder and uses of `root: CrateRoot` and other fields are so intertwined with each other that it would be hard to move a part of them into `cstore.rs` to privatize `CrateMetadata` fields, so we are going the other way round. `cstore.rs` can probably be dismantled now, but I'll leave this to some other day. Similarly, remaining `CrateMetadata` fields can be privatized by introducing some getter/setter methods, but not today. r? @eddyb
2019-11-17rustc_metadata: Remove `CrateMetadata::is_proc_macro_crate`Vadim Petrochenkov-11/+7
2019-11-17rustc_metadata: Stop leaking `Lazy` from the `rmeta` moduleVadim Petrochenkov-7/+19
2019-11-17rustc_metadata: Move `CrateMetadata` into `decoder.rs`Vadim Petrochenkov-6/+115
It allows to make most of its fields private
2019-11-17rustc_metadata: Move some structs from `cstore` to `decoder`Vadim Petrochenkov-4/+21
This allows to privatize their fields.
2019-11-15Remove newtype for qualifs in `rustc_metadata`Dylan MacKenzie-1/+1
We have a proper type for these now, so the wrapper is no longer necessary.
2019-11-15Fix nits from reviewDylan MacKenzie-1/+1
2019-11-15Use a bespoke type for the result of `mir_const_qualif`Dylan MacKenzie-1/+1
2019-11-10Merge hir::Mutability into ast::Mutability.Camille GILLOT-2/+2
2019-11-07rustc_metadata: Rename `schema` to `rmeta`Vadim Petrochenkov-0/+1396
And change `rmeta.rs` to `rmeta/mod.rs`