0

coverage: Simplify building coverage expressions based on sums by Zalathar · Pul...

 5 months ago
source link: https://github.com/rust-lang/rust/pull/117651
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Conversation

Contributor

This is a combination of some interlinked changes to the code that creates coverage counters/expressions for nodes and edges in the coverage graph:

  • Some preparatory cleanups in MakeBcbCounters::make_branch_counters
  • Use BcbCounter (instead of CovTerm) when building coverage expressions
    • This makes it easier to introduce a fold for building sums
  • Simplify the creation of coverage expressions based on sums, by having Iterator::fold do much of the work
  • Get rid of the awkward BcbBranch enum, and replace it with graph edges represented as (from_bcb, to_bcb)
    • This further simplifies the body of the fold

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK