about summary refs log tree commit diff
path: root/src/libserialize
AgeCommit message (Collapse)AuthorLines
2020-06-02Rename directories for some compiler crates from `libx` to `librustc_x`Vadim Petrochenkov-6360/+0
libarena -> librustc_arena libfmt_macros -> librustc_parse_format libgraphviz -> librustc_graphviz libserialize -> librustc_serialize
2020-05-14linker: More systematic handling of CRT objectsVadim Petrochenkov-2/+2
2020-05-10use min_specialization for some rustc crates where it requires no changesRalf Jung-1/+1
2020-05-02Update src/libserialize/json.rsTshepang Lekhonkhobe-1/+1
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2020-05-01doc: make Stack and StackElement a little prettyTshepang Lekhonkhobe-4/+6
Also, fix rustdoc warnings.
2020-04-25Bump rustfmt to most recently shippedMark Rousskov-1/+1
2020-04-20Remove unused ToHex/FromHex traitShotaro Yamada-205/+0
2020-04-07Use assoc integer constants in libserializeLinus Färnstrand-10/+10
2020-04-06Stop importing float module in libserializeLinus Färnstrand-1/+1
2020-04-05Stop importing int/float modules in libserializeLinus Färnstrand-1/+0
2020-04-02Add hash of source files in debug infoArlo Siemsen-0/+24
* Adds either an MD5 or SHA1 hash to the debug info. * Adds new unstable option `-Z src-hash-algorithm` to control the hashing algorithm.
2020-02-18Inline various simple `emit_*` and `read_*` methods in `Decoder`.Nicholas Nethercote-0/+19
Mostly, these are the ones whose body just contains `f(self)`.
2020-02-13Rollup merge of #69050 - nnethercote:micro-optimize-leb128, r=michaelwoeristerDylan DPC-50/+14
Micro-optimize the heck out of LEB128 reading and writing. This commit makes the following writing improvements: - Removes the unnecessary `write_to_vec` function. - Reduces the number of conditions per loop from 2 to 1. - Avoids a mask and a shift on the final byte. And the following reading improvements: - Removes an unnecessary type annotation. - Fixes a dangerous unchecked slice access. Imagine a slice `[0x80]` -- the current code will read past the end of the slice some number of bytes. The bounds check at the end will subsequently trigger, unless something bad (like a crash) happens first. The cost of doing bounds check in the loop body is negligible. - Avoids a mask on the final byte. And the following improvements for both reading and writing: - Changes `for` to `loop` for the loops, avoiding an unnecessary condition on each iteration. This also removes the need for `leb128_size`. All of these changes give significant perf wins, up to 5%. r? @michaelwoerister
2020-02-11Micro-optimize the heck out of LEB128 reading and writing.Nicholas Nethercote-50/+14
This commit makes the following writing improvements: - Removes the unnecessary `write_to_vec` function. - Reduces the number of conditions per loop from 2 to 1. - Avoids a mask and a shift on the final byte. And the following reading improvements: - Removes an unnecessary type annotation. - Fixes a dangerous unchecked slice access. Imagine a slice `[0x80]` -- the current code will read past the end of the slice some number of bytes. The bounds check at the end will subsequently trigger, unless something bad (like a crash) happens first. The cost of doing bounds check in the loop body is negligible. - Avoids a mask on the final byte. And the following improvements for both reading and writing: - Changes `for` to `loop` for the loops, avoiding an unnecessary condition on each iteration. This also removes the need for `leb128_size`. All of these changes give significant perf wins, up to 5%.
2020-02-07Remove unused feature gate from libserializebjorn3-1/+0
2020-01-30Remove unused `read_uleb128` parameter.Nicholas Nethercote-6/+6
2019-12-24Deprecate Error::description for realDavid Tolnay-18/+3
`description` has been documented as soft-deprecated since 1.27.0 (17 months ago). There is no longer any reason to call it or implement it. This commit: - adds #[rustc_deprecated(since = "1.41.0")] to Error::description; - moves description (and cause, which is also deprecated) below the source and backtrace methods in the Error trait; - reduces documentation of description and cause to take up much less vertical real estate in rustdocs, while preserving the example that shows how to render errors without needing to call description; - removes the description function of all *currently unstable* Error impls in the standard library; - marks #[allow(deprecated)] the description function of all *stable* Error impls in the standard library; - replaces miscellaneous uses of description in example code and the compiler.
2019-12-22Format the worldMark Rousskov-987/+1242
2019-12-14Revert "Stabilize the `never_type`, written `!`."Niko Matsakis-1/+1
This reverts commit 15c30ddd69d6cc3fffe6d304c6dc968a5ed046f1.
2019-11-21Stabilize the `never_type`, written `!`.Mazdak Farrokhzad-1/+1
2019-11-04bump smallvec to 1.0Ralf Jung-1/+1
2019-10-21Remove unnecessary `Hash` bounds from various types.Nicholas Nethercote-2/+2
2019-10-01Fix clippy warningsYuki Okushi-11/+10
2019-09-23Tweak libserialize allowsAlex Crichton-2/+2
2019-09-23Fix compiling libserialize testsAlex Crichton-0/+4
They've got new warnings turned on so they need more `#![allow]`
2019-09-23Move handling of internal lints to `build.rs`Alex Crichton-0/+1
2019-08-08Use associated_type_bounds where applicable - closes #61738Ilija Tovilo-8/+3
2019-08-02libserialize: Unconfigure tests during normal buildVadim Petrochenkov-44/+46
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-2/+0
rustbuild Remove some random unnecessary lint `allow`s
2019-07-25Rollup merge of #60066 - sfackler:type-name, r=CentrilMazdak Farrokhzad-3/+3
Stabilize the type_name intrinsic in core::any Stabilize `type_name` in `core::any`. Closes rust-lang/rfcs#1428 FCP completed over there. `RELEASES.md`: Prefer T-libs for categorization.
2019-07-24Stabilize the type_name intrinsic in core::anySteven Fackler-3/+3
Closes rust-lang/rfcs#1428
2019-07-23cleanup: Remove `extern crate serialize as rustc_serialize`sVadim Petrochenkov-2/+0
2019-07-07Rollup merge of #62042 - petrochenkov:macstab, r=matthewjasperMazdak Farrokhzad-7/+7
Support stability and deprecation checking for all macros RELNOTES: Deprecation attributes on macros now have effect. Fixes https://github.com/rust-lang/rust/issues/34079 Fixes https://github.com/rust-lang/rust/issues/49912 Unblocks https://github.com/rust-lang/rust/pull/62086 Unblocks https://github.com/rust-lang/rust/pull/61000
2019-07-07Address review comments + Fix rebaseVadim Petrochenkov-9/+7
2019-07-07syntax: Migrate built-in macros to the regular stability checkingVadim Petrochenkov-0/+2
2019-07-07rustc: Remove `dylib` crate type from most rustc cratesAlex Crichton-1/+0
Now that procedural macros no longer link transitively to libsyntax, this shouldn't be needed any more! This commit is an experiment in removing all dynamic libraries from rustc except for librustc_driver itself. Let's see how far we can get with that!
2019-07-01Remove needless lifetimesJeremy Stucki-2/+2
2019-06-26Fix clippy::cast_loslessIgor Matuszewski-7/+7
2019-06-26Fix clippy::redundant_field_namesIgor Matuszewski-1/+1
2019-06-25Use f{32,64}::from_bitsIgor Matuszewski-2/+2
2019-06-23Fix meta-variable binding errors in macrosJulien Cretin-9/+9
The errors are either: - The meta-variable used in the right-hand side is not bound (or defined) in the left-hand side. - The meta-variable used in the right-hand side does not repeat with the same kleene operator as its binder in the left-hand side. Either it does not repeat enough, or it uses a different operator somewhere. This change should have no semantic impact.
2019-06-18rustc: remove 'x: 'y bounds (except from comments/strings).Eduard-Mihai Burtescu-1/+1
2019-06-16Separate libserialize modulechansuke-212/+210
2019-06-10Rollup merge of #59600 - tobia:master, r=pnkfelixMazdak Farrokhzad-5/+12
Replaced linear token counting macros with optimized implementation There are currently two distinct token-counting macros in the source. Both implement the trivial algorithm, with linear complexity. They may or may not be adequate for their use case, but considering that other people are probably going to copy and paste them whenever they need a token-counting macro, I replaced them with an optimized implementation with logarithmic complexity.
2019-06-01rustc: use indexmap instead of a plain vector for upvars.Eduard-Mihai Burtescu-0/+70
2019-05-07serialize: add missing Encodable impl for Path.Eduard-Mihai Burtescu-1/+7
2019-04-21Allow unused_extern_crates for rustc_libserializePhilipp Hansch-0/+2
2019-04-13Replaced linear token counting macros with optimized implementationTobia-5/+12
2019-04-10Remove useless ?Sized boundJohn Kåre Alsaker-2/+2
2019-04-05Impl UseSpecializedDecodable for &TJohn Kåre Alsaker-0/+1