diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2026-02-02 12:04:21 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-02 12:04:21 +0000 |
| commit | 80c948277455eb9deaf79ac910fdc8957038fb75 (patch) | |
| tree | d95cb469a8dab31c15ea61b0f378066f3b7597eb /src/types.cpp | |
| parent | 813b622dcc8ba6f7b330a310fc324fccb33a2264 (diff) | |
| parent | a936f3fb7d3f6e6abf5e2599b7043625a1a0c17b (diff) | |
Merge pull request #6217 from odin-lang/bill/threading-fixes-2026-02
Fix to frontend threading bugs
Diffstat (limited to 'src/types.cpp')
| -rw-r--r-- | src/types.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/types.cpp b/src/types.cpp index 9ecdf5cdd..0ecce1adc 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -4308,17 +4308,17 @@ gb_internal i64 *type_set_offsets_of(Slice<Entity *> const &fields, bool is_pack gb_internal bool type_set_offsets(Type *t) { t = base_type(t); if (t->kind == Type_Struct) { - if (t->Struct.are_offsets_being_processed.load()) { - return true; - } + // if (t->Struct.are_offsets_being_processed.load()) { + // return true; + // } MUTEX_GUARD(&t->Struct.offset_mutex); if (!t->Struct.are_offsets_set) { t->Struct.are_offsets_being_processed.store(true); t->Struct.offsets = type_set_offsets_of(t->Struct.fields, t->Struct.is_packed, t->Struct.is_raw_union, t->Struct.custom_min_field_align, t->Struct.custom_max_field_align); t->Struct.are_offsets_being_processed.store(false); t->Struct.are_offsets_set = true; - return true; } + return true; } else if (is_type_tuple(t)) { MUTEX_GUARD(&t->Tuple.mutex); if (!t->Tuple.are_offsets_set) { @@ -4326,8 +4326,8 @@ gb_internal bool type_set_offsets(Type *t) { t->Tuple.offsets = type_set_offsets_of(t->Tuple.variables, t->Tuple.is_packed, false, 1, 0); t->Tuple.are_offsets_being_processed.store(false); t->Tuple.are_offsets_set = true; - return true; } + return true; } else { GB_PANIC("Invalid type for setting offsets"); } |