summary refs log tree commit diff
path: root/src/librustc_metadata/decoder.rs
AgeCommit message (Collapse)AuthorLines
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.
2016-12-30Such large. Very 128. Much bits.Simonas Kazlauskas-0/+4
This commit introduces 128-bit integers. Stage 2 builds and produces a working compiler which understands and supports 128-bit integers throughout. The general strategy used is to have rustc_i128 module which provides aliases for iu128, equal to iu64 in stage9 and iu128 later. Since nowhere in rustc we rely on large numbers being supported, this strategy is good enough to get past the first bootstrap stages to end up with a fully working 128-bit capable compiler. In order for this strategy to work, number of locations had to be changed to use associated max_value/min_value instead of MAX/MIN constants as well as the min_value (or was it max_value?) had to be changed to use xor instead of shift so both 64-bit and 128-bit based consteval works (former not necessarily producing the right results in stage1). This commit includes manual merge conflict resolution changes from a rebase by @est31.
2016-12-28rustdoc: pretty-print nested bodies in inlined constants.Eduard-Mihai Burtescu-0/+7
2016-12-28rustc: simplify constant cross-crate loading and rustc_passes::consts.Eduard-Mihai Burtescu-12/+13
2016-12-27Auto merge of #38537 - jseyfried:fix_rustdoc_ice, r=nrcbors-0/+1
Fix ICE in rustdoc Fixes #38237. r? @nrc
2016-12-24Use `DefId`s instead of `NodeId`s for `pub(restricted)` visibilities.Jeffrey Seyfried-5/+5
2016-12-23Fix rustdoc ICE.Jeffrey Seyfried-0/+1
2016-12-16No need to have tcx::opt_def_path() now that we store all DefPathsMichael Woerister-12/+5
2016-12-16definitions: Store DefPath data in separate table in metadataMichael Woerister-36/+13
2016-12-16definitions: Don't allocate DefIds for inlined HIRMichael Woerister-4/+1
2016-12-13Auto merge of #38278 - jseyfried:improve_proc_macro_def_ids, r=michaelwoeristerbors-22/+42
Improve proc-macro def ids Support `cstore.relative_def_path(id)` and `cstore.def_key(id)` with proc-macro def ids. Fixes #38207. r? @nikomatsakis
2016-12-10Improve proc-macro def ids.Jeffrey Seyfried-22/+42
2016-12-09move the check for instantiation from metadata encoding to the actual ↵Oliver Schneider-0/+23
decision site before it was assumed that anything that had a MIR was fair game for local instatiation
2016-12-09enable checking for const fn without needing to go through `entry`Oliver Schneider-6/+9
2016-12-06Auto merge of #37973 - vadimcn:dllimport, r=alexcrichtonbors-0/+4
Implement RFC 1717 Implement the first two points from #37403. r? @alexcrichton
2016-12-05Consider only libs that aren't excluded by #[link(cfg=...)]Vadim Chugunov-12/+3
2016-12-05trans: Rename `reachable` to `exported_symbols` where appropriate.Michael Woerister-2/+2
2016-12-02Auto merge of #38053 - eddyb:lazy-9, r=nikomatsakisbors-41/+22
[9/n] rustc: move type information out of AdtDef and TraitDef. _This is part of a series ([prev](https://github.com/rust-lang/rust/pull/37688) | [next]()) of patches designed to rework rustc into an out-of-order on-demand pipeline model for both better feature support (e.g. [MIR-based](https://github.com/solson/miri) early constant evaluation) and incremental execution of compiler passes (e.g. type-checking), with beneficial consequences to IDE support as well. If any motivation is unclear, please ask for additional PR description clarifications or code comments._ <hr> Both `AdtDef` and `TraitDef` contained type information (field types, generics and predicates) which was required to create them, preventing their use before that type information exists, or in the case of field types, *mutation* was required, leading to a variance-magicking implementation of `ivar`s. This PR takes that information out and the resulting cleaner setup could even eventually end up merged with HIR, because, just like `AssociatedItem` before it, there's no dependency on types anymore. (With one exception, variant discriminants should probably be moved into their own map later.)
2016-12-01Emit 'dllimport' attribute for dylib foreign items on Windows.Vadim Chugunov-2/+15
2016-11-30Auto merge of #37954 - eddyb:rustdoc-2, r=alexcrichtonbors-11/+28
rustdoc: link to cross-crate sources directly. Fixes #37684 by implementing proper support for getting the `Span` of definitions across crates. In rustdoc this is used to generate direct links to the original source instead of fragile redirects. This functionality could be expanded further for making error reporting code more uniform and seamless across crates, although at the moment there is no actual source to print, only file/line/column information. Closes #37870 which is also "fixes" #37684 by throwing away the builtin macro docs from libcore. After this lands, #37727 could be reverted, although it doesn't matter much either way.
2016-11-30rustc: track the Span's of definitions across crates.Eduard-Mihai Burtescu-11/+28
2016-11-29Auto merge of #37965 - Mark-Simulacrum:trait-obj-to-exis-predicate, r=eddybbors-0/+9
Refactor TraitObject to Slice<ExistentialPredicate> For reference, the primary types changes in this PR are shown below. They may add in the understanding of what is discussed below, though they should not be required. We change `TraitObject` into a list of `ExistentialPredicate`s to allow for a couple of things: - Principal (ExistentialPredicate::Trait) is now optional. - Region bounds are moved out of `TraitObject` into `TyDynamic`. This permits wrapping only the `ExistentialPredicate` list in `Binder`. - `BuiltinBounds` and `BuiltinBound` are removed entirely from the codebase, to permit future non-constrained auto traits. These are replaced with `ExistentialPredicate::AutoTrait`, which only requires a `DefId`. For the time being, only `Send` and `Sync` are supported; this constraint can be lifted in a future pull request. - Binder-related logic is extracted from `ExistentialPredicate` into the parent (`Binder<Slice<EP>>`), so `PolyX`s are inside `TraitObject` are replaced with `X`. The code requires a sorting order for `ExistentialPredicate`s in the interned `Slice`. The sort order is asserted to be correct during interning, but the slices are not sorted at that point. 1. `ExistentialPredicate::Trait` are defined as always equal; **This may be wrong; should we be comparing them and sorting them in some way?** 1. `ExistentialPredicate::Projection`: Compared by `ExistentialProjection::sort_key`. 1. `ExistentialPredicate::AutoTrait`: Compared by `TraitDef.def_path_hash`. Construction of `ExistentialPredicate`s is conducted through `TyCtxt::mk_existential_predicates`, which interns a passed iterator as a `Slice`. There are no convenience functions to construct from a set of separate iterators; callers must pass an iterator chain. The lack of convenience functions is primarily due to few uses and the relative difficulty in defining a nice API due to optional parts and difficulty in recognizing which argument goes where. It is also true that the current situation isn't significantly better than 4 arguments to a constructor function; but the extra work is deemed unnecessary as of this time. ```rust // before this PR struct TraitObject<'tcx> { pub principal: PolyExistentialTraitRef<'tcx>, pub region_bound: &'tcx ty::Region, pub builtin_bounds: BuiltinBounds, pub projection_bounds: Vec<PolyExistentialProjection<'tcx>>, } // after pub enum ExistentialPredicate<'tcx> { // e.g. Iterator Trait(ExistentialTraitRef<'tcx>), // e.g. Iterator::Item = T Projection(ExistentialProjection<'tcx>), // e.g. Send AutoTrait(DefId), } ```
2016-11-29rustc: simplify AdtDef by removing the field types and ty::ivar.Eduard-Mihai Burtescu-37/+19
2016-11-29rustc: remove type information from TraitDef.Eduard-Mihai Burtescu-4/+3
2016-11-28Refactor TyTrait to contain a interned ExistentialPredicate slice.Mark-Simulacrum-0/+9
Renames TyTrait to TyDynamic.
2016-11-28Avoid loading needless proc-macro dependencies.Jeffrey Seyfried-2/+2
2016-11-23Auto merge of #37931 - eddyb:meta-version, r=jseyfriedbors-0/+4
rustc_metadata: don't break the version check when CrateRoot changes. In #36551 I made `rustc_version` a field of `CrateRoot`, but despite it being the first field, one could still break the version check by changing `CrateRoot` so older compilers couldn't fully decode it (e.g. #37463). This PR fixes #37803 by moving the version string back at the beginning of metadata, right after the 32-bit big-endian absolute position of `CrateRoot`, and by incrementing `METADATA_VERSION`.
2016-11-22Auto merge of #37681 - nrc:crate-metadata, r=@alexcrichtonbors-1/+2
add --crate-type metadata r? @alexcrichton
2016-11-23Rebasing and review changesNick Cameron-1/+2
2016-11-22rustc_metadata: don't break the version check when CrateRoot changes.Eduard-Mihai Burtescu-0/+4