mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Add #simd[N]rawptr support
This commit is contained in:
+1
-1
@@ -3171,7 +3171,7 @@ gb_internal void check_array_type_internal(CheckerContext *ctx, Ast *e, Type **t
|
|||||||
} else if (name == "simd") {
|
} else if (name == "simd") {
|
||||||
if (!is_type_valid_vector_elem(elem) && !is_type_polymorphic(elem)) {
|
if (!is_type_valid_vector_elem(elem) && !is_type_polymorphic(elem)) {
|
||||||
gbString str = type_to_string(elem);
|
gbString str = type_to_string(elem);
|
||||||
error(at->elem, "Invalid element type for #simd, expected an integer, float, or boolean with no specific endianness, got '%s'", str);
|
error(at->elem, "Invalid element type for #simd, expected an integer, float, boolean, or 'rawptr' with no specific endianness, got '%s'", str);
|
||||||
gb_string_free(str);
|
gb_string_free(str);
|
||||||
*type = alloc_type_array(elem, count, generic_type);
|
*type = alloc_type_array(elem, count, generic_type);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -2091,6 +2091,9 @@ gb_internal bool is_type_valid_vector_elem(Type *t) {
|
|||||||
if (is_type_boolean(t)) {
|
if (is_type_boolean(t)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (t->Basic.kind == Basic_rawptr) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user