about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2016-08-14 20:29:49 +0300
committerGitHub <noreply@github.com>2016-08-14 20:29:49 +0300
commit9fb4fa8e990c2c5010ee9acc91880df8a9127f21 (patch)
tree248bf0f9f0576cbbfe0621c55888510a4ffa836c /src/rustllvm/RustWrapper.cpp
parentb1ec5b2ad23aa4e2e6670f47e270e30945444924 (diff)
parent16cc8a767a70b15927933507321a5ce6cb00372d (diff)
downloadrust-9fb4fa8e990c2c5010ee9acc91880df8a9127f21.tar.gz
rust-9fb4fa8e990c2c5010ee9acc91880df8a9127f21.zip
Rollup merge of #35539 - cgswords:ts_concat, r=nrc
Implemented a smarter TokenStream concatenation system

The new algorithm performs 'aggressive compacting' during concatenation as follows:

- If the nodes' combined total total length is less than 32, we copy both of
   them into a new vector and build a new leaf node.
- If one node is an internal node and the other is a 'small' leaf (length<32),
   we recur down the internal node on the appropriate side.
 - Otherwise, we construct a new internal node that points to them as left and
 right.

This should produce notably better behavior than the current concatenation implementation.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions