Commit ada0010
committed
compiler: move unions into InternPool
There are a couple concepts here worth understanding:
Key.UnionType - This type is available *before* resolving the union's
fields. The enum tag type, number of fields, and field names, field
types, and field alignments are not available with this.
InternPool.UnionType - This one can be obtained from the above type with
`InternPool.loadUnionType` which asserts that the union's enum tag type
has been resolved. This one has all the information available.
Additionally:
* ZIR: Turn an unused bit into `any_aligned_fields` flag to help
semantic analysis know whether a union has explicit alignment on any
fields (usually not).
* Sema: delete `resolveTypeRequiresComptime` which had the same type
signature and near-duplicate logic to `typeRequiresComptime`.
- Make opaque types not report comptime-only (this was inconsistent
between the two implementations of this function).
* Implement accepted proposal #12556 which is a breaking change.1 parent 6a54639 commit ada0010
File tree
27 files changed
+1396
-1358
lines changed- lib/std
- dwarf
- src
- arch
- aarch64
- arm
- wasm
- x86_64
- codegen
- c
- link
- test
- behavior
- cases/compile_errors
27 files changed
+1396
-1358
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | 72 | | |
77 | 73 | | |
78 | 74 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | 75 | | |
83 | 76 | | |
84 | 77 | | |
| |||
92 | 85 | | |
93 | 86 | | |
94 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
617 | | - | |
| 617 | + | |
618 | 618 | | |
619 | | - | |
| 619 | + | |
620 | 620 | | |
621 | 621 | | |
622 | 622 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4696 | 4696 | | |
4697 | 4697 | | |
4698 | 4698 | | |
| 4699 | + | |
4699 | 4700 | | |
4700 | 4701 | | |
4701 | 4702 | | |
| |||
4733 | 4734 | | |
4734 | 4735 | | |
4735 | 4736 | | |
| 4737 | + | |
4736 | 4738 | | |
4737 | 4739 | | |
4738 | 4740 | | |
| |||
4783 | 4785 | | |
4784 | 4786 | | |
4785 | 4787 | | |
| 4788 | + | |
4786 | 4789 | | |
4787 | 4790 | | |
4788 | 4791 | | |
| |||
11754 | 11757 | | |
11755 | 11758 | | |
11756 | 11759 | | |
| 11760 | + | |
11757 | 11761 | | |
11758 | 11762 | | |
11759 | 11763 | | |
| |||
11790 | 11794 | | |
11791 | 11795 | | |
11792 | 11796 | | |
| 11797 | + | |
11793 | 11798 | | |
11794 | 11799 | | |
11795 | 11800 | | |
| |||
0 commit comments