Commit Graph

14 Commits

Author SHA1 Message Date
Mara Bos
89882388d9 Revert stabilizing integer::BITS. 2021-02-03 22:23:58 +01:00
Ashley Mannix
8940a2652e stabilize int_bits_const 2021-01-31 21:50:47 +10:00
Tyson Nottingham
f15fae822e rustc_serialize: fix incorrect signed LEB128 decoding
The signed LEB128 decoding function used a hardcoded constant of 64
instead of the number of bits in the type of integer being decoded,
which resulted in incorrect results for some inputs. Fix this, make the
decoding more consistent with the unsigned version, and increase the
LEB128 encoding and decoding test coverage.
2021-01-11 12:13:26 -08:00
Tyson Nottingham
52f21791fb Serialize incr comp structures to file via fixed-size buffer
Reduce a large memory spike that happens during serialization by writing
the incr comp structures to file by way of a fixed-size buffer, rather
than an unbounded vector.

Effort was made to keep the instruction count close to that of the
previous implementation. However, buffered writing to a file inherently
has more overhead than writing to a vector, because each write may
result in a handleable error. To reduce this overhead, arrangements are
made so that each LEB128-encoded integer can be written to the buffer
with only one capacity and error check. Higher-level optimizations in
which entire composite structures can be written with one capacity and
error check are possible, but would require much more work.

The performance is mostly on par with the previous implementation, with
small to moderate instruction count regressions. The memory reduction is
significant, however, so it seems like a worth-while trade-off.
2021-01-11 12:13:22 -08:00
Tyson Nottingham
be79f493fb rustc_serialize: specialize opaque decoding of some u8 sequences 2021-01-01 22:49:16 -08:00
Tyson Nottingham
7c6274d464 rustc_serialize: have read_raw_bytes take MaybeUninit<u8> slice 2021-01-01 22:49:16 -08:00
Tyson Nottingham
a4daa63a90 rustc_serialize: specialize opaque encoding of some u8 sequences 2021-01-01 22:49:14 -08:00
Bastian Kauschke
06cc9c26da stabilize min_const_generics 2020-12-26 18:24:10 +01:00
Joshua Nelson
0ad3dce83a Fix some clippy lints 2020-12-03 17:08:19 -05:00
est31
a0fc455d30 Replace absolute paths with relative ones
Modern compilers allow reaching external crates
like std or core via relative paths in modules
outside of lib.rs and main.rs.
2020-10-13 14:16:45 +02:00
Oliver Scherer
455f284496 Deduplicate and generalize some (de/)serializer impls 2020-09-26 14:55:42 +02:00
Erik Hofmayer
138a2e5eaa /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
Erik Hofmayer
dd66ea2d3d Updated html_root_url for compiler crates 2020-09-23 21:14:43 +02:00
mark
9e5f7d5631 mv compiler to compiler/ 2020-08-30 18:45:07 +03:00