- 18 9月, 2017 14 次提交
-
-
由 bors 提交于
Refactor translation unit partitioning/collection as a query This commit is targeted at #44486 with the ultimate goal of making the `collect_and_partition_translation_items` function a query. This mostly just involved query-ifying a few other systems along with plumbing the tcx instead of `SharedCrateContext` in a few locations. Currently this only tackles the first bullet of #44486 and doesn't add a dedicated query for a particular codegen unit. I wasn't quite sure how to do that yet but figured this was good to put up. Closes #44486
-
由 Alex Crichton 提交于
This commit moves the actual code generation in the compiler behind a query keyed by a codegen unit's name. This ended up entailing quite a few internal refactorings to enable this, along with a few cut corners: * The `OutputFilenames` structure is now tracked in the `TyCtxt` as it affects a whole bunch of trans and such. This is now behind a query and threaded into the construction of the `TyCtxt`. * The `TyCtxt` now has a channel "out the back" intended to send data to worker threads in rustc_trans. This is used as a sort of side effect of the codegen query but morally what's happening here is the return value of the query (currently unit but morally a path) is only valid once the background threads have all finished. * Dispatching work items to the codegen threads was refactored to only rely on data in `TyCtxt`, which mostly just involved refactoring where data was stored, moving it from the translation thread to the controller thread's `CodegenContext` or the like. * A new thread locals was introduced in trans to work around the query system. This is used in the implementation of `assert_module_sources` which looks like an artifact of the old query system and will presumably go away once red/green is up and running.
-
由 bors 提交于
rustbuild: Don't pass `-j` if called by `make` In these situations Cargo just prints out a warning about ignoring the flag anyway, so let `make` take care of jobs and whatnot instead of getting warnings printed.
-
由 Alex Crichton 提交于
This commit attaches a channel to the LLVM workers to the `TyCtxt` which will later be used during the codegen query to actually send work to LLVM workers. Otherwise this commit is just plumbing this channel throughout the compiler to ensure it reaches the right consumers.
-
由 Alex Crichton 提交于
This commit removes the `crate_trans_items` field from the `CrateContext` of trans. This field, a big map, was calculated during partioning and was a set of all translation items. This isn't quite incremental-friendly because the map may change a lot but not have much effect on downstream consumers. Instead a new query was added for the one location this map was needed, along with a new comment explaining what the location is doing!
-
由 Alex Crichton 提交于
I believe this comment here is mostly talking about the `ptrcast` function call below, so move the comment down to that block.
-
由 Alex Crichton 提交于
This is a big map that ends up inside of a `CrateContext` during translation for all codegen units. This means that any change to the map may end up causing an incremental recompilation of a codegen unit! In order to reduce the amount of dependencies here between codegen units and the actual input crate this commit refactors dealing with exported symbols and such into various queries. The new queries are largely based on existing queries with filled out implementations for the local crate in addition to external crates, but the main idea is that while translating codegen untis no unit needs the entire set of exported symbols, instead they only need queries about particulare `DefId` instances every now and then. The linking stage, however, still generates a full list of all exported symbols from all crates, but that's going to always happen unconditionally anyway, so no news there!
-
由 Alex Crichton 提交于
Otherwise we may emit double errors related to the `#[export_name]` attribute, for example, and using a query should ensure that it's only emitted at most once.
-
由 Alex Crichton 提交于
This commit moves the `collect_and_partition_translation_items` function into a query on `TyCtxt` instead of a free function in trans, allowing us to track dependencies and such of the function.
-
由 Alex Crichton 提交于
This commit moves the definition of the `ExportedSymbols` structure to the `rustc` crate and then creates a query that'll be used to construct the `ExportedSymbols` set. This in turn uses the reachablity query exposed in the previous commit.
-
由 Alex Crichton 提交于
Turns out this was already set up as a query, just wasn't using it yet!
-
由 Alex Crichton 提交于
This commit refactors the the `partitioning::partition` function to operate with a `TyCtxt` instead of a `SharedCrateContext` in preparation for making it a query.
-
由 Alex Crichton 提交于
This commit refactors the `collect_crate_translation_items` function to only require the `TyCtxt` instead of a `SharedCrateContext` in preparation for query-ifying this portion of trans.
-
由 Alex Crichton 提交于
In these situations Cargo just prints out a warning about ignoring the flag anyway, so let `make` take care of jobs and whatnot instead of getting warnings printed.
-
- 17 9月, 2017 26 次提交
-
-
由 bors 提交于
Rollup of 17 pull requests - Successful merges: #44073, #44088, #44381, #44397, #44509, #44533, #44549, #44553, #44562, #44567, #44595, #44604, #44617, #44622, #44630, #44639, #44647 - Failed merges:
-
由 Tim Neumann 提交于
Ensure tcp test case passes when disconnected from network net::tcp::tests::connect_timeout_unroutable fails when the network is unreachable, like on a laptop disconnected from wifi. Check for this error and allow the test to pass. Closes #44645
-
由 Tim Neumann 提交于
stabilized needs_drop (fixes #41890) fixes #41890
-
由 Tim Neumann 提交于
compiletest: print the correct basename of the src dir See <https://github.com/laumann/compiletest-rs/issues/76>. Fixes #40712
-
由 Tim Neumann 提交于
Fix incorrect `into_inner` link in docs. Fixes https://github.com/rust-lang/rust/issues/42373.
-
由 Tim Neumann 提交于
ci: Upload/download from a new S3 bucket Moving buckets from us-east-1 to us-west-1 because us-west-1 is where rust-central-station itself runs and in general is where we have all our other buckets.
-
由 Tim Neumann 提交于
Update cargo submodule Just a routine update
-
由 Tim Neumann 提交于
stabilized compiler_fences (fixes #41091) I did not know what to proceed with "unstable-book" entry. The feature would no longer be unstable so I have deleted it. If it was the wrong call I'll revert it (unfortunately his case is not described in the CONTRIBUTING.md).
-
由 Tim Neumann 提交于
stabilized iterator_for_each (closes #42986) Also updated clippy and rls as these use the iterator_for_each I've made my first PR's today so most likely I've done something wrong. Sorry about that!
-
由 Tim Neumann 提交于
rustdoc: pretty-print Unevaluated expressions in types. Fixes #44555. r? @nikomatsakis
-
由 Tim Neumann 提交于
remove overzealous Box<ZeroSizeType> optimization
-
由 Tim Neumann 提交于
extend E0623 for earlybound and latebound for structs This fixes #44508 r? @nikomatsakis
-
由 Tim Neumann 提交于
Add Rustfmt r? @alexcrichton
-
由 Tim Neumann 提交于
Update compiler-builtins ~~I can't tell if this was ever used, but it's not used today.~~ See commits.
-
由 Tim Neumann 提交于
Codeblock color <img width="1440" alt="screen shot 2017-09-07 at 21 53 58" src="https://user-images.githubusercontent.com/3050060/30183045-4319108e-9419-11e7-98da-da54952cab37.png"> This screenshot has been generated from: ```rust /// foo /// /// ```compile_fail /// foo(); /// ``` /// /// ```ignore /// goo(); /// ``` /// /// ``` /// let x = 0; /// ``` pub fn bar() -> usize { 2 } ``` r? @QuietMisdreavus cc @rust-lang/docs
-
由 Tim Neumann 提交于
ci: introduce haiku x86_64 builder
-
由 Tim Neumann 提交于
Fix "new trace_macros doesn't work if there's an error during expansion" Fixes #43493
-
由 Tim Neumann 提交于
Implement `Arc`/`Rc` raw pointer conversions for `?Sized` * Add `T: ?Sized` bound to {`Arc`,`Rc`}::{`from_raw`,`into_raw`}
-
由 bors 提交于
ci: Disable rustc debug assertions on OSX This commit disables debug assertions for OSX in an effort to improve cycle time on OSX. It looks like #44610 didn't shave off quite as much time as desired so let's see how much this helps.
-
由 Trevor Merrifield 提交于
net::tcp::tests::connect_timeout_unroutable fails when the network is unreachable, like on a laptop disconnected from wifi. Check for this error and allow the test to pass. Closes #44645
-
由 bors 提交于
Rollup of 19 pull requests - Successful merges: #44273, #44356, #44395, #44531, #44537, #44542, #44560, #44567, #44574, #44577, #44586, #44589, #44590, #44593, #44598, #44606, #44609, #44616, #44631 - Failed merges:
-
由 Alex Crichton 提交于
This commit disables debug assertions for OSX in an effort to improve cycle time on OSX. It looks like #44610 didn't shave off quite as much time as desired so let's see how much this helps.
-
由 Alex Crichton 提交于
Make use of Travis's conditional jobs. Conditional jobs: https://docs.travis-ci.com/user/conditional-builds-stages-jobs/#Conditional-Jobs. Jobs not matching the condition will not be scheduled at all. This allows us to get rid of `$ALLOW_PR`/`$ALLOW_TRY`/`$SKIP_BUILD` in `.travis.yml`, and perfectly prevent spurious PR failures due to flaky macOS machines.
-
由 Alex Crichton 提交于
rustbuild: Fix test "test rustdoc" invocation Previously it would use the librustc output directory which would cause rustdoc to get entirely recompiled, whereas the intention is that it uses the already-compiled artifacts from building rustdoc itself, using the tool output directory
-
由 Alex Crichton 提交于
Mention that HashMap::new and HashSet::new do not allocate The docs for `HashMap::with_capacity` and `HashSet::with_capacity` already say that > If `capacity` is 0, the hash map/set will not allocate. However, the docs for `::new` do not say that the initial capacity is 0, and thus promise that a call to `::new` alone does not allocate. This PR fixes that.
-
由 Alex Crichton 提交于
rustbuild: Update `cmake` dependency Should help suppress some warnings from various repos as `cmake` in the newest version disables warnings by default.
-