diff options
| author | bors <bors@rust-lang.org> | 2017-10-20 02:27:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-10-20 02:27:16 +0000 |
| commit | 354eb160e0753620104d021fc013cc595588d7ff (patch) | |
| tree | b1950288a3f5b435bf15a6d32280d82f843c9147 /src/libstd/sys/unix/stack_overflow.rs | |
| parent | a651106ad0c8395fcfbd62ef58de9e36376252e0 (diff) | |
| parent | 229bee3c38376b99d7d483e20fa97ec774e8a2bd (diff) | |
| download | rust-354eb160e0753620104d021fc013cc595588d7ff.tar.gz rust-354eb160e0753620104d021fc013cc595588d7ff.zip | |
Auto merge of #45312 - theotherjimmy:refactor-ensure, r=michaelwoerister
Refactor `ensure` and `try_get_with` There was a bit of code shared between `try_get_with` and `ensure`, after I added `ensure`. I refactored that shared code into a query-agnostic method called `read_node_index`. The new method `read_node_index` will attempt to find the node index (`DepNodeIndex`) of a query. When `read_node_index` finds the `DepNodeIndex`, it marks the current query as a reader of the node it's requesting the index of. This is used by `try_get_with` and `ensure` as it elides the unimportant (to them) details of if the query is invalidated by previous changed computation (Red) or new and if they had to mark the query green. For both `try_get_with` and `ensure`, they just need to know if they can lookup the results or have to reevaluate. @nikomatsakis this is the [refactor we discussed](https://github.com/rust-lang/rust/pull/45228#discussion_r144577392) in the comment thread of #45228
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
