| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2020-02-29 | Move directory `libsyntax` -> `librustc_ast` | Vadim Petrochenkov | -486/+0 | |
| 2020-01-01 | Rename `syntax_pos` to `rustc_span` in source code | Vadim Petrochenkov | -1/+1 | |
| 2019-12-22 | Format the world | Mark Rousskov | -29/+23 | |
| 2019-12-02 | syntax: Remove redundant span from `ast::Mac` | Vadim Petrochenkov | -0/+8 | |
| Also remove a couple of redundant `visit_mac` asserts | ||||
| 2019-11-23 | Use proc-macro for TokenTree. | Camille GILLOT | -21/+1 | |
| 2019-11-23 | Rename StableHashingContextLike to HashStableContext. | Camille GILLOT | -2/+2 | |
| 2019-11-22 | Fix rebase fallout. | Camille GILLOT | -0/+1 | |
| 2019-11-22 | Invert implementations for TokenKind. | Camille GILLOT | -0/+31 | |
| Also export a bunch of Token-related impls. | ||||
| 2019-11-22 | Export HashStable for DelimSpan, Lit and Path. | Camille GILLOT | -1/+1 | |
| 2019-11-11 | Tiny cleanup to size assertions | Vadim Petrochenkov | -3/+1 | |
| 2019-11-10 | move config.rs to libsyntax_expand | Mazdak Farrokhzad | -4/+1 | |
| 2019-11-07 | syntax::parser::token -> syntax::token | Mazdak Farrokhzad | -1/+1 | |
| 2019-11-06 | Rollup merge of #66086 - RalfJung:smallvec, r=nagisa | Mazdak Farrokhzad | -1/+1 | |
| bump smallvec to 1.0 This includes https://github.com/servo/rust-smallvec/pull/162, fixing an unsoundness in smallvec. See https://github.com/servo/rust-smallvec/pull/175 for the 1.0 release announcement. Cc @mbrubeck @emilio | ||||
| 2019-11-04 | bump smallvec to 1.0 | Ralf Jung | -1/+1 | |
| 2019-11-03 | syntax: Avoid span arithmetics for delimiter tokens | Vadim Petrochenkov | -15/+5 | |
| 2019-10-21 | Derive `Rustc{En,De}codable` for `TokenStream`. | Nicholas Nethercote | -15/+2 | |
| `TokenStream` used to be a complex type, but it is now just a newtype around a `Lrc<Vec<TreeAndJoint>>`. Currently it uses custom encoding that discards the `IsJoint` and custom decoding that adds `NonJoint` back in for every token tree. This requires building intermediate `Vec<TokenTree>`s. This commit makes `TokenStream` derive `Rustc{En,De}codable`. This simplifies the code, and avoids the creation of the intermediate vectors, saving up to 3% on various benchmarks. It also changes the AST JSON output in one test. | ||||
| 2019-10-18 | Change `MetaItem::tokens()` to `MetaItem::token_trees_and_joints()`. | Nicholas Nethercote | -4/+0 | |
| Likewise for `NestedMetaItem::tokens()`. Also, add `MetaItemKind::token_trees_and_joints()`, which `MetaItemKind::tokens()` now calls. This avoids some unnecessary `TokenTree` to `TokenStream` conversions, and removes the need for the clumsy `TokenStream::append_to_tree_and_joint_vec()`. | ||||
| 2019-10-18 | Make `TokenStream::from_iter` less general and more efficient. | Nicholas Nethercote | -3/+3 | |
| The current code has this impl: ``` impl<T: Into<TokenStream>> iter::FromIterator<T> for TokenStream ``` If given an `IntoIterator<Item = TokenTree>`, it will convert each individual `TokenTree` to a `TokenStream` (at the cost of two allocations: a `Vec` and an `Lrc`). It will then merge those `TokenStream`s into a single `TokenStream`. This is inefficient. This commit changes the impl to this less general one: ``` impl iter::FromIterator<TokenTree> for TokenStream ``` It collects the `TokenTree`s into a single `Vec` first and then converts that to a `TokenStream` by wrapping it in a single `Lrc`. The previous generality was unnecessary; no other code needs changing. This change speeds up several benchmarks by up to 4%. | ||||
| 2019-10-16 | move syntax::ext to new crate syntax_expand | Mazdak Farrokhzad | -1/+1 | |
| 2019-10-14 | Rollup merge of #65261 - nnethercote:rm-Option-from-TokenStream, r=petrochenkov | Tyler Mandry | -133/+91 | |
| Remove `Option` from `TokenStream` A code simplification. r? @petrochenkov | ||||
| 2019-10-14 | Remove the `Option` in `TokenStream`. | Nicholas Nethercote | -133/+91 | |
| It means an allocation is required to create an empty `TokenStream`, but all other operations are simpler and marginally faster due to not having to check for `None`. Overall it simplifies the code for a negligible performance effect. The commit also removes `TokenStream::empty` by implementing `Default`, which is now possible. | ||||
| 2019-10-13 | tokenstream: don't depend on pprust | Mazdak Farrokhzad | -8/+1 | |
| 2019-10-08 | Optimize `TokenStreamBuilder::push`. | Nicholas Nethercote | -51/+43 | |
| Currently, when two tokens must be glued together, this function duplicates large chunks of the existing streams. This can cause quadratic behaviour. This commit changes the function so that it overwrites the last token with a glued token, which avoids the quadratic behaviour. This removes the need for `TokenStreamBuilder::push_all_but_{first,last}_tree`. The commit also restructures `push` somewhat, by removing `TokenStream::{first_tree_and_joint,last_tree_if_joint}` in favour of more pattern matching and some comments. This makes the code shorter, and in my opinion, more readable. | ||||
| 2019-10-08 | Optimize `TokenStream::from_streams`. | Nicholas Nethercote | -10/+37 | |
| Currently, this function creates a new empty stream, and then appends the elements from each given stream onto that stream. This can cause quadratic behaviour. This commit changes the function so that it modifies the first stream (which can be long) by extending it with the elements from the subsequent streams (which are almost always short), which avoids the quadratic behaviour. | ||||
| 2019-09-22 | push TokenTree::parse down | Aleksey Kladov | -15/+0 | |
| 2019-09-22 | pull mbe token tree definition up | Aleksey Kladov | -2/+2 | |
| 2019-09-22 | rename tt -> mbe, part 2 | Aleksey Kladov | -1/+1 | |
| 2019-09-22 | reduce visibility of a bunch of stuff in ext::tt | Aleksey Kladov | -1/+1 | |
| 2019-09-07 | Aggregation of cosmetic changes made during work on REPL PRs: libsyntax | Alexander Regueiro | -4/+3 | |
| 2019-09-03 | use TokenStream rather than &[TokenTree] for built-in macros | Aleksey Kladov | -1/+1 | |
| That way, we don't loose the jointness info | ||||
| 2019-08-23 | hygiene: Require passing transparency explicitly to `apply_mark` | Vadim Petrochenkov | -8/+1 | |
| 2019-08-19 | glue tokens when building token stream | Aleksey Kladov | -1/+1 | |
| 2019-08-02 | libsyntax: Unconfigure tests during normal build | Vadim Petrochenkov | -111/+3 | |
| 2019-07-23 | cleanup: Remove `extern crate serialize as rustc_serialize`s | Vadim Petrochenkov | -1/+1 | |
| 2019-07-19 | Adjust other names after the `Mark` renaming | Vadim Petrochenkov | -3/+3 | |
| 2019-07-19 | libsyntax: Remove `Mark` into `ExpnId` | Vadim Petrochenkov | -2/+2 | |
| 2019-07-04 | Switch master to 1.38 | Mark Rousskov | -11/+0 | |
| 2019-06-14 | put back the workarounds for #60846 | Felix S Klock II | -0/+11 | |
| based on https://github.com/rust-lang/rust/pull/61754#issuecomment-501743750 I am adding `bootstrap` to the cfg-preconditions for the two manual `unsafe impls`'s of `Send` and `Sync` for `TokenTree`. | ||||
| 2019-06-12 | remove hacks that are no longer needed | Niko Matsakis | -11/+0 | |
| 2019-06-08 | syntax: Remove `Deref` impl from `Token` | Vadim Petrochenkov | -8/+0 | |
| 2019-06-08 | syntax: Move most of the `TokenKind` methods to `Token` | Vadim Petrochenkov | -3/+2 | |
| 2019-06-06 | Some code cleanup and tidy/test fixes | Vadim Petrochenkov | -2/+3 | |
| 2019-06-06 | syntax: Switch function parameter order in `TokenTree::token` | Vadim Petrochenkov | -9/+9 | |
| 2019-06-06 | syntax: Remove duplicate span from `token::Ident` | Vadim Petrochenkov | -2/+2 | |
| 2019-06-06 | syntax: Add some helper methods to `Token` | Vadim Petrochenkov | -1/+1 | |
| 2019-06-06 | syntax: Use `Token` in `TokenTree::Token` | Vadim Petrochenkov | -57/+54 | |
| 2019-06-06 | syntax: Rename `TokenAndSpan` into `Token` | Vadim Petrochenkov | -1/+0 | |
| 2019-06-06 | syntax: Rename `Token` into `TokenKind` | Vadim Petrochenkov | -7/+7 | |
| 2019-06-06 | Always use token kinds through `token` module rather than `Token` type | Vadim Petrochenkov | -12/+12 | |
| 2019-05-27 | Short circuit Send and Sync impls for TokenTree | John Kåre Alsaker | -0/+22 | |
