about summary refs log tree commit diff
path: root/src/libserialize
AgeCommit message (Collapse)AuthorLines
2018-08-24check that adding infer-outlives requirement to all crates worksNiko Matsakis-0/+1
2018-08-23Use optimized SmallVec implementationIgor Gutorov-0/+37
2018-08-21Rollup merge of #53393 - BurntPizza:serialize-inlines, r=alexcrichtonkennytm-20/+23
Mark libserialize functions as inline Got to thinking: "what if that big pile of tiny functions isn't inlining as it should?" So a few `replace-regex` later the local perf run says this: <details> ![](https://i.imgur.com/gvdJEgG.png) </details> Not huge, but still a win, which is interesting. Want to verify with the real perf run, but I understand there's a backlog. I didn't notice any increase in compile time or binary sizes for rustc/libs.
2018-08-17Remove inline attribute on generic functionsBurntPizza-138/+18
2018-08-17Rollup merge of #53313 - llogiq:two-small-improvements, r=estebankkennytm-4/+3
Two small improvements In `librustc_apfloat/ieee.rs`, use the iterator.[r]find methods to simplify the code. In `libserialize/json.rs`, make use of the fact that `Vec.last` on an empty `Vec` returns `None` to simplify the code to a single match.
2018-08-17Rollup merge of #52946 - Ajacmac:doc-impl-from, r=GuillaumeGomezkennytm-0/+3
Documented impl From on line 367 of libserialize/json.rs This is for the impl From mentioned in #51430 assigned to @skade . Hopefully I didn't miss anything/get anything wrong. I looked over another PR for another part of this same issue to see what the proper formatting was, etc. Thanks!
2018-08-15Mark libserialize functions as inlineBurntPizza-0/+123
2018-08-15Two small improvementsAndre Bogus-4/+3
In `librustc_apfloat/ieee.rs`, use the iterator.[r]find methods to simplify the code. In `libserialize/json.rs`, make use of the fact that `Vec.last` on an empty `Vec` returns `None` to simplify the code to a single match.
2018-08-14Corrected typing description in docJacob-1/+1
2018-08-14Rollup merge of #53246 - ljedrz:cleanup_various, r=kennytmkennytm-33/+31
A few cleanups - change `skip(1).next()` to `nth(1)` - collapse some `if-else` expressions - remove a few explicit `return`s - remove an unnecessary field name - dereference once instead of matching on multiple references - prefer `iter().enumerate()` to indexing with `for` - remove some unnecessary lifetime annotations - use `writeln!()` instead of `write!()`+`\n` - remove redundant parentheses - shorten some enum variant names - a few other cleanups suggested by `clippy`
2018-08-11A few cleanups for fmt_macros, graphviz, apfloat, target, serialize and termljedrz-33/+31
2018-08-09[nll] libserialize: enable feature(nll) for bootstrapmemoryruins-0/+1
2018-08-01Documented impl From on line 367 of libserialize/json.rsStrategic Technologies-0/+3
2018-08-01Rollup merge of #52778 - ljedrz:readable_serialize, r=kennytmPietro Albini-83/+116
Improve readability of serialize.rs
2018-07-29Auto merge of #52738 - ljedrz:push_to_extend, r=eddybbors-9/+3
Replace push loops with extend() where possible Or set the vector capacity where I couldn't do it. According to my [simple benchmark](https://gist.github.com/ljedrz/568e97621b749849684c1da71c27dceb) `extend`ing a vector can be over **10 times** faster than `push`ing to it in a loop: 10 elements (6.1 times faster): ``` test bench_extension ... bench: 75 ns/iter (+/- 23) test bench_push_loop ... bench: 458 ns/iter (+/- 142) ``` 100 elements (11.12 times faster): ``` test bench_extension ... bench: 87 ns/iter (+/- 26) test bench_push_loop ... bench: 968 ns/iter (+/- 3,528) ``` 1000 elements (11.04 times faster): ``` test bench_extension ... bench: 311 ns/iter (+/- 9) test bench_push_loop ... bench: 3,436 ns/iter (+/- 233) ``` Seems like a good idea to use `extend` as much as possible.
2018-07-29Replace push loops with collect() and extend() where possibleljedrz-9/+3
2018-07-29Auto merge of #52767 - ljedrz:avoid_format, r=petrochenkovbors-15/+15
Prefer to_string() to format!() Simple benchmarks suggest in some cases it can be faster by even 37%: ``` test converting_f64_long ... bench: 339 ns/iter (+/- 199) test converting_f64_short ... bench: 136 ns/iter (+/- 34) test converting_i32_long ... bench: 87 ns/iter (+/- 16) test converting_i32_short ... bench: 87 ns/iter (+/- 49) test converting_str ... bench: 54 ns/iter (+/- 15) test formatting_f64_long ... bench: 349 ns/iter (+/- 176) test formatting_f64_short ... bench: 145 ns/iter (+/- 14) test formatting_i32_long ... bench: 98 ns/iter (+/- 14) test formatting_i32_short ... bench: 93 ns/iter (+/- 15) test formatting_str ... bench: 86 ns/iter (+/- 23) ```
2018-07-27Improve readability of serialize.rsljedrz-83/+116
2018-07-27Prefer to_string() to format!()ljedrz-15/+15
2018-07-25Deny bare_trait_objects globallyTatsuyuki Ishi-2/+0
2018-07-14Remove most of `PartialEq` impls from AST and HIR structuresVadim Petrochenkov-2/+2
2018-07-12Deny bare trait objects in src/libserializeljedrz-8/+10
2018-06-27Make opaque::Encoder append-only and make it infallibleJohn Kåre Alsaker-55/+34
2018-06-26migrate codebase to `..=` inclusive range patternsZack M. Davis-14/+14
These were stabilized in March 2018's #47813, and are the Preferred Way to Do It going forward (q.v. #51043).
2018-04-08Move deny(warnings) into rustbuildMark Simulacrum-1/+0
This permits easier iteration without having to worry about warnings being denied. Fixes #49517
2018-04-05Bump the bootstrap compiler to 1.26.0 betaAlex Crichton-1/+0
Holy cow that's a lot of `cfg(stage0)` removed and a lot of new stable language features!
2018-03-26Stabilize i128_typeMark Mansi-1/+1
2018-03-02Fix Decodable impl for ArcJohn Kåre Alsaker-1/+1
2018-01-20Auto merge of #46919 - michaelwoerister:new-leb128, r=sfacklerbors-81/+144
Speed up leb128 encoding and decoding for unsigned values. Make the implementation for some leb128 functions potentially faster. @Mark-Simulacrum, could you please trigger a perf.rlo run?
2018-01-09[incremental] Specialize encoding and decoding of FingerprintsWesley Wiser-3/+4
This saves the storage space used by about 32 bits per `Fingerprint`. On average, this reduces the size of the `/target/{mode}/incremental` folder by roughly 5%. Fixes #45875
2018-01-09Make leb128 coding a bit faster.Michael Woerister-81/+144
2018-01-06Add raw bytes functionsWesley Wiser-0/+14
Part of #45875
2017-12-30Add trailing newlines to files which have no trailing newlines.kennytm-1/+1
2017-12-23Auto merge of #46881 - michaelwoerister:ensure-coherence, r=nikomatsakisbors-0/+48
incr.comp.: Cache check_match and use ensure() for coherence-related queries. Some minor optimizations. r? @nikomatsakis
2017-12-21Add Encodable and Decodable impls for Arc<[T]>John Kåre Alsaker-0/+24
2017-12-20Implement Encodable and Decodable for Result.Michael Woerister-0/+48
2017-12-09Use Try syntax for Option in place of macros or matchMatt Brubeck-4/+1
2017-12-01incr.comp.: Load diagnostics from previous session lazily and clean up ↵Michael Woerister-0/+4
on-disk-cache persistence code.
2017-11-28incr.comp.: Make a bunch of query results encodable.Michael Woerister-0/+24
2017-08-25*: remove crate_{name,type} attributesTamir Duberstein-3/+0
Fixes #41701.
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-4/+4
Like #43008 (f668999), but _much more aggressive_.
2017-07-23Fix some doc/comment typos.Bruce Mitchener-2/+2
2017-06-23Removed as many "```ignore" as possible.kennytm-1/+1
Replaced by adding extra imports, adding hidden code (`# ...`), modifying examples to be runnable (sorry Homura), specifying non-Rust code, and converting to should_panic, no_run, or compile_fail. Remaining "```ignore"s received an explanation why they are being ignored.
2017-06-19Bump version and stage0 compilerAlex Crichton-4/+0
2017-06-13Merge crate `collections` into `alloc`Murarth-4/+1
2017-05-11rustc: Remove #![unstable] annotationAlex Crichton-3/+3
These are now no longer necessary with `-Z force-unstable-if-unmarked`
2017-02-10Only SwitchInt over integers, not all constsSimonas Kazlauskas-0/+28
Also use a Cow to avoid full Vec for all SwitchInts
2017-02-03Bump version, upgrade bootstrapAlex Crichton-16/+1
This commit updates the version number to 1.17.0 as we're not on that version of the nightly compiler, and at the same time this updates src/stage0.txt to bootstrap from freshly minted beta compiler and beta Cargo.
2017-01-25std: Stabilize APIs for the 1.16.0 releaseAlex Crichton-30/+0
This commit applies the stabilization/deprecations of the 1.16.0 release, as tracked by the rust-lang/rust issue tracker and the final-comment-period tag. The following APIs were stabilized: * `VecDeque::truncate` * `VecDeque::resize` * `String::insert_str` * `Duration::checked_{add,sub,div,mul}` * `str::replacen` * `SocketAddr::is_ipv{4,6}` * `IpAddr::is_ipv{4,6}` * `str::repeat` * `Vec::dedup_by` * `Vec::dedup_by_key` * `Result::unwrap_or_default` * `<*const T>::wrapping_offset` * `<*mut T>::wrapping_offset` * `CommandExt::creation_flags` (on Windows) * `File::set_permissions` * `String::split_off` The following APIs were deprecated * `EnumSet` - replaced with other ecosystem abstractions, long since unstable Closes #27788 Closes #35553 Closes #35774 Closes #36436 Closes #36949 Closes #37079 Closes #37087 Closes #37516 Closes #37827 Closes #37916 Closes #37966 Closes #38080
2017-01-22Remove unused `extern crate`s.Jeffrey Seyfried-8/+0