mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-14 16:55:24 +00:00
Remove using in arrays; Remove _ non-exported struct fields
Start determining slow parts of the compiler
This commit is contained in:
@@ -950,7 +950,18 @@ bool is_type_valid_for_keys(Type *t) {
|
||||
|
||||
|
||||
bool is_type_indexable(Type *t) {
|
||||
return is_type_array(t) || is_type_slice(t) || is_type_vector(t) || is_type_string(t);
|
||||
Type *bt = base_type(t);
|
||||
switch (bt->kind) {
|
||||
case Type_Basic:
|
||||
return is_type_string(bt);
|
||||
case Type_Array:
|
||||
case Type_Slice:
|
||||
case Type_Vector:
|
||||
case Type_DynamicArray:
|
||||
case Type_Map:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool is_type_polymorphic_struct(Type *t) {
|
||||
|
||||
Reference in New Issue
Block a user