about summary refs log tree commit diff
path: root/src/librustc_metadata/decoder.rs
AgeCommit message (Collapse)AuthorLines
2017-05-14Remove rustc_llvm dependency from rustc_metadataRobin Kruppe-5/+1
Move the code for loading metadata from rlibs and dylibs from rustc_metadata into rustc_trans, and introduce a trait to avoid introducing a direct dependency on rustc_trans. This means rustc_metadata is no longer rebuilt when LLVM changes.
2017-05-13rustc: stop interning CodeExtent, it's small enough.Eduard-Mihai Burtescu-7/+0
2017-05-09resolved merge conflictsachernyak-124/+112
2017-05-08incr.comp.: Hash more pieces of crate metadata to detect changes there.Michael Woerister-124/+112
2017-05-04moved metadata provider impls to decoderachernyak-3/+20
2017-05-02rename from `item_mir` to `optimized_mir`Niko Matsakis-4/+4
2017-05-02Rollup merge of #41662 - nikomatsakis:on-demandify-region-mapping, r=eddybCorey Farwell-2/+9
On demandify region mapping This is an adaptation of @cramertj's PR. I am sort of tempted to keep simplifying it, but also tempted to land it so and we can refactor more in follow-up PRs. As is, it does the following things: - makes the region-maps an on-demand query, per function `tcx.region_maps(def_id)` - interns code extents instead of of having them be integers - remove the "root region extent" and (to some extent) item extents; instead we use `Option<CodeExtent<'tcx>>` in a few places (no space inefficiency since `CodeExtent<'tcx>` is now a pointer). I'm not entirely happy with the way I have it setup though. Here are some of the changes I was considering (I'm not sure if they would work out well): 1. Removing `item_extents` entirely -- they are rarely used now, because most of the relevant places now accept an `Option<Region<'tcx>>` or an `Option<CodeExtent<'tcx>>`, but I think still used in a few places. 2. Merging `RegionMaps` into the typeck tables, instead of having it be its own query. 3. Change `CodeExtent<'tcx>` to store the parent pointer. This would mean that fewer places in the code actually *need* a `RegionMaps` anyhow, since most of them just want to be able to walk "up the tree". On the other hand, you wouldn't be able to intern a `CodeExtent<'tcx>` for some random node-id, you'd need to look it up in the table (since there'd be more information). Most of this code is semi-temporary -- I expect it to largely go away as we move to NLL -- so I'm also not *that* concerned with making it perfect. r? @eddyb
2017-05-01Queryify is_item_mir_availableTaylor Cramer-7/+2
2017-05-01Queryify const_is_rvalue_promotable_to_staticTaylor Cramer-5/+0
2017-05-01Queryify item_body_nested_bodiesTaylor Cramer-8/+1
2017-04-30intern CodeExtentsNiko Matsakis-2/+9
Make a `CodeExtent<'tcx>` be something allocated in an arena instead of an index into the `RegionMaps`.
2017-04-28Auto merge of #41368 - nikomatsakis:incr-comp-dep-tracking-map, r=eddybbors-1/+1
make *most* maps private Currently we access the `DepTrackingMap` fields directly rather than using the query accessors. This seems bad. This branch removes several such uses, but not all, and extends the macro so that queries can hide their maps (so we can prevent regressions). The extension to the macro is kind of ugly :/ but couldn't find a simple way to do it otherwise (I guess I could use a nested macro...). Anyway I figure it's only temporary. r? @eddyb
2017-04-28Auto merge of #41508 - michaelwoerister:generic-path-remapping, r=alexcrichtonbors-2/+2
Implement a file-path remapping feature in support of debuginfo and reproducible builds This PR adds the `-Zremap-path-prefix-from`/`-Zremap-path-prefix-to` commandline option pair and is a more general implementation of #41419. As opposed to the previous attempt, this implementation should enable reproducible builds regardless of the working directory of the compiler. This implementation of the feature is more general in the sense that the re-mapping will affect *all* paths the compiler emits, including the ones in error messages. r? @alexcrichton
2017-04-28do not access `associated_item` map directlyNiko Matsakis-1/+1
2017-04-27Auto merge of #37860 - giannicic:defaultimpl, r=nagisabors-0/+4
#37653 support `default impl` for specialization this commit implements the first step of the `default impl` feature: > all items in a `default impl` are (implicitly) `default` and hence > specializable. In order to test this feature I've copied all the tests provided for the `default` method implementation (in run-pass/specialization and compile-fail/specialization directories) and moved the `default` keyword from the item to the impl. See [referenced](https://github.com/rust-lang/rust/issues/37653) issue for further info r? @aturon
2017-04-26Implement a file-path remapping feature in support of debuginfo and ↵Michael Woerister-2/+2
reproducible builds.
2017-04-24rustc: rename some of the queries to match tcx methods.Eduard-Mihai Burtescu-1/+1
2017-04-24support `default impl` for specializationGianni Ciccarelli-0/+4
this commit implements the first step of the `default impl` feature: all items in a `default impl` are (implicitly) `default` and hence specializable. In order to test this feature I've copied all the tests provided for the `default` method implementation (in run-pass/specialization and compile-fail/specialization directories) and moved the `default` keyword from the item to the impl. See referenced issue for further info
2017-04-23rustc: make the const-eval cache polymorphic.Eduard-Mihai Burtescu-10/+9
2017-04-22cache attributes of items from foreign cratesAriel Ben-Yehuda-3/+18
this avoids parsing item attributes on each call to `item_attrs`, which takes off 33% (!) of translation time and 50% (!) of trans-item collection time.
2017-04-16rustc: use monomorphic const_eval for cross-crate enum discriminants.Eduard-Mihai Burtescu-19/+5
2017-04-16rustc_const_eval: move ConstEvalErr to the rustc crate.Eduard-Mihai Burtescu-1/+2
2017-04-12First attempt at global_asm! macroA.J. Gardner-0/+1
2017-04-07ICH: Centrally compute and cache DefPath hashes as part of DefPathTable.Michael Woerister-5/+8
2017-03-29Refactor how spans are combined in the parser.Jeffrey Seyfried-3/+3
2017-03-23convert `custom_coerce_unsized_kind` into a `coerce_unsized_info`Niko Matsakis-4/+4
This "on-demand" task both checks for errors and computes the custom unsized kind, if any. This task is only defined on impls of `CoerceUnsized`; invoking it on any other kind of impl results in a bug. This is just to avoid having an `Option`, could easily be changed.
2017-03-22Rollup merge of #40696 - cramertj:remove-unused-adt-def-code, r=petrochenkovCorey Farwell-10/+2
Remove unused adt-def insertion by constructor DefIndex It looks to me like ADT definitions weren't being looked up by constructor id, and a test run supports my theory. In any case, I'm not sure it would have worked in its current configuration. If I understand correctly, the `adt_def` map entry from constructor id -> adt def would only be present after a successful call to `queries::adt_def::get` with the proper ADT `DefIndex`. Trying to look up an adt_def by the constructor index prior to a successful lookup by ADT index would fail since `item.kind` would be `EntryKind::Fn` (for the constructor function) and so would trigger the `bug!`. r? @nikomatsakis
2017-03-21Remove unused adt-def insertion by constructor DefIndexTaylor Cramer-10/+2
2017-03-21Check for conflicts between macros 1.0 exports (`#[macro_export]`, ↵Jeffrey Seyfried-13/+6
`#[macro_reexport]`) and macros 2.0 exports (`pub use` macro re-exports and `pub macro` (once implemented) at the crate root.
2017-02-25rustc_const_eval: demand that the MIR qualify_consts ran on each evaluated body.Eduard-Mihai Burtescu-3/+14
2017-02-25rustc_typeck: rework coherence to be almost completely on-demand.Eduard-Mihai Burtescu-11/+10
2017-02-25rustc_typeck: hook up collect and item/body check to on-demand.Eduard-Mihai Burtescu-6/+9
2017-02-25rustc: combine BareFnTy and ClosureTy into FnSig.Eduard-Mihai Burtescu-7/+1
2017-02-25rustc: introduce a query system for type information in ty::maps.Eduard Burtescu-40/+21
2017-02-25rustc: consolidate dep-tracked hashmaps in tcx.maps.Eduard-Mihai Burtescu-3/+3
2017-02-25rustc: move the actual values of enum discriminants into a map.Eduard-Mihai Burtescu-10/+17
2017-02-25rustc: store type parameter defaults outside of ty::Generics.Eduard-Mihai Burtescu-24/+1
2017-02-23Move MacroKind into Def::MacroJosh Driver-6/+15
2017-02-11Rebase falloutSimonas Kazlauskas-3/+3
Because certain somebody sucks at resolving big conflicts
2017-02-10Move type of discriminant to AdtDefSimonas Kazlauskas-6/+10
Previously AdtDef variants contained ConstInt for each discriminant, which did not really reflect the actual type of the discriminants. Moving the type into AdtDef allows to easily put the type into metadata and also saves bytes from ConstVal overhead for each discriminant. Also arguably the code is cleaner now :)
2017-02-06Introduce ReprOptions, a struct for holding info from the repr attributes. ↵Austin Hicks-14/+14
This effectively deprecates lookup_repr_hints.
2017-02-03Bump version, upgrade bootstrapAlex Crichton-1/+0
This commit updates the version number to 1.17.0 as we're not on that version of the nightly compiler, and at the same time this updates src/stage0.txt to bootstrap from freshly minted beta compiler and beta Cargo.
2017-01-28rustc: move object default lifetimes to resolve_lifetimes.Eduard-Mihai Burtescu-0/+7
2017-01-28rustc: always include elidable lifetimes in HIR types.Eduard-Mihai Burtescu-1/+14
2017-01-26rustc: rename TyCtxt's `map` field to `hir`.Eduard-Mihai Burtescu-1/+1
2017-01-09trans/metadata: Remove obsolete CrateStore::can_have_local_instance()Michael Woerister-32/+6
2017-01-09metadata: Add is_exported_symbol() method to CrateStore.Michael Woerister-1/+1
2017-01-06rustc: store ty::Tables separately for each body (except closures').Eduard-Mihai Burtescu-54/+9
2016-12-30Fix rebase falloutest31-1/+0
2016-12-30Fix rebase falloutSimonas Kazlauskas-1/+1
This commit includes manual merge conflict resolution changes from a rebase by @est31.