diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-10-14 17:44:46 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-10-14 17:44:46 -0700 |
| commit | 8b882747813878a40b63572636a6e86a59a8581e (patch) | |
| tree | 82bb715d9575a81c7b06d1ff205ee43585a47de1 /src/codegen.zig | |
| parent | ed5a5e22936e5d90b6c9d255b17076f0db45c040 (diff) | |
| download | zig-8b882747813878a40b63572636a6e86a59a8581e.tar.gz zig-8b882747813878a40b63572636a6e86a59a8581e.zip | |
stage2: improved union support
* `Module.Union.getFullyQualifiedName` returns a sentinel-terminated
slice so that backends that need null-termination do not need an
additional copy.
* Module.Union: implement a `getLayout` function which returns
information about ABI size and alignment so that the LLVM backend can
properly lower union types into llvm types.
* Sema: `resolveType` now returns `error.GenericPoison` rather than a
Type with tag `generic_poison`. Callsites that want to allow that
need to bypass this higher-level function.
* Sema: implement coercion of enums and enum literals to unions.
* Sema: fix comptime mutation of pointers to unions
* LLVM backend: fully implement proper lowering of union types and
values according to the union layout, and update the handling of AIR
instructions that deal with unions to support union layouts.
* LLVM backend: handle `decl_ref_mut`
- Maybe this should be unreachable since comptime vars should be
changed to be non-mutable when they go out of scope, but it's
harmless for the LLVM backend to support lowering the value.
* Type: fix `requiresComptime` for optionals, pointers, and some other
types. This function is still wrong for structs, unions, and enums.
Diffstat (limited to 'src/codegen.zig')
0 files changed, 0 insertions, 0 deletions
