# stage2: fixups for topolarity-comptime-memory-reinterp branch · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/2f92d1a0264b6827cb67a55726c4c9a082337508)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 2f92d1a0264b6827cb67a55726c4c9a082337508

Requested commit: 2f92d1a0264b6827cb67a55726c4c9a082337508

Commit: 2f92d1a0264b6827cb67a55726c4c9a082337508

Tree: d6691a25a828b44cb4c17365fb8549d339046810

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: fixups for topolarity-comptime-memory-reinterp branch

 * don't store `has_well_defined_layout` in memory.
 * remove struct `hasWellDefinedLayout` logic. it's just
   `layout != .Auto`. This means we only need one implementation, in
   Type.
 * fix some of the cases being wrong in `hasWellDefinedLayout`, such as
   optional pointers.
 * move `tag_ty_inferred` field into a position that makes it more
   obvious how the struct layout will be done. Also we don't have a
   compiler that intelligently moves fields around so this layout is
   better.
 * Sema: don't `resolveTypeLayout` in `zirCoerceResultPtr` unless
   necessary.
 * Rename `ComptimePtrLoadKit` `target` field to `pointee` to avoid
   confusion with `target`.

```

## Parents

- [50a1ca24ca2a4311097132d660b8244f252da82f](https://git.cafe/gitcafe/zig/commit/50a1ca24ca2a4311097132d660b8244f252da82f?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/2f92d1a0264b6827cb67a55726c4c9a082337508?format=markdown)
