From d086a16f64d7cfd501cf8f1ebe5385c6afc23d3a Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 2 Feb 2026 10:52:14 +0000 Subject: [PATCH] Make atomic `variant_block_size` and `tag_size` in `TypeUnion` --- src/types.cpp | 24 ++++++++++++------------ 1 file 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 variants; + Slice 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 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 tag_size; + bool is_polymorphic; + bool is_poly_specialized; + UnionTypeKind kind; }; struct TypeProc {