1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
<!DOCTYPE html>
<!--
Preview this file as rendered HTML from the github source at:
https://htmlpreview.github.io/?https://github.com/rust-lang/rust/blob/master/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.async/async.i-%7Bclosure%230%7D.-------.InstrumentCoverage.0.html
For revisions in Pull Requests (PR):
* Replace "rust-lang" with the github PR author
* Replace "master" with the PR branch name
-->
<html>
<head>
<title>async.i-{closure#0} - Coverage Spans</title>
<style>
.line {
counter-increment: line;
}
.line:before {
content: counter(line) ": ";
font-family: Menlo, Monaco, monospace;
font-style: italic;
width: 3.8em;
display: inline-block;
text-align: right;
filter: opacity(50%);
-webkit-user-select: none;
}
.code {
color: #dddddd;
background-color: #222222;
font-family: Menlo, Monaco, monospace;
line-height: 1.4em;
border-bottom: 2px solid #222222;
white-space: pre;
display: inline-block;
}
.odd {
background-color: #55bbff;
color: #223311;
}
.even {
background-color: #ee7756;
color: #551133;
}
.code {
--index: calc(var(--layer) - 1);
padding-top: calc(var(--index) * 0.15em);
filter:
hue-rotate(calc(var(--index) * 25deg))
saturate(calc(100% - (var(--index) * 2%)))
brightness(calc(100% - (var(--index) * 1.5%)));
}
.annotation {
color: #4444ff;
font-family: monospace;
font-style: italic;
display: none;
-webkit-user-select: none;
}
body:active .annotation {
/* requires holding mouse down anywhere on the page */
display: inline-block;
}
span:hover .annotation {
/* requires hover over a span ONLY on its first line */
display: inline-block;
}
</style>
</head>
<body>
<div class="code" style="counter-reset: line 37"><span class="line"> <span><span class="code even" style="--layer: 1" title="42:11-42:12: @0[3]: FakeRead(ForMatchedPlace, _3)"><span class="annotation">@0,3,4⦊</span>{ // line coverage is 1, but there are 2 regions:</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="42:11-42:12: @0[3]: FakeRead(ForMatchedPlace, _3)"> // (a) the function signature, counted when the function is called; and</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="42:11-42:12: @0[3]: FakeRead(ForMatchedPlace, _3)"> // (b) the open brace for the function body, counted once when the body is</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="42:11-42:12: @0[3]: FakeRead(ForMatchedPlace, _3)"> // executed asynchronously.</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="42:11-42:12: @0[3]: FakeRead(ForMatchedPlace, _3)"> match x<span class="annotation">⦉@0,3,4</span></span></span><span class="code" style="--layer: 0"> {</span></span>
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code odd" style="--layer: 1" title="43:9-43:10: @17[3]: _4 = _3"><span class="annotation">@17,19⦊</span>y<span class="annotation">⦉@17,19</span></span></span><span class="code" style="--layer: 0"> if </span><span><span class="code even" style="--layer: 1" title="43:16-43:17: @3[6]: _9 = _3
43:14-43:18: @3.Call: _8 = c(move _9) -> [return: bb4, unwind: bb82]
43:14-43:18: @4[1]: FakeRead(ForMatchedPlace, _8)"><span class="annotation">@0,3,4⦊</span>c(x)<span class="annotation">⦉@0,3,4</span></span></span><span class="code" style="--layer: 0">.await == </span><span><span class="code odd" style="--layer: 1" title="43:28-43:29: @15[3]: _26 = (*_5)
43:28-43:33: @15[4]: _25 = Add(move _26, const 1_u8)"><span class="annotation">@10,13,15,16⦊</span>y + 1<span class="annotation">⦉@10,13,15,16</span></span></span><span class="code" style="--layer: 0"> => { </span><span><span class="code even" style="--layer: 1" title="43:39-43:42: @17.Call: _28 = d() -> [return: bb19, unwind: bb75]
43:39-43:42: @19[0]: FakeRead(ForMatchedPlace, _28)"><span class="annotation">@17,19⦊</span>d()<span class="annotation">⦉@17,19</span></span></span><span class="code" style="--layer: 0">.await; }</span></span>
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code odd" style="--layer: 1" title="44:9-44:10: @46[3]: _43 = _3"><span class="annotation">@46⦊</span>y<span class="annotation">⦉@46</span></span></span><span class="code" style="--layer: 0"> if </span><span><span class="code even" style="--layer: 1" title="44:14-44:17: @32.Call: _47 = f() -> [return: bb33, unwind: bb68]
44:14-44:17: @33[0]: FakeRead(ForMatchedPlace, _47)"><span class="annotation">@1,32,33⦊</span>f()<span class="annotation">⦉@1,32,33</span></span></span><span class="code" style="--layer: 0">.await == </span><span><span class="code odd" style="--layer: 1" title="44:27-44:28: @44[3]: _63 = (*_44)
44:27-44:32: @44[4]: _62 = Add(move _63, const 1_u8)"><span class="annotation">@39,42,44,45⦊</span>y + 1<span class="annotation">⦉@39,42,44,45</span></span></span><span class="code" style="--layer: 0"> => </span><span><span class="code even" style="--layer: 1" title="44:36-44:38: @46[4]: _0 = ()"><span class="annotation">@46⦊</span>()<span class="annotation">⦉@46</span></span></span><span class="code" style="--layer: 0">,</span></span>
<span class="line"><span class="code" style="--layer: 0"> _ => </span><span><span class="code odd" style="--layer: 1" title="45:14-45:16: @2[0]: _0 = ()"><span class="annotation">@2⦊</span>()<span class="annotation">⦉@2</span></span></span><span class="code" style="--layer: 0">,</span></span>
<span class="line"><span class="code" style="--layer: 0"> }</span></span>
<span class="line"><span class="code" style="--layer: 0">}</span><span><span class="code even" style="--layer: 1" title="47:2-47:2: @49.Return: return"><span class="annotation">@48,49⦊</span>‸<span class="annotation">⦉@48,49</span></span></span></span></div>
</body>
</html>
|