# stage2: rework Value Payload layout · gitcafe/zig

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

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

Visibility: public

Requested revision: 3f7d9b5fc19e4081236b3b63aebbc80e1b17f5b5

Requested commit: 3f7d9b5fc19e4081236b3b63aebbc80e1b17f5b5

Commit: 3f7d9b5fc19e4081236b3b63aebbc80e1b17f5b5

Tree: a577bd97edf5d5da357d576c777861d443210aec

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: rework Value Payload layout

This is the same as the previous commit but for Value instead of Type.

Add `Value.castTag` and note that it is preferable to call than
`Value.cast`. This matches other abstractions in the codebase.

Added a convenience function `Value.Tag.create` which really cleans up
the callsites of creating `Value` objects.

`Value` tags can now share payload types. This is in preparation for
another improvement that I want to do.

```

## Parents

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

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