| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 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 | |
| 2019-05-21 | Move `edition` outside the hygiene lock and avoid accessing it | John Kåre Alsaker | -16/+18 | |
| 2019-05-19 | Improve type size assertions | Vadim Petrochenkov | -2/+2 | |
| Now they - Tell what the new size is, when it changes - Do not require passing an identifier | ||||
| 2019-04-24 | Add guard for missing comma in macro call suggestion | Esteban Küber | -2/+4 | |
| 2019-03-29 | Use `SmallVec` in `TokenStreamBuilder`. | Nicholas Nethercote | -6/+8 | |
| This reduces by 12% the number of allocations done for a "clean incremental" of `webrender_api`, which reduces the instruction count by about 0.5%. It also reduces instruction counts by up to 1.4% across a range of rustc-perf benchmark runs. | ||||
| 2019-03-13 | Fix operator precedence | Esteban Küber | -2/+2 | |
| 2019-03-11 | Be more discerning on when to attempt suggesting a comma in a macro invocation | Esteban Küber | -3/+5 | |
| 2019-02-25 | Restrict value in key-value attributes to literals | Vadim Petrochenkov | -1/+1 | |
| 2019-02-18 | Make `interpolated_to_tokenstream` a method on `Nonterminal`. | Nicholas Nethercote | -2/+2 | |
| 2019-02-10 | rustc: doc comments | Alexander Regueiro | -2/+3 | |
