summary refs log tree commit diff
path: root/src/librustc_driver
AgeCommit message (Collapse)AuthorLines
2018-07-25force the doctest rustc thread to share the name of the testQuietMisdreavus-5/+17
2018-06-28Attempt to fix hygiene for global_allocatorMark Mansi-1/+10
2018-06-19Auto merge of #51383 - Zoxc:parallel-stuff, r=nikomatsakisbors-5/+3
Run some stuff in parallel Requires https://github.com/rust-lang/rust/pull/50699 to actually work correctly. r? @nikomatsakis
2018-06-19Parallel codeJohn Kåre Alsaker-5/+3
2018-06-18Auto merge of #51248 - fabric-and-ink:newtype_index_debrujin, r=nikomatsakisbors-1/+1
Declare DebruijnIndex via newtype_index macro Part of #49887 Declare `DebruijnIndex` via the `newtype_index` macro.
2018-06-18Auto merge of #51414 - oli-obk:impl_trait_type_def, r=pnkfelixbors-0/+1
Add existential type definitions Note: this does not allow creating named existential types, it just desugars `impl Trait` to a less (but still very) hacky version of actual `existential type` items. r? @nikomatsakis
2018-06-15Fix compile errorFabian Drinck-1/+1
2018-06-14Circumvent const fn problemFabian Drinck-1/+1
2018-06-14Fix compile errorFabian Drinck-1/+1
2018-06-14rustc: rename ty::maps to ty::query.Eduard-Mihai Burtescu-9/+9
2018-06-11Update testsOliver Schneider-0/+1
2018-06-08Rollup merge of #51394 - nnethercote:NCA-depths, r=nikomatsakisMark Rousskov-3/+4
Use scope tree depths to speed up `nearest_common_ancestor`. This patch adds depth markings to all entries in the `ScopeTree`'s `parent_map`. This change increases memory usage somewhat, but permits a much faster algorithm to be used: - If one scope has a greater depth than the other, the deeper scope is moved upward until they are at equal depths. - Then we move the two scopes upward in lockstep until they match. This avoids the need to keep track of which scopes have already been seen, which was the major part of the cost of the old algorithm. It also reduces the number of child-to-parent moves (which are hash table lookups) when the scopes start at different levels, because it never goes past the nearest common ancestor the way the old algorithm did. Finally, the case where one of the scopes is the root is now handled in advance, because that is moderately common and lets us skip everything. This change speeds up runs of several rust-perf benchmarks, the best by 6%. A selection of the bigger improvements: ``` clap-rs-check avg: -2.6% min: -6.6% max: 0.0% syn-check avg: -2.2% min: -5.0% max: 0.0% style-servo-check avg: -2.9%? min: -4.8%? max: 0.0%? cargo-check avg: -1.3% min: -2.8% max: 0.0% sentry-cli-check avg: -1.0% min: -2.1% max: 0.0% webrender-check avg: -0.9% min: -2.0% max: 0.0% style-servo avg: -0.9%? min: -1.8%? max: -0.0%? ripgrep-check avg: -0.7% min: -1.8% max: 0.1% clap-rs avg: -0.9% min: -1.6% max: -0.2% regex-check avg: -0.2% min: -1.3% max: 0.1% syn avg: -0.6% min: -1.3% max: 0.1% hyper-check avg: -0.5% min: -1.1% max: 0.0% ``` The idea came from multiple commenters on my blog and on Reddit. Thank you! r? @nikomatsakis
2018-06-06Reduce the amount of unsafe code and mark handle_deadlock as unsafeJohn Kåre Alsaker-3/+4
2018-06-06Update Rayon versionJohn Kåre Alsaker-1/+1
2018-06-06Make queries block and handle query cyclesJohn Kåre Alsaker-3/+10
2018-06-06Use scope tree depths to speed up `nearest_common_ancestor`.Nicholas Nethercote-3/+4
This patch adds depth markings to all entries in the `ScopeTree`'s `parent_map`. This change increases memory usage somewhat, but permits a much faster algorithm to be used: - If one scope has a greater depth than the other, the deeper scope is moved upward until they are at equal depths. - Then we move the two scopes upward in lockstep until they match. This avoids the need to keep track of which scopes have already been seen, which was the major part of the cost of the old algorithm. It also reduces the number of child-to-parent moves (which are hash table lookups) when the scopes start at different levels, because it never goes past the nearest common ancestor the way the old algorithm did. Finally, the case where one of the scopes is the root is now handled in advance, because that is moderately common and lets us skip everything. This change speeds up runs of several rust-perf benchmarks, the best by 6%.
2018-06-05Add commentbjorn3-0/+12
2018-06-05Impl CompilerCalls for CompileController instead of AdHocCompilerCallsbjorn3-24/+57
2018-06-05Add AdHocCalls and pass self to build_controller as Box<Self>bjorn3-22/+50
2018-05-28stop invoking `DebruijnIndex::new` directlyNiko Matsakis-7/+10
Co-authored-by: csmoe <35686186+csmoe@users.noreply.github.com>
2018-05-17Add edition to expansion infoVadim Petrochenkov-1/+2
2018-05-17Rename trans to codegen everywhere.Irina Popa-63/+65
2018-05-15Pull common parameters into GenericParamDefvarkor-1/+1
This leads to a lot of simplifications, as most code doesn't actually need to know about the specific lifetime/type data; rather, it's concerned with properties like name, index and def_id.
2018-05-13Add a Rayon thread poolJohn Kåre Alsaker-25/+83
2018-05-13Add Sync bounds to the crate storeJohn Kåre Alsaker-6/+8
2018-05-07Make DepGraph::previous_work_products immutableWesley Wiser-9/+10
Fixes #50501
2018-05-02make it compile againflip1995-1/+1
2018-05-02Allow Path for name of MetaItemSeiichi Uchida-1/+1
2018-04-27rustc_driver: Catch ICEs on the main thread tooJosh Stone-1/+2
2018-04-27Auto merge of #50102 - Zoxc:query-nomacro, r=michaelwoeristerbors-1/+1
Move query code outside macros and store query jobs separately from query results Based on https://github.com/rust-lang/rust/pull/50067 r? @michaelwoerister
2018-04-27Move query functions out from the define_maps! macroJohn Kåre Alsaker-1/+1
2018-04-27Rename InternedString to LocalInternedString and introduce a new thread-safe ↵John Kåre Alsaker-2/+2
InternedString
2018-04-26rustc_target: move in syntax::abi and flip dependency.Irina Popa-1/+1
2018-04-26Rename rustc_back::target to rustc_target::spec.Irina Popa-3/+3
2018-04-24Make Binder's field private and clean up its usageTyler Mandry-1/+1
2018-04-23in unit tests, use `note` to dump multiple program clausesNiko Matsakis-4/+4
(rather than issuing multiple errors) Also, reorder so that the annotations are considered "used" when the lint runs.
2018-04-19add EDITIONS_NAME_LIST, make edition tracked, enforce that only stable ↵Kurtis Nusbaum-1/+1
editions are allowed to be used on non-nightly builds
2018-04-18Auto merge of #49349 - Zoxc:sync-errors, r=michaelwoeristerbors-5/+5
Make Handler more thread-safe The use of `code_emitted` to suppress extended explanations is not thread safe. I'm not sure why we keep the documentation for errors outside `diagnostics.rs` anyway. It would be better to add a `teach` method to `DiagnosticsBuilder`, so instead of: ``` if self.tcx.sess.teach(&err.get_code().unwrap()) { err.note("..."); } ``` we'd use `err.teach("...")` cc @estebank r? @michaelwoerister
2018-04-18Auto merge of #49969 - mark-i-m:allocator_fmt, r=estebankbors-526/+610
Various rustfmt and commenting changes These are factored out of #49320 There aren't actually any changes in functionality, just rustfmt and doccomments.
2018-04-17run rustfmt on rustc_driver/driver.rsMark Mansi-526/+610
2018-04-17Make Handler more thread-safeJohn Kåre Alsaker-5/+5
2018-04-17Use #[no_debug] to work around LLVM problem with rustc_driver::get_trans::LOAD.Michael Woerister-0/+4
2018-04-17Auto merge of #49882 - Zoxc:sync-misc2, r=michaelwoeristerbors-2/+6
More thread-safety changes r? @michaelwoerister
2018-04-17Rollup merge of #49606 - varkor:pipe-repair, r=alexcrichtonkennytm-0/+12
Prevent broken pipes causing ICEs As the private `std::io::print_to` panics if there is an I/O error, which is used by `println!`, the compiler would ICE if one attempted to use a broken pipe (e.g. `rustc --help | false`). This introduces a new (private) macro `try_println!` which allows us to avoid this. As a side note, it seems this macro might be useful publicly (and actually there seems to be [a crate specifically for this purpose](https://crates.io/crates/try_print/)), though that can probably be left for a future discussion. One slight alternative approach would be to simply early exit without an error (i.e. exit code `0`), which [this comment](https://github.com/rust-lang/rust/issues/34376#issuecomment-377822526) suggests is the usual approach. I've opted not to take that approach initially, because I think it's more helpful to know when there is a broken pipe. Fixes #34376.
2018-04-16Auto merge of #49433 - varkor:metadata-skip-mir-opt, r=michaelwoeristerbors-1/+1
Skip MIR encoding for cargo check Resolves #48662. r? @michaelwoerister
2018-04-15Add misc timingsJohn Kåre Alsaker-2/+6
2018-04-14Rollup merge of #49913 - varkor:RegionParameterDef-InternedString, ↵kennytm-1/+1
r=petrochenkov Use InternedString rather than Name for RegionParameterDef This makes it consistent with `TypeParameterDef`.
2018-04-13Use InternedString rather than Name for RegionParameterDefvarkor-1/+1
This makes it consistent with TypeParameterDef.
2018-04-12Auto merge of #49558 - Zoxc:sync-misc, r=michaelwoeristerbors-3/+4
Even more thread-safety changes r? @michaelwoerister
2018-04-11Rollup merge of #49525 - varkor:sort_by_cached_key-conversion, r=scottmcmkennytm-8/+3
Use sort_by_cached_key where appropriate A follow-up to https://github.com/rust-lang/rust/pull/48639, converting various slice sorting calls to `sort_by_cached_key` when the key functions are more expensive.