summary refs log tree commit diff
path: root/src/librustc_metadata/astencode.rs
AgeCommit message (Collapse)AuthorLines
2016-08-13Rename empty/bang to neverAndrew Cann-4/+4
Split Ty::is_empty method into is_never and is_uninhabited
2016-08-13Add EmptyToAny adjustmentAndrew Cann-1/+15
2016-08-08fixup tests for new def'n of InlinedItemNiko Matsakis-3/+7
it now carries a def-id; supply a dummy
2016-08-02replace graph rewriting with detecting inlined idsNiko Matsakis-12/+12
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-9/+42
inlined HIR.
2016-07-29intravisit: Fold functionality of IdVisitor into the regular Visitor.Michael Woerister-5/+5
2016-07-02Auto merge of #34539 - arielb1:metadata-hash, r=alexcrichtonbors-10/+10
Make the metadata lock more robust Fixes #33778 and friends. I also needed to add a metadata encoding version to rlibs, as they did not have it before. To keep it backwards-compatible, I added 4 zeroes to the start of the metadata, which are treated as an empty length field by older rustcs. r? @alexcrichton
2016-06-28refactor rustc_metadata to use CamelCase names and IndexVecAriel Ben-Yehuda-10/+10
2016-06-28cleanup: refactor away `ast::NodeIdAssigner`Jeffrey Seyfried-20/+1
2016-06-23Move errors from libsyntax to its own crateJonathan Turner-11/+12
2016-06-10Introduce TyCtxt::expect_def/expect_resolution helpers and use them where ↵Vadim Petrochenkov-5/+2
possible
2016-05-13Auto merge of #33532 - jseyfried:mutable_lowering_context, r=nrcbors-9/+9
Clean up `hir::lowering` Clean up `hir::lowering`: - give lowering functions mutable access to the lowering context - refactor the `lower_*` functions and other functions that take a lowering context into methods - simplify the API that `hir::lowering` exposes to `driver` - other miscellaneous cleanups r? @nrc
2016-05-11rustc: Remove the unnecessary ast_ty_to_ty_cache.Eduard Burtescu-5/+2
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-8/+8
2016-05-11rustc: Replace &'a TyCtxt<'tcx> with a TyCtxt<'a, 'tcx> wrapper.Eduard Burtescu-27/+23
2016-05-10Refactor `hir::lowering` APIJeffrey Seyfried-1/+1
2016-05-10Refactor the `hir::lowering::lower_*` functions into methods of ↵Jeffrey Seyfried-6/+6
`LoweringContext`
2016-05-10Give lowering functions mutable access to the lowering contextJeffrey Seyfried-8/+8
2016-05-09Refactor `hir::lowering::Resolver`Jeffrey Seyfried-35/+44
2016-04-20debugging, misc fixesNick Cameron-4/+4
2016-04-12Do not encode name when encoding DefKeySeo Sanghyeon-8/+8
2016-04-06rustc: retire hir::map's paths.Eduard Burtescu-13/+4
2016-04-06rustc: move some maps from ty to hir.Eduard Burtescu-7/+7
2016-04-06rustc: move middle::{def,def_id,pat_util} to hir.Eduard Burtescu-2/+2
2016-04-06syntax: dismantle ast_util.Eduard Burtescu-8/+9
2016-04-06rustc: move rustc_front to rustc::hir.Eduard Burtescu-7/+7
2016-03-31librustc_metadata: use bug!(), span_bug!()Benjamin Herr-10/+6
2016-03-27rustc: move cfg, infer, traits and ty from middle to top-level.Eduard Burtescu-4/+4
2016-03-27rustc: move middle::subst into middle::ty.Eduard Burtescu-1/+1
2016-03-25track def-id for inlined itemsNiko Matsakis-4/+6
2016-03-17metadata: Constrain FoundAst::FoundParent to an Item.Eduard Burtescu-54/+44
2016-03-03Rename middle::ty::ctxt to TyCtxtJeffrey Seyfried-9/+9
2016-02-26Fix breakage in rustc_metadataJeffrey Seyfried-2/+2
2016-02-26Remove `LastPrivate`Jeffrey Seyfried-3/+0
2016-02-20make *mut T -> *const T a coercionAriel Ben-Yehuda-4/+12
rather than being implicit quasi-subtyping. Nothing good can come out of quasi-subtyping.
2016-02-12Autoderef in librustc_metadataJonas Schievink-3/+3
2016-01-26Implement the translation item collector.Michael Woerister-0/+1
The purpose of the translation item collector is to find all monomorphic instances of functions, methods and statics that need to be translated into LLVM IR in order to compile the current crate. So far these instances have been discovered lazily during the trans path. For incremental compilation we want to know the set of these instances in advance, and that is what the trans::collect module provides. In the future, incremental and regular translation will be driven by the collector implemented here.
2016-01-21move more checks out of librustcOliver Schneider-1/+1
2016-01-20Rename Def's variants and don't reexport themVadim Petrochenkov-28/+28
2016-01-20Refactor definitions of ADTs in rustc::middle::defVadim Petrochenkov-5/+4
2015-12-28Use a more efficient encoding for opaque data in RBML.Michael Woerister-75/+61
2015-12-22Fix def paths creation for items inlined from external crates.Michael Woerister-6/+9
Avoid duplicating the last element of the def path which led to paths like "std::slice::into_vec::into_vec".
2015-12-16rustc: Remove def::DefUseVadim Petrochenkov-1/+0
2015-12-11Make name resolution errors non-fatalNick Cameron-1/+2
2015-12-09Auto merge of #30140 - michaelwoerister:tls-encoding, r=nikomatsakisbors-58/+9
With this commit, metadata encoding and decoding can make use of thread-local encoding and decoding contexts. These allow implementers of `serialize::Encodable` and `Decodable` to access information and datastructures that would otherwise not be available to them. For example, we can automatically translate def-id and span information during decoding because the decoding context knows which crate the data is decoded from. Or it allows to make `ty::Ty` decodable because the context has access to the `ty::ctxt` that is needed for creating `ty::Ty` instances. Some notes: - `tls::with_encoding_context()` and `tls::with_decoding_context()` (as opposed to their unsafe versions) try to prevent the TLS data getting out-of-sync by making sure that the encoder/decoder passed in is actually the same as the one stored in the context. This should prevent accidentally reading from the wrong decoder. - There are no real tests in this PR. I had a unit tests for some of the core aspects of the TLS implementation but it was kind of brittle, a lot of code for mocking `ty::ctxt`, `crate_metadata`, etc and did actually test not so much. The code will soon be tested by the first incremental compilation auto-tests that rely on MIR being properly serialized. However, if people think that some tests should be added before this can land, I'll try to provide some that make sense. r? @nikomatsakis
2015-12-09Add scoped thread-local encoding and decoding contexts to cstore.Michael Woerister-58/+9
With this commit, metadata encoding and decoding can make use of thread-local encoding and decoding contexts. These allow implementers of serialize::Encodable and Decodable to access information and datastructures that would otherwise not be available to them. For example, we can automatically translate def-id and span information during decoding because the decoding context knows which crate the data is decoded from. Or it allows to make ty::Ty decodable because the context has access to the ty::ctxt that is needed for creating ty::Ty instances.
2015-12-07Remove some unnecessary indirection from HIR structuresVadim Petrochenkov-3/+3
2015-11-26split the metadata code into rustc_metadataAriel Ben-Yehuda-0/+1472
tests & rustdoc still broken