about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorJimmy Brisson <theotherjimmy@gmail.com>2017-10-15 14:25:53 -0500
committerJimmy Brisson <theotherjimmy@gmail.com>2017-10-15 14:36:07 -0500
commit549f8553dc487359b066c6857f7e4996e832d033 (patch)
tree3f1ced7adc2e6a43c772ad0c2ffc36e92a929cc5 /src/libstd/sys/unix/stack_overflow.rs
parent2689fd2402590961dae32f35369a8685c89022fb (diff)
downloadrust-549f8553dc487359b066c6857f7e4996e832d033.tar.gz
rust-549f8553dc487359b066c6857f7e4996e832d033.zip
Refactor `ensure` and `try_get_with` into `read_node_index`
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.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions