forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#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.
- Loading branch information
Showing
1 changed file
with
92 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters