mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-09 06:12:05 -04:00
Make is_type_lock_free follow what each target lowers without library calls, and reject atomics on types which are not lock-free
This commit is contained in:
1 parent
ad685e1144
commit
711f08a641
5 files changed
+90
-21
No files matched your search
@@ -6600,20 +6600,6 @@ gb_internal bool is_type_normal_pointer(Type *ptr, Type **elem) {
|
||||
return false;
|
||||
}
|
||||
|
||||
gb_internal bool is_type_valid_atomic_type(Type *elem) {
|
||||
elem = core_type(elem);
|
||||
if (is_type_internally_pointer_like(elem)) {
|
||||
return true;
|
||||
}
|
||||
if (elem->kind == Type_BitSet) {
|
||||
elem = bit_set_to_int(elem);
|
||||
}
|
||||
if (elem->kind != Type_Basic) {
|
||||
return false;
|
||||
}
|
||||
return (elem->Basic.flags & (BasicFlag_Boolean|BasicFlag_OrderedNumeric)) != 0;
|
||||
}
|
||||
|
||||
gb_internal bool check_identifier_exists(Scope *s, Ast *node, bool nested = false, Scope **out_scope = nullptr) {
|
||||
switch (node->kind) {
|
||||
case_ast_node(i, Ident, node);
|
||||
|
||||
Reference in new issue
Block a user