diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-11-13 08:35:52 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-12-13 08:36:25 +1100 |
| commit | a8207b195840fc664ffc4a9c033cd3ee0746ea2e (patch) | |
| tree | 4ca27332618afe412333ad644543a4f5f347da5a /src/test/debuginfo/enum-thinlto.rs | |
| parent | e9469a6aec2f49fa1e2ae670649f293866932253 (diff) | |
| download | rust-a8207b195840fc664ffc4a9c033cd3ee0746ea2e.tar.gz rust-a8207b195840fc664ffc4a9c033cd3ee0746ea2e.zip | |
Remove `NodeState::{Waiting,Done}`.
`NodeState` has two states, `Success` and `Done`, that are only used within `ObligationForest` methods. This commit removes them, and renames the existing `Waiting` state as `Success`. We are left with three states: `Pending`, `Success`, and `Error`. `Success` is augmented with a new `WaitingState`, which indicates when (if ever) it was last waiting on one or more `Pending` nodes. This notion of "when" requires adding a "process generation" to `ObligationForest`; it is incremented on each call to `process_obligtions`. This commit is a performance win. - Most of the benefit comes from `mark_as_waiting` (which the commit renames as `mark_still_waiting_nodes`). This function used to do two things: (a) change all `Waiting` nodes to `Success`, and (b) mark all nodes that depend on a pending node as `Waiting`. In practice, many nodes went from `Waiting` to `Success` and then immediately back to `Waiting`. The use of generations lets us skip step (a). - A smaller benefit comes from not having to change nodes to the `Done` state in `process_cycles`.
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions
