Commit Graph

367 Commits

Author SHA1 Message Date
John Kåre Alsaker 71c26b3171 Save query results and the dep graph in parallel 2018-06-19 03:19:49 +02:00
Eduard-Mihai Burtescu 5a5c7ded0d rustc: rename ty::maps to ty::query. 2018-06-14 18:05:12 +03:00
Isaac Whitfield 680f3b24ba Serialize attributes into the CrateRoot 2018-05-18 09:37:29 -07:00
Irina Popa b63d7e2b1c Rename trans to codegen everywhere. 2018-05-17 15:08:30 +03:00
Isaac Whitfield 8402a58528 Update an old method name in debug logging 2018-05-11 08:09:53 -07:00
Isaac Whitfield 0a4fbe326a Update naming in line with PR comments 2018-05-11 08:09:53 -07:00
Isaac Whitfield d23cbc3fbe Catch a bad reference in use clauses 2018-05-11 08:09:53 -07:00
Isaac Whitfield 89a8f2c103 Remove shared access to DepGraph::work_products 2018-05-11 08:09:53 -07:00
Wesley Wiser 868d2a18c1 Fix comment 2018-05-08 09:13:18 -04:00
Wesley Wiser 000d3c97ee Make DepGraph::previous_work_products immutable
Fixes #50501
2018-05-07 23:17:16 -04:00
flip1995 121abd0599 make it compile again 2018-05-02 12:05:13 +02:00
John Kåre Alsaker 4d52751d12 Rename InternedString to LocalInternedString and introduce a new thread-safe InternedString 2018-04-27 03:35:32 +02:00
John Kåre Alsaker ead5cf11b8 Add misc timings 2018-04-15 20:53:03 +02:00
Mark Simulacrum c115cc655c Move deny(warnings) into rustbuild
This permits easier iteration without having to worry about warnings
being denied.

Fixes #49517
2018-04-08 16:59:14 -06:00
bors 8c2d7b2da3 Auto merge of #49661 - alexcrichton:bump-bootstrap, r=nikomatsakis
Bump the bootstrap compiler to 1.26.0 beta

Holy cow that's a lot of `cfg(stage0)` removed and a lot of new stable language
features!
2018-04-07 11:58:38 +00:00
Vadim Petrochenkov 3a30bad6de Use Ident instead of Name in MetaItem 2018-04-06 11:52:16 +03:00
Alex Crichton 8958815916 Bump the bootstrap compiler to 1.26.0 beta
Holy cow that's a lot of `cfg(stage0)` removed and a lot of new stable language
features!
2018-04-05 07:13:45 -07:00
kennytm 0214304b5a Rollup merge of #49364 - wesleywiser:incr_handle_load_failure, r=michaelwoerister
[incremental] Don't panic if decoding the cache fails

If the cached data can't be loaded from disk, just issue a warning to
the user so they know why compilation is taking longer than usual but
don't fail the entire compilation since we can recover by ignorning the
on disk cache.

In the same way, if the disk cache can't be deserialized (because it has
been corrupted for some reason), report the issue as a warning and
continue without failing the compilation. `Decodable::decode()` tends to
panic with various errors like "entered unreachable code" or "index out
of range" if the input data is corrupted. Work around this by catching
panics from the `decode()` calls and continuing without the cached data.

Fixes #48847
2018-03-28 17:55:08 +02:00
Wesley Wiser 49fd71bea7 [incremental] Don't panic if decoding the cache fails
If the cached data can't be loaded from disk, just issue a warning to
the user so they know why compilation is taking longer than usual but
don't fail the entire compilation since we can recover by ignorning the
on disk cache.

In the same way, if the disk cache can't be deserialized (because it has
been corrupted for some reason), report the issue as a warning and
continue without failing the compilation. `Decodable::decode()` tends to
panic with various errors like "entered unreachable code" or "index out
of range" if the input data is corrupted. Work around this by catching
panics from the `decode()` calls when joining the thread and continuing
without the cached data.

Fixes #48847
2018-03-28 08:30:09 -04:00
Mark Mansi 7ce8191775 Stabilize i128_type 2018-03-26 08:36:50 -05:00
Taylor Cramer 0f5b52e4a8 Stabilize conservative_impl_trait 2018-03-26 10:43:03 +02:00
Wesley Wiser c43b1a09e0 Convert SerializedDepGraph to be a struct-of-arrays
Fixes #47326
2018-03-19 19:45:35 -04:00
bors 36b6687318 Auto merge of #49051 - kennytm:rollup, r=kennytm
Rollup of 17 pull requests

- Successful merges: #48706, #48875, #48892, #48922, #48957, #48959, #48961, #48965, #49007, #49024, #49042, #49050, #48853, #48990, #49037, #49049, #48972
- Failed merges:
2018-03-16 00:09:14 +00:00
kennytm 92d1f8d8e4 Stabilize inclusive_range_syntax language feature.
Stabilize the syntax `a..=b` and `..=b`.
2018-03-15 16:58:02 +08:00
Bastien Orivel a67e0723a3 Dedupe rand 2018-03-12 20:23:23 +01:00
John Kåre Alsaker 184fd32a03 Move PROFQ_CHAN to a Session field 2018-03-09 08:04:31 +01:00
Michael Woerister 542bc75dea Turn features() into a query. 2018-03-05 11:05:01 +01:00
Michael Woerister 580dd42cfa incr.comp.: Run cache directory garbage collection before loading dep-graph. 2018-02-13 13:37:32 +01:00
bjorn3 74c92c5562 Allow runtime switching between trans backends 2018-01-19 20:27:10 +01:00
leonardo.yvens f93183adb4 Remove impl Foo for .. in favor of auto trait Foo
No longer parse it.
Remove AutoTrait variant from AST and HIR.
Remove backwards compatibility lint.
Remove coherence checks, they make no sense for the new syntax.
Remove from rustdoc.
2018-01-13 18:48:00 +03:00
kennytm 7ffdabd401 Rollup merge of #47328 - mbrubeck:fs_read, r=sfackler
Use the new fs_read_write functions in rustc internals

Uses `fs::read` and `fs::write` (added by #45837) where appropriate, to simplify code and dog-food these new APIs.  This also improves performance, when combined with #47324.
2018-01-13 02:26:35 +08:00
bors 619ced0578 Auto merge of #47087 - Zoxc:incr_no_in_ignore, r=michaelwoerister
Replace uses of DepGraph.in_ignore with DepGraph.with_ignore

I currently plan to track tasks in thread local storage. Ignoring things in a closure ensures that the ignore tasks do not overlap the beginning or end of any other task. The TLS API will also use a closure to change a TLS value, so having the ignore task be a closure also helps there.

It also adds `assert_ignored` which is used before a `TyCtxt` is created. Instead of adding a new ignore task this simply ensures that we are in a context where reads are ignored.

r? @michaelwoerister
2018-01-11 03:24:16 +00:00
Matt Brubeck 3f9c057ea6 Use the new fs_read_write functions in rustc internals 2018-01-10 14:53:40 -08:00
John Kåre Alsaker 9508922499 Replace uses of DepGraph.in_ignore with DepGraph.with_ignore 2018-01-09 18:35:50 +01:00
Michael Woerister 94f3037f4b Shorten names of some compiler generated artifacts. 2018-01-08 12:30:52 +01:00
Malo Jaffré 3f073c409a Try to fix a perf regression by updating log
Upgrade `log` to `0.4` in multiple crates.
2018-01-07 16:54:05 +01:00
Michael Woerister e6e5589db4 incr.comp.: Use an IndexVec instead of a hashmap for storing result hashes. 2017-12-20 11:14:31 +01:00
David Teller a0fb93ddb4 Resolves #46555 - Moving loading and decoding of dependency graph to background thread 2017-12-15 12:01:11 -06:00
Michael Woerister c60b0e43c8 incr.comp.: Remove on-export crate metadata hashing. 2017-11-29 16:28:25 +01:00
Michael Woerister 8d6f869c98 Remove some trailing whitespace. 2017-11-19 17:26:19 +01:00
Michael Woerister a4ad5dbcb7 Fix tidy line-length issue. 2017-11-19 17:12:04 +01:00
Wesley Wiser f726634198 [incremental] Collect stats about duplicated edge reads from queries
Part of #45873
2017-11-17 18:03:29 -05:00
Michael Woerister cb1ff24425 incr.comp.: Remove default serialization implementations for things in rustc::hir::def_id so that we get an ICE instead of silently doing the wrong thing. 2017-11-16 17:13:39 +01:00
Michael Woerister 2f50e626e1 incr.comp.: Only save and load query result cache when -Zincremental-queries is specified. 2017-11-15 15:36:00 +01:00
Michael Woerister 4bfab89aa2 incr.comp.: Store the query result index which records where query results can be found in the cached. 2017-11-14 16:15:45 +01:00
Michael Woerister 8cbc02238d incr.comp.: Include header when loading cache files in order to get the same byte offsets as when saving. 2017-11-13 15:13:44 +01:00
Alex Crichton 6bc8f164b0 std: Remove rand crate and module
This commit removes the `rand` crate from the standard library facade as
well as the `__rand` module in the standard library. Neither of these
were used in any meaningful way in the standard library itself. The only
need for randomness in libstd is to initialize the thread-local keys of
a `HashMap`, and that unconditionally used `OsRng` defined in the
standard library anyway.

The cruft of the `rand` crate and the extra `rand` support in the
standard library makes libstd slightly more difficult to port to new
platforms, namely WebAssembly which doesn't have any randomness at all
(without interfacing with JS). The purpose of this commit is to clarify
and streamline randomness in libstd, focusing on how it's only required
in one location, hashmap seeds.

Note that the `rand` crate out of tree has almost always been a drop-in
replacement for the `rand` crate in-tree, so any usage (accidental or
purposeful) of the crate in-tree should switch to the `rand` crate on
crates.io. This then also has the further benefit of avoiding
duplication (mostly) between the two crates!
2017-11-08 20:41:17 -08:00
leonardo.yvens 9d181ac2de Fix tests and rebase conflict 2017-11-03 16:13:21 -02:00
bors a3f990dc08 Auto merge of #45472 - michaelwoerister:incr-comp-caching-base, r=nikomatsakis
incr.comp.: Implement compiler diagnostic persistence.

This PR implements storing and loading diagnostics that the compiler generates and thus allows for emitting warnings during incremental compilation without actually re-evaluating the thing the warning originally came from. It also lays some groundwork for storing and loading type information and MIR in the incr. comp. cache.

~~It is still work in progress:~~
- ~~There's still some documentation to be added.~~
- ~~The way anonymous queries are handled might lead to duplicated emissions of warnings. Not sure if there is a better way or how frequent such duplication would be in practice.~~

Diagnostic message duplication is addressed separately in #45519.

r? @nikomatsakis
2017-11-01 14:28:11 +00:00
Michael Woerister f55425dfcd incr.comp.: Implement query diagnostic persistence. 2017-10-25 15:43:48 +02:00