diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2026-02-02 10:52:14 +0000 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2026-02-02 10:52:14 +0000 |
| commit | d086a16f64d7cfd501cf8f1ebe5385c6afc23d3a (patch) | |
| tree | 0be6f792602b8e64f810e7ecd11affba01cdfd32 /src | |
| parent | cb50725b866ef7020f9bd82a1c39d4d8f7158e97 (diff) | |
Make atomic `variant_block_size` and `tag_size` in `TypeUnion`
Diffstat (limited to 'src')
| -rw-r--r-- | src/types.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/types.cpp b/src/types.cpp index a7f2bfda2..9ecdf5cdd 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -170,21 +170,21 @@ struct TypeStruct { }; struct TypeUnion { - Slice<Type *> variants; + Slice<Type *> variants; - Ast * node; - Scope * scope; + Ast * node; + Scope * scope; - i64 variant_block_size; - i64 custom_align; - Type * polymorphic_params; // Type_Tuple - Type * polymorphic_parent; - Wait_Signal polymorphic_wait_signal; + std::atomic<i64> variant_block_size; + i64 custom_align; + Type * polymorphic_params; // Type_Tuple + Type * polymorphic_parent; + Wait_Signal polymorphic_wait_signal; - i16 tag_size; - bool is_polymorphic; - bool is_poly_specialized; - UnionTypeKind kind; + std::atomic<i16> tag_size; + bool is_polymorphic; + bool is_poly_specialized; + UnionTypeKind kind; }; struct TypeProc { |