summary refs log tree commit diff
path: root/src/librustc_metadata
AgeCommit message (Collapse)AuthorLines
2017-01-28rustc: remove unused `bounds` field from `RegionParameterDef`.Eduard-Mihai Burtescu-1/+1
2017-01-28rustc: move object default lifetimes to resolve_lifetimes.Eduard-Mihai Burtescu-0/+23
2017-01-28rustc: always include elidable lifetimes in HIR types.Eduard-Mihai Burtescu-4/+45
2017-01-26rustc: rename TyCtxt's `map` field to `hir`.Eduard-Mihai Burtescu-37/+37
2017-01-25rename `Tables` to `TypeckTables`Niko Matsakis-1/+1
2017-01-20Rollup merge of #39118 - jseyfried:token_tree_based_parser, r=nrcAlex Crichton-14/+4
Refactor the parser to consume token trees This is groundwork for efficiently parsing attribute proc macro invocations, bang macro invocations, and `TokenStream`-based attributes and fragment matchers. This improves parsing performance by 8-15% and expansion performance by 0-5% on a sampling of the compiler's crates. r? @nrc
2017-01-17Refactor the parser to consume token trees.Jeffrey Seyfried-14/+4
2017-01-16Implement `#[proc_macro_attribute]`Austin Bonander-0/+10
* Add support for `#[proc_macro]` * Reactivate `proc_macro` feature and gate `#[proc_macro_attribute]` under it * Have `#![feature(proc_macro)]` imply `#![feature(use_extern_macros)]`, error on legacy import of proc macros via `#[macro_use]`
2017-01-09trans/metadata: Remove obsolete CrateStore::can_have_local_instance()Michael Woerister-41/+6
2017-01-09metadata: Add is_exported_symbol() method to CrateStore.Michael Woerister-3/+16
2017-01-08Auto merge of #38813 - eddyb:lazy-11, r=nikomatsakisbors-181/+25
[11/n] Separate ty::Tables into one per each body. _This is part of a series ([prev](https://github.com/rust-lang/rust/pull/38449) | [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> In order to track the results of type-checking and inference for incremental recompilation, they must be stored separately for each function or constant value, instead of lumped together. These side-`Tables` also have to be tracked by various passes, as they visit through bodies (all of which have `Tables`, even if closures share the ones from their parent functions). This is usually done by switching a `tables` field in an override of `visit_nested_body` before recursing through `visit_body`, to the relevant one and then restoring it - however, in many cases the nesting is unnecessary and creating the visitor for each body in the crate and then visiting that body, would be a much cleaner solution. To simplify handling of inlined HIR & its side-tables, their `NodeId` remapping and entries HIR map were fully stripped out, which means that `NodeId`s from inlined HIR must not be used where a local `NodeId` is expected. It might be possible to make the nodes (`Expr`, `Block`, `Pat`, etc.) that only show up within a `Body` have IDs that are scoped to that `Body`, which would also allow `Tables` to use `Vec`s. That last part also fixes #38790 which was accidentally introduced in a previous refactor.
2017-01-08Auto merge of #38679 - alexcrichton:always-deny-warnings, r=nrcbors-1/+1
Remove not(stage0) from deny(warnings) Historically this was done to accommodate bugs in lints, but there hasn't been a bug in a lint since this feature was added which the warnings affected. Let's completely purge warnings from all our stages by denying warnings in all stages. This will also assist in tracking down `stage0` code to be removed whenever we're updating the bootstrap compiler.
2017-01-06rustc: store ty::Tables separately for each body (except closures').Eduard-Mihai Burtescu-182/+24
2017-01-06rustc: keep track of tables everywhere as if they were per-body.Eduard-Mihai Burtescu-7/+9
2017-01-02rustc: Stabilize the `proc_macro` featureAlex Crichton-1/+0
This commit stabilizes the `proc_macro` and `proc_macro_lib` features in the compiler to stabilize the "Macros 1.1" feature of the language. Many more details can be found on the tracking issue, #35900. Closes #35900
2016-12-30Fix rebase falloutest31-1/+0
2016-12-30Fix rebase falloutSimonas Kazlauskas-9/+12
This commit includes manual merge conflict resolution changes from a rebase by @est31.
2016-12-30Such large. Very 128. Much bits.Simonas Kazlauskas-0/+11
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-29Remove not(stage0) from deny(warnings)Alex Crichton-1/+1
Historically this was done to accommodate bugs in lints, but there hasn't been a bug in a lint since this feature was added which the warnings affected. Let's completely purge warnings from all our stages by denying warnings in all stages. This will also assist in tracking down `stage0` code to be removed whenever we're updating the bootstrap compiler.
2016-12-29Change --crate-type metadata to --emit=metadataNick Cameron-2/+1
2016-12-28rustdoc: pretty-print nested bodies in inlined constants.Eduard-Mihai Burtescu-0/+45
2016-12-28rustc: simplify constant cross-crate loading and rustc_passes::consts.Eduard-Mihai Burtescu-157/+72
2016-12-28rustc: move function arguments into hir::Body.Eduard-Mihai Burtescu-15/+35
2016-12-28rustc: separate bodies for static/(associated)const and embedded constants.Eduard-Mihai Burtescu-2/+4
2016-12-28rustc: separate TraitItem from their parent Item, just like ImplItem.Eduard-Mihai Burtescu-2/+4
2016-12-27Auto merge of #38537 - jseyfried:fix_rustdoc_ice, r=nrcbors-0/+1
Fix ICE in rustdoc Fixes #38237. r? @nrc
2016-12-26More systematic error reporting in path resolutionVadim Petrochenkov-2/+1
2016-12-25Auto merge of #38490 - jseyfried:def_id_vis, r=nrcbors-41/+17
Use `DefId`s instead of `NodeId`s for `pub(restricted)` visibilities This is groundwork for hygiene 2.0, specifically privacy checking hygienic intercrate name resolutions. r? @nrc
2016-12-24Use `DefId`s instead of `NodeId`s for `pub(restricted)` visibilities.Jeffrey Seyfried-41/+17
2016-12-23Fix rustdoc ICE.Jeffrey Seyfried-0/+1
2016-12-22Fix Markdown list formatting.Chris Morgan-3/+3
The Markdown engine used by the book can cope with a single leading space on the list marker: Like this: * List item Rather than like this: * List item … but it’s not the typical convention employed in the book, and moreover the Markdown engine used for producing the error index *can’t* cope with it (its behaviour looks like a bug, as it appears to lose one of the two line breaks as well, but that’s immaterial here). So, we shift to a single convention which doesn’t trigger bugs in the Markdown renderer.
2016-12-20Rollup merge of #38418 - michaelwoerister:def_path_cleanup, r=eddybAlex Crichton-94/+51
Cleanup refactoring around DefPath handling This PR makes two big changes: * All DefPaths of a crate are now stored in metadata in their own table (as opposed to `DefKey`s as part of metadata `Entry`s. * The compiler will no longer allocate a pseudo-local DefId for inlined HIR nodes (because those are gross). Inlined HIR nodes will have a NodeId but they don't have there own DefId anymore. Turns out they were not needed anymore either. Hopefully HIR inlining will be gone completely one day but if until then we start needing to be able to map inlined NodeIds to original DefIds, we can add an additional table to metadata that allows for reconstructing this. Overall this makes for some nice simplifications and removal of special cases. r? @eddyb cc @rust-lang/compiler
2016-12-18Remove `MacroDef`'s fields `imported_from` and `allow_internal_unstable`,Jeffrey Seyfried-2/+0
remove `export` argument of `resolver.add_macro()`.
2016-12-16No need to have tcx::opt_def_path() now that we store all DefPathsMichael Woerister-13/+6
2016-12-16Move retrace_path() implementation to DefPathTableMichael Woerister-9/+10
2016-12-16definitions: Add some timing stats for DefPathTable decoding.Michael Woerister-1/+6
2016-12-16definitions: Store DefPath data in separate table in metadataMichael Woerister-60/+31
2016-12-16definitions: Don't allocate DefIds for inlined HIRMichael Woerister-14/+1
2016-12-16Auto merge of #38352 - bluss:unaligned-metadata, r=eddybbors-4/+12
Fix unaligned loads in librustc_metadata Creating a `&[u32]` from an `&[u8]` is not necessarily valid, and crashes on certain platforms if the data is not well aligned.
2016-12-14rustc_metadata: Fix unaligned loadsUlrik Sverdrup-4/+12
Creating a `&[u32]` from a `&[u8]` was not valid; the data is not necessarily well aligned.
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/+28
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-08also generate MIR for staticsOliver Schneider-0/+1
2016-12-07add a -Z flag to guarantee that MIR is generated for all functionsOliver Schneider-2/+4
2016-12-06Auto merge of #37973 - vadimcn:dllimport, r=alexcrichtonbors-59/+136
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-17/+24
2016-12-05Refactor symbol export list generation.Michael Woerister-0/+8
2016-12-05trans: Rename `reachable` to `exported_symbols` where appropriate.Michael Woerister-17/+17