summary refs log tree commit diff
path: root/src/librustc_save_analysis
AgeCommit message (Collapse)AuthorLines
2017-04-12First attempt at global_asm! macroA.J. Gardner-0/+2
2017-04-04rebasedNick Cameron-1/+5
2017-04-04save-analysis: index extern blocksNick Cameron-0/+90
2017-04-04save-analysis: only index path references onceNick Cameron-9/+2
2017-04-03Auto merge of #40915 - nrc:save-assoc, r=eddybbors-3/+27
save-analysis: track associated types r? @eddyb
2017-03-30save-analysis: track associated typesNick Cameron-3/+27
2017-03-29Refactor how spans are combined in the parser.Jeffrey Seyfried-3/+3
2017-03-29Merge `ExpnId` and `SyntaxContext`.Jeffrey Seyfried-6/+4
2017-03-27Rollup merge of #40751 - nrc:save-callback, r=eddybAlex Crichton-66/+159
save-analysis: allow clients to get data directly without writing to a file.
2017-03-27Fix various useless derefs and slicingsOliver Schneider-1/+1
2017-03-23Remove internal liblogAlex Crichton-1/+1
This commit deletes the internal liblog in favor of the implementation that lives on crates.io. Similarly it's also setting a convention for adding crates to the compiler. The main restriction right now is that we want compiler implementation details to be unreachable from normal Rust code (e.g. requires a feature), and by default everything in the sysroot is reachable via `extern crate`. The proposal here is to require that crates pulled in have these lines in their `src/lib.rs`: #![cfg_attr(rustbuild, feature(staged_api, rustc_private))] #![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))] This'll mean that by default they're not using these attributes but when compiled as part of the compiler they do a few things: * Mark themselves as entirely unstable via the `staged_api` feature and the `#![unstable]` attribute. * Allow usage of other unstable crates via `feature(rustc_private)` which is required if the crate relies on any other crates to compile (other than std).
2017-03-23save-analysis: allow clients to get data directly without writing to a fileNick Cameron-66/+159
2017-03-19Rollup merge of #40554 - nrc:rls-data, r=alexcrichtonCorey Farwell-782/+467
Use rls-data crate This basically pulls out a bunch of data structures used by save-analysis for serialization into an external crate, and pulls that crate in using Rustbuild. The RLS can then share these data structures with the compiler which in some cases will allow more efficient communication between the compiler and the RLS (i.e., without serialisation). Along the way, I have to pull in rls-span, which is the RLS's way of defining spans (more type-safe than the compiler's built-in way). This is basically just to convert from compiler spans to RLS spans. I also pull in the crates.io version of rustc-serialize, which is a bit annoying, but seems to be the only way to have serialisable data in an external crate. To make this work, all of the save-analysis crate has to use this version too (cc #40527). Finally I pull in a line from #40347 to make the unstable crate checking stuff working. There are a lot of changes to save-analysis but they are all mechanical and trivial - changing from using `From` to `Into` (because of orphan rules) being the main thing. r? @alexcrichton
2017-03-19Auto merge of #39799 - dpc:create_dir_all, r=alexcrichtonbors-1/+1
Fix race condition in fs::create_dir_all The code would crash if the directory was created after create_dir_all checked whether the directory already existed. This was contrary to the documentation which claimed to create the directory if it doesn't exist, implying (but not stating) that there would not be a failure due to the directory existing.
2017-03-17Fix race condition in fs::create_dir_allDavid Roundy-1/+1
It is more robust to not fail if any directory in a path was created concurrently. This change lifts rustc internal `create_dir_racy` that was created to handle such conditions to be new `create_dir_all` implementation.
2017-03-15Move to using 0.1 versions of crates, rather than GH linksNick Cameron-4/+4
Also adds a fixme and does cargo update
2017-03-15Move the API json dumper to use rls-data tooNick Cameron-314/+147
2017-03-15Add rls-span to do some conversions into rls-data.Nick Cameron-13/+14
And fix some warnings and borrow errors
2017-03-15Use out-of-tree rustc serializeNick Cameron-83/+68
And remove a few data structures in favour of rls-data ones
2017-03-15Change json dumper (and a few other bits and pieces) to use rls-data rather ↵Nick Cameron-398/+261
than its own data structures
2017-03-15save-analysis: depend on the rls-data crateNick Cameron-1/+4
2017-03-14Refactor `Attribute` to use `Path` and `TokenStream` instead of `MetaItem`.Jeffrey Seyfried-6/+3
2017-03-11Rollup merge of #40344 - nrc:save-container, r=eddybAriel Ben-Yehuda-1/+4
save-analysis: cope with lack of method data after a type error Fixes #39957 r? @eddyb
2017-03-10Rollup merge of #40311 - nrc:save-proc-macro-attr, r=jseyfriedAlex Crichton-1/+3
Expect macro defs in save-analysis and add expn info to spans for att… …r proc macros r? @jseyfried
2017-03-10save-analysis: cope with lack of method data after a type errorNick Cameron-1/+4
Fixes #39957
2017-03-10Expect macro defs in save-analysis and add expn info to spans for attr proc ↵Nick Cameron-1/+3
macros
2017-03-10Move remove_docs_from_attrs into lowering stepJonas Bushart-41/+36
2017-03-10Store attributes as stringsJonas Bushart-74/+11
Remove the AST structure
2017-03-10Export attributes in save-analysis dataJonas Bushart-6/+171
Some annotations like the "test" annotations might be of interest for other projects, especially rls. Export all attributes in a new attributes item.
2017-03-03Integrate `TokenStream`.Jeffrey Seyfried-1/+1
2017-02-28Add `syntax::ext::tt::quoted::{TokenTree, ..}` and remove ↵Jeffrey Seyfried-3/+3
`tokenstream::TokenTree::Sequence`.
2017-02-28rustc_save_analysis: don't pollute the codemap with fake files.Eduard Burtescu-51/+16
2017-02-25rustc_typeck: lift CrateCtxt to TyCtxt.Eduard Burtescu-3/+3
2017-02-25rustc: consolidate dep-tracked hashmaps in tcx.maps.Eduard-Mihai Burtescu-1/+1
2017-02-23Move MacroKind into Def::MacroJosh Driver-1/+1
2017-02-13save-analysis: emit info about impls and super-traits in JSONNick Cameron-20/+97
2017-02-05Rollup merge of #39453 - nrc:save-path, r=nikomatsakisCorey Farwell-0/+3
save-analysis: be more paranoid about generated paths fixes https://github.com/rust-lang-nursery/rls/issues/160
2017-02-03Add warning for () to ! switchAndrew Cann-1/+1
2017-02-02save-analysis: be more paranoid about generated pathsNick Cameron-0/+3
fixes https://github.com/rust-lang-nursery/rls/issues/160
2017-01-27save-analysis: get tables directly, accomodating them being missingNick Cameron-4/+9
Fixes an ICE when running with save-analsysis after an error
2017-01-26rustc: rename TyCtxt's `map` field to `hir`.Eduard-Mihai Burtescu-61/+61
2017-01-25rename `Tables` to `TypeckTables`Niko Matsakis-2/+2
2017-01-25save-analysis: walk pathsNick Cameron-0/+1
Catches generic types in paths
2017-01-25save-analysis: walk path expressionsNick Cameron-0/+6
This is actually kinda hard to hit, but it fixes missing the `foo` in `for _ in foo {}`.
2017-01-20Rollup merge of #39118 - jseyfried:token_tree_based_parser, r=nrcAlex Crichton-7/+6
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-17Introduce `string_reader.parse_all_token_trees()`.Jeffrey Seyfried-5/+5
2017-01-17Give the `StringReader` a `sess: &ParseSess`.Jeffrey Seyfried-2/+1
2017-01-10save-analysis: handle paths in type/trait context more correctlyNick Cameron-8/+6
TBH, this is still not perfect, witness the FIXME, but it is an improvement. In particular it means we get information about trait references in impls.
2017-01-09save-analysis: fix over-zealous filter on generated codeNick Cameron-8/+9
2017-01-08Auto merge of #38813 - eddyb:lazy-11, r=nikomatsakisbors-38/+48
[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.