Commit fc33745
authored
[analysis] Let Flat lattice take multiple types (#8052)
Previously, one could approximate a Flat lattice whose elements could
have multiple types by creating a Flat lattice of a variant type.
However, this would produce elements that were variants of variants,
wasting space on an extra discriminant. To make this use case more
efficient and ergonomic, support taking multiple type parameters in
Flat. The multiple type parameters all become part of the element
variant type. To handle the case where types are repeated, also add
element accessors templatized on the type index.1 parent 89688ba commit fc33745
2 files changed
+73
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | | - | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
41 | | - | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
45 | | - | |
46 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
47 | 52 | | |
48 | 53 | | |
49 | | - | |
| 54 | + | |
50 | 55 | | |
51 | 56 | | |
52 | | - | |
53 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
54 | 69 | | |
55 | | - | |
56 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
57 | 80 | | |
58 | 81 | | |
59 | 82 | | |
| |||
62 | 85 | | |
63 | 86 | | |
64 | 87 | | |
65 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
66 | 91 | | |
67 | 92 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 93 | + | |
75 | 94 | | |
76 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
77 | 103 | | |
78 | 104 | | |
79 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
351 | 367 | | |
352 | 368 | | |
353 | 369 | | |
| |||
711 | 727 | | |
712 | 728 | | |
713 | 729 | | |
714 | | - | |
715 | | - | |
716 | | - | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
717 | 733 | | |
718 | 734 | | |
719 | 735 | | |
720 | 736 | | |
721 | 737 | | |
722 | 738 | | |
723 | 739 | | |
724 | | - | |
725 | | - | |
726 | | - | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
727 | 743 | | |
728 | 744 | | |
729 | 745 | | |
| |||
815 | 831 | | |
816 | 832 | | |
817 | 833 | | |
818 | | - | |
819 | | - | |
820 | | - | |
821 | | - | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
822 | 838 | | |
823 | 839 | | |
824 | 840 | | |
| |||
0 commit comments