Commit Graph

64 Commits

Author SHA1 Message Date
Tyler Mandry
14c0e4c9ea
Rollup merge of #75637 - ctaggart:wasm32build, r=Mark-Simulacrum
update stacker to 0.1.11 to unbreak build for wasm32-unknown-unknown

Like #72079, this updates stacker. The related problem is stacker is here https://github.com/rust-lang/stacker/issues/42. It was fixed by switching from `libc::c_void` to `std::ffi::c_void` https://github.com/rust-lang/stacker/pull/43/files.
2020-08-17 20:20:29 -07:00
Cameron Taggart
2b1fc16153 update stacker to 0.1.11 to unbreak build for wasm32-unknown-unknown 2020-08-17 10:57:53 -06:00
pawanbisht62
bab15885c0
Merge branch 'master' into feature/incorporate-tracing 2020-08-15 08:59:12 +05:30
Matthew Jasper
cbcef3effc Rework rustc_serialize
- Move the type parameter from `encode` and `decode` methods to
  the trait.
- Remove `UseSpecialized(En|De)codable` traits.
- Remove blanket impls for references.
- Add `RefDecodable` trait to allow deserializing to arena-allocated
  references safely.
- Remove ability to (de)serialize HIR.
- Create proc-macros `(Ty)?(En|De)codable` to help implement these new
  traits.
2020-08-14 17:34:30 +01:00
Dylan DPC
992988bbc5
Rollup merge of #75315 - Mark-Simulacrum:save-temps, r=ecstatic-morse
Avoid deleting temporary files on error

Previously if the compiler error'd, fatally, then temporary directories which
should be preserved by -Csave-temps would be deleted due to fatal compiler
errors being implemented as panics.

cc @infinity0

(Hopefully) fixes #75275, but I haven't tested
2020-08-11 01:56:34 +02:00
pawanbisht62
7c4ef37e19
Merge branch 'master' into feature/incorporate-tracing 2020-08-10 13:19:24 +05:30
Josh Stone
997a766b32 Upgrade indexmap to 1.5.1, now using hashbrown! 2020-08-09 12:25:21 -07:00
Mark Rousskov
2627eedde9 Avoid deleting temporary files on error
Previously if the compiler error'd, fatally, then temporary directories which
should be preserved by -Csave-temps would be deleted due to fatal compiler
errors being implemented as panics.
2020-08-09 08:28:15 -04:00
bishtpawan
fdfbd89946 Incorporate tracing crate 2020-08-06 16:56:56 +05:30
Oliver Scherer
ec7230fea2 Move from log to tracing 2020-07-31 22:38:20 +02:00
Jack Huey
6aa2e9d978 Update chalk 2020-06-19 14:04:30 -04:00
Vadim Petrochenkov
283e5b4106 Rename the crates in source code 2020-06-02 20:42:54 +03:00
Vadim Petrochenkov
11d951492c Make things build again 2020-06-02 20:38:24 +03:00
Dylan MacKenzie
9f82785c81 Replace rustc_data_structures::sync::Once with OnceCell 2020-05-22 13:26:39 -07:00
Sébastien Marie
a26335b2a0 update stacker to 0.1.9 to unbreak build on OpenBSD 2020-05-10 10:23:13 +00:00
bors
97f3eeec82 Auto merge of #55617 - oli-obk:stacker, r=nagisa,oli-obk
Prevent compiler stack overflow for deeply recursive code

I was unable to write a test that

1. runs in under 1s
2. overflows on my machine without this patch

The following reproduces the issue, but I don't think it's sensible to include a test that takes 30s to compile. We can now easily squash newly appearing overflows by the strategic insertion of calls to `ensure_sufficient_stack`.

```rust
// compile-pass

#![recursion_limit="1000000"]

macro_rules! chain {
    (EE $e:expr) => {$e.sin()};
    (RECURSE $i:ident $e:expr) => {chain!($i chain!($i chain!($i chain!($i $e))))};
    (Z $e:expr) => {chain!(RECURSE EE $e)};
    (Y $e:expr) => {chain!(RECURSE Z $e)};
    (X $e:expr) => {chain!(RECURSE Y $e)};
    (A $e:expr) => {chain!(RECURSE X $e)};
    (B $e:expr) => {chain!(RECURSE A $e)};
    (C $e:expr) => {chain!(RECURSE B $e)};
    // causes overflow on x86_64 linux
    // less than 1 second until overflow on test machine
    // after overflow has been fixed, takes 30s to compile :/
    (D $e:expr) => {chain!(RECURSE C $e)};
    (E $e:expr) => {chain!(RECURSE D $e)};
    (F $e:expr) => {chain!(RECURSE E $e)};
    // more than 10 seconds
    (G $e:expr) => {chain!(RECURSE F $e)};
    (H $e:expr) => {chain!(RECURSE G $e)};
    (I $e:expr) => {chain!(RECURSE H $e)};
    (J $e:expr) => {chain!(RECURSE I $e)};
    (K $e:expr) => {chain!(RECURSE J $e)};
    (L $e:expr) => {chain!(RECURSE L $e)};
}

fn main() {
    let x = chain!(D 42.0_f32);
}
```

fixes #55471
fixes #41884
fixes #40161
fixes #34844
fixes #32594

cc @alexcrichton @rust-lang/compiler

I looked at all code that checks the recursion limit and inserted stack growth calls where appropriate.
2020-05-07 00:03:23 +00:00
Markus Westerlind
caacdd2024 Move region_constraint to the unified undo log 2020-05-05 11:23:54 +02:00
Simonas Kazlauskas
a5c5365031 Move ensure_sufficient_stack to data_structures
We anticipate this to have uses in all sorts of crates and keeping it in
`rustc_data_structures` enables access to it from more locations without
necessarily pulling in the large `librustc` crate.
2020-05-02 16:47:52 +02:00
Luca Barbieri
45ede927fb Depend on libc from crates.io 2020-04-11 11:07:04 -04:00
Mateusz Mikuła
f5e702df0e Upgrade rustc and bootstrap dependencies 2020-03-26 14:11:23 +01:00
Andy Russell
7b564c67de
use winapi for non-stdlib Windows bindings 2020-01-11 20:56:46 -05:00
Michael Woerister
11e4844480 Update measureme to 0.7.1 in order to fix compilation error on big-endian platforms. 2020-01-10 10:19:40 +01:00
Michael Woerister
b8ead417a6 Initial support for recording query keys in self-profiling data. 2020-01-10 10:19:39 +01:00
Michael Woerister
a62c040929 self-profile: Switch to new approach for event_id generation that enables query-invocation-specific event_ids. 2020-01-10 10:18:21 +01:00
Michael Woerister
edcca15c5b Update measureme crate to 0.5.0. 2019-12-03 10:33:24 +01:00
Mark Rousskov
f696b21c5f Move self-profile infrastructure to data structures
The single dependency on queries (QueryName) can be fairly easily
abstracted via a trait and this further decouples Session from librustc
(the primary goal).
2019-11-12 12:48:04 -05:00
Ralf Jung
90b8d34c9f bump smallvec to 1.0 2019-11-04 15:59:09 +01:00
Josh Stone
33c4125fbe Rebase rustc-rayon on rayon-1.2
See also https://github.com/rust-lang/rustc-rayon/pull/3
2019-10-07 13:20:17 -07:00
csmoe
1cff2e6557 move index_vec into rustc_index 2019-09-29 16:11:30 +00:00
Nicholas Nethercote
3eae7f6291 Upgrade to ena-0.13.1 and use the new inlined_probe_value function.
This is a big speed win for `keccak` and `inflate`.
2019-09-20 11:24:30 +10:00
Mateusz Mikuła
935394f4f8 Upgrade parking_lot and tempfile rustc dependencies 2019-09-11 19:15:32 +02:00
Vadim Petrochenkov
614037171b cleanup: Remove extern crate serialize as rustc_serializes 2019-07-23 19:20:16 +03:00
John Kåre Alsaker
498bdc9b42 Add an AtomicCell abstraction 2019-07-10 17:04:42 +02:00
Alex Crichton
345ba505ec rustc: Remove dylib crate type from most rustc crates
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-07 03:23:00 +02:00
Eduard-Mihai Burtescu
961fe5479f rustc: use indexmap instead of a plain vector for upvars. 2019-06-01 19:17:22 +03:00
John Kåre Alsaker
0e05a9bb85 Update rustc-rayon version 2019-04-26 19:08:36 +02:00
John Kåre Alsaker
03727a4f25 Clean up jobserver integration 2019-04-09 07:44:10 +02:00
varkor
3683f51352 Update ena to version 0.13.0 2019-03-27 09:44:55 +00:00
varkor
443a2d4f86 Update ena 2019-03-27 09:44:55 +00:00
John Kåre Alsaker
892fed9d08 Add support for using a jobserver with Rayon 2019-03-01 01:15:37 +01:00
Bastien Orivel
a82f0ce54b Update parking_lot to 0.7
Unfortunately this'll dupe parking_lot until the data_structures crate
is published and be updated in rls in conjunction with crossbeam-channel
2019-02-22 13:49:19 +01:00
Taiki Endo
3e2b5a4b08 librustc_data_structures => 2018 2019-02-09 01:36:22 +09:00
Nicholas Nethercote
ecf6cd4b3c Upgrade smallvec to 0.6.7 and use the new may_dangle feature. 2018-12-10 09:31:27 +11:00
Nicholas Nethercote
1e34dfce6f Update to ena 0.11.0.
This version has some significant speed-ups relating to snapshotting.
2018-11-25 17:54:04 +11:00
Eduard-Mihai Burtescu
7683180be5 rustc: implement and use Default on more types. 2018-11-21 08:11:50 +02:00
Andreas Jonson
03aaa4b659 remove unused dependency 2018-11-16 08:46:15 +01:00
Diogo Sousa
3fc275df6c Added graphviz visualization for obligation forests.
This can be a big help when debugging the trait resolver.
2018-10-14 16:12:07 +01:00
Mark Rousskov
9ec5ef541a Breaking change upgrades 2018-09-04 13:22:08 -06:00
Igor Gutorov
4d81fe9243 Use optimized SmallVec implementation 2018-08-23 10:45:53 +03:00
John Kåre Alsaker
d85b5eadea Update Rayon version 2018-06-06 15:25:16 +02:00