rust/src/libsyntax_ext/deriving
Nicholas Nethercote f8801f3bf6 Remove LazyTokenStream.
It's present within `Token::Interpolated` as an optimization, so that if
a nonterminal is converted to a `TokenStream` multiple times, the
first-computed value is saved and reused.

But in practice it's not needed. `interpolated_to_tokenstream()` is a
cold function: it's only called a few dozen times while compiling rustc
itself, and a few hundred times across the entire `rustc-perf` suite.
Furthermore, when it is called, it is almost always the first
conversion, so no benefit is gained from it.

So this commit removes `LazyTokenStream`, along with the now-unnecessary
`Token::interpolated()`.

As well as a significant simplification, the removal speeds things up
slightly, mostly due to not having to `drop` the `LazyTokenStream`
instances.
2019-02-18 09:46:33 +11:00
..
cmp libsyntax_ext => 2018 2019-02-04 21:49:54 +09:00
generic rustc: doc comments 2019-02-10 23:42:32 +00:00
bounds.rs libsyntax_ext => 2018 2019-02-04 21:49:54 +09:00
clone.rs libsyntax_ext => 2018 2019-02-04 21:49:54 +09:00
custom.rs Remove LazyTokenStream. 2019-02-18 09:46:33 +11:00
debug.rs libsyntax_ext => 2018 2019-02-04 21:49:54 +09:00
decodable.rs rustc: doc comments 2019-02-10 23:42:32 +00:00
default.rs libsyntax_ext => 2018 2019-02-04 21:49:54 +09:00
encodable.rs rustc: doc comments 2019-02-10 23:42:32 +00:00
hash.rs libsyntax_ext => 2018 2019-02-04 21:49:54 +09:00
mod.rs Use Rc<[Symbol]> instead of Vec<Symbol> to reduce # of allocs 2019-02-11 15:08:17 +01:00