diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-09-10 21:00:43 +0100 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2025-09-10 21:00:43 +0100 |
| commit | 549edcc0f90d632587c427e5d4189721323bd4a8 (patch) | |
| tree | fa683b18b3a392ce2b3ec881c1c940c9e972c2af /src/llvm_backend_expr.cpp | |
| parent | 34e3d3078057fdf22c2f91847096e0a3e098fa82 (diff) | |
Use a `RwMutex` instead of `BlockingMutex`
Diffstat (limited to 'src/llvm_backend_expr.cpp')
| -rw-r--r-- | src/llvm_backend_expr.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/llvm_backend_expr.cpp b/src/llvm_backend_expr.cpp index ebc3ec158..cff91813e 100644 --- a/src/llvm_backend_expr.cpp +++ b/src/llvm_backend_expr.cpp @@ -2563,10 +2563,11 @@ gb_internal lbValue lb_emit_conv(lbProcedure *p, lbValue value, Type *t) { Type *dt = t; + TEMPORARY_ALLOCATOR_GUARD(); + GB_ASSERT(is_type_struct(st) || is_type_raw_union(st)); Selection sel = {}; - sel.index.allocator = heap_allocator(); - defer (array_free(&sel.index)); + sel.index.allocator = temporary_allocator(); if (lookup_subtype_polymorphic_selection(t, src_type, &sel)) { if (sel.entity == nullptr) { GB_PANIC("invalid subtype cast %s -> ", type_to_string(src_type), type_to_string(t)); |